[MECH] TrainYourLung v1.0 - Add some realism to diving [1337]

Discussion in 'Inactive/Unsupported Plugins' started by Sixael, Apr 13, 2011.

  1. Offline

    Sixael

    TrainYourLung - Leveling system for diving.
    Version: 1.0 - Download in attachment (external below description)

    This plugin is made for people who like to play and host their server the "non-cheaty" but more favorable way than vanilla.

    Description/Features:
    So what does it do?
    It adds a leveling-mechanism to diving, so whenever you go out of bubbles under water the so called "LungPower" gives the player a boost of air. The amount of air the player gets depends on how often he uses it. Every time you use some of your LungPower it has to recover (by not being under water, 1 second equals 1 recovered point). While recovering you gain for every LungPower point an experience point. When the experience-points reach a certain value you gain one more point to your max. LungPower. One point equals 0.05 sec more time to dive. The higher the max. LungPower, the longer it takes to gain a level up.
    <Edit by Moderator: Redacted mediafire url>

    Commands:

    Show Spoiler
    /lungstats
    shows the person using the command how much LungPower is remaining, his current EXP and the EXP needed to level up.

    /reminder <value>
    sets the plugin to inform you every multiple of the value. value of 1 equals 1 second.

    /maxlungair <playername> <value> or /mla <playername> <value>
    changes the maximum lungair of the player to the value. value of 1 equals 0.05 seconds.

    /remaininglungair <playername> <value> or /rla <playername> <value>
    changes the remaining lungair of the player to the value. value of 1 equals 0.05 seconds.
    /rates
    shows the current plugin rates.
    /pointsperlevelup <value>
    changes the points per levelup. value of 1 equals 0.05 seconds.

    /regenerationrate <value>
    changes regeneration rate of your lungair (faster regeneration rate = faster leveling). value of 1 equals 1 ms.




    Permissions:

    Show Spoiler
    "trainyourlung.lungpower" to have access to the plugin itself.
    "trainyourlung.command.maxlungair" access to maxlungair command.
    "trainyourlung.command.remaininglungair" access to remaininglungair command.
    "trainyourlung.command.pointsperlevelup" access to poinstperlevelup command.
    "trainyourlung.command.regenerationrate" access to regenerationrate command.



    Changelog:

    Show Spoiler
    v.1.0: fixed a lot of stuff, updated to newest bukkit version.
    v.0.1.5c: plugin config is being saved every time the commands are used.
    v.0.1.5b: fixed plugin saving function.
    v.0.1.5: added configurable plugin rates (points per levelup and regeneration rate for now).
    v.0.1.4a: refactoring, added new commands (maxlungair and remininglungair) and permissions for them.
    v.0.1.4: fixed reload commands breaking the plugin and improved the code.
    - known bug: plugin not working right if dove to long (unsure if fixed in 0.1.4a).
    v.0.1.3f: fixed the problem on player quit (hopefully)
    - known bug: reloading the plugin breaks it. (fixed)
    v.0.1.3e: readded permissions.
    v.0.1.3d: fixed and changed saving function, hopefully fixed nullpointer problem.
    v.0.1.3c: fixed remaining air resetting when dying in water.
    - known bug: nullpointer problem still occurs. (fixed)
    v.0.1.3b: fixed reminder, hopefully fixed the use of permissions causing a nullpointer exception.
    v.0.1.3: added Permissions support (requested by dak393)
    - known bug: reminder acting weird sometimes, atm looking into it...
    v.0.1.2: removed the 'unknown command' output and added a configurable reminder (requested by kleril)
    v.0.1.1b: removed the "300" console output.
    v.0.1.1: some refactoring and bugfixing here and there.
    v0.1: release.


    Download:
     

    Attached Files:

    Last edited by a moderator: Dec 14, 2016
    Aaron_Merric likes this.
  2. Offline

    Sixael

    Darn I don't get it, just can't reproduce the error on my server. :/
    Does the error occur even if you are the only one on the server?
    But good to know that it's not caused by my Permissions checks...

    Edit: Working on a workaround, will up it in about 20 minutes.
     
    Simanova likes this.
  3. Offline

    Simanova

    Greetings Sixael,

    Ive just tested 0.13c on my server ( bukkit build 678 ) and i got the same effect as yesterday.
    Iam not using permissions ( no need for this crap )
    Ive tryed this plugin sandboxed with only 1 person connected.

    /lungstats is showing the same values every time i call it
    There is no progress in training characters lung

    I dived about 15min
     
  4. Offline

    Sixael

    Does it show you the "Remaining LungPower: XY" after you run out of bubbles?
    And is it counting down?
     
  5. Offline

    Simanova

    No ... nothings like that.

    Its like the plugin is dead
     
  6. Offline

    xZise

    I'm getting this error, when I reload the server.

    Fabian
     
  7. Offline

    Simanova

    Okay plugin is working now - this world needs an higher IQ
     
  8. Offline

    Sixael

    Which error?

    "Could not pass event PLAYER_MOVE to TrainYourLung" - this one?
    Which line does it occur?

    @Simanova: It just needs some better explanations. ;)

    Edit: The workaround will take longer than expected, bukkit is acting weird and returns false values...
     
  9. Offline

    xZise

    This error with version 0.1.3.

    Fabian
     
  10. Offline

    Sixael

    0.1.3d up again.
     
  11. Offline

    xZise

    You know that your dummy file is empty? Maybe this cause the problems? And please could you reintroduce permissions? I want to allow this feature only some players.

    Fabian
     
  12. Offline

    Sixael

    Yup, permission was just deleted to test if it's caused by it. ;)
    The dummy file isn't used, I just experienced some issues creating a new directory on some servers and so I put the folder together in the zip. :p
    Does the new 0.1.3d still cause an exception?
     
  13. Offline

    MrObject

    Could you add a new version number, I can't get a new version uploaded without a new version number. So maybe 1.3e?
     
  14. Offline

    xZise

    Okay it seems that version 0.1.3d works. Could you please reimplement Permissions?

    Fabian

    PS: Better would be 0.1.3e :p
     
  15. Offline

    Sixael

    0.1.3e is up. ;)
     
  16. Offline

    Nytemare3701

    On the subject of MCMMO integration: You could make this a 3rd party plugin that adds the "Diving" skill to the skill list. Looking at the MCMMO source, it shouldn't be too hard.
     
  17. Offline

    Sixael

    You mean like Permissions hooking the plugin to MCMMO when it's installed on the server?
    I haven't used MCMMO yet, would there be any difference as running it as an own plugin?
     
  18. Offline

    Nytemare3701

    Look at the other 3rd party plugins for MCMMO. You will probably find what you need there.
     
  19. Offline

    MrObject

    Within McMMO you can actually turn off any skills you don't want. So my advice would be to integrate this into McMMO, then for anyone who wants just this and not McMMO you'd just include the permission mcmmo.skills.diving and nothing else.

    McMMO now also has MySQL support as well as flat file, so it's a really progressive mod.
     
  20. works with 1-3 players, over 3 players -> starts to bring error in command. USeless shit!
     
  21. Offline

    Sixael

    Thanks for your nice comment, playing with 8 people on my server without a problem.
    You could just post the error you get here so I'll be able to fix it, but meh, probably you are to fucking stupid to do so.
     
  22. Offline

    MrObject

    Lol ziiiiiing!
    I'll have to agree with you gete Sixael. This is your post, and he comes in here to tell you that your plugin is useless. That would be like you walking into his house and telling him that he's a moron, and his house smells funny.

    If you think this plugin is shit, don't use it. Sixael volunteered his time to make this plugin, so if you have any issues with it, then maybe you should try to code it yourself.

    I'm a coder too, but I just don't have the time to code Bukkit mods.

    Btw Sixael, I still suggest that you take a look at the mcmmo code, and have a chat with Nossr.
     
  23. Offline

    Simanova

    Reminder ingame configuration with /reminder x seems to be broken

    Bukkit build 699 - MC 1.5_02
     
  24. Offline

    Sixael

    I'll update the plugin as soon as the official 1.5_x supported bukkit version is released.
     
  25. Offline

    xZise

    Hmm the reminder is for to 3 sec but it reminds me every x*3 seconds (x*3 secs remaining) and not 3 seconds after starting diving. Is this intended? And could you add a more often reminder if you have only some seconds left?

    Fabian
     
  26. Offline

    Sixael

    Like it says in the description, it reminds you every multiple of the value you choose. ;)
    Maybe I'll add a 3/2/1 seconds left counter, but on the other hand I don't want to spam the chat with the plugin.
     
  27. Offline

    Jaypee

    Sixael you could discuss with nossr50(the creater of Mcmmo) to integrate both plugins, would be awsome.

    And btw, great plugin.
     
  28. Offline

    xZise

    But for example you have a reminder of 5 secs and remaining air for 16 seconds. Then I thought it remind 5 seconds after the lung power starts (so you have 11 seconds left).

    Fabian
     
  29. Offline

    Sixael

    nope, it reminds you at every multiple of 5, = 5, 10, 15... ;)
     
  30. Offline

    Simanova

    Works fine under bukkit build #714 ( 0.13 e )
     
  31. Offline

    Fob_Upset

    Code:
    19:14:34 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'reminder' in plugin TrainYourLung v0.1.3e
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:677)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.NullPointerException
            at bukkit.Sixael.TrainYourLung.TrainYourLung.onCommand(TrainYourLung.java:192)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    19:14:58 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'reminder' in plugin TrainYourLung v0.1.3e
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:677)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.NullPointerException
            at bukkit.Sixael.TrainYourLung.TrainYourLung.onCommand(TrainYourLung.java:192)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    19:15:01 [INFO] jok3r09 lost connection: disconnect.quitting
    19:15:01 [INFO] Connection reset
    19:15:13 [INFO] Global[Vip][Vip]Connor548: sorry
    19:15:20 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'reminder' in plugin TrainYourLung v0.1.3e
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:255)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:677)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:640)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:634)
            at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.NullPointerException
            at bukkit.Sixael.TrainYourLung.TrainYourLung.onCommand(TrainYourLung.java:192)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    
    I get that in the console, when i type /reminder and in-game it says "An internal error occurred while attempting to use this command"
     

Share This Page