Skip to content

Commit 5b36d72

Browse files
committed
Stop dismounting when inside world border
1 parent 3436ad1 commit 5b36d72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/world/bentobox/crowdbound/listeners/PlayerListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ public void onEntityMount(EntityMountEvent event) {
250250
return;
251251
}
252252
// Eject from mount if outside the protection range
253-
if (addon.getIslands().getProtectedIslandAt(loc).isEmpty()) {
253+
if (!player.getWorldBorder().isInside(loc)) {
254254
// Force the dismount event for custom entities
255255
if (!event.getMount().eject()) {
256256
var dismountEvent = new EntityDismountEvent(player, event.getMount());

0 commit comments

Comments
 (0)