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.

PermissionDescription
deathpenalty.hearghostsAllows or disallows the player to listen to ghosts speak when he or she is not a ghost
deathpenalty.changespawnAllows or disallows the player from changing the spawn for ghosts
deathpenalty.ignoreMakes a player not become a ghost when they die if this is true
deathpenalty.resurrectAllows a player to resurrect other players (admins do not get this by default)
deathpenalty.seeAllows a player to see ghosts when not a ghost; Operators get this by default
deathpenalty.addAllows a player to add lives for other players

Configuration

ValueDescription
ghostTimeHow long a player will be a ghost for (in seconds) when they die
usePermissionsWhether or not to use permissions. If this is false, only admins can change the spawn and hear other ghosts.
cakeAmountThe 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.
disablePortalsEnable or disable a ghost from using end and nether portals
ghostsFlyMakes 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.
livesNumber of lives a player has before they become a ghost again
maxGhostTimesNumber 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.
banTimeHow long (in seconds) a player is banned when their ghost times are depleted and banOnGhostLifeDepletion is enabled
permaGhostWhether 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.

Buy me a drink :D

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 anything
  • Fix an issue where ghosts are not hidden from players
  • Have 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

Source on GitHub


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files