mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 00:25:32 +01:00
Little bit extra sanity checking.
This commit is contained in:
parent
5d372b8149
commit
8718d59286
@ -160,11 +160,14 @@ public class EssentialsPlayerListener implements Listener
|
||||
user.setLastLogin(System.currentTimeMillis());
|
||||
user.updateActivity(false);
|
||||
|
||||
for (String p : ess.getVanishedPlayers())
|
||||
if (!ess.getVanishedPlayers().isEmpty() && !user.isAuthorized("essentials.vanish.see"))
|
||||
{
|
||||
if (!user.isAuthorized("essentials.vanish.see"))
|
||||
for (String p : ess.getVanishedPlayers())
|
||||
{
|
||||
user.hidePlayer(ess.getUser(p).getBase());
|
||||
Player toVanish = ess.getUser(p).getBase();
|
||||
if (toVanish.isOnline()) {
|
||||
user.hidePlayer(toVanish);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -384,7 +387,7 @@ public class EssentialsPlayerListener implements Listener
|
||||
}
|
||||
break;
|
||||
case LEFT_CLICK_AIR:
|
||||
if (event.getPlayer().isFlying())
|
||||
if (event.getPlayer().isFlying())
|
||||
{
|
||||
final User user = ess.getUser(event.getPlayer());
|
||||
if (user.isFlyClickJump())
|
||||
@ -423,7 +426,8 @@ public class EssentialsPlayerListener implements Listener
|
||||
Location loc = user.getLocation();
|
||||
loc.setX(otarget.getX());
|
||||
loc.setZ(otarget.getZ());
|
||||
while (Util.isBlockDamaging(loc.getWorld(), loc.getBlockX(), loc.getBlockY() -1, loc.getBlockZ())) {
|
||||
while (Util.isBlockDamaging(loc.getWorld(), loc.getBlockX(), loc.getBlockY() - 1, loc.getBlockZ()))
|
||||
{
|
||||
loc.setY(loc.getY() + 1d);
|
||||
}
|
||||
user.getBase().teleport(loc, TeleportCause.PLUGIN);
|
||||
|
Loading…
Reference in New Issue
Block a user