mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-24 00:51:22 +01:00
Handle vaults as use, crafters as chest-access.
This commit is contained in:
parent
af645ea2e4
commit
b269d7e264
@ -22,9 +22,7 @@
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.sk89q.worldguard.protection.flags.Flags;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.Tag;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.potion.PotionEffect;
|
||||
@ -872,7 +870,7 @@ private static void putMaterialTag(Tag<Material> tag, Integer value) {
|
||||
MATERIAL_FLAGS.put(Material.TRIAL_SPAWNER, 0);
|
||||
MATERIAL_FLAGS.put(Material.TRIAL_KEY, 0);
|
||||
MATERIAL_FLAGS.put(Material.OMINOUS_TRIAL_KEY, 0);
|
||||
MATERIAL_FLAGS.put(Material.VAULT, 0);
|
||||
MATERIAL_FLAGS.put(Material.VAULT, MODIFIED_ON_RIGHT);
|
||||
MATERIAL_FLAGS.put(Material.OMINOUS_BOTTLE, 0);
|
||||
MATERIAL_FLAGS.put(Material.BREEZE_ROD, 0);
|
||||
MATERIAL_FLAGS.put(Material.WIND_CHARGE, 0);
|
||||
@ -1165,6 +1163,7 @@ public static boolean isInventoryBlock(Material material) {
|
||||
|| material == Material.BLAST_FURNACE
|
||||
|| material == Material.SMOKER
|
||||
|| material == Material.CHISELED_BOOKSHELF
|
||||
|| material == Material.CRAFTER
|
||||
|| Tag.ITEMS_CHEST_BOATS.isTagged(material)
|
||||
|| Tag.SHULKER_BOXES.isTagged(material);
|
||||
}
|
||||
@ -1324,7 +1323,7 @@ public static boolean isUseFlagApplicable(Material material) {
|
||||
}
|
||||
return switch (material) {
|
||||
case LEVER, LECTERN, ENCHANTING_TABLE, BELL, LOOM,
|
||||
CARTOGRAPHY_TABLE, STONECUTTER, GRINDSTONE -> true;
|
||||
CARTOGRAPHY_TABLE, STONECUTTER, GRINDSTONE, VAULT -> true;
|
||||
default -> false;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user