Inactive [FIX] GravitySucks - Stop players from logging in and out to avoid fall damage! [1.2.5-R1.2]

Discussion in 'Inactive/Unsupported Plugins' started by itsatacoshop247, Apr 4, 2012.

  1. Offline

    itsatacoshop247

    GravitySucks - Stop players from avoiding fall damage!
    Version: v1.4

    This plugin will remove the three seconds of invincibility when a player logs in if it is detected that they were falling when they logged out! This fixes the exploit where you can logout then login again to avoid taking fall damage.

    Note, it only removes this invincibility if you were falling before you logged out. If you log in not falling, or only start falling once you log in (ex someone made a fall trap) then you will still have the normal invincibility!

    Old video with outdated "hold you" version, but it still gets the point across:


    Features:
    • Fixes the login/logout exploit to avoid fall damage
    • Option to send them a message
    • Very lightweight plugin as of now.
    Config:
    • Message: The message that will be displayed to a player when they are held up. You can use color codes &1-9 and &a-e on it.
    • Display Message: True or False - Should the player be sent a message when they are being help for attempting to avoid fall damage?
    Permissions:
    • gravitysucks.ignore - will allow the player to relog to avoid fall damage.
    • gravitysucks.reload - will allow the player to use "/gravitysucks reload"
    Download from BukkitDev!

    Source Code

    Changelog:


    V1.4
    • Added "/gravitysucks reload" with "gravitysucks.reload" permission.
    • Redid the plugin. Now instead of holding you in the air, it properly removes the 3 seconds of invincibility upon spawning, so you just continue to fall and die. Even better, if you were not falling before you logged out (EX. someone digs a fall trap) you will still have the 3 seconds of invincibility like usual! The invincibility will only be removed if you were falling before logging out!
    V1.3
    • Tweaked permissions to true/false (see config file)
    • Fixed a "Cannot Handle player teleport" (Needs field testing)
    V1.2
    • Added ignore permission "gravitysucks.ignore"
    • Build against 1.2.5-R1.2
    V1.1
    • Error on different Java Versions fixed
    V 1.0
    • Release
    Roadmap:
    • Suggest things!
    Like the plugin? Help me keep my programming hobby alive! Please consider donating!
    Donate here.
     
    kahlilnc likes this.
  2. Offline

    MikeA

    Sweet! Thanks for this, people on my server were complaining about people abusing this.
     
  3. Offline

    itsatacoshop247

    I play and moderate on a hardcore server with a 3 hour death ban, so when I saw players using the exploit to avoid the 3 hour ban, I decided to whip this up :D

    I'm pretty sure I covered anything, but if you or anyone else finds any bugs let me know and I will fix them ASAP!
     
  4. Offline

    MikeA

    I tested it and haven't found anything wrong, tried many different ways.
     
  5. Offline

    itsatacoshop247

    Awesome, glad its working.
     
  6. Offline

    kahlilnc

    Yay tacos!
     
  7. Offline

    Trust518

    Thanks alot! This is perfect for my spleef arena (I put lava under instead xD) but now i can remove it :D
     
  8. Offline

    md_5

    Sweet, approved.
     
  9. Offline

    itsatacoshop247

    I didn't realize that hadn't been approved yet, awesome! I has kinda sad it wasn't getting much attention, but that's probably why! Thanks

    Not directly related to this plugin, but on my server I just check for when a player is below a certain Y coordinate to figure out when they are 'dead' and then I just teleport them back to the arena spawn. If you'd like to PM me I could come on your server and have a look, and then maybe write you a quick code for doing that on your arena.
     
  10. Offline

    Trust518

    No need =) i am using lava again.
     
  11. Offline

    Buckethead

    admin permission node for this to not happen?
     
  12. Offline

    itsatacoshop247

    Sure', I'll add em tonight
     
  13. Offline

    Buckethead

    ty
     
  14. Offline

    itsatacoshop247

    V1.2
    • Added ignore permission "gravitysucks.ignore"
    • Build against 1.2.5-R1.2
    Download
    Added!
     
    Buckethead likes this.
  15. Offline

    Speedyboy235

    Sweet, I'll test it out on my server, I'll come back and leave a comment once I've finished!

    EDIT: Great plugin, but could you add an option to customize the freezing time in the config file? It's perfectly fine for me, but others may want it.

    :D
     
  16. Offline

    HunterT

    Not very many people knew you could actually do that to avoid damage xD
     
  17. Offline

    Buckethead

    Yay works fine
     
  18. Offline

    itsatacoshop247

    The freezing time is a solid 3 seconds, because that is how long a player is invincible for after the log in. So it CAN'T be shorter, and I don't really see a point in making it longer.
    It was highly used on most of the servers I play on, which is what inspired me to make it.
     
    HunterT likes this.
  19. Offline

    Speedyboy235

    Ok, right, forgot about that :p
    Also, for some reason the plugin has stopped working, and only works sometimes... Any tips?
     
  20. Offline

    itsatacoshop247

    Any errors in the console? Permissions messing up? Dunno. I'd need more info to do real debugging.
     
  21. Offline

    Speedyboy235

    It used to work, I never had setup any permissions, ever, and no errors. :/
     
  22. Offline

    itsatacoshop247

    Go back to using V1.1 and see if that still works.
     
  23. Offline

    Speedyboy235

    Link?
    Thanks
     
  24. Offline

    itsatacoshop247

  25. Offline

    Speedyboy235

    Thanks, will try this out and report if it works.

    EDIT: Sweet, it works now. Thanks.

    EDIT #2: Possible for a /gs reload or /gravitysucks reload in-game command?
     
  26. Server crashed, restarted and when matto668 connected, this error showd up :)

    Code:
    2012-05-05 11:58:00 [INFO] Connected players:matt0668
    2012-05-05 11:58:01 [WARNING] Could not properly handle event PLAYER_TELEPORT:
    java.lang.IllegalAccessError: Synchronized code got accessed from another thread: me.itsatacoshop247.GravitySucks.GravitySucksInjure
    at org.bukkit.event.Listener.onPlayerTeleport(Listener:0)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
    at org.bukkit.craftbukkit.entity.CraftPlayer.teleport(CraftPlayer.java:342)
    at org.bukkit.craftbukkit.entity.CraftEntity.teleport(CraftEntity.java:162)
    at me.itsatacoshop247.GravitySucks.GravitySucksInjure.run(GravitySucksInjure.java:39)
    2012-05-05 11:58:01 [INFO] This error is logged only once: it could have occurred multiple times by now.
    2012-05-05 11:58:01 [INFO] Please contact one of the authors of plugin 'GravitySucks': itsatacoshop247
    
     
  27. Offline

    itsatacoshop247

    Alright glad its working, something must be bugged with 1.2.
    Thanks! I think I actually know the issue with this, I'll upload tomorrow.
     

  28. Np. First bug ive encountered with this, otherwise it runs perfectly
     
  29. Offline

    itsatacoshop247

    V1.3
    • Tweaked permissions to true/false (see config file)
    • Fixed a "Cannot Handle player teleport" (Needs field testing)
    Download

    Think I fixed it, test and let me know!
     
  30. Offline

    jinS

    Love it!
     

Share This Page