Some optimisations

This commit is contained in:
MrMicky 2018-05-11 01:45:12 +02:00
parent 76039112b0
commit 46ad713d9b
2 changed files with 4 additions and 4 deletions

View File

@ -72,7 +72,7 @@ public class ChunkListener implements Listener {
// Show the NPC (if in range).
if (inRange) {
npc.show(Bukkit.getPlayer(uuid), true);
npc.show(player, true);
}
}
}

View File

@ -61,11 +61,11 @@ public class PacketListener {
UUID uuid = player.getUniqueId();
delay.add(uuid);
Bukkit.getScheduler().runTaskLater(plugin, () -> delay.remove(uuid), 1);
Bukkit.getScheduler().runTask(plugin, () -> delay.remove(uuid));
return null;
} else {
return super.onPacketInAsync(player, channel, packet);
}
return super.onPacketInAsync(player, channel, packet);
}
};
}