File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
surf-npc-bukkit/src/main/kotlin/dev/slne/surf/npc/bukkit/listener Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,10 @@ class NpcListener : PacketListener {
2828 ? : continue
2929 val playerLoc = player.location
3030
31+ if (playerLoc.world.name != npcLoc.world) {
32+ continue
33+ }
34+
3135 if (playerLoc.distanceSquared(npcLoc.toLocation()) > 20 * 20 ) {
3236 continue
3337 }
@@ -43,6 +47,10 @@ class NpcListener : PacketListener {
4347 ? : continue
4448 val playerLoc = player.location
4549
50+ if (playerLoc.world.name != npcLoc.world) {
51+ continue
52+ }
53+
4654 if (playerLoc.distanceSquared(npcLoc.toLocation()) > 1 * 1 ) {
4755 continue
4856 }
@@ -82,6 +90,7 @@ class NpcListener : PacketListener {
8290 ).callEvent()
8391 }
8492 }
93+
8594 WrapperPlayClientInteractEntity .InteractAction .INTERACT_AT -> {
8695 // This is already handled by INTERACT action, so we can ignore it.
8796 }
You can’t perform that action at this time.
0 commit comments