Some optimisations
This commit is contained in:
parent
76039112b0
commit
46ad713d9b
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue