Fixing Detonator #158
@ -33,7 +33,8 @@ public class CommandDetonator implements CommandExecutor {
|
||||
private void help(Player player) {
|
||||
player.sendMessage("§8/§edetonator wand §8- §7Legt den Fernzünder ins Inventar");
|
||||
player.sendMessage("§8/§edetonator detonate §8- §7Benutzt den Fernzünder");
|
||||
player.sendMessage("§8/§edetonator reset §8- §7Löscht alle markierten Positionen");
|
||||
player.sendMessage("§8/§edetonator reset §8- §7Lösche alle markierten Positionen");
|
||||
player.sendMessage("§8/§edetonator remove §8- §7Entferne den Fernzünder");
|
||||
}
|
||||
|
||||
private boolean permissionCheck(Player player) {
|
||||
@ -65,16 +66,20 @@ public class CommandDetonator implements CommandExecutor {
|
||||
player.updateInventory();
|
||||
Detonator.getDetonator(player);
|
||||
break;
|
||||
case "delete":
|
||||
case "reset":
|
||||
case "remove":
|
||||
Detonator.deleteDetonator(player);
|
||||
player.getInventory().removeItem(Detonator.WAND);
|
||||
break;
|
||||
case "detonate":
|
||||
case "click":
|
||||
case "use":
|
||||
Detonator.getDetonator(player).execute();
|
||||
break;
|
||||
case "clear":
|
||||
case "delete":
|
||||
case "reset":
|
||||
Detonator.getDetonator(player).clearLocs();
|
||||
break;
|
||||
default:
|
||||
help(player);
|
||||
}
|
||||
|
@ -163,7 +163,8 @@ public class Detonator implements Listener {
|
||||
|
||||
@EventHandler
|
||||
public void onPlayerQuit(PlayerQuitEvent event) {
|
||||
deleteDetonator(event.getPlayer());
|
||||
if(event.getPlayer().equals(player))
|
||||
deleteDetonator(player);
|
||||
}
|
||||
|
||||
Set<Detoloader.DetonatorActivation> getLocations() {
|
||||
@ -174,6 +175,10 @@ public class Detonator implements Listener {
|
||||
return player;
|
||||
}
|
||||
|
||||
public void clearLocs() {
|
||||
locs.clear();
|
||||
}
|
||||
|
||||
void print(String message, boolean withSize){
|
||||
if(withSize)
|
||||
getPlayer().spigot().sendMessage(ChatMessageType.ACTION_BAR, TextComponent.fromLegacyText(message + " §8" + getLocations().size()));
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren