[SEC/FIX] Piston Protect v1.1 - Make Pistons Safe For Your Server [1060]

Discussion in 'Inactive/Unsupported Plugins' started by CNATION, Jul 31, 2011.

  1. Offline

    CNATION

    Piston Protect V1.1
    Description
    Piston Protect makes pistons safe to use on your server. Quick simple setup, just drop it into your plugins folder. To describe the plugin short termed, it cancels the pistons push or retract if any of the blocks that would be affected by the push/retract are in a protected region, that the piston itself is not in. This allows for the owner of the region to use pistons inside the area well denying other users form changing anything inside the region by placing a piston outside of or at the border of the region. It also prevents gravel, sand, and two types of red stone torch duplications. ​
    Features
    • Prevent pistons from pushing blocks in Worldguard regions players do not have access to
    • Prevent pistons from being used to duplicate gravel
    • Prevent pistons from being used to duplicate sand
    • Prevent pistons from being used to duplicate red stone torches
    Change log

    Code:
    V1.1 - Added checks to prevent sand/gravel/redstone torch duping
    V1.0 - Release
     
    blackbinary and morizuki like this.
  2. Offline

    WiLDiSH

    I didn't know pistons could move protected blocks.

    **New idea :p
     
  3. Offline

    Sh00ck

    nice :O
    GJ!
    Really nice!
    i love it <.<
     
  4. Offline

    Tauryuu

    Prevent pushing Signs?
     
  5. Offline

    morizuki

    can i suggest for Residence Region too?
     
    o0AzzA0o likes this.
  6. Offline

    Joh

    Good plugin! <cheers>
     
  7. Offline

    o0AzzA0o

    +1 vote on this :p nice plugin btw
     
    morizuki likes this.
  8. Offline

    Ghappy

    Asum plugin :D
    @Tauryoo
    this would be a cool feature, but shouldnt one be able to push or own signs?
     
  9. Offline

    Plague

    Sorry for the delay in submission approvals, I've been away for a while.
     
  10. Offline

    gamemaster1494

    Can you make it to where it stops the piston breaking chests glitch? If you place a piston facing a chest ( a locked lwc one) and place a redstone torch next to it, and take break the redstone torch the piston moves, pushes the chest 1 block, turns the chest to cobble and spills its contents.... This is rly bad....
     
  11. Offline

    fragger505

    Request to add support for parent/child regions.
    I don't current know how this plugin is setup but add support where the player HAS to be a owner or member of the region.

    Currently you can do this:
    Region C & B is a child of region A. (Like a city/town grid setup.)
    Region C is next to region B with region A between the two.
    Piston can push blocks from B into A but not into C.
     
  12. Offline

    jdjfusion

    does this also work for towny?
     
  13. Offline

    goldseed

    Does this conflicts with Bigbrother????

    Code:
    2011-08-22 02:14:14 [SEVERE] Could not pass event BLOCK_PISTON_EXTEND to BigBrother
    java.lang.ClassCastException: org.bukkit.material.MaterialData cannot be cast to org.bukkit.material.PistonBaseMaterial
        at org.bukkit.event.block.BlockPistonEvent.getDirection(BlockPistonEvent.java:41)
        at me.taylorkelly.bigbrother.listeners.BBBlockListener.onBlockPistonExtend(BBBlockListener.java:83)
        at org.bukkit.plugin.java.JavaPluginLoader$43.execute(JavaPluginLoader.java:540)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at net.minecraft.server.BlockPiston.g(BlockPiston.java:70)
        at net.minecraft.server.BlockPiston.doPhysics(BlockPiston.java:47)
           at net.minecraft.server.World.applyPhysics(World.java:439)
        at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
          at net.minecraft.server.World.update(World.java:407)
        at net.minecraft.server.World.setTypeIdAndData(World.java:391)
        at net.minecraft.server.BlockDiode.a(SourceFile:69)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    I think I solved this by changing BB setting.
    BB does not check Piston anymore...
    Code:
        disabled-actions:
        - BlockPistoned
    
     
  14. Offline

    CNATION

    @gamemaster1494 It can be added but we have to be able to duplicate the issue ourselves. So far no luck.

    @fragger505 It should work fine for parent and child regions

    @jdjfusion No it does not support towny protected land

    @goldseed Will try to fix that :)
     
  15. Offline

    goldseed

    You are so kind!!!
     
  16. I have been looking for this since 1.7, can't believe I missed it for 3 weeks....too much clutter on this forum ><
     
  17. Offline

    goldseed

    I am afraid this plugin conflicts chestshop and precious stones, too.
    Code:
    2011-08-23 11:30:58 [SEVERE] Could not pass event BLOCK_PISTON_RETRACT to PreciousStones
    java.lang.ClassCastException
    2011-08-23 11:30:58 [SEVERE] Could not pass event BLOCK_PISTON_EXTEND to BigBrother
    java.lang.ClassCastException
    2011-08-23 11:30:58 [SEVERE] Could not pass event BLOCK_PISTON_RETRACT to ChestShop
    java.lang.ClassCastException
    2011-08-23 11:30:58 [SEVERE] Could not pass event BLOCK_PISTON_RETRACT to PreciousStones
    java.lang.ClassCastException
    2011-08-23 11:30:58 [SEVERE] Could not pass event BLOCK_PISTON_EXTEND to BigBrother
    java.lang.ClassCastException
    2011-08-23 11:30:58 [SEVERE] Could not pass event BLOCK_PISTON_RETRACT to ChestShop
    java.lang.ClassCastException
    2011-08-23 11:30:58 [SEVERE] Could not pass event BLOCK_PISTON_RETRACT to PreciousStones
    java.lang.ClassCastException.

    Thanks CNATION
     
  18. Offline

    tremor

    terrific, I just found people on my server making these en-masse in an attempt to bring it down with entity lag...
     
  19. Offline

    Kane

    I'm confused was the duping not stopped? Have you confirmed that you can still dupe in bukkit?

     
  20. Offline

    tremor

    Yes piston duping for sand, gravel and torches still works -- yes this plugin stops it.

    REQUEST: As the dupe only seems to occur with Sticky Pistons - can the block behavior with normal pistons be allowed.. this plugin seems to block sand from being pushed by normal pistons as well.
     
  21. Offline

    Vettexl

    If it's possible, can I get a link to the version (If there was one) for CB Build 1000? Thanks!
     
  22. Offline

    Kane

    is there a example of this in 1060?
     
  23. Offline

    tremor

    I was watching it work just the other day, my attempt to get video of the guy doing it was poor - as I have a slow PC and even slower internet. He had about 30 chests full of sand, and when he left the machine for about 1 full minute, everyone within about 100 blocks of the machine lagged out of the server completely.. the floating unpicked up sandblocks numbers in the thousands, and were only able to return the server to normal working oder after getting one of my admins with an uber-fast PC to login and get near the area, and worldedit /removenear on the the sticky pistons to stop the machine.. then we did /replacenear 20 air lava - to eat up all the blocks because no one could get close enough to scoop them up into inventory... after that.. i came looking for this plugin, which i was quite happy to find.
     
  24. Worked fine for some days now, suddenly started throwing errors now:

    Code:
    17:19:13 [SEVERE] Could not pass event BLOCK_PISTON_EXTEND to PistonProtect
    java.lang.ClassCastException: org.bukkit.material.MaterialData cannot be cast to org.bukkit.material.PistonBaseMaterial
            at org.bukkit.event.block.BlockPistonEvent.getDirection(BlockPistonEvent.java:41)
            at org.bukkit.event.block.BlockPistonExtendEvent.getBlocks(BlockPistonExtendEvent.java:37)
            at me.Ghappy.PistonProtect.PPBlockListener.onBlockPistonExtend(PPBlockListener.java:32)
            at org.bukkit.plugin.java.JavaPluginLoader$43.execute(JavaPluginLoader.java:540)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.BlockPiston.g(BlockPiston.java:70)
            at net.minecraft.server.BlockPiston.doPhysics(BlockPiston.java:47)
            at net.minecraft.server.World.k(World.java:464)
            at net.minecraft.server.World.applyPhysics(World.java:443)
            at net.minecraft.server.BlockRedstoneTorch.c(BlockRedstoneTorch.java:56)
            at net.minecraft.server.Chunk.a(Chunk.java:380)
            at net.minecraft.server.World.setRawTypeIdAndData(World.java:302)
            at net.minecraft.server.World.setTypeIdAndData(World.java:395)
            at net.minecraft.server.BlockRedstoneTorch.a(BlockRedstoneTorch.java:142)
            at net.minecraft.server.Chunk.flushTicks(Chunk.java:91)
            at net.minecraft.server.World.j(World.java:1899)
            at net.minecraft.server.World.doTick(World.java:1742)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:442)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    17:19:13 [SEVERE] Could not pass event BLOCK_PISTON_EXTEND to PistonProtect
    java.lang.ClassCastException: org.bukkit.material.MaterialData cannot be cast to org.bukkit.material.PistonBaseMaterial
            at org.bukkit.event.block.BlockPistonEvent.getDirection(BlockPistonEvent.java:41)
            at org.bukkit.event.block.BlockPistonExtendEvent.getBlocks(BlockPistonExtendEvent.java:37)
            at me.Ghappy.PistonProtect.PPBlockListener.onBlockPistonExtend(PPBlockListener.java:32)
            at org.bukkit.plugin.java.JavaPluginLoader$43.execute(JavaPluginLoader.java:540)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
            at net.minecraft.server.BlockPiston.g(BlockPiston.java:70)
            at net.minecraft.server.BlockPiston.doPhysics(BlockPiston.java:47)
            at net.minecraft.server.World.k(World.java:464)
            at net.minecraft.server.World.applyPhysics(World.java:443)
            at net.minecraft.server.World.update(World.java:412)
            at net.minecraft.server.World.setTypeIdAndData(World.java:396)
            at net.minecraft.server.BlockRedstoneTorch.a(BlockRedstoneTorch.java:142)
            at net.minecraft.server.Chunk.flushTicks(Chunk.java:91)
            at net.minecraft.server.World.j(World.java:1899)
            at net.minecraft.server.World.doTick(World.java:1742)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:442)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     

  25. Any chance to get source posted?​
     
  26. Offline

    Juze

    Silly Joy, Java is unobfuscated. Use JD-GUI or other decompiler.
     
  27. Offline

    pivotgamer84

    Could you update it to prevent painting duping?

    If you set it up like so:

    []] = Unpowered piston

    #
    #= Painting that is 2 blocks high

    []]#
    []]#

    When both pistons get powered at the same time, it will break the painting off, and make 2 painting items.
     
  28. Code:
    2011-09-06 21:14:46 [SEVERE] Could not pass event BLOCK_PISTON_EXTEND to PistonProtect
    java.lang.ClassCastException: org.bukkit.material.MaterialData cannot be cast to org.bukkit.material.PistonBaseMaterial
        at org.bukkit.event.block.BlockPistonEvent.getDirection(BlockPistonEvent.java:41)
        at org.bukkit.event.block.BlockPistonExtendEvent.getBlocks(BlockPistonExtendEvent.java:37)
        at me.Ghappy.PistonProtect.PPBlockListener.onBlockPistonExtend(PPBlockListener.java:32)
        at org.bukkit.plugin.java.JavaPluginLoader$43.execute(JavaPluginLoader.java:540)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
        at net.minecraft.server.BlockPiston.g(BlockPiston.java:70)
        at net.minecraft.server.BlockPiston.doPhysics(BlockPiston.java:47)
        at net.minecraft.server.World.k(World.java:453)
        at net.minecraft.server.World.applyPhysics(World.java:429)
        at net.minecraft.server.World.update(World.java:401)
        at net.minecraft.server.World.setTypeIdAndData(World.java:385)
        at net.minecraft.server.BlockDiode.a(SourceFile:69)
        at net.minecraft.server.World.a(World.java:1982)
        at net.minecraft.server.World.doTick(World.java:1722)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:441)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Please try to fix it. Theese messages flood in server.log
     
  29. Offline

    Rich Boos

    If this is true then +1
     
  30. Still having this issue :/

    Please post source if not planning to fix.
     

Share This Page