Refactored chunk object comparison.

Object#equals checks values inside the object. == only returns true if they refer to the same object.
This commit is contained in:
JitseB 2018-04-25 15:37:56 +02:00
parent c51f522874
commit 5f9467e265
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ public class ChunkListener implements Listener {
for (NPC npc : NPCManager.getAllNPCs()) {
Chunk npcChunk = npc.getLocation().getChunk();
if (chunk == npcChunk) {
if (chunk.equals(npcChunk)) {
// Loaded chunk with NPC in it. Showing it to the players again.
for (UUID uuid : npc.getShown()) {