Fix a bug caused by Ghost_chu

Former-commit-id: 32bd53178f0dda33988a0a8cc09e4464fc3da85e
This commit is contained in:
sandtechnology committed 2020-02-19 22:18:16 +08:00
1 parent c60e7625df
commit 5cf38fba3e
1 file changed
+1 -1
@@ -66,7 +66,7 @@ public class VirtualDisplayItem extends DisplayItem {
//some time shop can be loaded when world isn't loaded
if(Util.isLoaded(shop.getLocation())){
//Let nearby player can saw fake item
packetSenders = shop.getLocation().getWorld().getNearbyEntities(shop.getLocation(), plugin.getServer().getViewDistance() * 16, shop.getLocation().getWorld().getMaxHeight(), 256).stream().map(Entity::getUniqueId).collect(Collectors.toCollection(ConcurrentSkipListSet::new));
packetSenders = shop.getLocation().getWorld().getNearbyEntities(shop.getLocation(), plugin.getServer().getViewDistance() * 16, shop.getLocation().getWorld().getMaxHeight(), plugin.getServer().getViewDistance() * 16).stream().map(Entity::getUniqueId).collect(Collectors.toCollection(ConcurrentSkipListSet::new));
}
protocolManager.addPacketListener(new PacketAdapter(plugin, ListenerPriority.NORMAL, PacketType.Play.Server.MAP_CHUNK) {
@Override