From 9073a6b2206af2419baa14a85b4ec0184af5d9a9 Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Tue, 23 Aug 2016 23:39:53 -0400 Subject: [PATCH] Added sender.sendmessages --- src/iie/DeathListener.java | 3 +++ src/iie/HelloWorld.java | 11 +++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/iie/DeathListener.java b/src/iie/DeathListener.java index c2ad90f..67f8611 100644 --- a/src/iie/DeathListener.java +++ b/src/iie/DeathListener.java @@ -34,6 +34,9 @@ public class DeathListener implements Listener { if (worldString == "hardcore"){ plugin.deathMap.put(playerString, timeString); player.sendMessage(plugin.deathMap.toString()); + + player.sendMessage("Key saved: " + playerString); + player.sendMessage("Data saved: " + plugin.deathMap.get(playerString)); } } diff --git a/src/iie/HelloWorld.java b/src/iie/HelloWorld.java index c78b584..f57cfec 100644 --- a/src/iie/HelloWorld.java +++ b/src/iie/HelloWorld.java @@ -31,9 +31,13 @@ public class HelloWorld implements CommandExecutor { long currentTime = System.currentTimeMillis(); String playername = sender.getName(); long deathTime = 0; - - if (plugin.deathMap.get(playername) != null){ - deathTime = Long.parseLong(plugin.deathMap.get(playername)); + + sender.sendMessage("Playername: " + playername); + sender.sendMessage("Data Imported: " + plugin.deathMap.get(playername)); + + if (plugin.deathMap.get(playername) != null){ + deathTime = Long.parseLong(plugin.deathMap.get(playername)); + sender.sendMessage("DeathTime: " + deathTime); }else{ sender.sendMessage("you have never died in hardcore"); Player player = (Player) sender; @@ -46,7 +50,6 @@ public class HelloWorld implements CommandExecutor { //sender.sendMessage(String.valueOf(deathTime)); //sender.sendMessage(String.valueOf(currentTime)); - if (currentTime - deathTime >= 86400000 && deathTime != 0){ sender.sendMessage((86400000 - (currentTime - deathTime) ) /3600000 + " hours have passed since you died in hardcore last"); Player player = (Player) sender;