mirror of
https://github.com/ColdeZhang/Dominion.git
synced 2025-01-27 10:34:16 +08:00
尝试兼容一些箱子UI菜单插件
This commit is contained in:
parent
dcb27740d6
commit
895e003502
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>cn.lunadeer</groupId>
|
||||
<artifactId>Dominion</artifactId>
|
||||
<version>1.28.4-beta</version>
|
||||
<version>1.28.5-beta</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Dominion</name>
|
||||
|
@ -6,6 +6,7 @@ import cn.lunadeer.dominion.dtos.DominionDTO;
|
||||
import cn.lunadeer.dominion.dtos.Flag;
|
||||
import cn.lunadeer.dominion.dtos.PlayerDTO;
|
||||
import cn.lunadeer.minecraftpluginutils.Teleport;
|
||||
import cn.lunadeer.minecraftpluginutils.XLogger;
|
||||
import io.papermc.paper.event.entity.EntityDyeEvent;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Location;
|
||||
@ -27,6 +28,7 @@ import org.bukkit.event.inventory.InventoryOpenEvent;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.player.*;
|
||||
import org.bukkit.event.vehicle.VehicleDestroyEvent;
|
||||
import org.bukkit.inventory.CraftingInventory;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.spigotmc.event.entity.EntityMountEvent;
|
||||
|
||||
@ -203,6 +205,10 @@ public class PlayerEvents implements Listener {
|
||||
|
||||
@EventHandler(priority = EventPriority.HIGHEST) // container
|
||||
public void openContainer(InventoryOpenEvent event) {
|
||||
if (event.getInventory() instanceof CraftingInventory) {
|
||||
Dominion.logger.debug("CraftingInventory opened");
|
||||
return;
|
||||
}
|
||||
if (event.getInventory().getType() != InventoryType.CHEST &&
|
||||
event.getInventory().getType() != InventoryType.BARREL &&
|
||||
event.getInventory().getType() != InventoryType.SHULKER_BOX) {
|
||||
|
Loading…
Reference in New Issue
Block a user