diff options
author | Bryson Steck <steck.bryson@gmail.com> | 2021-06-06 00:15:30 -0600 |
---|---|---|
committer | Bryson Steck <steck.bryson@gmail.com> | 2021-06-06 00:15:30 -0600 |
commit | d308671441ce473bc2b56fa166d7a214aec980c6 (patch) | |
tree | a5736c00452c6ab4bebf833ba594a6027bf33069 /src/net/brysonsteck/PlayerListener.java | |
parent | 6b9e7b28e59a274ee2881f388649357b651cf037 (diff) | |
download | resurrection-d308671441ce473bc2b56fa166d7a214aec980c6.tar resurrection-d308671441ce473bc2b56fa166d7a214aec980c6.tar.gz resurrection-d308671441ce473bc2b56fa166d7a214aec980c6.tar.bz2 |
allowing out folder for now
Diffstat (limited to 'src/net/brysonsteck/PlayerListener.java')
-rw-r--r-- | src/net/brysonsteck/PlayerListener.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/net/brysonsteck/PlayerListener.java b/src/net/brysonsteck/PlayerListener.java new file mode 100644 index 0000000..8a57624 --- /dev/null +++ b/src/net/brysonsteck/PlayerListener.java @@ -0,0 +1,17 @@ +package net.brysonsteck; + +import org.bukkit.entity.Player; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.entity.PlayerDeathEvent; + +public class PlayerListener implements Listener { + @EventHandler + public void onDeath(PlayerDeathEvent e) { + Player p = e.getEntity(); + Long timeOfDeath = System.currentTimeMillis(); + Long resurrectionTime = timeOfDeath + 86400000; + + p.sendMessage("You have died at " + timeOfDeath + ". You will respawn at " + resurrectionTime); + } +} |