[INACTIVE][FUN, MISC] GhostBuster v0.5, ban dead players for some time [527]

Discussion in 'Inactive/Unsupported Plugins' started by Bobby_Bonsai, Feb 25, 2011.

  1. Offline


    GhostBuster - Bans dead players for a certain amount of time
    Version: v0.5

    This plugin will punish players for dieing by baning them for a certain amount of time.

    The ban list (ghosts.yml) is maintained completely independent from the server-ban-feature.

    The freeSlotsMode is basically just an additional flag, telling the plugin only to kick in if the server is full
    (and there for freeing up some slots for other players).

    Since v0.4 you can let the user know for how long he is banned by using the placeholders %h for
    hours and %m for minutes in the messages like this:
    You're still banned for %h hours and %m minutes.
    You're still banned for 1 hours and 57 minutes.
    Created based on this request:

    • Ban dead players for a certain amount of time
    • Exception list
    • Free-slots-mode

    Source Code

    Commands (open)
    You'll need to be op to execute this commands.
    # Ban the specified player
    ghost_ban <player>
    # Unban the specified player
    ghost_unban <player>
    # List all banned players
    # Unban all players
    # Reload the configuration

    Default configuration file (plugins/GhostBuster/config.yml) (open)
    banTime: 120	# Ban time in minutes
    keepAtRestart: true		# Keep the ghost-list even if the server restarts
    freeSlotsMode: false		# Only kick-in if the server is full
    deathMessage: You've died...come back when you live again.
    stillDeadMessage: You're a ghost, you don't exist, go away.

    Example ghost list (plugins/GhostBuster/ghosts.yml) (open)
    Player: 2011-02-25T21:35:14.867Z

    Example exception list (plugins/GhostBuster/exceptions.yml) (open)
    - Player1
    - Player2

    Changelog (open)

    Version 0.5 (Download) [527]
    • Switched to Monitor-Priority
    • Fixed issues with PlugIn-Compatibility (thanks to deltahat)
    Version 0.4 (Download) [493]
    • Added support to display the ban-time in messages.
    • Removed testing code (could have lead to misguided bans)
    • Added commands: ghost_clear and ghost_reinit
    Version 0.3 (Download) [493]
    • Fixed bug which allowed players to circumvent the plugin (exiting to menu instead of respawning). The plugin now listens to the EntityDeath-Event instead of PlayerRespawn.
    • Added commands (ghost_ban, ghost_unban and ghost_list)
    • Renamed YamlHelper to avoid collision with other plugins
    • List of ghosts gets now saved on changes (if it should be saved anyway)
    Version 0.2 (Download)
    • Added exception list
    • Added free-slots-mode
    Version 0.1 (Download)
    • First Version

    Planned Features:
    • Limbo/Nether, players will only be able to spawn/play in a selected world while banned
    • Different Ban-Times based on Death reason

    Known Bugs:
    • (Possible fix issued with v0.5) Does not work with the Stats & Achievements Plugin
    • (Possible fix issued with v0.5) Possible odd side-effects with the MCStats2 Plugin
  2. Offline


    Nice plugin this one.
    Could you put a little check before ban? If server is full it bans the player, if it isnt full, it doesnt.
    Also, a exception list would be nice. Dont want me or my moderators baned :p
  3. Offline


    Thank you. And the exception-list is a very good idea!

    Baning only if the server is full? Mmmhhh...like getting slots-free for other players? That's a nice idea, too.
  4. Offline


    I dont really like the idea of banning people when they die lol. I think some may find that kind of disrupted and frustrating. What about sending them to jail? or disabling them such as becoming a ghost where they cant edit blocks and cant interact with people.
  5. Offline


    @anon: Done (that was suspiciously easy...).

    @Daveyo: Well, that's the basic idea of the plugin. You die, you're out for x minutes...so give your best. As anon pointed out, it can also be used to keep the server 'clean' and free up slots for other players.
  6. Offline


    Theres a bug somewhere very occasionally it doesn't ban people properlly.
    like if someone dies, and later i restart the server, it doesn't always save it to the file, and as a result the person becomes unbanned.
    maybe have it save to a file as soon as the person dies? there seems to be a delay currently :(

    Sending you a PM with a link to what i'm using the addon for.
  7. Offline


    I think this is not really a pleasant idea.
  8. Offline


    Atchally it is, for extreme smp.. i'm holding an event that uses it currently on my server.
    You're playing, when you die, you're out.
    Last man standing wins.
    adds more risk to the game, where if you die, you atchally die.
    makes everything more scary, adds a whole new element of danger to the game.
    It's like an entire new game mode.
    I've got it set to 10080 miniutes ban time, which works out as being 1 week.
    at the end of the week, we reset the map.
    It's obvousally not the best for a regular server, but for this situation it adds a lot to gameplay.
    we've got a normal server too, but it's a nice twist.

    it's also good for really busy servers, where you need to give more people the opportunity to play, instead of having people who're logged on constantly, as well as adding the element of danger, knowing you could be kicked if you die.
  9. Offline


    First of all, I don't understand the people in this thread who are against the idea of a deathban plugin. No one is forcing you run it on your server, and as a matter of fact it is EXACTLY what I need for mine.

    I've been using Jigabot's DeathBan plugin since it came out but it breaks when used with any of the Essentials plugins with build 440. I will be testing this plugin on my own server and reporting back.
  10. Offline


    A week, woah, are you sure you're okay? ;)

    Just giving my opinion ;)
  11. Offline


    @Infernus: And you're free to do so, of course. But it has at least one user, and that justifies it's existence in my eyes. ;)

    @Danny: How are you stopping the server? Please always use stop, because I can't guarantee for any other method that the plugins can properly unload (including saving of settings etc.). From looking at the source I can't really point my finger at something...are there any (error) messages sometimes?
  12. Offline


    May use this. Unsure.

    Can there be a command to un-death-ban someone?
  13. Offline


    @Bacu: At the moment there are no commands implemented, but I'm planning to do so in the next time.

    To lift a ban, you'd have to stop the server at the moment.
  14. Offline


    This is decent I used to use death bans but it no longer works with recommended 493. Do you think you could add the timer to your screen when you log back in. "You will be revived in 3:49" countdown ect.
  15. Offline


    @TheMap: I can't find anything wrong with it, even when used with 493...odd. Is there an error message or what's it doing? And yes, I'll add the possibility to display the remaining time in messages.
  16. Offline


    This is what im getting when people die, its filling my screen up and laggin my server. Spams about 50 times. RB 293 Fake Permissions 2.5, group manager 1.0.

    3-05 05:49:30 [SEVERE] java.lang.IllegalStateException: Failed to remove player. net.minecraft.server.EntityPlayer@1878e5 isn't in chunk 131, 137
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.PlayerInstance.b(PlayerInstance.java:49)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.PlayerManager.b(PlayerManager.java:101)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.ServerConfigurationManager.c(ServerConfigurationManager.java:113)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:90)
    2011-03-05 05:49:30 [SEVERE]     at org.bukkit.craftbukkit.entity.CraftPlayer.kickPlayer(CraftPlayer.java:125)
    2011-03-05 05:49:30 [SEVERE]     at org.bonsaimind.bukkitplugins.GhostBuster.makeGhost(GhostBuster.java:142)
    2011-03-05 05:49:30 [SEVERE]     at org.bonsaimind.bukkitplugins.GhostBusterPlayerListener.onPlayerRespawn(GhostBusterPlayerListener.java:50)
    2011-03-05 05:49:30 [SEVERE]     at org.bukkit.plugin.java.JavaPluginLoader$3.execute(JavaPluginLoader.java:140)
    2011-03-05 05:49:30 [SEVERE]     at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    2011-03-05 05:49:30 [SEVERE]     at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:225)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.ServerConfigurationManager.d(ServerConfigurationManager.java:182)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:759)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.Packet9Respawn.a(SourceFile:10)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.NetworkManager.a(SourceFile:230)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:70)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:338)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:253)
    2011-03-05 05:49:30 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
  17. Offline


    @TheMap: This is odd. I had this problem in my first test builds when players joined, but not when they died. I'll investigate it, but I'm not sure if I can reproduce it.
  18. Offline


    I've been using save-all followed by stop. :)
    It's only on very rare occasions however.
  19. Offline


    @Danny: Then this problem shouldn't happen. But I'll implement the option to dumb the file whenever the list of ghosts changes. On second thought, I've found a bug which would allow players to circumvent the plugin completely (they just need to exit to title instead of respawn...which sucks a little bit :/ ... and I'm working on a fix). Maybe this is what you're seeing?

    @TheMap: Sorry, I wasn't able to reproduce this so far. What is RB 293?

    @TheMap: I've changed the way the plugin works in v0.6, maybe this fixes your problem.
  20. Offline


    That sounds like the problem I'm having, yes.
  21. Offline


    @Danny: This should be fixed with v0.3, because I changed the detection if somebody dies.
  22. Offline


    Any chance of adding permissions? I want to use it as a pseudo deathjail for bandits and such.
  23. Offline


    Tested and working on build 531. Thanks for the great replacement for the other DeathBan plugin. The only thing I think it is missing is the countdown timer when banned players attempt to log back in. Once that gets added this will be perfect.
  24. Offline


    @treepunch: I wanted to implement it but then ran into that nasty bug and I completely forgot about it. I'll put it back on the list. :)

    @Nytemare3701: I'm not planning on doing so, no, sorry. But maybe the newly implemented commands are of help.

    @treepunch: v0.4 is out, there you go. :)
  25. Offline


    AWESOME DUDE. talk about response time.

    EDIT: Hey man, so I let the new GhostBuster.jar regenerate the GhostBuster folder and config files but I'm not seeing exactly how to include the time left message in the config. What code do I enter for that? Thanks.
  26. Offline


    Thanks. :)

    You just need to add %h and %m like this:

    You're still banned for %h hours and %m minutes.
    You're still banned for 1 hours and 57 minutes.
    I'll add that example to my first post, too.
  27. Offline


    I'm very impressed with this plugin, picking up where deathBan left off. This seems to successfully pass "death" events to HeroBounty (or rather, allow it?). Unfortunately, it doesn't seem to allow Stats & Achievements to track player deaths, which was something I was really hoping for. Do you know if there is something within GhostBuster that could be changed to allow this? Or does S&A need to be altered?
  28. Offline


    @GhostToast: Unfortunately that's because of the architecture of the plugins. See, plugins are getting events based on the priority with which they've registered themselves. My plugin uses Highest/High priority, while HeroBounty uses Normal and S&A uses the Monitor priority (which is the highest).

    • Lowest
    • Low
    • Normal
    • High
    • Highest
    • Monitor

    Bukkit calls the plugins in the order of Lowest to Monitor, which means that plugins with a lower priority get the events first. Because I kick the player at the High level, S&A does not seem to get the event anymore or does not process it correct. There is no easy solution to that I fear...at least none I can see right now. I'm not even sure if registering GhostBuster with the Monitor priority would do any good, because I don't know why S&A does not process the event (if it does get it from Bukkit).

    Maybe the event-chain gets broken if the player gets kicked (which shouldn't happen in my opinion). One or the other I'll investigate it.
    treepunch likes this.
  29. Offline


    thanks for the explanation. that makes more sense. i look forward to the results of your research.
  30. Offline


    Agreed, finally the source of all my problems has been put into words I can understand. I've got Ghostbuster running as well. I used to use Stats and Achievements but as previously stated I could not get it to register deaths. I moved over to using the MCStats2 that was just recently released and that stats tracker is counting deaths perfectly. However, now I have the problem of MCStats2 miscounting the kill count when anyone dies. I don't have any idea if this is related to the Ghostbuster plugin or how, but I thought I would throw it out there. You can see the stats tracking at stats.treepunch.us. Everything appears to be accurate except players are being given between 2-6 points per kill, seemingly at random.

Share This Page