File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
surf-npc-bukkit/src/main/kotlin/dev/slne/surf/npc/bukkit/listener Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 11kotlin.code.style =official
22kotlin.stdlib.default.dependency =false
33org.gradle.parallel =true
4- version =1.21.7-1.4.3 -SNAPSHOT
4+ version =1.21.7-1.4.4 -SNAPSHOT
Original file line number Diff line number Diff line change 11package dev.slne.surf.npc.bukkit.listener
22
3+ import dev.slne.surf.npc.api.npc.location.NpcLocation
34import dev.slne.surf.npc.api.npc.property.NpcProperty
45import dev.slne.surf.npc.core.controller.npcController
56import org.bukkit.event.EventHandler
@@ -15,6 +16,11 @@ class ConnectionListener : Listener {
1516 .filter {
1617 it.getPropertyValue(NpcProperty .Internal .VISIBILITY_GLOBAL , Boolean ::class ) ? : false
1718 }
19+ .filter {
20+ val npcLocation =
21+ it.getPropertyValue(NpcProperty .Internal .LOCATION , NpcLocation ::class )
22+ npcLocation == null || npcLocation.world == player.world.name
23+ }
1824 .forEach {
1925 it.spawn(player.uniqueId)
2026 }
You can’t perform that action at this time.
0 commit comments