Speed 0 when not logged!

This commit is contained in:
Gabriele C
2015-09-19 22:28:55 +02:00
parent dc35d768aa
commit b427d14bcb
6 changed files with 22 additions and 0 deletions
@@ -486,6 +486,10 @@ public class AdminCommand implements CommandExecutor {
LimboCache.getInstance().getLimboPlayer(name).setMessageTaskId(sched.runTaskAsynchronously(plugin, new MessageTask(plugin, name, m.send("reg_msg"), interval)));
if (Settings.applyBlindEffect)
target.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, Settings.getRegistrationTimeout * 20, 2));
if (!Settings.isMovementAllowed) {
target.setWalkSpeed(0.0f);
target.setFlySpeed(0.0f);
}
m.send(target, "unregistered");
}
}
@@ -109,6 +109,10 @@ public class UnregisterCommand implements CommandExecutor {
}
if (Settings.applyBlindEffect)
player.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, Settings.getRegistrationTimeout * 20, 2));
if (!Settings.isMovementAllowed) {
player.setWalkSpeed(0.0f);
player.setFlySpeed(0.0f);
}
m.send(player, "unregistered");
ConsoleLogger.info(player.getDisplayName() + " unregistered himself");
if (Settings.isTeleportToSpawnEnabled && !Settings.noTeleport) {