Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
All multiversion materials from conf now work.
Browse files Browse the repository at this point in the history
  • Loading branch information
prosavage committed Aug 19, 2018
1 parent 075264b commit 855d872
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 32 deletions.
37 changes: 19 additions & 18 deletions src/main/java/com/massivecraft/factions/Conf.java
Original file line number Diff line number Diff line change
Expand Up @@ -345,53 +345,54 @@ public class Conf {
territoryEnemyDenyCommands.add("tpa");


//territoryProtectedMaterials.add(Material.LEGACY_WOODEN_DOOR);
//territoryProtectedMaterials.add(Material.LEGACY_TRAP_DOOR);
//territoryProtectedMaterials.add(Material.LEGACY_FENCE_GATE);

territoryProtectedMaterials.add(P.p.WOODEN_DOOR);
territoryProtectedMaterials.add(P.p.TRAP_DOOR);
territoryProtectedMaterials.add(P.p.FENCE_GATE);
territoryProtectedMaterials.add(Material.DISPENSER);
territoryProtectedMaterials.add(Material.CHEST);
territoryProtectedMaterials.add(Material.FURNACE);
//territoryProtectedMaterials.add(Material.LEGACY_BURNING_FURNACE);
//territoryProtectedMaterials.add(Material.LEGACY_DIODE_BLOCK_OFF);
//territoryProtectedMaterials.add(Material.LEGACY_DIODE_BLOCK_ON);
territoryProtectedMaterials.add(P.p.BURNING_FURNACE);
territoryProtectedMaterials.add(P.p.DIODE_BLOCK_OFF);
territoryProtectedMaterials.add(P.p.DIODE_BLOCK_ON);
territoryProtectedMaterials.add(Material.JUKEBOX);
territoryProtectedMaterials.add(Material.BREWING_STAND);
//territoryProtectedMaterials.add(Material.LEGACY_ENCHANTMENT_TABLE);
territoryProtectedMaterials.add(P.p.ENCHANTMENT_TABLE);
territoryProtectedMaterials.add(Material.CAULDRON);
//territoryProtectedMaterials.add(Material.LEGACY_SOIL);
territoryProtectedMaterials.add(P.p.ENCHANTMENT_TABLE);
territoryProtectedMaterials.add(Material.BEACON);
territoryProtectedMaterials.add(Material.ANVIL);
territoryProtectedMaterials.add(Material.TRAPPED_CHEST);
territoryProtectedMaterials.add(Material.DROPPER);
territoryProtectedMaterials.add(Material.HOPPER);

//territoryDenyUseageMaterials.add(Material.LEGACY_FIREBALL);
territoryDenyUseageMaterials.add(P.p.FIREBALL);
territoryDenyUseageMaterials.add(Material.FLINT_AND_STEEL);
territoryDenyUseageMaterials.add(Material.BUCKET);
territoryDenyUseageMaterials.add(Material.WATER_BUCKET);
territoryDenyUseageMaterials.add(Material.LAVA_BUCKET);

// territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_WOODEN_DOOR);
// territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_TRAP_DOOR);
//territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_FENCE_GATE);
territoryProtectedMaterialsWhenOffline.add(P.p.WOODEN_DOOR);
territoryProtectedMaterialsWhenOffline.add(P.p.TRAP_DOOR);
territoryProtectedMaterialsWhenOffline.add(P.p.FENCE_GATE);
territoryProtectedMaterialsWhenOffline.add(Material.DISPENSER);
territoryProtectedMaterialsWhenOffline.add(Material.CHEST);
territoryProtectedMaterialsWhenOffline.add(Material.FURNACE);
// territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_BURNING_FURNACE);
// territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_DIODE_BLOCK_OFF);
// territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_DIODE_BLOCK_ON);
territoryProtectedMaterialsWhenOffline.add(P.p.BURNING_FURNACE);
territoryProtectedMaterialsWhenOffline.add(P.p.DIODE_BLOCK_OFF);
territoryProtectedMaterialsWhenOffline.add(P.p.DIODE_BLOCK_OFF);
territoryProtectedMaterialsWhenOffline.add(Material.JUKEBOX);
territoryProtectedMaterialsWhenOffline.add(Material.BREWING_STAND);
// territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_ENCHANTMENT_TABLE);
territoryProtectedMaterialsWhenOffline.add(P.p.ENCHANTMENT_TABLE);
territoryProtectedMaterialsWhenOffline.add(Material.CAULDRON);
// territoryProtectedMaterialsWhenOffline.add(Material.LEGACY_SOIL);
territoryProtectedMaterialsWhenOffline.add(P.p.SOIL);
territoryProtectedMaterialsWhenOffline.add(Material.BEACON);
territoryProtectedMaterialsWhenOffline.add(Material.ANVIL);
territoryProtectedMaterialsWhenOffline.add(Material.TRAPPED_CHEST);
territoryProtectedMaterialsWhenOffline.add(Material.DROPPER);
territoryProtectedMaterialsWhenOffline.add(Material.HOPPER);

// territoryDenyUseageMaterialsWhenOffline.add(Material.LEGACY_FIREBALL);
territoryDenyUseageMaterialsWhenOffline.add(P.p.FIREBALL);
territoryDenyUseageMaterialsWhenOffline.add(Material.FLINT_AND_STEEL);
territoryDenyUseageMaterialsWhenOffline.add(Material.BUCKET);
territoryDenyUseageMaterialsWhenOffline.add(Material.WATER_BUCKET);
Expand Down
37 changes: 23 additions & 14 deletions src/main/java/com/massivecraft/factions/P.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,20 +212,12 @@ public void onEnable() {


//multiversion material fields
public Material SUGAR_CANE_BLOCK;
public Material BANNER;
public Material CROPS;
public Material REDSTONE_LAMP_ON;
public Material STAINED_GLASS;
public Material STATIONARY_WATER;
public Material STAINED_CLAY;
public Material WOOD_BUTTON;
public Material SOIL;
public Material MOB_SPANWER;
public Material THIN_GLASS;
public Material IRON_FENCE;
public Material NETHER_FENCE;
public Material FENCE;
public Material SUGAR_CANE_BLOCK, BANNER, CROPS, REDSTONE_LAMP_ON,
STAINED_GLASS, STATIONARY_WATER, STAINED_CLAY, WOOD_BUTTON,
SOIL, MOB_SPANWER, THIN_GLASS, IRON_FENCE, NETHER_FENCE, FENCE,
WOODEN_DOOR, TRAP_DOOR, FENCE_GATE, BURNING_FURNACE, DIODE_BLOCK_OFF,
DIODE_BLOCK_ON, ENCHANTMENT_TABLE, FIREBALL;


private void setupMultiversionMaterials() {
if (mc113) {
Expand All @@ -243,6 +235,15 @@ private void setupMultiversionMaterials() {
IRON_FENCE = Material.valueOf("LEGACY_IRON_FENCE");
NETHER_FENCE = Material.valueOf("LEGACY_NETHER_FENCE");
FENCE = Material.valueOf("LEGACY_FENCE");
WOODEN_DOOR = Material.valueOf("LEGACY_WOODEN_DOOR");
TRAP_DOOR = Material.valueOf("LEGACY_TRAP_DOOR");
FENCE_GATE = Material.valueOf("LEGACY_FENCE_GATE");
BURNING_FURNACE = Material.valueOf("LEGACY_BURNING_FURNACE");
DIODE_BLOCK_OFF = Material.valueOf("LEGACY_DIODE_BLOCK_OFF");
DIODE_BLOCK_ON = Material.valueOf("LEGACY_DIODE_BLOCK_ON");
ENCHANTMENT_TABLE = Material.valueOf("LEGACY_ENCHANTMENT_TABLE");
FIREBALL = Material.valueOf("LEGACY_FIREBALL");

} else {
BANNER = Material.valueOf("BANNER");
CROPS = Material.valueOf("CROPS");
Expand All @@ -258,6 +259,14 @@ private void setupMultiversionMaterials() {
IRON_FENCE = Material.valueOf("IRON_FENCE");
NETHER_FENCE = Material.valueOf("NETHER_FENCE");
FENCE = Material.valueOf("FENCE");
WOODEN_DOOR = Material.valueOf("WOODEN_DOOR");
TRAP_DOOR = Material.valueOf("TRAP_DOOR");
FENCE_GATE = Material.valueOf("FENCE_GATE");
BURNING_FURNACE = Material.valueOf("BURNING_FURNACE");
DIODE_BLOCK_OFF = Material.valueOf("DIODE_BLOCK_OFF");
DIODE_BLOCK_ON = Material.valueOf("DIODE_BLOCK_ON");
ENCHANTMENT_TABLE = Material.valueOf("ENCHANTMENT_TABLE");
FIREBALL = Material.valueOf("FIREBALL");
}


Expand Down

0 comments on commit 855d872

Please sign in to comment.