mirror of
https://github.com/kaboomserver/icontrolu.git
synced 2024-05-20 20:11:22 +00:00
Latest changes
This commit is contained in:
parent
90e2e27a39
commit
d0c0ccac13
|
@ -48,6 +48,7 @@ class Tick extends BukkitRunnable {
|
||||||
target.teleport(controller);
|
target.teleport(controller);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
target.setAllowFlight(controller.getAllowFlight());
|
||||||
target.setExhaustion(controller.getExhaustion());
|
target.setExhaustion(controller.getExhaustion());
|
||||||
target.setFlying(controller.isFlying());
|
target.setFlying(controller.isFlying());
|
||||||
target.setFoodLevel(controller.getFoodLevel());
|
target.setFoodLevel(controller.getFoodLevel());
|
||||||
|
@ -161,7 +162,7 @@ class Events implements Listener {
|
||||||
|
|
||||||
for (Player otherPlayer: Bukkit.getOnlinePlayers()) {
|
for (Player otherPlayer: Bukkit.getOnlinePlayers()) {
|
||||||
/* Target disconnects */
|
/* Target disconnects */
|
||||||
if (main.controllerFor.get(player.getUniqueId()).equals(otherPlayer)) {
|
if (main.controllerFor.containsKey(player.getUniqueId()) && main.controllerFor.get(player.getUniqueId()).equals(otherPlayer)) {
|
||||||
main.targetFor.remove(otherPlayer.getUniqueId());
|
main.targetFor.remove(otherPlayer.getUniqueId());
|
||||||
main.controllerFor.remove(player.getUniqueId());
|
main.controllerFor.remove(player.getUniqueId());
|
||||||
|
|
||||||
|
@ -188,7 +189,7 @@ class Events implements Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Controller disconnects */
|
/* Controller disconnects */
|
||||||
if (main.targetFor.get(player.getUniqueId()).equals(otherPlayer)) {
|
if (main.targetFor.containsKey(player.getUniqueId()) && main.targetFor.get(player.getUniqueId()).equals(otherPlayer)) {
|
||||||
main.targetFor.remove(player.getUniqueId());
|
main.targetFor.remove(player.getUniqueId());
|
||||||
main.controllerFor.remove(otherPlayer.getUniqueId());
|
main.controllerFor.remove(otherPlayer.getUniqueId());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue