Removed all 1.13 materials

This commit is contained in:
ProSavage 2018-08-08 23:18:38 -05:00
parent 207c4daab1
commit de3f0c4c87
3 changed files with 98 additions and 57 deletions

View File

@ -213,6 +213,7 @@ public class Conf {
public static Set<Material> territoryProtectedMaterialsWhenOffline = EnumSet.noneOf(Material.class); public static Set<Material> territoryProtectedMaterialsWhenOffline = EnumSet.noneOf(Material.class);
public static Set<Material> territoryDenyUseageMaterialsWhenOffline = EnumSet.noneOf(Material.class); public static Set<Material> territoryDenyUseageMaterialsWhenOffline = EnumSet.noneOf(Material.class);
public static transient Set<EntityType> safeZoneNerfedCreatureTypes = EnumSet.noneOf(EntityType.class); public static transient Set<EntityType> safeZoneNerfedCreatureTypes = EnumSet.noneOf(EntityType.class);
// Economy settings // Economy settings
public static boolean econEnabled = false; public static boolean econEnabled = false;
public static String econUniverseAccount = ""; public static String econUniverseAccount = "";
@ -343,53 +344,54 @@ public class Conf {
territoryEnemyDenyCommands.add("tpaccept"); territoryEnemyDenyCommands.add("tpaccept");
territoryEnemyDenyCommands.add("tpa"); territoryEnemyDenyCommands.add("tpa");
territoryProtectedMaterials.add(Material.LEGACY_WOODEN_DOOR);
territoryProtectedMaterials.add(Material.LEGACY_TRAP_DOOR); //territoryProtectedMaterials.add(Material.LEGACY_WOODEN_DOOR);
territoryProtectedMaterials.add(Material.LEGACY_FENCE_GATE); //territoryProtectedMaterials.add(Material.LEGACY_TRAP_DOOR);
//territoryProtectedMaterials.add(Material.LEGACY_FENCE_GATE);
territoryProtectedMaterials.add(Material.DISPENSER); territoryProtectedMaterials.add(Material.DISPENSER);
territoryProtectedMaterials.add(Material.CHEST); territoryProtectedMaterials.add(Material.CHEST);
territoryProtectedMaterials.add(Material.FURNACE); territoryProtectedMaterials.add(Material.FURNACE);
territoryProtectedMaterials.add(Material.LEGACY_BURNING_FURNACE); //territoryProtectedMaterials.add(Material.LEGACY_BURNING_FURNACE);
territoryProtectedMaterials.add(Material.LEGACY_DIODE_BLOCK_OFF); //territoryProtectedMaterials.add(Material.LEGACY_DIODE_BLOCK_OFF);
territoryProtectedMaterials.add(Material.LEGACY_DIODE_BLOCK_ON); //territoryProtectedMaterials.add(Material.LEGACY_DIODE_BLOCK_ON);
territoryProtectedMaterials.add(Material.JUKEBOX); territoryProtectedMaterials.add(Material.JUKEBOX);
territoryProtectedMaterials.add(Material.BREWING_STAND); territoryProtectedMaterials.add(Material.BREWING_STAND);
territoryProtectedMaterials.add(Material.LEGACY_ENCHANTMENT_TABLE); //territoryProtectedMaterials.add(Material.LEGACY_ENCHANTMENT_TABLE);
territoryProtectedMaterials.add(Material.CAULDRON); territoryProtectedMaterials.add(Material.CAULDRON);
territoryProtectedMaterials.add(Material.LEGACY_SOIL); //territoryProtectedMaterials.add(Material.LEGACY_SOIL);
territoryProtectedMaterials.add(Material.BEACON); territoryProtectedMaterials.add(Material.BEACON);
territoryProtectedMaterials.add(Material.ANVIL); territoryProtectedMaterials.add(Material.ANVIL);
territoryProtectedMaterials.add(Material.TRAPPED_CHEST); territoryProtectedMaterials.add(Material.TRAPPED_CHEST);
territoryProtectedMaterials.add(Material.DROPPER); territoryProtectedMaterials.add(Material.DROPPER);
territoryProtectedMaterials.add(Material.HOPPER); territoryProtectedMaterials.add(Material.HOPPER);
territoryDenyUseageMaterials.add(Material.LEGACY_FIREBALL); //territoryDenyUseageMaterials.add(Material.LEGACY_FIREBALL);
territoryDenyUseageMaterials.add(Material.FLINT_AND_STEEL); territoryDenyUseageMaterials.add(Material.FLINT_AND_STEEL);
territoryDenyUseageMaterials.add(Material.BUCKET); territoryDenyUseageMaterials.add(Material.BUCKET);
territoryDenyUseageMaterials.add(Material.WATER_BUCKET); territoryDenyUseageMaterials.add(Material.WATER_BUCKET);
territoryDenyUseageMaterials.add(Material.LAVA_BUCKET); territoryDenyUseageMaterials.add(Material.LAVA_BUCKET);
territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_WOODEN_DOOR); // territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_WOODEN_DOOR);
territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_TRAP_DOOR); // territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_TRAP_DOOR);
territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_FENCE_GATE); //territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_FENCE_GATE);
territoryProtectedMaterialsWhenOffline.add(Material.DISPENSER); territoryProtectedMaterialsWhenOffline.add(Material.DISPENSER);
territoryProtectedMaterialsWhenOffline.add(Material.CHEST); territoryProtectedMaterialsWhenOffline.add(Material.CHEST);
territoryProtectedMaterialsWhenOffline.add(Material.FURNACE); territoryProtectedMaterialsWhenOffline.add(Material.FURNACE);
territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_BURNING_FURNACE); // territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_BURNING_FURNACE);
territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_DIODE_BLOCK_OFF); // territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_DIODE_BLOCK_OFF);
territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_DIODE_BLOCK_ON); // territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_DIODE_BLOCK_ON);
territoryProtectedMaterialsWhenOffline.add(Material.JUKEBOX); territoryProtectedMaterialsWhenOffline.add(Material.JUKEBOX);
territoryProtectedMaterialsWhenOffline.add(Material.BREWING_STAND); territoryProtectedMaterialsWhenOffline.add(Material.BREWING_STAND);
territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_ENCHANTMENT_TABLE); // territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_ENCHANTMENT_TABLE);
territoryProtectedMaterialsWhenOffline.add(Material.CAULDRON); territoryProtectedMaterialsWhenOffline.add(Material.CAULDRON);
territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_SOIL); // territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_SOIL);
territoryProtectedMaterialsWhenOffline.add(Material.BEACON); territoryProtectedMaterialsWhenOffline.add(Material.BEACON);
territoryProtectedMaterialsWhenOffline.add(Material.ANVIL); territoryProtectedMaterialsWhenOffline.add(Material.ANVIL);
territoryProtectedMaterialsWhenOffline.add(Material.TRAPPED_CHEST); territoryProtectedMaterialsWhenOffline.add(Material.TRAPPED_CHEST);
territoryProtectedMaterialsWhenOffline.add(Material.DROPPER); territoryProtectedMaterialsWhenOffline.add(Material.DROPPER);
territoryProtectedMaterialsWhenOffline.add(Material.HOPPER); territoryProtectedMaterialsWhenOffline.add(Material.HOPPER);
territoryDenyUseageMaterialsWhenOffline.add(Material.LEGACY_FIREBALL); // territoryDenyUseageMaterialsWhenOffline.add(Material.LEGACY_FIREBALL);
territoryDenyUseageMaterialsWhenOffline.add(Material.FLINT_AND_STEEL); territoryDenyUseageMaterialsWhenOffline.add(Material.FLINT_AND_STEEL);
territoryDenyUseageMaterialsWhenOffline.add(Material.BUCKET); territoryDenyUseageMaterialsWhenOffline.add(Material.BUCKET);
territoryDenyUseageMaterialsWhenOffline.add(Material.WATER_BUCKET); territoryDenyUseageMaterialsWhenOffline.add(Material.WATER_BUCKET);

View File

@ -200,13 +200,15 @@ public class FactionsPlayerListener implements Listener {
} }
if (!rel.isMember() || !otherFaction.playerHasOwnershipRights(me, loc) && player.getItemInHand().getType() != null) { if (!rel.isMember() || !otherFaction.playerHasOwnershipRights(me, loc) && player.getItemInHand().getType() != null) {
if (player.getItemInHand().getType().toString().toUpperCase().contains("DOOR")) {
return false;
}
switch (player.getItemInHand().getType()) { switch (player.getItemInHand().getType()) {
case CHEST: case CHEST:
case LEGACY_TRAP_DOOR:
case TRAPPED_CHEST: case TRAPPED_CHEST:
case SIGN: case SIGN:
case LEGACY_WOOD_DOOR:
case IRON_DOOR:
return false; return false;
default: default:
break; break;
@ -215,6 +217,7 @@ public class FactionsPlayerListener implements Listener {
PermissableAction action = null; PermissableAction action = null;
if (P.p.mc113) {
switch (block.getType()) { switch (block.getType()) {
case LEVER: case LEVER:
action = PermissableAction.LEVER; action = PermissableAction.LEVER;
@ -252,6 +255,42 @@ public class FactionsPlayerListener implements Listener {
} }
break; break;
} }
} else {
if (block.getType().toString().toUpperCase().contains("BUTTON")) {
action = PermissableAction.BUTTON;
}
switch (block.getType()) {
case LEVER:
action = PermissableAction.LEVER;
break;
case DARK_OAK_DOOR:
case ACACIA_DOOR:
case BIRCH_DOOR:
case IRON_DOOR:
case JUNGLE_DOOR:
case SPRUCE_DOOR:
case ACACIA_FENCE_GATE:
case BIRCH_FENCE_GATE:
case DARK_OAK_FENCE_GATE:
case JUNGLE_FENCE_GATE:
case SPRUCE_FENCE_GATE:
action = PermissableAction.DOOR;
break;
case CHEST:
case ENDER_CHEST:
case TRAPPED_CHEST:
action = PermissableAction.CONTAINER;
break;
default:
// Check for doors that might have diff material name in old version.
if (block.getType().name().contains("DOOR")) {
action = PermissableAction.DOOR;
}
break;
}
}
// We only care about some material types. // We only care about some material types.
if (otherFaction.hasPlayersOnline()) { if (otherFaction.hasPlayersOnline()) {
if (!Conf.territoryProtectedMaterials.contains(material)) { if (!Conf.territoryProtectedMaterials.contains(material)) {

View File

@ -1,5 +1,5 @@
name: Factions name: Factions
version: ${project.version}-1.4-BETA-6 version: ${project.version}-1.4-BETA-7
api-version: 1.13 api-version: 1.13
main: com.massivecraft.factions.P main: com.massivecraft.factions.P
authors: [Olof Larsson, Brett Flannigan, drtshock, ProSavage] authors: [Olof Larsson, Brett Flannigan, drtshock, ProSavage]