mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 19:25:12 +01:00
Set the default game mode when player makes island.
This commit is contained in:
parent
6c75733417
commit
876ba91837
@ -271,10 +271,10 @@ public class IslandsManager {
|
||||
}
|
||||
// Known unsafe blocks
|
||||
return switch (ground) {
|
||||
// Unsafe
|
||||
case ANVIL, BARRIER, CACTUS, END_PORTAL, END_ROD, FIRE, FLOWER_POT, LADDER, LEVER, TALL_GRASS, PISTON_HEAD,
|
||||
MOVING_PISTON, TORCH, WALL_TORCH, TRIPWIRE, WATER, COBWEB, NETHER_PORTAL, MAGMA_BLOCK -> false;
|
||||
default -> true;
|
||||
// Unsafe
|
||||
case ANVIL, BARRIER, CACTUS, END_PORTAL, END_ROD, FIRE, FLOWER_POT, LADDER, LEVER, TALL_GRASS, PISTON_HEAD,
|
||||
MOVING_PISTON, TORCH, WALL_TORCH, TRIPWIRE, WATER, COBWEB, NETHER_PORTAL, MAGMA_BLOCK -> false;
|
||||
default -> true;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1153,6 +1153,9 @@ public class IslandsManager {
|
||||
if (plugin.getIWM().isOnJoinResetXP(world)) {
|
||||
user.getPlayer().setTotalExperience(0);
|
||||
}
|
||||
|
||||
// Set the game mode
|
||||
user.setGameMode(plugin.getIWM().getDefaultGameMode(world));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user