mirror of
https://github.com/kaboomserver/icontrolu.git
synced 2024-12-01 03:36:48 -05:00
Latest changes
This commit is contained in:
parent
90e2e27a39
commit
d0c0ccac13
1 changed files with 3 additions and 2 deletions
|
@ -48,6 +48,7 @@ class Tick extends BukkitRunnable {
|
|||
target.teleport(controller);
|
||||
}
|
||||
|
||||
target.setAllowFlight(controller.getAllowFlight());
|
||||
target.setExhaustion(controller.getExhaustion());
|
||||
target.setFlying(controller.isFlying());
|
||||
target.setFoodLevel(controller.getFoodLevel());
|
||||
|
@ -161,7 +162,7 @@ class Events implements Listener {
|
|||
|
||||
for (Player otherPlayer: Bukkit.getOnlinePlayers()) {
|
||||
/* 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.controllerFor.remove(player.getUniqueId());
|
||||
|
||||
|
@ -188,7 +189,7 @@ class Events implements Listener {
|
|||
}
|
||||
|
||||
/* 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.controllerFor.remove(otherPlayer.getUniqueId());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue