aboutsummaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/brysonsteck/PlayerListener.java17
-rw-r--r--src/net/brysonsteck/Resurrection.java4
-rw-r--r--src/net/brysonsteck/plugin.yml3
3 files changed, 22 insertions, 2 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);
+ }
+}
diff --git a/src/net/brysonsteck/Resurrection.java b/src/net/brysonsteck/Resurrection.java
index c4553e8..74fc8af 100644
--- a/src/net/brysonsteck/Resurrection.java
+++ b/src/net/brysonsteck/Resurrection.java
@@ -8,7 +8,7 @@ import java.io.*;
import java.nio.Buffer;
public class Resurrection extends JavaPlugin {
- public Plugin plugin = getPlugin(Resurrection.class);
+// public Plugin plugin = getPlugin(Resurrection.class);
//spigot things
@Override
@@ -19,7 +19,7 @@ public class Resurrection extends JavaPlugin {
@Override
public void onEnable() {
super.onEnable();
-
+ System.out.println("I'm alive!");
}
// end of spigot things
diff --git a/src/net/brysonsteck/plugin.yml b/src/net/brysonsteck/plugin.yml
index e69de29..36632da 100644
--- a/src/net/brysonsteck/plugin.yml
+++ b/src/net/brysonsteck/plugin.yml
@@ -0,0 +1,3 @@
+main: net.brysonsteck.Resurrection
+name: Resurrection
+version: alpha 0.0.1 \ No newline at end of file