Paintball gun to color a Survival World

Discussion in 'Archived: Plugin Requests' started by SneakyAzShiite, Mar 24, 2014.

  1. Offline

    CGA1123

    SneakyAzShiite

    Please tag me in your posts!!

    And I'll work on this when i have a bit of time! Thanks for the feedback!

    SneakyAzShiite

    - Prevented people from 'painting' signs & doors.
    - Prevented breaking of the wool blocks.


    <Edit by Moderator: Redacted mediafire url>

    Version Number should been shown in the server log on startup or reload.
    However I have renamed this Version 1.4 to correspond with the old one being 'v3'.

    Also, do you want me to look into adding the timer & the speed?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Nov 3, 2016
  2. Offline

    SneakyAzShiite

    CGA1123
    - Also can we prevent breaking of crops,jukebox,furnaces,chests,dropper,dispenser,hopper, bed, IF POSSIBLE->item frame,boat
    - Signs are still being painted for v1.4
    - As for the timer I'll leave it up to you. Is it possible for there to be an individual reset per person along with a global one? That way if people want to make things with their own gun they dont get reset by everyone else using the global reset? "/pb preset" <- per player reset.
    - I don't know if you have other projects to pursue or anything and don't wanna take too much time from other things!
    - Limiting the speed would be a decent idea. I don't know what the current rate/second is but it's pretty fast.


    On version 1.3(and now 1.4 as well) i got this error:
    08.06 00:26:18 [Multicraft] Skipped 20 lines due to rate limit (30/s)
    08.06 00:26:16 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO org.bukkit.event.EventException
    08.06 00:26:16 [Server] INFO [00:26:16 ERROR]: Could not pass event PlayerInteractEvent to Paintball v1.5
    08.06 00:26:16 [Server] INFO ... 15 more
    08.06 00:26:16 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_51]
    08.06 00:26:16 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_51]
    08.06 00:26:16 [Server] INFO at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) ~[?:?]
    08.06 00:26:16 [Server] INFO at me.CGA1123.Paintball.onShoot(Paintball.java:404) ~[?:?]
    08.06 00:26:16 [Server] INFO Caused by: java.lang.NullPointerException
    08.06 00:26:16 [Server] INFO at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInArmAnimation.handle(SourceFile:9) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInArmAnimation.a(SourceFile:43) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:992) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:186) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:216) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:16 [Server] INFO org.bukkit.event.EventException
    08.06 00:26:16 [Server] INFO [00:26:16 ERROR]: Could not pass event PlayerInteractEvent to Paintball v1.5
    08.06 00:26:16 [Multicraft] Skipped 95 lines due to rate limit (30/s)
    08.06 00:26:15 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO org.bukkit.event.EventException
    08.06 00:26:15 [Server] INFO [00:26:15 ERROR]: Could not pass event PlayerInteractEvent to Paintball v1.5
    08.06 00:26:15 [Server] INFO ... 15 more
    08.06 00:26:15 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_51]
    08.06 00:26:15 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_51]
    08.06 00:26:15 [Server] INFO at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source) ~[?:?]
    08.06 00:26:15 [Server] INFO at me.CGA1123.Paintball.onShoot(Paintball.java:404) ~[?:?]
    08.06 00:26:15 [Server] INFO Caused by: java.lang.NullPointerException
    08.06 00:26:15 [Server] INFO at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInArmAnimation.handle(SourceFile:9) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInArmAnimation.a(SourceFile:43) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:992) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:186) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:216) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    08.06 00:26:15 [Server] INFO org.bukkit.event.EventException
    08.06 00:26:15 [Server] INFO [00:26:15 ERROR]: Could not pass event PlayerInteractEvent to Paintball v1.5
     
  3. Offline

    CGA1123

    SneakyAzShiite

    The log says it's happening when you shoot a paintball, could you explain exactly what happen when the error occurs (what you're doing)?

    Could you check if your config.yml is set up correctly? it should have this included:
    Code:
    #Set PaintBall Gun (Use Material Names http://jd.bukkit.org/rb/apidocs/org/bukkit/Material.html)
    paintballgun: 'BREWING_STAND_ITEM'
     
    #Set the paintball (either snowball or enderpearl)
    paintball: 'enderpearl'
    Can you explain the per player reset in a bit more depth please?
    Also what exactly would you want for a timer?
     
  4. Offline

    SneakyAzShiite

    Just shooting the paintball. The paintball doesn't seem to have an issue in game even with the error.

    Code:java
    1. org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    2. 10.06 22:00:55 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_51]
    3. 10.06 22:00:55 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_51]
    4. 10.06 22:00:55 [Server] INFO at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) ~[?:?]
    5. 10.06 22:00:55 [Server] INFO at me.CGA1123.Paintball.onShoot(Paintball.java:378) ~[?:?]
    6. 10.06 22:00:55 [Server] INFO Caused by: java.lang.NullPointerException
    7. 10.06 22:00:55 [Server] INFO at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    8. 10.06 22:00:55 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    9. 10.06 22:00:55 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    10. 10.06 22:00:55 [Server] INFO at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    11. 10.06 22:00:55 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    12. 10.06 22:00:55 [Server] INFO at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    13. 10.06 22:00:55 [Server] INFO at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    14. 10.06 22:00:55 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInBlockPlace.handle(SourceFile:9) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    15. 10.06 22:00:55 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInBlockPlace.a(SourceFile:60) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    16. 10.06 22:00:55 [Server] INFO at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:605) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17. 10.06 22:00:55 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:186) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    18. 10.06 22:00:55 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:216) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    19. 10.06 22:00:55 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    20. 10.06 22:00:55 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    21. 10.06 22:00:55 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    22. 10.06 22:00:55 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    23. 10.06 22:00:55 [Server] INFO org.bukkit.event.EventException
    24. 10.06 22:00:55 [Server] INFO [22:00:55 ERROR]: Could not pass event PlayerInteractEvent to Paintball v1.4
    25. 10.06 22:00:02 [Disconnect] User [22:00:02 INFO]: net.minecraft.util.com.mojang.authlib.GameProfile@33f51919[id=<null>,name=MCI,properties={},legacy=false] (/198.27.83.157:40192) has disconnected, reason: Internal Exception: java.io.IOException: Connection reset by peer
    26. 10.06 21:59:33 [Server] INFO ... 15 more
    27. 10.06 21:59:33 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    28. 10.06 21:59:33 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_51]
    29. 10.06 21:59:33 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_51]
    30. 10.06 21:59:33 [Server] INFO at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) ~[?:?]
    31. 10.06 21:59:33 [Server] INFO at me.CGA1123.Paintball.onShoot(Paintball.java:378) ~[?:?]
    32. 10.06 21:59:33 [Server] INFO Caused by: java.lang.NullPointerException
    33. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    34. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    35. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    36. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    37. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    38. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    39. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    40. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInBlockPlace.handle(SourceFile:9) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    41. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInBlockPlace.a(SourceFile:60) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    42. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:629) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    43. 10.06 21:59:33 [Server] INFO at net.minecraft.server.v1_7_R3.PlayerInteractManager.interact(PlayerInteractManager.java:374) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    44. 10.06 21:59:33 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:216) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    45. 10.06 21:59:33 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    46. 10.06 21:59:33 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    47. 10.06 21:59:33 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    48. 10.06 21:59:33 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    49. 10.06 21:59:33 [Server] INFO org.bukkit.event.EventException
    50. 10.06 21:59:33 [Server] INFO [21:59:33 ERROR]: Could not pass event PlayerInteractEvent to Paintball v1.4


    CGA1123

    Per player reset: Players would only be able to reset things that they have "painted" as an individual. Some people were trying to build things with the paintball gun which i didnt expect. So keep a global reset. Then a command for a player to reset his painted stuff. (dont know if possible)
    If the pb reset isnt possible then just have the gun's have a timer where the wool paints blocks and lasts for X seconds before reverting automatically.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  5. Offline

    iMurder

    CGA1123 Quick heads up, if you use the paintball gun, then scroll to another inventory slot, it acts as a normal enderpearl / snowball.
     
  6. Offline

    CGA1123

    iMurder
    Fixed, and thanks!

    SneakyAzShiite

    I've added the extra blocks that shouldn't be changed. I can't seem to reproduce the error on my server!
    <Edit by Moderator: Redacted mediafire url>
    I will try to add the per player reset over the next few days, I need to do a few projects before school ends.
    And you do not want the timer added if per player reset is added, correct?
     
    Last edited by a moderator: Nov 3, 2016
  7. Offline

    ChipDev

    CGA1123 cast tags to the enderpearl on hit event? That could be useful (If you didn't code it in) for when it hits a block, if it has correct casted data.
     
  8. Offline

    Deleted user

    CGA1123
    So, some suggestions:
    Material.matchMaterial() works better
    Don't use Logger.getLogger(). That's severely deprecated. Use JavaPlugin#getLogger() instead
    In PlayerTeleportEvent -> e.getCause().equals(TeleportCause.ENDER_PEARL) (No need for toString)
    In BlockPlaceEvent -> No need to re-getMaterial. There's already a global variable
    In PlayerInteractEvent -> Again, no need to use toString on getType
    -> getItemMeta may return null
    -> The global variable itemInHandShoot cannot be used for multiple people with paintball guns
    -> Instead of repeatedly using getConfig(), store it in a global variable. It's more efficient (I'm 99% sure)
    In setNearBlocks -> Re-Allocating memory for all the Materials is bad. Declare it in a global arraylist
    -> Store all temp locations into arraylist, and iterate through that instead
    In onCommand -> Store colors in global arraylist
    -> Use else-if so you only need one return true

    That should be all
     
    CGA1123 likes this.
  9. Offline

    CGA1123

    zombiekiller753
    Thanks!!

    ChipDev I don't quite understand what you are saying

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  10. Offline

    ChipDev

    Ok: Cast data to a item so when it hits, it (the block )tests for the data; if it has it, It turns into wool
     
  11. Offline

    CGA1123

  12. Offline

    ChipDev

    Sorry for the misread; I'm skimming through the posts. Typin' fast so I have more time!
     
    CGA1123 likes this.
  13. Offline

    CGA1123

    SneakyAzShiite

    Implemented most of the fixes mentioned above.
    Added per player reset.
    - /pb preset
    - "paintball.preset"

    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 3, 2016
  14. Offline

    SneakyAzShiite

    CGA1123 oh wow i stopped getting notifications from the thread! =O

    Thanks so much. I'll try the latest version and see if the error is still happening. If so maybe it's interacting badly with another plugin? Will report back!
    thank you so much once again

    CGA1123 Paintballs are still breaking crops.

    also still getting error. It doesnt seem to be affecting anything in game though.

    Code:
    17.06 20:11:25 [Multicraft] Skipped 45 lines due to rate limit (30/s)
    17.06 20:11:03 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO org.bukkit.event.EventException
    17.06 20:11:03 [Server] INFO [20:11:03 ERROR]: Could not pass event PlayerInteractEvent to Paintball v1.6
    17.06 20:11:03 [Server] INFO ... 15 more
    17.06 20:11:03 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:292) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_51]
    17.06 20:11:03 [Server] INFO at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_51]
    17.06 20:11:03 [Server] INFO at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) ~[?:?]
    17.06 20:11:03 [Server] INFO at me.CGA1123.Paintball.onShoot(Paintball.java:347) ~[?:?]
    17.06 20:11:03 [Server] INFO Caused by: java.lang.NullPointerException
    17.06 20:11:03 [Server] INFO at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:469) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:558) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:260) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:667) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at net.minecraft.server.v1_7_R3.ServerConnection.c(SourceFile:134) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at net.minecraft.server.v1_7_R3.NetworkManager.a(NetworkManager.java:157) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInArmAnimation.handle(SourceFile:9) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at net.minecraft.server.v1_7_R3.PacketPlayInArmAnimation.a(SourceFile:43) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at net.minecraft.server.v1_7_R3.PlayerConnection.a(PlayerConnection.java:992) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:186) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at org.bukkit.craftbukkit.v1_7_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:216) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:486) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:501) [craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:294) ~[craftbukkit.jar:git-Bukkit-1.7.9-R0.1-b3084jnks]
    17.06 20:11:03 [Server] INFO org.bukkit.event.EventException
    17.06 20:11:03 [Server] INFO [20:11:03 ERROR]: Could not pass event PlayerInteractEvent to Paintball v1.6
    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  15. Offline

    CGA1123

    SneakyAzShiite
    The crops are probably breaking due to the dirt block underneath them being changed, I'll see about checking for that.

    I may have found what is causing the NullPointerException, however I still have been unable to re-create this error!

    I'll try and fix this stuff ASAP! Also, the /pb preset is working well?
     
  16. Offline

    AoH_Ruthless

    CGA1123
    To check for tilled dirt, use Material.SOIL
     
    CGA1123 likes this.
  17. Offline

    SneakyAzShiite

    CGA1123 There was some issues where people couldn't /pb preset but then they could. may have just been a small hiccup. Is there any more info i can provide to help find the cause of this error? Is it having an issue with another plugin? i dont understand the error or "what it means".

    Also a thank you to you other people in here who have contributed ideas and helped guide the plugin ^_^
     
    CGA1123 likes this.
  18. Offline

    CGA1123

    AoH_Ruthless Thanks!

    SneakyAzShiite
    The error is a NullPointerException, meaning at line 347 (if you look at the error file it shows this when it says "at me.CGA1123.Paintball.onShoot(Paintball.java:347) ~[?:?]") in my file, the code is returning an unexpected null value.
    The reason it is not changing any ability is because that part of the code is just checking if the item used when attempting to shoot is an old paintball gun.

    And I'll check the code for the per player reset again!
     
  19. Offline

    CGA1123

    SneakyAzShiite

    Ok this should finally work now!
    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 3, 2016

Share This Page