DeathPenalty
Death
Quote:Yeah, yeah I died. I'll just respawn. What is this? I can't do anything!?
Death can be extremely boring. Why not make your players become ghosts when they die? This can also be a better solution for hardcore servers, instead of them being banned for a number of hours. You can still ban them if they die too much with this plugin.
Being a ghost
When a player dies, they either teleport to a location defined by somebody who can change the spawn or to their spawn. They're now a ghost for a predefined time. A ghost can't do much. All he or she can really do is chat to other ghosts or people that have the deathpenalty.hearghosts permission.
Ghosts can't
- Break blocks
- Damage players and mobs
- Be seen by non-ghosts
- Execute commands
- Open chests and doors, use brewing stands and enchanting tables, etc
- Die
- Take damage
Credit for the idea goes to xeNium on the forums!
Permissions
There aren't many permissions, but they work with PermissionsEx, PermissionsBukkit and probably other permissions plugins.
Permission | Description |
---|---|
deathpenalty.hearghosts | Allows or disallows the player to listen to ghosts speak when he or she is not a ghost |
deathpenalty.changespawn | Allows or disallows the player from changing the spawn for ghosts |
deathpenalty.ignore | Makes a player not become a ghost when they die if this is true |
deathpenalty.resurrect | Allows a player to resurrect other players (admins do not get this by default) |
deathpenalty.see | Allows a player to see ghosts when not a ghost; Operators get this by default |
deathpenalty.add | Allows a player to add lives for other players |
Configuration
Value | Description |
---|---|
ghostTime | How long a player will be a ghost for (in seconds) when they die |
usePermissions | Whether or not to use permissions. If this is false, only admins can change the spawn and hear other ghosts. |
cakeAmount | The amount to reduce a ghost's time when a player eats cake (they may only do this once when they're a ghost). If this value is 0, it will not heal any. |
disablePortals | Enable or disable a ghost from using end and nether portals |
ghostsFly | Makes players able to fly when they are in ghost form. This switches the game mode to creative, but they can not keep the items when they are made a normal player again. |
lives | Number of lives a player has before they become a ghost again |
maxGhostTimes | Number of times a player may become a ghost before they are banned (doesn't do anything unless banOnGhostLifeDepletion is enabled); Set this to 0 if you don't want to use the banning system. |
banTime | How long (in seconds) a player is banned when their ghost times are depleted and banOnGhostLifeDepletion is enabled |
permaGhost | Whether or not ghosts are permanently ghosts |
Commands
- dp setghostspawn
- Sets the spawning location for players when they die and become ghosts. This command may be executed only by a player.
- dp setafterghostspawn
- Sets the spawning location for a ghost when he or she is made a normal player again. This may be executed only by a player.
- dp resurrect <player>
- Resurrects the player if he or she is a ghost. The executor must have the permission or be the console. Operators (admins) don't get this by default. This can be executed from the console, however.
- dp unban <player>
- Unbans a player if they are banned due to depleting their ghost times. This may be run from only the console.
- dp addlife <player>
- Adds life to a player (does not increase past the maximum set in the configuration); The permission node deathpenalty.add is required to run this command. Otherwise, it can be run from the console.
- dp fixghosts
- Forces ghosts to become hidden. This is best used for when you reload permissions and you changed a player's deathpenalty.see permission and reload. If you use the server reload command, you don't need to use this.
- dp reload
- Reloads the configuration from the file.
- timeleft
- Shows a ghost how much time they have before resurrection. If a player is not a ghost, nothing will appear.
Todo
Add a feature so that when a ghost eats cake, their incorporeal time is decreased.Add a feature to allow ghosts to fly but still not do anythingFix an issue where ghosts are not hidden from playersHave a certain number of lives before you become a ghost.Add a ghost lives system where if you become a ghost too many times, you become banned for a certain period of time.- Have separate permissions for ghosts
Thanks a bunch for your adjustments. I donated.
Hey VeryBigCrop. Thanks for your plugin. It's useful and also fun. Can you do or add following things?
Can you add that we can manually edit the text of spawning or something like. Also is it possible to give permissions to ghosts what they can do?
@Thokas
It should be fixed. It may have been caused by all of the database calls, but now it has to do that less. I'll run it on my server for a few days and see whether or not it crashes it. I'll update you on it as soon as possible. :)
@VeryBigCorp
Do you know if you fixed the server crash bug? I would love to use the plugin.
@Hulkiedulkie
I fixed that to an extent, but their inventories will still be changed if you have ghostsFly enabled. The reason for this is that players can just add items to their inventory and keep them when they are resurrected. If it's not enabled, then their inventories will stay the same.
@Chadthedj
I could work on that for the next release. That's a great idea.
How about add Spout support to make players see-through when they're ghosts?
Any way to have ghosts pull from another permissions set compared to other players?
I noticed that gost lose their inventory when they resurrect.
I'd rather not have this. Can this be changed?
Make a command /dp setcakespawn delaytime - It will spawn a cake every delaytime on your location when you execute the command. Bytheway Why VeryBigCorp does not reply my message anymore? You does not want my suggestion?
This is the error:
15:04:24 [SEVERE] Exception in thread "Timer-93" 15:04:24 [SEVERE] java.util.ConcurrentModificationException 15:04:24 [SEVERE] at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372) 15:04:24 [SEVERE] at java.util.AbstractList$Itr.next(AbstractList.java:343) 15:04:24 [SEVERE] at org.bukkit.craftbukkit.CraftWorld.getPlayers(CraftWorld.java:637) 15:04:24 [SEVERE] at com.verybigcorp.deathpenalty.DeathPenalty.getPlayer(DeathPenalty.java:631) 15:04:24 [SEVERE] at com.verybigcorp.deathpenalty.DeathPenalty.hideGhost(DeathPenalty.java:640) 15:04:24 [SEVERE] at com.verybigcorp.deathpenalty.DeathPenalty.hideGhosts(DeathPenalty.java:658) 15:04:24 [SEVERE] at com.verybigcorp.deathpenalty.DeathPenalty$DelayedHide.run(DeathPenalty.java:604) 15:04:24 [SEVERE] at java.util.TimerThread.mainLoop(Timer.java:512) 15:04:24 [SEVERE] at java.util.TimerThread.run(Timer.java:462)
This plugin was just spitting out too many errors.. Anyone else got problems? People started turning into a ghost every death instead of every 5. This plugin is a good idea but very buggy
deathpenalty.hearghosts isn't working
Still crash Nothing changed :)
@VeryBigCorp
Hey! Thanks for the quick release. Sadly, we're still experiencing the crashing issue with the plugin. After a couple reboots, I've noticed that the server will crash after awhile right and randomly when someone joins the server.
I hope you can figure this one out mate.
I love the lives feature, but I was wondering if they could be added on a per player basis. Maybe even with economy. Player speeds x amount of currency and they can purchase an additional life. Or say, player donates to the server, and buycraft will execute command /dp addlife player 1
My player base really likes the idea of the plugin, but I'm having problems with it being stable. :(
@Thokas
Oh sorry about that. I just uploaded a new version (2.0.1) to address the Factions problem.
Working great so far. Have a minor problem. Our Factions plugin is overriding the ghost spawn. Is there any way we can set a priority on the spawn location?
Awesome plugin, an essential for my pvp server!
@albireox
I have now changed it to be on GitHub :D If you want to help, that would be great!
@VeryBigCorp
Eagerly waiting for the release! Because of the crash bug we can't use it at all right now! Looking forward to it!