seeing if playerlistener class is working properly

This commit is contained in:
Bryson Steck 2021-06-06 10:54:49 -06:00
parent 2968f7b9c1
commit 6d718d7627
5 changed files with 19 additions and 1 deletions

16
TODO.md Normal file
View file

@ -0,0 +1,16 @@
# TODO List
### For first release
* figure out how to get the player.data file to add a user when one joins the server for the first time
* get the player death event working
* figure out how to convert milliseconds to an actual date and time for the end user
* figure out commands and how to use them
* `about`
* `resurrect PLAYER` (resurrects a player now if needed)
### For later releases
* add ability to change time with new commands
* `change-time MILLISECONDS` (0 for default 1 day wait time)
* figure out how to get a version updater working using the web server (using JSON hopefully)

View file

@ -8,6 +8,7 @@ import org.bukkit.event.entity.PlayerDeathEvent;
public class PlayerListener implements Listener { public class PlayerListener implements Listener {
@EventHandler @EventHandler
public void onDeath(PlayerDeathEvent e) { public void onDeath(PlayerDeathEvent e) {
System.out.println("Resurrection: A player has died!");
Player p = e.getEntity(); Player p = e.getEntity();
Long timeOfDeath = System.currentTimeMillis(); Long timeOfDeath = System.currentTimeMillis();
Long resurrectionTime = timeOfDeath + 86400000; Long resurrectionTime = timeOfDeath + 86400000;

View file

@ -19,7 +19,8 @@ public class Resurrection extends JavaPlugin {
@Override @Override
public void onEnable() { public void onEnable() {
super.onEnable(); super.onEnable();
System.out.println("I'm alive!"); System.out.println("Resurrection: I'm alive!");
PlayerListener playerListener = new PlayerListener();
} }
// end of spigot things // end of spigot things