[INACTIVE] [SEC/FUN] Gallows v0.13 Hang those heathens! (Tag: Jail) [1337]

Discussion in 'Inactive/Unsupported Plugins' started by kjhf, Aug 19, 2011.

  1. Gallows - Don't like somebody? Why not hang them?
    Requested by @Tomasdasd

    Version: 0.13 BETA
    Disclaimer: This plugin is in beta.
    It still has substantial To Do list and safety features to add. Though it should be fine if you follow the instructions, do not complain to me that the plugin has burnt down your prized Taj Mahal, or destroyed a part of your Opera House, et cetera.

    Further, since no protections are coded yet, don't use on servers which will have people tearing down the Gallows and selling the bits on.

    Features:
    • Semi-auto generating gallows.
    • Safety feature so the Gallows's generation will not overwrite you or your buildings.
    • Hang players by strapping them to web (string.. geddit?) in the Gallows.
    • Let player take customisable damage on the Gallows, or disable completely.
    • Release when you see fit, or when the player dies (yes you can rehang them if they die >:D )
    • Customisable behaviours on release.
    • Customisable messages.
    • Compatible with Yeti's Permissions and PermissionsBukkit.
    Extra Media:

    Pics (open)

    Video (open)

    Sample Config (open)

    Code:
    Gallows:
        Version: 0.13
        Debugging: false
    
    # This sets allowed commands for people who are being hanged. Give the value "all" to allow all commands and disable the feature.
    AllowedCommands: /afk, /g, /gallow, /gallows, /hang, /me, /motd, /msg, /release, /tell
    
    # This lists blocks to check for when creating a Gallows. If a block is found to match the types below, Gallows will not build there.
    CheckedBlocks: brick, clay, cobblestone, redstone, wood
    
    # Players on the Gallows lose half a heart per second specified. -1 to disable. e.g. "2" will make players lose half a heart every 2 secs.
    ChokeHangedPlayers: -1
    
    # This sets whether when someone is hanged or released, it is broadcast across the server. true = broadcast; false = send messages to person issuing the command and affected player.
    MakeHangAnnouncementsPublic: 'true'
    MakeReleaseAnnouncementsPublic: 'true'
    
    # This sets the teleport behaviour of the plugin when a player is released.
    # Options: none, burn, commander, kill, near, original, rehang, skydive, spawn, void, random.  --Note: Random excludes rehang.
    # none= no tp, burn= burns player (no tp), commander= tps to the player issuing the release, kill = death on release,
    # near= tp near to Gallows, original= tps player to their original location, rehang= disallow release until death,
    # skydive= tp without a parachute..., spawn= tps player to spawn, void= tps player into the abyss, random=Any except rehang.
    OnReleaseTeleportBehaviour: original
    
    # This sets whether opped players are always exempt from hanging.
    OppedPlayersCannotBeHanged: 'true'
    
    # This sets whether players are released when they die.
    ReleaseOnDeath: 'true'
    
    # This sets whether released players are healed to full health. Warning: exploitation may occur if set to true.
    RestoreHealthOnRelease: 'true'
    
    # This disables/enables the use of the alias /g. Disable if you have another plugin that uses /g (Such as unconfigured Herochat)
    UseGCommand: 'true'


    Sample Messages File (open)

    Code:
    ADDING_NUMBER=%name already taken. Adding a number to the end.
    CANCEL_EVENT=Oh no you don't. You're in the Gallows matey.
    CANNOT_FIND_GALLOWS=Can't find a Gallows! Have you made one yet?
    CANNOT_FIND_NAMED_GALLOWS=I can't find the Gallows named %name!
    CREATE_INSTRUCTIONS_A=Left click a dirt block to place a Gallows.
    CREATE_INSTRUCTIONS_B=Warning - Stand away from the block being clicked. Keep away from important buildings.
    CREATE_REMINDER=Reminder - Left click a dirt block to place a Gallows.
    DEFAULT_NAME=Name not specifed... using "default". To add a name, type one after create.
    DELETE_NO_NAME=Please specify a Gallows name after delete. You can also destroy a block on a Gallows to unregister it.
    DENY_BREAK=Can't break this - it's part of the Gallows.
    DIED_AND_REHANGED=%player has died... but has been put back on the Gallows!
    EXEMPT_FROM_HANGING=%player is exempt from hanging!
    INVALID_TARGET_GALLOWS=Cannot find the target Gallows!
    INVALID_TARGET_PLAYER=Cannot find the target Player!
    NO_PERMISSION=You do not have permission to do this!
    PLAYER_IN_GALLOWS=%player is already in the Gallows!
    PLAYER_NOT_IN_GALLOWS=%player is not in the Gallows!
    PLAYER_HUNG=%player has been put on the Gallows!
    PLAYER_RELEASED=%player has been released from the Gallows!
    PLAYER_RELEASED_BY_DEATH=%player has been released from the Gallows because they died!
    SUCCESSFULLY_CREATED=Successfully created %name!
    SUCCESSFULLY_DELETED=Successfully deleted %name!
    TARGET_IN_BED=You cannot hang that person right now as they are in bed. Try again when they leave.
    TELEPORT_ERROR=Could not teleport %player.
    UNSAFE_BLOCKS=There are buildings or placed blocks that would be overwriten in this Gallows. Please make a new selection. [Block(s) found - %block]
    UNSAFE_PLAYER_LOCATION=You are standing in an unsafe location! Please move round to another side of the dirt block or further away.


    Permissions & Commands:
    • gallows.hang -- Permission to hang people.
    • gallows.release -- Permission to release people.
    • gallows.create -- Permission to create gallows.
    • gallows.delete -- Permission to delete (and break) gallows.
    • gallows.exempt -- Permission to prevent player from being hanged.
    • gallows.list -- Permission to view all a gallows list. Note: on by default.
    • gallows.reload -- Permission to reload the config. Is NOT included under gallows.*.
    /g, /gallow, /gallows -- Base command. /g can be semi-disabled* in the config if it conflicts.

    * It doesn't turn off the plugin monitoring /g, it disables any actions that would be taken. For most cases this will be fine.

    • /g hang player gallowsname - Hangs the player at an optional gallowsname
    • /g release player behaviour - Releases a player with an optional tp behaviour.
    • /g create name - Create a Gallow with optional name. (Unnamed = "default")
    • /g delete name - Deletes a Gallow with given name.
    • /g list - Displays a list of all Gallows and nearby ones
    • /g reload - Reloads the config. Must be opped or given specific permission.
    • /hang player gallowsname - Alias for /g hang player gallowsname
    • /release player behaviour - Alias for /g release player behaviour
    TO DO (open)


    Planned for next version:
    -Fix any submitted bugs

    General:
    • Make BukkitPermissions compatible
    • Add method to update config if new version has new properties
    • Make aliases for /hang and /release
    • Add command to list all Gallows' names / nearby ones.
    • Reload config command
    • Remote control trapdoors? Or maybe just add a lever...
    Protections:

    • Add protection method/listener
    • To Self: Remember to remove protections on deleted
    • Prevent players from using commands whilst hanged
    • Prevent players from moving out of the Gallows without being released.
    Hang:

    • Send people to an optionally specified Gallow (rather than a random one)
    • Add health change option in config (hanged people get hurt occasionally and may die after a while )
    Release:

    • Add more options for on release. Re-hang a big possibility.
    • Add option to override tp behaviour
    • Add option in config to restore player health on release
    • Release when a Gallows is broken
    Create:

    • Allow players to designate their own Gallows
      • When done, change create -> generate
    • Add some sort of safety feature when generating (prevent creators from being stuck, or worse, burnt :evil: )
    • Prevent generation if blocks overwrite buildings
      • And config the blocks to look for ...
    • Undo
    • Custom Templates in config
    Delete:

    • Actually delete the structure rather than just removing it from the database
    • By damaging rather than by name
    • Undo



    Download
    Source

    If you have an issue, please include:
    • Current version of your CraftBukkit.jar: (ex. 1060)
    • Permissions system installed: (ex. Permissions, BukkitPermissions, etc)
    • Version of Gallows you have (don't say latest).
    • The EXACT message being displayed on screen. If in case of a stacktrace in your console, copy and paste into a spoiler ([.spoiler]SPOILER: Don't forget to remove dots[./spoiler])
    • Have you tried reloading or rebooting server?: (ex. Yes)
    • Does the error appear for others?
    Changelog:
    Version 0.13
    • Added more compatibility for launching commands from Console.
    • Fixed an NPE that would occur if a hanged player tp'd to a different world.
    • Fixed a bug in 'rehang' behaviour that said it wasn't recognised.
    Version 0.12
    • Added config option to rehang a player if they die. Defaults to false.
    Version 0.11
    • Added basic multi-world support
    • Added console command support. Console overrides any exempt privs.
    • Added feature to restore health on release.
    • Finally squashed the ON_BLOCK_BREAK bug
    Version 0.10
    • Added teleport behaviour override -- specify a behaviour after the player's name when releasing them! e.g. /g release kjhf spawn
    • Added a new teleportation behaviour "burn".
    • Fixed an NPE
    • Removed Herobrine
    Older (open)

    Version 0.09
    • New protections:
      • which prevent players from moving out
      • which teleports players to nearby Gallows if they are hanged and somehow got out of the Gallows
      • fixed a bug in the AllowedCommands (and added motd)
    • Fixed some NPEs
    • Added a new teleportation behaviour "kill".
    • Improved /g list (Added nearest Gallows, removed list of AllGallows if more than 10.)
    Version 0.08
    • Added safety features:
      • which tells you if you're in the way of the Gallows generating.
      • which tells you if the Gallows would overwrite certain blocks (new config option).
    • Fixed some NPEs
    • Optimised creation code (saved 3KB!)
    Version 0.07
    • Now in Beta! ^^
    • Added entire protection class and rewrote a lot of code.
      • Prevent players from using commands in the Gallows
      • Prevent players from breaking the Gallows without delete perm
    • Added ability to delete (unregister) a Gallows by breaking it.
    • Added two new teleportation behaviours: "void" and "random".
    • Fixed "spawn" tp behaviour spawning in ground.
    • Fixed a nasty bug which fetched null locations.
    • Added more messages to file for customisation.
    Version 0.06
    • Added new command: /g reload along with permission gallows.reload (does NOT come under gallows.* -- it must be given explicitly).
    • Added two new teleportation behaviours: "commander" and "rehang".
    • Changed the PermissionsBukkit perms to default to opped.
    • Streamlined some code to decrease memory usage.
    • Fixed a few typos.
    Version 0.05

    • Added new command: /g list along with permission gallows.list (on by default).
    • Added ability to delete the config in a clean install and not have to delete other files.
    • Added aliases /hang and /release
    • Added new teleportation action: skydive
    • Upgraded choke system to work with doubles (AKA x.xx seconds). Switch to 0.1 for insta death ;D)
    • Fixed a bug in the choke system that was hurting players despite it being turned off
    • Fixed a bug in the "near" and "spawn" teleportation actions
    • Fixed a bug in the messages file that would derp the plugin if anything was empty
    • Made a cleaner installation which displays files being installed
    Version 0.04

    • Fixed web spawning on player issuing command rather than the hanged person (DERP!)
    • Added choke feature (lowers hanged players' healths)
    • Added more functionality to the update config.
    Version 0.03

    • Added support for PermissionsBukkit
    • Added config option to not exempt ops
    • Fixed yet another .exempt issue
    • Added config fixer/updater
    • Added hang at specified Gallows feature
    Version 0.02

    • Fixed exempt perm issue
    Version 0.01

    • Initial Release
     
    kahlilnc and EspoDev like this.
  2. Offline

    FuturaEX

    nice but, when i try to hang some1 it says '' cannot hang player''
     
  3. Have you created a Gallows yet?

    If the message is (player) cannot be hanged, it is because they are exempt (full permissions)
     
  4. Offline

    FuturaEX

    yeah i created the gallow, but i still can't hang him....
    and i haven't given him the exempt permission either
     
  5. Is he opped?

    If not, can you give me the exact message it says ...
     
  6. Offline

    FuturaEX

    no he isn't opped, but when i type '' /g hang RedRacket ''
    it says '' RedRacket cannot be hanged! ''
    it's no error msg, simply just that one msg.
     
  7. That's a permissions exempt error. I've looked at the code and I may have got the exempt perm the wrong way round. Corrected now, please re-download. Thanks for helping :)
     
  8. Offline

    thehutch

    As a request remove permissions support for bukkit permissions/ superperms mainly because everyone needs to change to this permissions and also because it is more lightweight also I don't know if you noticed but Permissions(the plugin of tomorrow) is now inactive so you should remove support for it. All typed on an iPod touch at 2:40 am :)
     
  9. Offline

    FuturaEX

    i think it works now, but everyone on my server has logged off now so i didn't get to test it so much...
    but i tried once and it kinda worked.
    i let you know if something comes up

    and don't remove permission support like he said please.....
     
  10. Offline

    thehutch

    No I simply meant replace your support for bukkits own permission system because it is much simpler to code and more lightweight. and also because the one your supporting is outdated
     
  11. Support for BukkitPerms has been on my ToDo list for a while. I support permissions because that is the plugin that most people use, including my home server >.>
    Judging by the overall mood on the Permissions thread, few will be leaving it until absolutely necessary.

    I'm definitely not removing Permissions support, even if that is what you meant ;)
     
  12. Offline

    thehutch

    Well adding both we leave me happy :)
     
  13. Offline

    EnlightendDead

    Are ops automatically exempted? If so can you make a config setting so they are not :p?
     
  14. Offline

    kahlilnc

    Nice new idea for plugin :p
     
  15. Done! :)

    Done! :)

    Done! Thanks, though it was a request! :)
     
    kahlilnc likes this.
  16. Offline

    lillootie

    you should make it so there is a lever that'll release the trapdoor, and send them to the lava
     
  17. Offline

    terrordrone_nl

    actually, when you place a gallow, you can edit it, and thus make this yourself. but you might want to change the trapdoor to a block with a piston behind it, wired up with the lever. (because you can open the trapdoor without the lever, but thats not as much fun...)


    anyways, Awsome idea. this is way better then a jail.
    bug: always when i hang someone other then myself, the cobweb spawns inside me, and then the person (or as i call them: my victims) is transported to the gallow.
    Few things that i wanted to point out:
    1: i don't really like the fact that the player can get out of the gallow, i would prefer an option to make them unable to move (but still look around if that's possible)
    2:that they spawn inside the cobweb, and not on the corner of it.
     
  18. Offline

    waffletiem

    there is problem i have, when i create a allows there is no web. when i type "/g hang ______ 1"(1 is the name of the gallows) they spawn on the gallows, but instead of them baing caught in the web, im caught in a web that spawns at my feet 2 high. they are on the trapdoor in the gallows, but no web is there. help?
     
  19. Offline

    CloseKnight

    The web spawning code is off. It spawns it on the player who types the command and not the player who is put in the gallows.
     
  20. Offline

    Thomasdasd

    Yeah I got that bug too. The one with the cobweb. However, I've tested the plugin and it's fine, although it's still the Alpha release :) I'm watching those Java tutorials and I've learned a lot. It was different before; If you wanted a ... let's say castle. You had to build your house first and then the castle. Now the Java got the house finished etc.

    Looking forward to make my own plugins, since there is quite a lot not yet implemented in bukkit. And I think gallows is quite awesome, so I was surprised when it was not yet implemented :/
    Then I made this request, and here we are.
     
    kjhf likes this.
  21. Hi guys,
    Yes that web bug was a big derp ;)
    Updated to 0.04
     
    efstajas likes this.
  22. Offline

    zcleaver

    How to i fix it from killing my players instantly?
     
  23. What do you have your choke setting on?

    Hope this patch fixes the problem.

    0.05 everyone :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  24. Offline

    Buckethead

    cool. nice to do to griefers before i van them :)
     
  25. Offline

    Blackjack150

    18:13:13 [WARNING] Server permissions file permissions.yml is not valid YAML: while scanning for the next token
    found character '\t' that cannot start any token
    in "<reader>", line 11, column 1:
    gallow.hang:false
    Please explain
     
  26. You have done something bad to your permissions yml. Not my fault :3
    Take a read of:
    http://forums.multiplay.co.uk/minecraft/80422-basic-guide-permissions-bukkit
    then try and parse the yml through http://yaml-online-parser.appspot.com/

    Also, you're trying your luck with permissions.yml in your server folder. The plugin supports Yeti Permissions and PermissionsBukkit.
     
  27. Offline

    Henkjehh

    Cool plugin, but I think I like it more when you have to build your own gallow
     
  28. 0.07 out. You will need to reinstall your config and messages file. Hanged players and locations should be fine.
     
  29. Offline

    zcleaver

    Awesome... I will re-download this later! Thanks for fixing this!
     
  30. Offline

    Otter

    Oh I am so using this. Thanks for writing it!
     

Share This Page