Filled ScubaHelmet

Discussion in 'Plugin Requests' started by proof2006, Jan 10, 2015.

Thread Status:
Not open for further replies.
  1. What I want:
    A plugin that lets you breathe longer under water while wearing the Leather Cap and also configurable in seconds in the config.yml.
    One example would be if you put the Leather Cap on your head (not in inventory) it activates the Potion of Water Breathing effect for X seconds as soon as you go under water. Going back up to the surface removes the effect. If that is too advanced it could just activate the effect as soon as you put it on your head.

    I've searched and tried a few similar plugins but they're not updated since 2012 and you can't configure the time limit for the effect.

    Ideas for commands:
    /scubahelmet reload - reload the configuration file.

    Ideas for config.yml:
    duration: <number in seconds> - the duration in seconds in which the effect is active.

    Ideas for permissions:
    None. Should activate for any player who has a Leather Cap on their head while going under water.

    When I'd like it by:
    As soon as possible.
     
  2. Offline

    BlazingBroGamer

    @proof2006
    Hmm.. I might try this
    EDIT: Its simple, so I will do this.

    Finished!
    Download here! I am sleepy so I will post it on the bukkit dev tomorrow. Btw, added permission for scubahelmet reload. It is scubahelmet.reload
     
    Last edited: Jan 10, 2015
    proof2006 likes this.
  3. Wow, just wow! Works exactly as I was hoping, thank you so much @BlazingBroGamer ! :D
     
    Last edited: Jan 10, 2015
  4. Offline

    XvXRainbowzZ3D

  5. Aye, I was about to but I was testing the plugin a bit and I get these errors in the console. I actually didn't even have the helmet equipped and it still gives these errors. Running on 1.7.10-R0.1. Any fix @BlazingBroGamer ?

    Show Spoiler

    10.01 19:56:49 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_55]
    10.01 19:56:49 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_55]
    10.01 19:56:49 [Server] INFO at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) ~[?:?]
    10.01 19:56:49 [Server] INFO at me.BlazingBroGamer.ScubaHelmet.Main.onPlayerMove(Main.java:51) ~[?:?]
    10.01 19:56:49 [Server] INFO Caused by: java.lang.NullPointerException
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:258) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.PacketPlayInPositionLook.handle(SourceFile:20) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.PacketPlayInFlying.a(SourceFile:137) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:236) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO org.bukkit.event.EventException
    10.01 19:56:49 [Server] ERROR Could not pass event PlayerMoveEvent to ScubaHelmet v1.0
    10.01 19:56:49 [Server] INFO ... 13 more
    10.01 19:56:49 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_55] 10.01 19:56:49 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_55]
    10.01 19:56:49 [Server] INFO at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) ~[?:?] 10.01 19:56:49 [Server] INFO at me.BlazingBroGamer.ScubaHelmet.Main.onPlayerMove(Main.java:51) ~[?:?]
    10.01 19:56:49 [Server] INFO Caused by: java.lang.NullPointerException
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.ThreadServerApplication.run(SourceFile:628) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.DedicatedServer.v(DedicatedServer.java:258) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.ServerConnection.c(SourceFile:134) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.NetworkManager.a(NetworkManager.java:157) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.PacketPlayInPositionLook.handle(SourceFile:20) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.PacketPlayInFlying.a(SourceFile:137) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at net.minecraft.server.v1_7_R4.PlayerConnection.a(PlayerConnection.java:236) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit-dev.jar:git-Bukkit-1.7.9-R0.2-24-g07d4558-b3116jnks]
    10.01 19:56:49 [Server] INFO org.bukkit.event.EventException
    10.01 19:56:49 [Server] ERROR Could not pass event PlayerMoveEvent to ScubaHelmet v1.0
    10.01 19:56:49 [Server] INFO ... 13 more 10.01 19:56:49 [Server] INFO at
     
  6. Offline

    Plasticable

    @BlazingBroGamer
    I heard that it is very heavy for server.
    I mean using PlayerMoveEvent. What if setup this plugin on very big server, that online will > 500?
    Imagine how many players moves every tick. Maybe need to use tasks?
     
  7. Offline

    Krizeh

    I had a couple minutes so I made this plugin for you.
    It looks like @BlazingBroGamer already did but if you want you could use this version instead.
    You can customize the helmet and the amount of time (in seconds) that you'd like to give the player water breathing.
    I've tested it and there are no errors.
    The download link is right here.
     
    proof2006 likes this.
  8. @Krizeh works like a charm, thank you!
     
    Krizeh likes this.
Thread Status:
Not open for further replies.

Share This Page