mirror of
https://github.com/moparisthebest/xAuth
synced 2024-12-21 22:58:51 -05:00
Possible fix for players falling into the void
This commit is contained in:
parent
f3784c771e
commit
5b5e11e372
@ -1,6 +1,6 @@
|
||||
package com.cypherx.xauth;
|
||||
|
||||
import org.bukkit.Location;
|
||||
//import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.player.*;
|
||||
|
||||
@ -117,21 +117,20 @@ public class xAuthPlayerListener extends PlayerListener
|
||||
if (event.isCancelled())
|
||||
return;
|
||||
|
||||
Location from = event.getFrom();
|
||||
/*Location from = event.getFrom();
|
||||
Location to = event.getTo();
|
||||
|
||||
if (from.getX() == to.getX() && from.getZ() == to.getZ())
|
||||
{
|
||||
if (from.getY() > to.getY())
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
Player player = event.getPlayer();
|
||||
plugin.handleEvent(player, event);
|
||||
|
||||
if (event.isCancelled())
|
||||
player.teleport(event.getFrom());
|
||||
//player.teleportTo(event.getFrom());
|
||||
}
|
||||
|
||||
//Prevents player from picking up items
|
||||
|
Loading…
Reference in New Issue
Block a user