Probably fixed errors on teleporting

This commit is contained in:
Norbi Peti 2016-05-13 12:31:27 +02:00
parent c1f0ec8bf0
commit 669c5aa616
2 changed files with 5 additions and 5 deletions

Binary file not shown.

View file

@ -712,20 +712,20 @@ public class PlayerListener implements Listener {
@EventHandler(priority = EventPriority.LOWEST)
public void onPlayerTeleport(PlayerTeleportEvent e) {
if (BoardColl.get().getFactionAt(PS.valueOf(e.getFrom())).getId()
/*if (BoardColl.get().getFactionAt(PS.valueOf(e.getFrom())).getId()
.equalsIgnoreCase("nomansland")
|| BoardColl.get().getFactionAt(PS.valueOf(e.getTo())).getId()
.equalsIgnoreCase("nomansland")) {
.equalsIgnoreCase("nomansland")) {*/
// e.setTo(e.getFrom());
e.setCancelled(true); // Relative coordinates mess it up
//e.setCancelled(true); // Relative coordinates mess it up
/*
* System.out.println("From: " + e.getFrom());
* System.out.println("To: " + e.getTo());
* System.out.println("Cause: "+e.getCause());
*/
e.getPlayer().sendMessage(
/*e.getPlayer().sendMessage(
"§cYou are not allowed to teleport to/from No Mans Land.");
}
}*/
if (MaybeOfflinePlayer.GetFromPlayer(e.getPlayer()).ChatOnly) {
e.setCancelled(true);