Added sender.sendmessages
This commit is contained in:
parent
42fd476ff7
commit
9073a6b220
2 changed files with 10 additions and 4 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue