Prevented setting NewHaven as enemy
This commit is contained in:
parent
377d6d9035
commit
2007001562
5 changed files with 11 additions and 0 deletions
Binary file not shown.
|
@ -829,6 +829,17 @@ public class PlayerListener implements Listener { // 2015.07.16.
|
|||
}
|
||||
}
|
||||
}
|
||||
if (cmd.equalsIgnoreCase("f")) {
|
||||
String[] args = event.getMessage().substring(index + 1).split(" ");
|
||||
if (args.length > 1) {
|
||||
if (args[0].toLowerCase().equals("enemy")
|
||||
&& args[1].equalsIgnoreCase("newhaven")) {
|
||||
event.setCancelled(true);
|
||||
event.getPlayer().sendMessage(
|
||||
"§cYou are not allowed to set New Haven as your enemy faction.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue