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
Would be cool if you made it compatible with RandomSpawn.
Server crashed on build 2.2 with CB 1.2.5. with this error
2012-05-02 20:30:40 [SEVERE] java.util.ConcurrentModificationException 2012-05-02 20:30:40 [SEVERE] at java.util.ArrayList$Itr.checkForComodification(Unknown Source) 2012-05-02 20:30:40 [SEVERE] at java.util.ArrayList$Itr.next(Unknown Source) 2012-05-02 20:30:40 [SEVERE] at net.minecraft.server.World.tickEntities(World.java:1177) 2012-05-02 20:30:40 [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:542) 2012-05-02 20:30:40 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449) 2012-05-02 20:30:40 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) 2012-05-02 20:30:40 [SEVERE] Unexpected exception java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(Unknown Source) at java.util.ArrayList$Itr.next(Unknown Source) at net.minecraft.server.World.tickEntities(World.java:1177) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:542) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
My server crashes a few times per day. I don't know if it is because of DeathPenalty but that is always the first addon that I see in the error report.
I saved the error report at http://nukepowered.net/hs_err_pid17854.log (I have more if you need them).
So the problem server restarts after couple of minutes here is warning
[WARNING] Could not properly handle event PLAYER_TELEPORT: java.lang.IllegalAccessError: Synchronized code got accessed from another thread: com.verybigcorp.deathpenalty.DeathPenalty$EventListener$2 at org.bukkit.event.Listener.onPlayerTeleport(Listener:0) at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) 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:347) at org.bukkit.craftbukkit.entity.CraftEntity.teleport(CraftEntity.java:167) at com.verybigcorp.deathpenalty.DeathPenalty$EventListener$2.run(DeathPenalty.java:454) 12:56:48 [INFO] This error is logged only once: it could have occurred multiple
@GioboiMC
@FrostyJacks
@FrostyJacks
@JoneKone
I've re-released v2.2 (modified, of course :P) and after testing, it seems to be working fine. Sorry for the bad version.
@GioboiMC
Oh! :P That's weird. I don't really have the time to fix the plugin, so I may just hand it over to somebody else. I'll try to fix it before I hand it over so they don't have to go through this torture.
@VeryBigCorp
EVERY TIME THEY DIE it says they have TWO lives left.
@GioboiMC
Well if you have three lives, you're alive for one, then if you die, it goes down to two. So, the first time you die, it will go down to two.
@FrostyJacks
Yes, downgrading to 2.1 fixed it :P
Thanks anyway :)
Hi,
Great plug-in. Having an issue though, can't resurrect people. They get the message "Move to be resurrected..." but they remain a ghost. Deleting the database file doesn't remove the ghosts.
Any help much appreciated!
@VeryBigCorp
That version doesn't work either. With that version, every time someone dies it says they have 2 lives left, I set it so that they should have 3 lives with a 60 second ghost after that. Please fix!
@GioboiMC
@JoneKone
@antanas258
Sorry about this. I seem to have broken something in 2.2... I've retested 2.1 and it works fine. For now you can use 2.1 until I release a fixing version.
I tried to make it so that people are a ghost for 60 seconds every third death. The plugin doesn't work at all. People become a ghost after one death and stay a ghost forever. I tried to use nodes to make it so that everyone can see what ghosts say, that doesn't work either. This plugin is a great idea and would really help my server but is a buggy mess. Please fix your plugin!
"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."
Hi i'm new to this plugin. The flying thing can be achieved with fly only option in bukkit you don't have to set Creative mode anymore.
So today i got another problem First one is tiem is up move and nothink happens and another one is that than you restart minecraft you can;t use /login [pass] so you stand in one place but please tell me what to do with first problem
Possibly make it possible to support Vault. So that when servers us like herochat. It would make them chat in there. As i know it will most likely not work with that. If ghosts are talking to each other..
@wickedfable
I tried to implement your first idea, but it just slowed the server down immensely. I will, however, supplement the plugin with your second idea. It's really useful for many people (especially for non-English speakers)
Great plugin, VeryBigCorp. It's very simple to use and functions very well. Would you consider adding an option to make players hold a "resurrection item" of some sort in order to revive another player? Possibly one that could be determined in the config files. I want players on the server to be able to resurrect each other but not freely. I was also wondering if you could allow for configuring the messages the plugin displays?
In any case, these are not necessary, they would just be neat additions. The plugin works wonderfully and I thank you for the work you have put in to it.
Cheers, -wicked.fable
@Hulkiedulkie
I hope my plugin is useful to your server! Thanks for the donation :D