[MECH/ECON]Pathogen Player Lives v1.5 - 1up! Save your inventory! [BOSE+iConomy+Spout Support][1000]

Discussion in 'Inactive/Unsupported Plugins' started by Pathogen David, Apr 3, 2011.

  1. Offline

    Pathogen David

    I will no longer be updating the forum topic on a regular basis. Please watch the new BukkitDev page for updates!

    playerLives - Pathogen Player Lives [Download] [Source on BitBucket]
    Version: v1.5.0
    Like this plug-in? [Donate]

    Hey everyone! Sorry I got super inactive over the past 2.5 or so months! For some reason I stopped getting watch messages and did not realize how active the topic had gotten during my absence. I'm going to make more frequent releases, especially with the magic that is Spout renewing my interest in Bukkit.

    This plug-in adds lives to players. When you die a life is subtracted, but when you respawn you will still have your full inventory. If you had no lives, you stuff is dropped as normal where you died and you spawn with nothing.

    Features:
    • Players can keep stuff if they die.
    • Use iConomy or BOSEconomy to buy lives! (iConomy 4 AND iConomy 5 compatible)
    • Optional punishment for dying (Loose money in the economy.)
    • Infinite lives option
    • Optional Spout notifications
    • MySQL or Flatfile storage engine
    • PermissionsBukkit support
    • A great way to make your server creative and still have a challenge!
    [Download Pathogen Player Lives]
    [Source Code on BitBucket]

    Changelog:
    Version 1.5.0
    • Upgraded to Bukkit 1000!
    • New death handling! No more missed death events from /kill commands!
    • MySQL Support!
    • BOSEconomy Support!
    • (Optional) Basic Spout notification support!
    • Supports new PermissionsBukkit system! (Old school Permissions is still supported.)
    • More exclamation marks!
    Version 1.4.1 (Preview)
    • MySQL Support!
    • Permissions bug/nag fixes
    Version 1.4.0 (Preview)
    • iConomy 4 support (Auto detects 4 and 5!)
    • Support for MySQL underway! (Target: 1.4.1)
    • Support for alternate economies now easier to do. (However, currently no target for other economies.)
    • Major source code overhaul
    Version 1.3.0 (Preview)
    • iConomy 5 (iConomy 4 now broken)
    • Permissions!
    Version 1.2.0
    • Added infiniteLives option (Off by default)
    • Added verbose option (Off by default - no more console spam!)
    • Added player name resolution
    Version 1.1.1
    • Fixed bug with player's loosing lives on server restart
    Version 1.1.0
    • Added iConomy support
    • Added iConomy death punishment
    Version 1.0.0
    • Initial Release
    Todo:
    • iConomy support (To buy more lives)
    • Permissions support
    • MySQL/SQLite support
    • Reload command
    • Unlimited lives
    • Player auto-complete (and case-insensitivity)
    • Remove some debug spam (Add Verbose property)
    • Fix lag+no items bug (Can be fixed with disconnect and reconnect for now. Bug in Minecraft.)
    • Plugin activate/deactivate
    • Gold/Diamond/Other to buy lives
    • Investigate /kill command bug (Lose all lives or all drops)
    • Multiworld Support
    • Other plugin support: (Maybe)
      • Wars (Disable death in war zones)
      • Sign Shop Support (For now, SignCommands works.)
      • BOSEconomy
    Command Usage:
    • /lives [player]
      Display your or other's lives.
    • /buylives [count]
      Buy yourself some lives.
    • /givelives [player] [count]
      (Default op) Give lives to the specified person.
    • /takelives [player] [count]
      (Default op) Take lives to the specified person.
    • /setlives [player] [count]
      (Default op) Set the lives of a person explicitly.
    Configuration:
    • lifeCost (100.0): Price of a life for iConomy.
    • defaultLives (3): The number of lives new users start with.
    • minBalanceForPunishment (100.0): The minimum amount of money a player must have to be punished for dying. (Set to 0.0 to disable.)
    • deathPunishmentCost (0.0): The amount of iConomy money a player looses for dying. (Set to 0.0 to disable.)
    • verbose (false): If verbose is true, more detailed information will be outputted to the console for debugging purposes.
    • infiniteLives (false): If true, the lives database will be ignored for deaths. (Players will not loose lives and the system will treat them as if they had at least one.)
    • dbDriver ("flatfile"): Selects which database driver to use. (Currently: flatfile or mysql)
    • dbHost ("localhost"): The database server to connect to (if applicable.)
    • dbPort (3306): The port the database server is listening on (if applicable.)
    • dbUser ("root"): The database access username (if applicable.)
    • dbPassword (""): The database access password (if applicable.)
    • dbDatabase ("playerlives"): The database to use (if applicable.)
    • dbTable ("playerlives"): The table to use (if applicable. Included to allow multiple instances in one database.)
    Permissions:
    • playerlives.*: Enables all playerlives permissions (Maps to all permissions as true. PermissionsBukkit only!)
    • playerlives.canuse: Determines if the player can use player lives at all
    • playerlives.checkself: Determines if the player can check the number of lives they have
    • playerlives.buy: Determines if the player can buy lives with the economy.
    • playerlives.checkothers: Determines if the player can check other people's life count
    • playerlives.change: Determines if the player can change their or other's lives (This applies to set, add, and subtract.)
    Other notes:
    Currently, Flatfile only saves when the server is stopped (properly) or reloaded, so a crash can cause lives to go back to when the server started.

    Any comments or questions are highly appreciated!

    ~Pathogen-David
     
    KragTheDark likes this.
  2. Offline

    generalmek

    ? about u taking?
     
  3. Offline

    Danton1983

    Mine works only half way sometimes players with lives still drop items while other players with lives do not. I have pasted below my config and the error im seeing on the console.

    Config
    dbDatabase: playerlives
    lifeCost: 1000.0
    minBalanceForPunishment: 1000.0
    defaultLives: 5
    deathPunishmentCost: 100.0
    dbUser: root
    dbTable: playerlives
    infiniteLives: false
    dbDriver: flatfile
    dbHost: localhost
    dbPassword: ''
    dbdatabase: livesDb.properties
    verbose: false
    dbPort: 3306

    Error

    2011-08-09 06:02:22 [SEVERE] [pathogenPlayerLives] COULD NOT LOAD LIVES FLATFILE DATABASE!
    2011-08-09 06:02:22 [SEVERE] java.lang.NumberFormatException: For input string: ""
    2011-08-09 06:02:22 [SEVERE] at java.lang.NumberFormatException.forInputString(Unknown Source)
    2011-08-09 06:02:22 [SEVERE] at java.lang.Integer.parseInt(Unknown Source)
    2011-08-09 06:02:22 [SEVERE] at java.lang.Integer.parseInt(Unknown Source)
    2011-08-09 06:02:22 [SEVERE] at com.pathogenstudios.playerlives.PropertyHandler.getInt(PropertyHandler.java:151)
    2011-08-09 06:02:22 [SEVERE] at com.pathogenstudios.playerlives.dbWrappers.flatfile.load(flatfile.java:36)
    2011-08-09 06:02:22 [SEVERE] at com.pathogenstudios.playerlives.dbWrappers.flatfile.<init>(flatfile.java:20)
    2011-08-09 06:02:22 [SEVERE] at com.pathogenstudios.playerlives.playerLives.onEnable(playerLives.java:107)
    2011-08-09 06:02:22 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    2011-08-09 06:02:22 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
    2011-08-09 06:02:22 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
    2011-08-09 06:02:22 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
    2011-08-09 06:02:22 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
    2011-08-09 06:02:22 [SEVERE] at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
    2011-08-09 06:02:22 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
    2011-08-09 06:02:22 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
    2011-08-09 06:02:22 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
    2011-08-09 06:02:22 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  4. Offline

    dak393

    Well maybe seeing as this was last built in 798 and has not been updated since it probably has errors now if you could turn your attention to about 3 posts up you will see that I linked another offshoot of the original nodrop plugin to look at.
     
  5. Offline

    Pathogen David

    Holy crap! Apparently I stopped receiving watch updates, I thought the thread went to sleep.

    Super awesome update today! Check the main topic for details!

    Here are replies to all of you guys:

    @vejbuch @trollsama @cyborax @Ross Gosling @skyref @PAN32 @Asterdom @sfxworks @goldseed
    Pathogen PlayerLives has been updated to 1000!

    @OzRavenheart
    Newest version has BOSEconomy support!

    @hofec @Psychos @Ross Gosling @Croyd @Asterdom
    (Invisible inventory) It actually seems to be an issue with how Minecraft handles inventory updates. If the update reaches the user before they finish reloading, they get an invisible inventory. You can click and box in the inventory and everything appears. I have an idea on a work-around but I need to test it more first.

    @Danton1983
    Thank you very much!

    @Qlaras
    I'm going to start trying to get more frequent releases out at the expense of some testing (EG: I won't be testing iConomy 4 anymore) so just let me know if/when you find issues!

    --- On your second issue with the not working for non-ops. Make sure you didn't accidentially reject the playerlives.canuse permission for non-ops.

    @Joy
    That feature slipped my todo list. I'll add it in the next release (since it is pretty simple to do.)
    The magic bookcases I will probably include with my update to add things like Mushrooms = Lives and such.

    @TruffleDucks
    Sorry to hear that, the newest version should have sealed any possibility of lost items. But as with updating any plugin, make sure you backup your entire bukkit server if you can (at least player's inventories in the case of my plugin)

    @buckeT.de
    You have a super old version that had a scrap of debug code left in it. Update and it will be all good again.

    @winter4w
    Do you have iConomy 5? Back when you posted this you had to have the beta pathogenPlayerLives if I remember right. Simply update to the newest pathogenPlayerLives and see if it works now. When iConomy is linked, there should be a message in the server console "Successfully linked with iConomy 5" or "Successfully linked with iConomy 4". If you see "Failed to link with iConomy 4 and iConomy 5!" then something is really messed up with your iConomy install.

    --- I saw your post later with the log. You had iConomy 5, so I bet you had ppl 1.3.x Updating should fix this.

    --- Permissions should never cause a plugin to fail to find another plugin.

    @dak393
    Thanks for helping @winter4w when I was gone.

    @sagethor
    My sincerest apologies, I had not realized this thread kept moving on without me!

    @trollsama
    No, there was never a /back command. It would have conflicted with essentials anyway.

    @stargateanubis14
    Woah, that is really weird. The way the plugin (as well as Bukkit its self) handles death events and items has changed significantly. Can you reproduce this with the newest version? (1.5)

    @Torner92
    You can adjust it in the config files.

    @gameswereus
    Nope! I am back! I got tired of Minecraft and super crazy busy, its all good now though!

    @m0dulus
    The current behavior is that the player will drop their items as you would expect in minecraft.

    @TGU_Roboto
    You probably had build 1.3, updating should fix this. If not, let me know.

    @generalmek
    I believe I was going to do that at some point and forgot. Should not be hard so I'll probably squeeze it in the next release.

    @MrBorking
    If you didn't go with Scavenger, we're back!

    @Danton1983
    Hmmm, not sure. Can you update and see if it is all better now?

    ----------------

    Also, EVERYONE: You have @Rowtag to thank for this coming back to life sooner rather than later. If he hadn't messaged me I would not have noticed the thread having been so active without me.
     
  6. Offline

    dak393

    Cool glad you're back :) BTW it's "spout" not "sprout" and you sig needs an update :D
     
  7. Offline

    Ross Gosling

    @Pathogen David

    My players inventory doesn't seem to be restored until you disconnect and reconnect so could you fix this?

    And how do you turn notifacations on?
     
  8. Offline

    Pathogen David

    @dak393
    Dangit. I thought it was called Sprout the first time I read it and I still mistype it sometimes. Oops, lemme update that!

    @Ross Gosling
    I'm working on a way to fix that (it seems to have gotten worse with the new Bukkit, maybe it is faster or something so the packet gets out before the player loads.) In my testing the inventory reappeared if I opened my inventory and clicked on any slot.

    Notofications will turn on automatically if you have Spout and the client is running Spout. (Oh, and if you have Spout and the client lacks Spout, they will just not get any kind of message >.< Going to fix that tonight.)
     
  9. Offline

    dak393

    XD its ok seen a couple people mess it up don't know why :p
     
  10. Offline

    goldseed

    THANKS!!!

    the best inventory-saving plugin!!
     
  11. Offline

    Pathogen David

    @dak393
    Yeah, I guess my brain saw spout and saw the water spout logo and thought "Ah! The water falls on the mods and makes them sprout and grow!" or something like that.

    @goldseed
    You're welcome, and thanks!
     
  12. Offline

    Hanver

    n1 work we have a chance to german translate? i cant not open the class datei.
     
  13. Offline

    Pathogen David

    I was planning to add localization ability in an upcoming release. Right now you can grab my source off of Bit Bucket and change the strings manually if you are brave.
     
  14. Offline

    d00ba

    Nice plugin, kinda sucks that it only supports Permissionsbukkit seeing as hardly any plugins support Permissionsbukkit at the moment. Would be ideal if it supported both..

    EDIT: I misread.. it works fine with Permissions 2.7.4
     
  15. Offline

    emilhem

    I'm getting:
    Code:
    13:49:05 [INFO] [pathogenPlayerLives] Loading Pathogen playerLives...
    13:49:05 [INFO] [pathogenPlayerLives] Loading config...
    13:49:05 [INFO] [pathogenPlayerLives] Saving config...
    13:49:05 [SEVERE] [pathogenPlayerLives] Error initialzing MySQL.
    13:49:05 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'minecraft'@'localhost' to database 'playerlives'
    13:49:05 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    13:49:05 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    13:49:05 [SEVERE]       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    13:49:05 [SEVERE]       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    13:49:05 [SEVERE]       at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    13:49:05 [SEVERE]       at com.mysql.jdbc.Util.getInstance(Util.java:382)
    13:49:05 [SEVERE]       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
    13:49:05 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    13:49:05 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    13:49:05 [SEVERE]       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:931)
    13:49:05 [SEVERE]       at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4031)
    13:49:05 [SEVERE]       at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1296)
    13:49:05 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2338)
    13:49:05 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2371)
    13:49:05 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2163)
    13:49:05 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
    13:49:05 [SEVERE]       at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    13:49:05 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    13:49:05 [SEVERE]       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    13:49:05 [SEVERE]       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    13:49:05 [SEVERE]       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    13:49:05 [SEVERE]       at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    13:49:05 [SEVERE]       at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:378)
    13:49:05 [SEVERE]       at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
    13:49:05 [SEVERE]       at java.sql.DriverManager.getConnection(DriverManager.java:582)
    13:49:05 [SEVERE]       at java.sql.DriverManager.getConnection(DriverManager.java:185)
    13:49:05 [SEVERE]       at com.pathogenstudios.playerlives.dbWrappers.mySQL.<init>(mySQL.java:27)
    13:49:05 [SEVERE]       at com.pathogenstudios.playerlives.playerLives.onEnable(playerLives.java:76)
    13:49:05 [SEVERE]       at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    13:49:05 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:885)
    13:49:05 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
    13:49:05 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:178)
    13:49:05 [SEVERE]       at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:161)
    13:49:05 [SEVERE]       at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:286)
    13:49:05 [SEVERE]       at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:273)
    13:49:05 [SEVERE]       at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:149)
    13:49:05 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:337)
    13:49:05 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    13:49:05 [INFO] [pathogenPlayerLives] Done loading Pathogen playerLives.
    13:49:05 [INFO] [pathogenPlayerLives] Successfully linked with iConomy 5
    13:49:05 [INFO] [pathogenPlayerLives] Successfully linked with Permissions
    
    
    It means that the addon hasn't added the table and it's configurations. You have to supply us a database file to make the table or make the addon create it for us.
     
  16. Offline

    Pathogen David

    @d00ba
    Thanks! Classic permissions should work fine, if you have issues with it, let me know.

    @emilhem
    Read your error "13:49:05 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'minecraft'@'localhost' to database 'playerlives'"

    You need to configure PlayerLives to point to a valid MySQL server with a valid user account on that server. Any database will do. As it is a bad practice, PlayerLives will not create the database for you (but it will create the table.)

    If you're still confused, let me know if you have access to a phpMyAdmin panel or a MySQL command line and I can help you out in more detail.
     
  17. Offline

    d00ba

    After some testing I've got this running on my live server with Permissions 2.7.4 and MYSQL. Thanks!
     
  18. Offline

    emilhem

    My bad. I read the config file one more time and saw that the database was playerlives while it should have been minecraft.
     
  19. Offline

    Pathogen David

    @d00ba
    Awesome!

    @emilhem
    No problem, glad you got it working!
     
  20. Offline

    Brazzled

    Is there a way to disable it, if killed by another player. Eg, if killed in a PvE battle, you keep your items, but if killed in a PvP battle your items are dropped?
     
  21. Offline

    Pathogen David

    Hmm, that's a good idea. Not in it yet. You should add it to the tracker on the BukkitDev page.
     
  22. Offline

    Croyd

    I use McMyAdmin to manage my server and under the list of plugins in it the latest player lives that I download from the link for 1.5.0 list it as 1.4.1

    Is it just reading a reference file in the jar that isn't updated or is the link still pointed to 1.4.1?

    Great plugin and its great to see you haven't abandoned it.
     
  23. Offline

    Pathogen David

    Yeah, that was simply my mistake. If you have the most recent download, then it should be 1.5.0. I forgot to update the plugin.yml.
     
  24. Offline

    Maine

    Found 2 possible bugs - infinite lives does not work if the user has no lives. It only checks that they have 1 or more lives left, and fails to suppress dropping the items regardless of the infinite lives setting.

    This might not be a bug by your design (i.e, a player with no lives doesn't get infinite lives), but my players are also not getting any starting lives - this appears to be an issue with loading the plugin for the first time while players are on the server (they must re-log).

    Finally, the player lives db only gets saved on close, which can be an issue for flat file mode if the server crashes.
     
  25. Offline

    Pathogen David

    I'll look into the first one. I was aware of the other two, but I've been procrastinating on fixing either of them. Mind adding all three of those to the BukkitDev tracker?:)
     
  26. Need an option to translate notifications ! :D
     
  27. Offline

    Pathogen David

    It is in the todo list ;)
     
  28. Offline

    Evilhaunting

    Can you make it so that they don't respawn and there health bar just gets renewed
     
  29. Offline

    AHgpeu

    Code:
    2011-10-01 04:02:34 [INFO] [pathogenPlayerLives] Unloading Pathogen playerLives.
    ..
    2011-10-01 04:02:34 [SEVERE] Error occurred while disabling playerLives v1.5.1.1
     (Is it up to date?): null
    java.lang.NullPointerException
            at com.pathogenstudios.playerlives.dbWrappers.flatfile.close(flatfile.ja
    va:96)
            at com.pathogenstudios.playerlives.playerLives.onDisable(playerLives.jav
    a:104)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:128)
            at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoade
    r.java:941)
            at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManag
    er.java:294)
            at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginMana
    ger.java:287)
            at org.bukkit.craftbukkit.CraftServer.disablePlugins(CraftServer.java:16
    8)
            at net.minecraft.server.MinecraftServer.stop(MinecraftServer.java:325)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:404)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  30. Offline

    Pathogen David

    @Evilhaunting
    Why not just use a godmode plugin?

    @AHgpeu
    That is a bug introduced when I added auto-saving to flatfile databases. Either enable auto-saving (You should anyway...) or wait for the next release.
     
  31. Offline

    Evilhaunting

     

Share This Page