Riding animals buck off the player now on gamemode change
This commit is contained in:
parent
5d7dee727b
commit
58a092267a
1 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@ import java.util.Map;
|
|||
import java.util.WeakHashMap;
|
||||
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.entity.Animals;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
|
@ -85,6 +86,9 @@ public class ModInventories extends CoreModule<LimitedCreative> {
|
|||
if (plugin.getPermManager().hasPermission(player, InventoryPermissions.KEEP_INVENTORY))
|
||||
return;
|
||||
player.closeInventory();
|
||||
if (player.getVehicle() != null && player.getVehicle() instanceof Animals) {
|
||||
player.leaveVehicle();
|
||||
}
|
||||
|
||||
GameMode cgm = player.getGameMode();
|
||||
if (gm == GameMode.ADVENTURE && !config.getSeparateAdventure())
|
||||
|
|
Loading…
Reference in a new issue