gradle part 2

This commit is contained in:
nossr50 2019-02-06 19:41:06 -08:00
parent bbbf6777f9
commit d98b077be3
28 changed files with 674 additions and 643 deletions

3
.gitignore vendored
View File

@ -11,6 +11,9 @@
/lib /lib
# gradle # gradle
*.bin
*.lock
bin
/.gradle /.gradle
/mcMMO-core/.gradle /mcMMO-core/.gradle
/mcMMO-core/gradle /mcMMO-core/gradle

View File

@ -8,9 +8,35 @@ version '2.2.0-SNAPSHOT'
sourceCompatibility = 1.8 sourceCompatibility = 1.8
repositories { repositories {
mavenCentral() mavenCentral()
// Spigot & Bukkit
maven { url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots' }
// World Edit
maven { url = "http://maven.sk89q.com/repo/" }
// Tomcat
// bStats
maven { url = "https://repo.codemc.org/repository/maven-public" }
mavenLocal() // -- needed for craftbukkit / spigot
} }
dependencies { dependencies {
compileOnly 'org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT' // Spigot API
compileOnly 'com.sk89q.worldguard:worldguard-core:7.0.0-SNAPSHOT' // World Guard
compileOnly 'com.sk89q.worldguard:worldguard-legacy:7.0.0-SNAPSHOT' // World Guard Legacy (NEEDED)
compileOnly 'org.bstats:bstats:1.4' // bStats
compileOnly 'org.apache.tomcat:tomcat-jdbc:7.0.52' // tomcat JDBC
compileOnly 'org.apache.tomcat:tomcat-juli:7.0.52' // tomcat juli
testCompile group: 'junit', name: 'junit', version: '4.12' testCompile group: 'junit', name: 'junit', version: '4.12'
} }

View File

@ -68,7 +68,7 @@ public class Roll extends AcrobaticsSubSkill {
return false; return false;
switch (entityDamageEvent.getCause()) { switch (entityDamageEvent.getCause()) {
case DamageCause.FALL: case FALL:
//Grab the player //Grab the player
McMMOPlayer mcMMOPlayer = EventUtils.getMcMMOPlayer(entityDamageEvent.getEntity()); McMMOPlayer mcMMOPlayer = EventUtils.getMcMMOPlayer(entityDamageEvent.getEntity());

View File

@ -432,22 +432,22 @@ public class EntityListener implements Listener {
TamingManager tamingManager = UserManager.getPlayer(player).getTamingManager(); TamingManager tamingManager = UserManager.getPlayer(player).getTamingManager();
switch (cause) { switch (cause) {
case DamageCause.CONTACT: case CONTACT:
case DamageCause.FIRE: case FIRE:
case DamageCause.LAVA: case LAVA:
if (tamingManager.canUseEnvironmentallyAware()) { if (tamingManager.canUseEnvironmentallyAware()) {
tamingManager.processEnvironmentallyAware(wolf, event.getDamage()); tamingManager.processEnvironmentallyAware(wolf, event.getDamage());
} }
return; return;
case DamageCause.FALL: case FALL:
if (tamingManager.canUseEnvironmentallyAware()) { if (tamingManager.canUseEnvironmentallyAware()) {
event.setCancelled(true); event.setCancelled(true);
} }
return; return;
case DamageCause.ENTITY_ATTACK: case ENTITY_ATTACK:
case DamageCause.PROJECTILE: case PROJECTILE:
if (tamingManager.canUseThickFur()) { if (tamingManager.canUseThickFur()) {
event.setDamage(Taming.processThickFur(wolf, event.getDamage())); event.setDamage(Taming.processThickFur(wolf, event.getDamage()));
@ -457,23 +457,23 @@ public class EntityListener implements Listener {
} }
return; return;
case DamageCause.FIRE_TICK: case FIRE_TICK:
if (tamingManager.canUseThickFur()) { if (tamingManager.canUseThickFur()) {
Taming.processThickFurFire(wolf); Taming.processThickFurFire(wolf);
} }
return; return;
case DamageCause.MAGIC: case MAGIC:
case DamageCause.POISON: case POISON:
case DamageCause.WITHER: case WITHER:
if (tamingManager.canUseHolyHound()) { if (tamingManager.canUseHolyHound()) {
Taming.processHolyHound(wolf, event.getDamage()); Taming.processHolyHound(wolf, event.getDamage());
} }
return; return;
case DamageCause.BLOCK_EXPLOSION: case BLOCK_EXPLOSION:
case DamageCause.ENTITY_EXPLOSION: case ENTITY_EXPLOSION:
case DamageCause.LIGHTNING: case LIGHTNING:
if (tamingManager.canUseShockProof()) { if (tamingManager.canUseShockProof()) {
event.setDamage(Taming.processShockProof(wolf, event.getDamage())); event.setDamage(Taming.processShockProof(wolf, event.getDamage()));
@ -559,9 +559,9 @@ public class EntityListener implements Listener {
LivingEntity entity = event.getEntity(); LivingEntity entity = event.getEntity();
switch (event.getSpawnReason()) { switch (event.getSpawnReason()) {
case SpawnReason.NETHER_PORTAL: case NETHER_PORTAL:
case SpawnReason.SPAWNER: case SPAWNER:
case SpawnReason.SPAWNER_EGG: case SPAWNER_EGG:
entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue); entity.setMetadata(mcMMO.entityMetadataKey, mcMMO.metadataValue);
Entity passenger = entity.getPassenger(); Entity passenger = entity.getPassenger();
@ -571,7 +571,7 @@ public class EntityListener implements Listener {
} }
return; return;
case SpawnReason.BREEDING: case BREEDING:
entity.setMetadata(mcMMO.bredMetadataKey, mcMMO.metadataValue); entity.setMetadata(mcMMO.bredMetadataKey, mcMMO.metadataValue);
return; return;
@ -727,25 +727,25 @@ public class EntityListener implements Listener {
* if we find something is giving too much of a bonus * if we find something is giving too much of a bonus
*/ */
switch (player.getInventory().getItemInMainHand().getType()) { switch (player.getInventory().getItemInMainHand().getType()) {
case Material.BAKED_POTATO: /* case BAKED_POTATO: /*
* RESTORES 3 HUNGER - RESTORES 5 1/2 HUNGER @ * RESTORES 3 HUNGER - RESTORES 5 1/2 HUNGER @
* 1000 * 1000
*/ */
case Material.BEETROOT: case BEETROOT:
case Material.BREAD: /* RESTORES 2 1/2 HUNGER - RESTORES 5 HUNGER @ 1000 */ case BREAD: /* RESTORES 2 1/2 HUNGER - RESTORES 5 HUNGER @ 1000 */
case Material.CARROT: /* case CARROT: /*
* RESTORES 2 HUNGER - RESTORES 4 1/2 HUNGER @ * RESTORES 2 HUNGER - RESTORES 4 1/2 HUNGER @
* 1000 * 1000
*/ */
case Material.GOLDEN_CARROT: /* case GOLDEN_CARROT: /*
* RESTORES 3 HUNGER - RESTORES 5 1/2 HUNGER @ * RESTORES 3 HUNGER - RESTORES 5 1/2 HUNGER @
* 1000 * 1000
*/ */
case Material.MUSHROOM_STEW: /* case MUSHROOM_STEW: /*
* RESTORES 4 HUNGER - RESTORES 6 1/2 HUNGER @ * RESTORES 4 HUNGER - RESTORES 6 1/2 HUNGER @
* 1000 * 1000
*/ */
case Material.PUMPKIN_PIE: /* case PUMPKIN_PIE: /*
* RESTORES 4 HUNGER - RESTORES 6 1/2 HUNGER @ * RESTORES 4 HUNGER - RESTORES 6 1/2 HUNGER @
* 1000 * 1000
*/ */
@ -754,19 +754,19 @@ public class EntityListener implements Listener {
} }
return; return;
case Material.COOKIE: /* RESTORES 1/2 HUNGER - RESTORES 2 HUNGER @ 1000 */ case COOKIE: /* RESTORES 1/2 HUNGER - RESTORES 2 HUNGER @ 1000 */
case Material.MELON_SLICE: /* RESTORES 1 HUNGER - RESTORES 2 1/2 HUNGER @ 1000 */ case MELON_SLICE: /* RESTORES 1 HUNGER - RESTORES 2 1/2 HUNGER @ 1000 */
case Material.POISONOUS_POTATO: /* case POISONOUS_POTATO: /*
* RESTORES 1 HUNGER - RESTORES 2 1/2 HUNGER * RESTORES 1 HUNGER - RESTORES 2 1/2 HUNGER
* @ 1000 * @ 1000
*/ */
case Material.POTATO: /* RESTORES 1/2 HUNGER - RESTORES 2 HUNGER @ 1000 */ case POTATO: /* RESTORES 1/2 HUNGER - RESTORES 2 HUNGER @ 1000 */
if (Permissions.isSubSkillEnabled(player, SubSkillType.HERBALISM_FARMERS_DIET)) { if (Permissions.isSubSkillEnabled(player, SubSkillType.HERBALISM_FARMERS_DIET)) {
event.setFoodLevel(UserManager.getPlayer(player).getHerbalismManager().farmersDiet(newFoodLevel)); event.setFoodLevel(UserManager.getPlayer(player).getHerbalismManager().farmersDiet(newFoodLevel));
} }
return; return;
case Material.COOKED_SALMON: /* case COOKED_SALMON: /*
* RESTORES 2 1/2 HUNGER - RESTORES 5 HUNGER @ * RESTORES 2 1/2 HUNGER - RESTORES 5 HUNGER @
* 1000 * 1000
*/ */
@ -775,7 +775,7 @@ public class EntityListener implements Listener {
} }
return; return;
case Material.SALMON: /* RESTORES 1 HUNGER - RESTORES 2 1/2 HUNGER @ 1000 */ case SALMON: /* RESTORES 1 HUNGER - RESTORES 2 1/2 HUNGER @ 1000 */
if (Permissions.isSubSkillEnabled(player, SubSkillType.FISHING_FISHERMANS_DIET)) { if (Permissions.isSubSkillEnabled(player, SubSkillType.FISHING_FISHERMANS_DIET)) {
event.setFoodLevel(UserManager.getPlayer(player).getFishingManager().handleFishermanDiet(Fishing.fishermansDietRankLevel2, newFoodLevel)); event.setFoodLevel(UserManager.getPlayer(player).getFishingManager().handleFishermanDiet(Fishing.fishermansDietRankLevel2, newFoodLevel));
} }

View File

@ -231,11 +231,11 @@ public class InventoryListener implements Listener {
if (click.isShiftClick()) { if (click.isShiftClick()) {
switch (slot) { switch (slot) {
case SlotType.FUEL: case FUEL:
AlchemyPotionBrewer.scheduleCheck(player, stand); AlchemyPotionBrewer.scheduleCheck(player, stand);
return; return;
case SlotType.CONTAINER: case CONTAINER:
case SlotType.QUICKBAR: case QUICKBAR:
if (!AlchemyPotionBrewer.isValidIngredient(player, clicked)) { if (!AlchemyPotionBrewer.isValidIngredient(player, clicked)) {
return; return;
} }

View File

@ -37,6 +37,7 @@ import org.bukkit.entity.*;
import org.bukkit.event.EventHandler; import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority; import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityPickupItemEvent; import org.bukkit.event.entity.EntityPickupItemEvent;
import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.*; import org.bukkit.event.player.*;
@ -251,7 +252,7 @@ public class PlayerListener implements Listener {
FishingManager fishingManager = UserManager.getPlayer(player).getFishingManager(); FishingManager fishingManager = UserManager.getPlayer(player).getFishingManager();
switch (event.getState()) { switch (event.getState()) {
case State.CAUGHT_FISH: case CAUGHT_FISH:
//TODO Update to new API once available! Waiting for case CAUGHT_TREASURE: //TODO Update to new API once available! Waiting for case CAUGHT_TREASURE:
Item fishingCatch = (Item) event.getCaught(); Item fishingCatch = (Item) event.getCaught();
@ -270,7 +271,7 @@ public class PlayerListener implements Listener {
} }
return; return;
case State.IN_GROUND: case IN_GROUND:
Block block = player.getTargetBlock(null, 100); Block block = player.getTargetBlock(null, 100);
if (fishingManager.canIceFish(block)) { if (fishingManager.canIceFish(block)) {
@ -325,21 +326,21 @@ public class PlayerListener implements Listener {
//event.setExpToDrop(event.getExpToDrop()); //Redundant? //event.setExpToDrop(event.getExpToDrop()); //Redundant?
switch (event.getState()) { switch (event.getState()) {
case State.FISHING: case FISHING:
if (fishingManager.canMasterAngler()) { if (fishingManager.canMasterAngler()) {
fishingManager.masterAngler(event.getHook()); fishingManager.masterAngler(event.getHook());
fishingManager.setFishingTarget(); fishingManager.setFishingTarget();
} }
return; return;
case State.CAUGHT_FISH: case CAUGHT_FISH:
if(fishingManager.exploitPrevention(event.getHook().getBoundingBox())) if(fishingManager.exploitPrevention(event.getHook().getBoundingBox()))
return; return;
fishingManager.handleFishing((Item) caught); fishingManager.handleFishing((Item) caught);
fishingManager.setFishingTarget(); fishingManager.setFishingTarget();
return; return;
case State.CAUGHT_ENTITY: case CAUGHT_ENTITY:
if (fishingManager.canShake(caught)) { if (fishingManager.canShake(caught)) {
fishingManager.shakeCheck((LivingEntity) caught); fishingManager.shakeCheck((LivingEntity) caught);
fishingManager.setFishingTarget(); fishingManager.setFishingTarget();
@ -514,7 +515,7 @@ public class PlayerListener implements Listener {
ItemStack heldItem = player.getInventory().getItemInMainHand(); ItemStack heldItem = player.getInventory().getItemInMainHand();
switch (event.getAction()) { switch (event.getAction()) {
case Action.RIGHT_CLICK_BLOCK: case RIGHT_CLICK_BLOCK:
Material type = block.getType(); Material type = block.getType();
if (!Config.getInstance().getAbilitiesOnlyActivateWhenSneaking() || player.isSneaking()) { if (!Config.getInstance().getAbilitiesOnlyActivateWhenSneaking() || player.isSneaking()) {
@ -554,7 +555,7 @@ public class PlayerListener implements Listener {
break; break;
case Action.LEFT_CLICK_BLOCK: case LEFT_CLICK_BLOCK:
type = block.getType(); type = block.getType();
if (!Config.getInstance().getAbilitiesOnlyActivateWhenSneaking() || player.isSneaking()) { if (!Config.getInstance().getAbilitiesOnlyActivateWhenSneaking() || player.isSneaking()) {
@ -615,7 +616,7 @@ public class PlayerListener implements Listener {
ItemStack heldItem = player.getInventory().getItemInMainHand(); ItemStack heldItem = player.getInventory().getItemInMainHand();
switch (event.getAction()) { switch (event.getAction()) {
case Action.RIGHT_CLICK_BLOCK: case RIGHT_CLICK_BLOCK:
if(player.getInventory().getItemInOffHand().getType() != Material.AIR && !player.isInsideVehicle() && !player.isSneaking()) { if(player.getInventory().getItemInOffHand().getType() != Material.AIR && !player.isInsideVehicle() && !player.isSneaking()) {
break; break;
} }
@ -646,12 +647,12 @@ public class PlayerListener implements Listener {
if (heldItem.getType() == Material.BONE_MEAL) { if (heldItem.getType() == Material.BONE_MEAL) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.BEETROOTS: case BEETROOTS:
case Material.CARROT: case CARROT:
case Material.COCOA: case COCOA:
case Material.WHEAT: case WHEAT:
case Material.NETHER_WART_BLOCK: case NETHER_WART_BLOCK:
case Material.POTATO: case POTATO:
mcMMO.getPlaceStore().setFalse(blockState); mcMMO.getPlaceStore().setFalse(blockState);
} }
} }
@ -673,7 +674,7 @@ public class PlayerListener implements Listener {
} }
break; break;
case Action.RIGHT_CLICK_AIR: case RIGHT_CLICK_AIR:
if(player.getInventory().getItemInOffHand().getType() != Material.AIR && !player.isInsideVehicle() && !player.isSneaking()) { if(player.getInventory().getItemInOffHand().getType() != Material.AIR && !player.isInsideVehicle() && !player.isSneaking()) {
break; break;
} }
@ -700,8 +701,8 @@ public class PlayerListener implements Listener {
break; break;
case Action.LEFT_CLICK_AIR: case LEFT_CLICK_AIR:
case Action.LEFT_CLICK_BLOCK: case LEFT_CLICK_BLOCK:
if (!player.isSneaking()) { if (!player.isSneaking()) {
break; break;

View File

@ -284,18 +284,18 @@ public class FishingManager extends SkillManager {
// Extra processing depending on the mob and drop type // Extra processing depending on the mob and drop type
switch (target.getType()) { switch (target.getType()) {
case EntityType.PLAYER: case PLAYER:
Player targetPlayer = (Player) target; Player targetPlayer = (Player) target;
switch (drop.getType()) { switch (drop.getType()) {
case Material.PLAYER_HEAD: case PLAYER_HEAD:
drop.setDurability((short) 3); drop.setDurability((short) 3);
SkullMeta skullMeta = (SkullMeta) drop.getItemMeta(); SkullMeta skullMeta = (SkullMeta) drop.getItemMeta();
skullMeta.setOwningPlayer(targetPlayer); skullMeta.setOwningPlayer(targetPlayer);
drop.setItemMeta(skullMeta); drop.setItemMeta(skullMeta);
break; break;
case Material.BEDROCK: case BEDROCK:
if (TreasureConfig.getInstance().getInventoryStealEnabled()) { if (TreasureConfig.getInstance().getInventoryStealEnabled()) {
PlayerInventory inventory = targetPlayer.getInventory(); PlayerInventory inventory = targetPlayer.getInventory();
int length = inventory.getContents().length; int length = inventory.getContents().length;
@ -323,7 +323,7 @@ public class FishingManager extends SkillManager {
} }
break; break;
case EntityType.SHEEP: case SHEEP:
Sheep sheep = (Sheep) target; Sheep sheep = (Sheep) target;
if (drop.getType().name().endsWith("WOOL")) { if (drop.getType().name().endsWith("WOOL")) {

View File

@ -20,20 +20,20 @@ public class Herbalism {
*/ */
protected static boolean convertGreenTerraBlocks(BlockState blockState) { protected static boolean convertGreenTerraBlocks(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.COBBLESTONE_WALL: case COBBLESTONE_WALL:
blockState.setType(Material.MOSSY_COBBLESTONE_WALL); blockState.setType(Material.MOSSY_COBBLESTONE_WALL);
return true; return true;
case Material.STONE_BRICKS: case STONE_BRICKS:
blockState.setType(Material.MOSSY_STONE_BRICKS); blockState.setType(Material.MOSSY_STONE_BRICKS);
return true; return true;
case Material.DIRT : case DIRT :
case Material.GRASS_PATH : case GRASS_PATH :
blockState.setType(Material.GRASS_BLOCK); blockState.setType(Material.GRASS_BLOCK);
return true; return true;
case Material.COBBLESTONE : case COBBLESTONE :
blockState.setType(Material.MOSSY_COBBLESTONE); blockState.setType(Material.MOSSY_COBBLESTONE);
return true; return true;
@ -118,9 +118,9 @@ public class Herbalism {
*/ */
protected static boolean convertShroomThumb(BlockState blockState) { protected static boolean convertShroomThumb(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.DIRT : case DIRT :
case Material.GRASS_BLOCK: case GRASS_BLOCK:
case Material.GRASS_PATH : case GRASS_PATH :
blockState.setType(Material.MYCELIUM); blockState.setType(Material.MYCELIUM);
return true; return true;

View File

@ -283,27 +283,27 @@ public class HerbalismManager extends SkillManager {
Material seed = null; Material seed = null;
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.CARROTS: case CARROTS:
seed = Material.CARROT; seed = Material.CARROT;
break; break;
case Material.WHEAT: case WHEAT:
seed = Material.WHEAT_SEEDS; seed = Material.WHEAT_SEEDS;
break; break;
case Material.NETHER_WART: case NETHER_WART:
seed = Material.NETHER_WART; seed = Material.NETHER_WART;
break; break;
case Material.POTATOES: case POTATOES:
seed = Material.POTATO; seed = Material.POTATO;
break; break;
case Material.BEETROOTS: case BEETROOTS:
seed = Material.BEETROOT_SEEDS; seed = Material.BEETROOT_SEEDS;
break; break;
case Material.COCOA: case COCOA:
seed = Material.COCOA_BEANS; seed = Material.COCOA_BEANS;
break; break;
@ -338,9 +338,9 @@ public class HerbalismManager extends SkillManager {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.POTATOES: case POTATOES:
case Material.CARROTS: case CARROTS:
case Material.WHEAT: case WHEAT:
if (greenTerra) { if (greenTerra) {
crops.setAge(3); crops.setAge(3);
@ -350,8 +350,8 @@ public class HerbalismManager extends SkillManager {
} }
break; break;
case Material.BEETROOTS: case BEETROOTS:
case Material.NETHER_WART: case NETHER_WART:
if (greenTerra || greenThumbStage > 2) { if (greenTerra || greenThumbStage > 2) {
crops.setAge(2); crops.setAge(2);
@ -364,7 +364,7 @@ public class HerbalismManager extends SkillManager {
} }
break; break;
case Material.COCOA: case COCOA:
if (greenTerra || getGreenThumbStage() > 1) { if (greenTerra || getGreenThumbStage() > 1) {
crops.setAge(1); crops.setAge(1);

View File

@ -34,59 +34,59 @@ public class Mining {
Material blockType = blockState.getType(); Material blockType = blockState.getType();
switch (blockType) { switch (blockType) {
case Material.END_STONE: case END_STONE:
case Material.TERRACOTTA: case TERRACOTTA:
case Material.CLAY: case CLAY:
case Material.IRON_ORE: case IRON_ORE:
case Material.MOSSY_COBBLESTONE: case MOSSY_COBBLESTONE:
case Material.NETHERRACK: case NETHERRACK:
case Material.OBSIDIAN: case OBSIDIAN:
case Material.SANDSTONE: case SANDSTONE:
case Material.BLACK_GLAZED_TERRACOTTA: case BLACK_GLAZED_TERRACOTTA:
case Material.BLACK_TERRACOTTA: case BLACK_TERRACOTTA:
case Material.BLUE_GLAZED_TERRACOTTA: case BLUE_GLAZED_TERRACOTTA:
case Material.BLUE_TERRACOTTA: case BLUE_TERRACOTTA:
case Material.BROWN_GLAZED_TERRACOTTA: case BROWN_GLAZED_TERRACOTTA:
case Material.BROWN_TERRACOTTA: case BROWN_TERRACOTTA:
case Material.CYAN_GLAZED_TERRACOTTA: case CYAN_GLAZED_TERRACOTTA:
case Material.CYAN_TERRACOTTA: case CYAN_TERRACOTTA:
case Material.GRAY_GLAZED_TERRACOTTA: case GRAY_GLAZED_TERRACOTTA:
case Material.GRAY_TERRACOTTA: case GRAY_TERRACOTTA:
case Material.GREEN_GLAZED_TERRACOTTA: case GREEN_GLAZED_TERRACOTTA:
case Material.GREEN_TERRACOTTA: case GREEN_TERRACOTTA:
case Material.LIGHT_BLUE_GLAZED_TERRACOTTA: case LIGHT_BLUE_GLAZED_TERRACOTTA:
case Material.LIGHT_BLUE_TERRACOTTA: case LIGHT_BLUE_TERRACOTTA:
case Material.LIGHT_GRAY_GLAZED_TERRACOTTA: case LIGHT_GRAY_GLAZED_TERRACOTTA:
case Material.LIGHT_GRAY_TERRACOTTA: case LIGHT_GRAY_TERRACOTTA:
case Material.LIME_GLAZED_TERRACOTTA: case LIME_GLAZED_TERRACOTTA:
case Material.LIME_TERRACOTTA: case LIME_TERRACOTTA:
case Material.MAGENTA_GLAZED_TERRACOTTA: case MAGENTA_GLAZED_TERRACOTTA:
case Material.MAGENTA_TERRACOTTA: case MAGENTA_TERRACOTTA:
case Material.ORANGE_GLAZED_TERRACOTTA: case ORANGE_GLAZED_TERRACOTTA:
case Material.ORANGE_TERRACOTTA: case ORANGE_TERRACOTTA:
case Material.PINK_GLAZED_TERRACOTTA: case PINK_GLAZED_TERRACOTTA:
case Material.PINK_TERRACOTTA: case PINK_TERRACOTTA:
case Material.PURPLE_GLAZED_TERRACOTTA: case PURPLE_GLAZED_TERRACOTTA:
case Material.PURPLE_TERRACOTTA: case PURPLE_TERRACOTTA:
case Material.RED_GLAZED_TERRACOTTA: case RED_GLAZED_TERRACOTTA:
case Material.RED_TERRACOTTA: case RED_TERRACOTTA:
case Material.WHITE_GLAZED_TERRACOTTA: case WHITE_GLAZED_TERRACOTTA:
case Material.WHITE_TERRACOTTA: case WHITE_TERRACOTTA:
case Material.YELLOW_GLAZED_TERRACOTTA: case YELLOW_GLAZED_TERRACOTTA:
case Material.YELLOW_TERRACOTTA: case YELLOW_TERRACOTTA:
handleMiningDrops(blockState); handleMiningDrops(blockState);
return; return;
case Material.COAL_ORE: case COAL_ORE:
case Material.DIAMOND_ORE: case DIAMOND_ORE:
case Material.EMERALD_ORE: case EMERALD_ORE:
case Material.GLOWSTONE: case GLOWSTONE:
case Material.LAPIS_ORE: case LAPIS_ORE:
case Material.PACKED_ICE: case PACKED_ICE:
case Material.NETHER_QUARTZ_ORE: case NETHER_QUARTZ_ORE:
case Material.REDSTONE_ORE: case REDSTONE_ORE:
case Material.STONE: case STONE:
case Material.PRISMARINE: case PRISMARINE:
Misc.dropItem(Misc.getBlockCenter(blockState), new ItemStack(blockState.getType())); Misc.dropItem(Misc.getBlockCenter(blockState), new ItemStack(blockState.getType()));
return; return;
@ -105,55 +105,55 @@ public class Mining {
*/ */
protected static void handleMiningDrops(BlockState blockState) { protected static void handleMiningDrops(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.COAL_ORE: case COAL_ORE:
case Material.DIAMOND_ORE: case DIAMOND_ORE:
case Material.EMERALD_ORE: case EMERALD_ORE:
case Material.END_STONE: case END_STONE:
case Material.GLOWSTONE: case GLOWSTONE:
case Material.GOLD_ORE: case GOLD_ORE:
case Material.TERRACOTTA: case TERRACOTTA:
case Material.IRON_ORE: case IRON_ORE:
case Material.LAPIS_ORE: case LAPIS_ORE:
case Material.MOSSY_COBBLESTONE: case MOSSY_COBBLESTONE:
case Material.NETHERRACK: case NETHERRACK:
case Material.OBSIDIAN: case OBSIDIAN:
case Material.PACKED_ICE: case PACKED_ICE:
case Material.REDSTONE_ORE: case REDSTONE_ORE:
case Material.SANDSTONE: case SANDSTONE:
case Material.BLACK_GLAZED_TERRACOTTA: case BLACK_GLAZED_TERRACOTTA:
case Material.BLACK_TERRACOTTA: case BLACK_TERRACOTTA:
case Material.BLUE_GLAZED_TERRACOTTA: case BLUE_GLAZED_TERRACOTTA:
case Material.BLUE_TERRACOTTA: case BLUE_TERRACOTTA:
case Material.BROWN_GLAZED_TERRACOTTA: case BROWN_GLAZED_TERRACOTTA:
case Material.BROWN_TERRACOTTA: case BROWN_TERRACOTTA:
case Material.CYAN_GLAZED_TERRACOTTA: case CYAN_GLAZED_TERRACOTTA:
case Material.CYAN_TERRACOTTA: case CYAN_TERRACOTTA:
case Material.GRAY_GLAZED_TERRACOTTA: case GRAY_GLAZED_TERRACOTTA:
case Material.GRAY_TERRACOTTA: case GRAY_TERRACOTTA:
case Material.GREEN_GLAZED_TERRACOTTA: case GREEN_GLAZED_TERRACOTTA:
case Material.GREEN_TERRACOTTA: case GREEN_TERRACOTTA:
case Material.LIGHT_BLUE_GLAZED_TERRACOTTA: case LIGHT_BLUE_GLAZED_TERRACOTTA:
case Material.LIGHT_BLUE_TERRACOTTA: case LIGHT_BLUE_TERRACOTTA:
case Material.LIGHT_GRAY_GLAZED_TERRACOTTA: case LIGHT_GRAY_GLAZED_TERRACOTTA:
case Material.LIGHT_GRAY_TERRACOTTA: case LIGHT_GRAY_TERRACOTTA:
case Material.LIME_GLAZED_TERRACOTTA: case LIME_GLAZED_TERRACOTTA:
case Material.LIME_TERRACOTTA: case LIME_TERRACOTTA:
case Material.MAGENTA_GLAZED_TERRACOTTA: case MAGENTA_GLAZED_TERRACOTTA:
case Material.MAGENTA_TERRACOTTA: case MAGENTA_TERRACOTTA:
case Material.ORANGE_GLAZED_TERRACOTTA: case ORANGE_GLAZED_TERRACOTTA:
case Material.ORANGE_TERRACOTTA: case ORANGE_TERRACOTTA:
case Material.PINK_GLAZED_TERRACOTTA: case PINK_GLAZED_TERRACOTTA:
case Material.PINK_TERRACOTTA: case PINK_TERRACOTTA:
case Material.PURPLE_GLAZED_TERRACOTTA: case PURPLE_GLAZED_TERRACOTTA:
case Material.PURPLE_TERRACOTTA: case PURPLE_TERRACOTTA:
case Material.RED_GLAZED_TERRACOTTA: case RED_GLAZED_TERRACOTTA:
case Material.RED_TERRACOTTA: case RED_TERRACOTTA:
case Material.WHITE_GLAZED_TERRACOTTA: case WHITE_GLAZED_TERRACOTTA:
case Material.WHITE_TERRACOTTA: case WHITE_TERRACOTTA:
case Material.YELLOW_GLAZED_TERRACOTTA: case YELLOW_GLAZED_TERRACOTTA:
case Material.YELLOW_TERRACOTTA: case YELLOW_TERRACOTTA:
case Material.STONE: case STONE:
case Material.NETHER_QUARTZ_ORE: case NETHER_QUARTZ_ORE:
Misc.dropItems(Misc.getBlockCenter(blockState), blockState.getBlock().getDrops()); Misc.dropItems(Misc.getBlockCenter(blockState), blockState.getBlock().getDrops());
return; return;

View File

@ -56,11 +56,11 @@ public class SmeltingManager extends SkillManager {
ItemStack item = null; ItemStack item = null;
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.IRON_ORE: case IRON_ORE:
item = new ItemStack(Material.IRON_INGOT); item = new ItemStack(Material.IRON_INGOT);
break; break;
case Material.GOLD_ORE: case GOLD_ORE:
item = new ItemStack(Material.GOLD_INGOT); item = new ItemStack(Material.GOLD_INGOT);
break; break;

View File

@ -44,13 +44,13 @@ public class Taming {
protected static String getCallOfTheWildFailureMessage(EntityType type) { protected static String getCallOfTheWildFailureMessage(EntityType type) {
switch (type) { switch (type) {
case EntityType.OCELOT: case OCELOT:
return "Taming.Summon.Fail.Ocelot"; return "Taming.Summon.Fail.Ocelot";
case EntityType.WOLF: case WOLF:
return "Taming.Summon.Fail.Wolf"; return "Taming.Summon.Fail.Wolf";
case EntityType.HORSE: case HORSE:
return "Taming.Summon.Fail.Horse"; return "Taming.Summon.Fail.Horse";
default: default:

View File

@ -298,16 +298,16 @@ public class TamingManager extends SkillManager {
addToTracker(entity); addToTracker(entity);
switch (type) { switch (type) {
case EntityType.OCELOT: case OCELOT:
((Ocelot) entity).setCatType(Ocelot.Type.values()[1 + Misc.getRandom().nextInt(3)]); ((Ocelot) entity).setCatType(Ocelot.Type.values()[1 + Misc.getRandom().nextInt(3)]);
break; break;
case EntityType.WOLF: case WOLF:
entity.setMaxHealth(20.0); entity.setMaxHealth(20.0);
entity.setHealth(entity.getMaxHealth()); entity.setHealth(entity.getMaxHealth());
break; break;
case EntityType.HORSE: case HORSE:
Horse horse = (Horse) entity; Horse horse = (Horse) entity;
entity.setMaxHealth(15.0 + (Misc.getRandom().nextDouble() * 15)); entity.setMaxHealth(15.0 + (Misc.getRandom().nextDouble() * 15));

View File

@ -77,7 +77,7 @@ public class UnarmedManager extends SkillManager {
BlockData data = blockState.getBlockData(); BlockData data = blockState.getBlockData();
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.STONE_BRICKS: case STONE_BRICKS:
if (!Unarmed.blockCrackerSmoothBrick) { if (!Unarmed.blockCrackerSmoothBrick) {
return false; return false;
} }

View File

@ -57,8 +57,8 @@ public class WoodcuttingManager extends SkillManager {
int xp = Woodcutting.getExperienceFromLog(blockState, ExperienceGainMethod.DEFAULT); int xp = Woodcutting.getExperienceFromLog(blockState, ExperienceGainMethod.DEFAULT);
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.BROWN_MUSHROOM_BLOCK: case BROWN_MUSHROOM_BLOCK:
case Material.RED_MUSHROOM_BLOCK: case RED_MUSHROOM_BLOCK:
break; break;
default: default:

View File

@ -37,90 +37,90 @@ public final class BlockUtils {
*/ */
public static boolean canActivateAbilities(BlockState blockState) { public static boolean canActivateAbilities(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.BLACK_BED: case BLACK_BED:
case Material.BLUE_BED: case BLUE_BED:
case Material.BROWN_BED: case BROWN_BED:
case Material.CYAN_BED: case CYAN_BED:
case Material.GRAY_BED: case GRAY_BED:
case Material.GREEN_BED: case GREEN_BED:
case Material.LIGHT_BLUE_BED: case LIGHT_BLUE_BED:
case Material.LIGHT_GRAY_BED: case LIGHT_GRAY_BED:
case Material.LIME_BED: case LIME_BED:
case Material.MAGENTA_BED: case MAGENTA_BED:
case Material.ORANGE_BED: case ORANGE_BED:
case Material.PINK_BED: case PINK_BED:
case Material.PURPLE_BED: case PURPLE_BED:
case Material.RED_BED: case RED_BED:
case Material.WHITE_BED: case WHITE_BED:
case Material.YELLOW_BED: case YELLOW_BED:
case Material.BREWING_STAND : case BREWING_STAND :
case Material.BOOKSHELF : case BOOKSHELF :
case Material.CAKE: case CAKE:
case Material.CHEST : case CHEST :
case Material.DISPENSER : case DISPENSER :
case Material.ENCHANTING_TABLE: case ENCHANTING_TABLE:
case Material.ENDER_CHEST : case ENDER_CHEST :
case Material.OAK_FENCE_GATE: case OAK_FENCE_GATE:
case Material.ACACIA_FENCE_GATE : case ACACIA_FENCE_GATE :
case Material.DARK_OAK_FENCE_GATE : case DARK_OAK_FENCE_GATE :
case Material.SPRUCE_FENCE_GATE : case SPRUCE_FENCE_GATE :
case Material.BIRCH_FENCE_GATE : case BIRCH_FENCE_GATE :
case Material.JUNGLE_FENCE_GATE : case JUNGLE_FENCE_GATE :
case Material.FURNACE : case FURNACE :
case Material.JUKEBOX : case JUKEBOX :
case Material.LEVER : case LEVER :
case Material.NOTE_BLOCK : case NOTE_BLOCK :
case Material.STONE_BUTTON : case STONE_BUTTON :
case Material.OAK_BUTTON: case OAK_BUTTON:
case Material.BIRCH_BUTTON: case BIRCH_BUTTON:
case Material.ACACIA_BUTTON: case ACACIA_BUTTON:
case Material.DARK_OAK_BUTTON: case DARK_OAK_BUTTON:
case Material.JUNGLE_BUTTON: case JUNGLE_BUTTON:
case Material.SPRUCE_BUTTON: case SPRUCE_BUTTON:
case Material.ACACIA_TRAPDOOR: case ACACIA_TRAPDOOR:
case Material.BIRCH_TRAPDOOR: case BIRCH_TRAPDOOR:
case Material.DARK_OAK_TRAPDOOR: case DARK_OAK_TRAPDOOR:
case Material.JUNGLE_TRAPDOOR: case JUNGLE_TRAPDOOR:
case Material.OAK_TRAPDOOR: case OAK_TRAPDOOR:
case Material.SPRUCE_TRAPDOOR: case SPRUCE_TRAPDOOR:
case Material.WALL_SIGN : case WALL_SIGN :
case Material.CRAFTING_TABLE: case CRAFTING_TABLE:
case Material.BEACON : case BEACON :
case Material.ANVIL : case ANVIL :
case Material.DROPPER : case DROPPER :
case Material.HOPPER : case HOPPER :
case Material.TRAPPED_CHEST : case TRAPPED_CHEST :
case Material.IRON_DOOR : case IRON_DOOR :
case Material.IRON_TRAPDOOR : case IRON_TRAPDOOR :
case Material.OAK_DOOR: case OAK_DOOR:
case Material.ACACIA_DOOR : case ACACIA_DOOR :
case Material.SPRUCE_DOOR : case SPRUCE_DOOR :
case Material.BIRCH_DOOR : case BIRCH_DOOR :
case Material.JUNGLE_DOOR : case JUNGLE_DOOR :
case Material.DARK_OAK_DOOR : case DARK_OAK_DOOR :
case Material.OAK_FENCE: case OAK_FENCE:
case Material.ACACIA_FENCE : case ACACIA_FENCE :
case Material.DARK_OAK_FENCE : case DARK_OAK_FENCE :
case Material.BIRCH_FENCE : case BIRCH_FENCE :
case Material.JUNGLE_FENCE : case JUNGLE_FENCE :
case Material.SPRUCE_FENCE : case SPRUCE_FENCE :
case Material.ARMOR_STAND : case ARMOR_STAND :
case Material.BLACK_SHULKER_BOX : case BLACK_SHULKER_BOX :
case Material.BLUE_SHULKER_BOX : case BLUE_SHULKER_BOX :
case Material.BROWN_SHULKER_BOX : case BROWN_SHULKER_BOX :
case Material.CYAN_SHULKER_BOX : case CYAN_SHULKER_BOX :
case Material.GRAY_SHULKER_BOX : case GRAY_SHULKER_BOX :
case Material.GREEN_SHULKER_BOX : case GREEN_SHULKER_BOX :
case Material.LIGHT_BLUE_SHULKER_BOX : case LIGHT_BLUE_SHULKER_BOX :
case Material.LIME_SHULKER_BOX : case LIME_SHULKER_BOX :
case Material.MAGENTA_SHULKER_BOX : case MAGENTA_SHULKER_BOX :
case Material.ORANGE_SHULKER_BOX : case ORANGE_SHULKER_BOX :
case Material.PINK_SHULKER_BOX : case PINK_SHULKER_BOX :
case Material.PURPLE_SHULKER_BOX : case PURPLE_SHULKER_BOX :
case Material.RED_SHULKER_BOX : case RED_SHULKER_BOX :
case Material.LIGHT_GRAY_SHULKER_BOX: case LIGHT_GRAY_SHULKER_BOX:
case Material.WHITE_SHULKER_BOX : case WHITE_SHULKER_BOX :
case Material.YELLOW_SHULKER_BOX : case YELLOW_SHULKER_BOX :
return false; return false;
default : default :
@ -139,114 +139,114 @@ public final class BlockUtils {
*/ */
public static boolean canActivateTools(BlockState blockState) { public static boolean canActivateTools(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.BLACK_BED: case BLACK_BED:
case Material.BLUE_BED: case BLUE_BED:
case Material.BROWN_BED: case BROWN_BED:
case Material.CYAN_BED: case CYAN_BED:
case Material.GRAY_BED: case GRAY_BED:
case Material.GREEN_BED: case GREEN_BED:
case Material.LIGHT_BLUE_BED: case LIGHT_BLUE_BED:
case Material.LIGHT_GRAY_BED: case LIGHT_GRAY_BED:
case Material.LIME_BED: case LIME_BED:
case Material.MAGENTA_BED: case MAGENTA_BED:
case Material.ORANGE_BED: case ORANGE_BED:
case Material.PINK_BED: case PINK_BED:
case Material.PURPLE_BED: case PURPLE_BED:
case Material.RED_BED: case RED_BED:
case Material.WHITE_BED: case WHITE_BED:
case Material.YELLOW_BED: case YELLOW_BED:
case Material.BREWING_STAND : case BREWING_STAND :
case Material.BOOKSHELF : case BOOKSHELF :
case Material.CAKE: case CAKE:
case Material.CHEST : case CHEST :
case Material.DISPENSER : case DISPENSER :
case Material.ENCHANTING_TABLE: case ENCHANTING_TABLE:
case Material.ENDER_CHEST : case ENDER_CHEST :
case Material.OAK_FENCE_GATE: case OAK_FENCE_GATE:
case Material.ACACIA_FENCE_GATE : case ACACIA_FENCE_GATE :
case Material.DARK_OAK_FENCE_GATE : case DARK_OAK_FENCE_GATE :
case Material.SPRUCE_FENCE_GATE : case SPRUCE_FENCE_GATE :
case Material.BIRCH_FENCE_GATE : case BIRCH_FENCE_GATE :
case Material.JUNGLE_FENCE_GATE : case JUNGLE_FENCE_GATE :
case Material.FURNACE : case FURNACE :
case Material.JUKEBOX : case JUKEBOX :
case Material.LEVER : case LEVER :
case Material.NOTE_BLOCK : case NOTE_BLOCK :
case Material.STONE_BUTTON : case STONE_BUTTON :
case Material.OAK_BUTTON: case OAK_BUTTON:
case Material.BIRCH_BUTTON: case BIRCH_BUTTON:
case Material.ACACIA_BUTTON: case ACACIA_BUTTON:
case Material.DARK_OAK_BUTTON: case DARK_OAK_BUTTON:
case Material.JUNGLE_BUTTON: case JUNGLE_BUTTON:
case Material.SPRUCE_BUTTON: case SPRUCE_BUTTON:
case Material.ACACIA_TRAPDOOR: case ACACIA_TRAPDOOR:
case Material.BIRCH_TRAPDOOR: case BIRCH_TRAPDOOR:
case Material.DARK_OAK_TRAPDOOR: case DARK_OAK_TRAPDOOR:
case Material.JUNGLE_TRAPDOOR: case JUNGLE_TRAPDOOR:
case Material.OAK_TRAPDOOR: case OAK_TRAPDOOR:
case Material.SPRUCE_TRAPDOOR: case SPRUCE_TRAPDOOR:
case Material.WALL_SIGN : case WALL_SIGN :
case Material.CRAFTING_TABLE: case CRAFTING_TABLE:
case Material.BEACON : case BEACON :
case Material.ANVIL : case ANVIL :
case Material.DROPPER : case DROPPER :
case Material.HOPPER : case HOPPER :
case Material.TRAPPED_CHEST : case TRAPPED_CHEST :
case Material.IRON_DOOR : case IRON_DOOR :
case Material.IRON_TRAPDOOR : case IRON_TRAPDOOR :
case Material.OAK_DOOR: case OAK_DOOR:
case Material.ACACIA_DOOR : case ACACIA_DOOR :
case Material.SPRUCE_DOOR : case SPRUCE_DOOR :
case Material.BIRCH_DOOR : case BIRCH_DOOR :
case Material.JUNGLE_DOOR : case JUNGLE_DOOR :
case Material.DARK_OAK_DOOR : case DARK_OAK_DOOR :
case Material.OAK_FENCE: case OAK_FENCE:
case Material.ACACIA_FENCE : case ACACIA_FENCE :
case Material.DARK_OAK_FENCE : case DARK_OAK_FENCE :
case Material.BIRCH_FENCE : case BIRCH_FENCE :
case Material.JUNGLE_FENCE : case JUNGLE_FENCE :
case Material.SPRUCE_FENCE : case SPRUCE_FENCE :
case Material.ARMOR_STAND : case ARMOR_STAND :
case Material.BLACK_SHULKER_BOX : case BLACK_SHULKER_BOX :
case Material.BLUE_SHULKER_BOX : case BLUE_SHULKER_BOX :
case Material.BROWN_SHULKER_BOX : case BROWN_SHULKER_BOX :
case Material.CYAN_SHULKER_BOX : case CYAN_SHULKER_BOX :
case Material.GRAY_SHULKER_BOX : case GRAY_SHULKER_BOX :
case Material.GREEN_SHULKER_BOX : case GREEN_SHULKER_BOX :
case Material.LIGHT_BLUE_SHULKER_BOX : case LIGHT_BLUE_SHULKER_BOX :
case Material.LIME_SHULKER_BOX : case LIME_SHULKER_BOX :
case Material.MAGENTA_SHULKER_BOX : case MAGENTA_SHULKER_BOX :
case Material.ORANGE_SHULKER_BOX : case ORANGE_SHULKER_BOX :
case Material.PINK_SHULKER_BOX : case PINK_SHULKER_BOX :
case Material.PURPLE_SHULKER_BOX : case PURPLE_SHULKER_BOX :
case Material.RED_SHULKER_BOX : case RED_SHULKER_BOX :
case Material.LIGHT_GRAY_SHULKER_BOX: case LIGHT_GRAY_SHULKER_BOX:
case Material.WHITE_SHULKER_BOX : case WHITE_SHULKER_BOX :
case Material.YELLOW_SHULKER_BOX : case YELLOW_SHULKER_BOX :
case Material.STRIPPED_ACACIA_LOG: case STRIPPED_ACACIA_LOG:
case Material.STRIPPED_ACACIA_WOOD: case STRIPPED_ACACIA_WOOD:
case Material.STRIPPED_BIRCH_LOG: case STRIPPED_BIRCH_LOG:
case Material.STRIPPED_BIRCH_WOOD: case STRIPPED_BIRCH_WOOD:
case Material.STRIPPED_DARK_OAK_LOG: case STRIPPED_DARK_OAK_LOG:
case Material.STRIPPED_DARK_OAK_WOOD: case STRIPPED_DARK_OAK_WOOD:
case Material.STRIPPED_JUNGLE_LOG: case STRIPPED_JUNGLE_LOG:
case Material.STRIPPED_JUNGLE_WOOD: case STRIPPED_JUNGLE_WOOD:
case Material.STRIPPED_OAK_LOG: case STRIPPED_OAK_LOG:
case Material.STRIPPED_OAK_WOOD: case STRIPPED_OAK_WOOD:
case Material.STRIPPED_SPRUCE_LOG: case STRIPPED_SPRUCE_LOG:
case Material.STRIPPED_SPRUCE_WOOD: case STRIPPED_SPRUCE_WOOD:
case Material.ACACIA_LOG: case ACACIA_LOG:
case Material.ACACIA_WOOD: case ACACIA_WOOD:
case Material.BIRCH_LOG: case BIRCH_LOG:
case Material.BIRCH_WOOD: case BIRCH_WOOD:
case Material.DARK_OAK_LOG: case DARK_OAK_LOG:
case Material.DARK_OAK_WOOD: case DARK_OAK_WOOD:
case Material.JUNGLE_LOG: case JUNGLE_LOG:
case Material.JUNGLE_WOOD: case JUNGLE_WOOD:
case Material.OAK_LOG: case OAK_LOG:
case Material.OAK_WOOD: case OAK_WOOD:
case Material.SPRUCE_LOG: case SPRUCE_LOG:
case Material.SPRUCE_WOOD: case SPRUCE_WOOD:
return false; return false;
default : default :
@ -274,15 +274,15 @@ public final class BlockUtils {
*/ */
public static boolean canMakeMossy(BlockState blockState) { public static boolean canMakeMossy(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.COBBLESTONE : case COBBLESTONE :
case Material.DIRT : case DIRT :
case Material.GRASS_PATH : case GRASS_PATH :
return true; return true;
case Material.STONE_BRICKS: case STONE_BRICKS:
return true; return true;
case Material.COBBLESTONE_WALL: case COBBLESTONE_WALL:
return true; return true;
default : default :
@ -356,12 +356,12 @@ public final class BlockUtils {
*/ */
public static boolean isLeaves(BlockState blockState) { public static boolean isLeaves(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.OAK_LEAVES: case OAK_LEAVES:
case Material.ACACIA_LEAVES: case ACACIA_LEAVES:
case Material.BIRCH_LEAVES: case BIRCH_LEAVES:
case Material.DARK_OAK_LEAVES: case DARK_OAK_LEAVES:
case Material.JUNGLE_LEAVES: case JUNGLE_LEAVES:
case Material.SPRUCE_LEAVES: case SPRUCE_LEAVES:
return true; return true;
default : default :
@ -378,8 +378,8 @@ public final class BlockUtils {
*/ */
public static boolean affectedByFluxMining(BlockState blockState) { public static boolean affectedByFluxMining(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.IRON_ORE : case IRON_ORE :
case Material.GOLD_ORE : case GOLD_ORE :
return true; return true;
default : default :
@ -397,10 +397,10 @@ public final class BlockUtils {
*/ */
public static boolean canActivateHerbalism(BlockState blockState) { public static boolean canActivateHerbalism(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.DIRT : case DIRT :
case Material.GRASS : case GRASS :
case Material.GRASS_PATH : case GRASS_PATH :
case Material.FARMLAND: case FARMLAND:
return false; return false;
default : default :
@ -418,7 +418,7 @@ public final class BlockUtils {
*/ */
public static boolean affectedByBlockCracker(BlockState blockState) { public static boolean affectedByBlockCracker(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.STONE_BRICKS: case STONE_BRICKS:
return true; return true;
default : default :
@ -435,9 +435,9 @@ public final class BlockUtils {
*/ */
public static boolean canMakeShroomy(BlockState blockState) { public static boolean canMakeShroomy(BlockState blockState) {
switch (blockState.getType()) { switch (blockState.getType()) {
case Material.DIRT : case DIRT :
case Material.GRASS : case GRASS :
case Material.GRASS_PATH : case GRASS_PATH :
return true; return true;
default : default :

View File

@ -60,30 +60,30 @@ public final class HolidayManager {
public static FakeSkillType getByStatistic(Statistic statistic) { public static FakeSkillType getByStatistic(Statistic statistic) {
switch (statistic) { switch (statistic) {
case Statistic.DAMAGE_TAKEN: case DAMAGE_TAKEN:
return FakeSkillType.MACHO; return FakeSkillType.MACHO;
case Statistic.JUMP: case JUMP:
return FakeSkillType.JUMPING; return FakeSkillType.JUMPING;
case Statistic.DROP: case DROP:
return FakeSkillType.THROWING; return FakeSkillType.THROWING;
case Statistic.MINE_BLOCK: case MINE_BLOCK:
case Statistic.BREAK_ITEM: case BREAK_ITEM:
return FakeSkillType.WRECKING; return FakeSkillType.WRECKING;
case Statistic.CRAFT_ITEM: case CRAFT_ITEM:
return FakeSkillType.CRAFTING; return FakeSkillType.CRAFTING;
case Statistic.WALK_ONE_CM: case WALK_ONE_CM:
return FakeSkillType.WALKING; return FakeSkillType.WALKING;
case Statistic.SWIM_ONE_CM: case SWIM_ONE_CM:
return FakeSkillType.SWIMMING; return FakeSkillType.SWIMMING;
case Statistic.FALL_ONE_CM: case FALL_ONE_CM:
return FakeSkillType.FALLING; return FakeSkillType.FALLING;
case Statistic.CLIMB_ONE_CM: case CLIMB_ONE_CM:
return FakeSkillType.CLIMBING; return FakeSkillType.CLIMBING;
case Statistic.FLY_ONE_CM: case FLY_ONE_CM:
return FakeSkillType.FLYING; return FakeSkillType.FLYING;
case Statistic.WALK_UNDER_WATER_ONE_CM: case WALK_UNDER_WATER_ONE_CM:
return FakeSkillType.DIVING; return FakeSkillType.DIVING;
case Statistic.PIG_ONE_CM: case PIG_ONE_CM:
return FakeSkillType.PIGGY; return FakeSkillType.PIGGY;
default: default:
return FakeSkillType.UNKNOWN; return FakeSkillType.UNKNOWN;
@ -334,20 +334,20 @@ public final class HolidayManager {
int modifier; int modifier;
switch (statistic) { switch (statistic) {
case Statistic.DAMAGE_TAKEN: case DAMAGE_TAKEN:
modifier = 500; modifier = 500;
break; break;
case Statistic.JUMP: case JUMP:
modifier = 500; modifier = 500;
break; break;
case Statistic.DROP: case DROP:
modifier = 200; modifier = 200;
break; break;
case Statistic.MINE_BLOCK: case MINE_BLOCK:
case Statistic.BREAK_ITEM: case BREAK_ITEM:
modifier = 500; modifier = 500;
break; break;
case Statistic.CRAFT_ITEM: case CRAFT_ITEM:
modifier = 100; modifier = 100;
break; break;
default: default:

View File

@ -24,7 +24,7 @@ public final class ItemUtils {
Material type = item.getType(); Material type = item.getType();
switch (type) { switch (type) {
case Material.BOW: case BOW:
return true; return true;
default: default:
@ -42,11 +42,11 @@ public final class ItemUtils {
Material type = item.getType(); Material type = item.getType();
switch (type) { switch (type) {
case Material.DIAMOND_SWORD: case DIAMOND_SWORD:
case Material.GOLDEN_SWORD: case GOLDEN_SWORD:
case Material.IRON_SWORD: case IRON_SWORD:
case Material.STONE_SWORD: case STONE_SWORD:
case Material.WOODEN_SWORD: case WOODEN_SWORD:
return true; return true;
default: default:
@ -64,11 +64,11 @@ public final class ItemUtils {
Material type = item.getType(); Material type = item.getType();
switch (type) { switch (type) {
case Material.DIAMOND_HOE: case DIAMOND_HOE:
case Material.GOLDEN_HOE: case GOLDEN_HOE:
case Material.IRON_HOE: case IRON_HOE:
case Material.STONE_HOE: case STONE_HOE:
case Material.WOODEN_HOE: case WOODEN_HOE:
return true; return true;
default: default:
@ -86,11 +86,11 @@ public final class ItemUtils {
Material type = item.getType(); Material type = item.getType();
switch (type) { switch (type) {
case Material.DIAMOND_SHOVEL: case DIAMOND_SHOVEL:
case Material.GOLDEN_SHOVEL: case GOLDEN_SHOVEL:
case Material.IRON_SHOVEL: case IRON_SHOVEL:
case Material.STONE_SHOVEL: case STONE_SHOVEL:
case Material.WOODEN_SHOVEL: case WOODEN_SHOVEL:
return true; return true;
default: default:
@ -108,11 +108,11 @@ public final class ItemUtils {
Material type = item.getType(); Material type = item.getType();
switch (type) { switch (type) {
case Material.DIAMOND_AXE: case DIAMOND_AXE:
case Material.GOLDEN_AXE: case GOLDEN_AXE:
case Material.IRON_AXE: case IRON_AXE:
case Material.STONE_AXE: case STONE_AXE:
case Material.WOODEN_AXE: case WOODEN_AXE:
return true; return true;
default: default:
@ -130,11 +130,11 @@ public final class ItemUtils {
Material type = item.getType(); Material type = item.getType();
switch (type) { switch (type) {
case Material.DIAMOND_PICKAXE: case DIAMOND_PICKAXE:
case Material.GOLDEN_PICKAXE: case GOLDEN_PICKAXE:
case Material.IRON_PICKAXE: case IRON_PICKAXE:
case Material.STONE_PICKAXE: case STONE_PICKAXE:
case Material.WOODEN_PICKAXE: case WOODEN_PICKAXE:
return true; return true;
default: default:
@ -166,11 +166,11 @@ public final class ItemUtils {
Material type = item.getType(); Material type = item.getType();
switch (type) { switch (type) {
case Material.DIAMOND_HELMET: case DIAMOND_HELMET:
case Material.GOLDEN_HELMET: case GOLDEN_HELMET:
case Material.IRON_HELMET: case IRON_HELMET:
case Material.CHAINMAIL_HELMET: case CHAINMAIL_HELMET:
case Material.LEATHER_HELMET: case LEATHER_HELMET:
return true; return true;
default: default:
@ -188,11 +188,11 @@ public final class ItemUtils {
Material type = item.getType(); Material type = item.getType();
switch (type) { switch (type) {
case Material.DIAMOND_CHESTPLATE: case DIAMOND_CHESTPLATE:
case Material.GOLDEN_CHESTPLATE: case GOLDEN_CHESTPLATE:
case Material.IRON_CHESTPLATE: case IRON_CHESTPLATE:
case Material.CHAINMAIL_CHESTPLATE: case CHAINMAIL_CHESTPLATE:
case Material.LEATHER_CHESTPLATE: case LEATHER_CHESTPLATE:
return true; return true;
default: default:
@ -210,11 +210,11 @@ public final class ItemUtils {
Material type = item.getType(); Material type = item.getType();
switch (type) { switch (type) {
case Material.DIAMOND_LEGGINGS: case DIAMOND_LEGGINGS:
case Material.GOLDEN_LEGGINGS: case GOLDEN_LEGGINGS:
case Material.IRON_LEGGINGS: case IRON_LEGGINGS:
case Material.CHAINMAIL_LEGGINGS: case CHAINMAIL_LEGGINGS:
case Material.LEATHER_LEGGINGS: case LEATHER_LEGGINGS:
return true; return true;
default: default:
@ -232,11 +232,11 @@ public final class ItemUtils {
Material type = item.getType(); Material type = item.getType();
switch (type) { switch (type) {
case Material.DIAMOND_BOOTS: case DIAMOND_BOOTS:
case Material.GOLDEN_BOOTS: case GOLDEN_BOOTS:
case Material.IRON_BOOTS: case IRON_BOOTS:
case Material.CHAINMAIL_BOOTS: case CHAINMAIL_BOOTS:
case Material.LEATHER_BOOTS: case LEATHER_BOOTS:
return true; return true;
default: default:
@ -272,10 +272,10 @@ public final class ItemUtils {
*/ */
public static boolean isLeatherArmor(ItemStack item) { public static boolean isLeatherArmor(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.LEATHER_BOOTS: case LEATHER_BOOTS:
case Material.LEATHER_CHESTPLATE: case LEATHER_CHESTPLATE:
case Material.LEATHER_HELMET: case LEATHER_HELMET:
case Material.LEATHER_LEGGINGS: case LEATHER_LEGGINGS:
return true; return true;
default: default:
@ -291,10 +291,10 @@ public final class ItemUtils {
*/ */
public static boolean isGoldArmor(ItemStack item) { public static boolean isGoldArmor(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.GOLDEN_BOOTS: case GOLDEN_BOOTS:
case Material.GOLDEN_CHESTPLATE: case GOLDEN_CHESTPLATE:
case Material.GOLDEN_HELMET: case GOLDEN_HELMET:
case Material.GOLDEN_LEGGINGS: case GOLDEN_LEGGINGS:
return true; return true;
default: default:
@ -310,10 +310,10 @@ public final class ItemUtils {
*/ */
public static boolean isIronArmor(ItemStack item) { public static boolean isIronArmor(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.IRON_BOOTS: case IRON_BOOTS:
case Material.IRON_CHESTPLATE: case IRON_CHESTPLATE:
case Material.IRON_HELMET: case IRON_HELMET:
case Material.IRON_LEGGINGS: case IRON_LEGGINGS:
return true; return true;
default: default:
@ -329,10 +329,10 @@ public final class ItemUtils {
*/ */
public static boolean isDiamondArmor(ItemStack item) { public static boolean isDiamondArmor(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.DIAMOND_BOOTS: case DIAMOND_BOOTS:
case Material.DIAMOND_CHESTPLATE: case DIAMOND_CHESTPLATE:
case Material.DIAMOND_HELMET: case DIAMOND_HELMET:
case Material.DIAMOND_LEGGINGS: case DIAMOND_LEGGINGS:
return true; return true;
default: default:
@ -348,10 +348,10 @@ public final class ItemUtils {
*/ */
public static boolean isChainmailArmor(ItemStack item) { public static boolean isChainmailArmor(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.CHAINMAIL_BOOTS: case CHAINMAIL_BOOTS:
case Material.CHAINMAIL_CHESTPLATE: case CHAINMAIL_CHESTPLATE:
case Material.CHAINMAIL_HELMET: case CHAINMAIL_HELMET:
case Material.CHAINMAIL_LEGGINGS: case CHAINMAIL_LEGGINGS:
return true; return true;
default: default:
@ -377,11 +377,11 @@ public final class ItemUtils {
*/ */
public static boolean isStoneTool(ItemStack item) { public static boolean isStoneTool(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.STONE_AXE: case STONE_AXE:
case Material.STONE_HOE: case STONE_HOE:
case Material.STONE_PICKAXE: case STONE_PICKAXE:
case Material.STONE_SHOVEL: case STONE_SHOVEL:
case Material.STONE_SWORD: case STONE_SWORD:
return true; return true;
default: default:
@ -397,11 +397,11 @@ public final class ItemUtils {
*/ */
public static boolean isWoodTool(ItemStack item) { public static boolean isWoodTool(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.WOODEN_AXE: case WOODEN_AXE:
case Material.WOODEN_HOE: case WOODEN_HOE:
case Material.WOODEN_PICKAXE: case WOODEN_PICKAXE:
case Material.WOODEN_SHOVEL: case WOODEN_SHOVEL:
case Material.WOODEN_SWORD: case WOODEN_SWORD:
return true; return true;
default: default:
@ -417,9 +417,9 @@ public final class ItemUtils {
*/ */
public static boolean isStringTool(ItemStack item) { public static boolean isStringTool(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.BOW: case BOW:
case Material.CARROT_ON_A_STICK: case CARROT_ON_A_STICK:
case Material.FISHING_ROD: case FISHING_ROD:
return true; return true;
default: default:
@ -435,11 +435,11 @@ public final class ItemUtils {
*/ */
public static boolean isGoldTool(ItemStack item) { public static boolean isGoldTool(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.GOLDEN_AXE: case GOLDEN_AXE:
case Material.GOLDEN_HOE: case GOLDEN_HOE:
case Material.GOLDEN_PICKAXE: case GOLDEN_PICKAXE:
case Material.GOLDEN_SHOVEL: case GOLDEN_SHOVEL:
case Material.GOLDEN_SWORD: case GOLDEN_SWORD:
return true; return true;
default: default:
@ -455,14 +455,14 @@ public final class ItemUtils {
*/ */
public static boolean isIronTool(ItemStack item) { public static boolean isIronTool(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.BUCKET: case BUCKET:
case Material.FLINT_AND_STEEL: case FLINT_AND_STEEL:
case Material.IRON_AXE: case IRON_AXE:
case Material.IRON_HOE: case IRON_HOE:
case Material.IRON_PICKAXE: case IRON_PICKAXE:
case Material.IRON_SHOVEL: case IRON_SHOVEL:
case Material.IRON_SWORD: case IRON_SWORD:
case Material.SHEARS: case SHEARS:
return true; return true;
default: default:
@ -478,11 +478,11 @@ public final class ItemUtils {
*/ */
public static boolean isDiamondTool(ItemStack item) { public static boolean isDiamondTool(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.DIAMOND_AXE: case DIAMOND_AXE:
case Material.DIAMOND_HOE: case DIAMOND_HOE:
case Material.DIAMOND_PICKAXE: case DIAMOND_PICKAXE:
case Material.DIAMOND_SHOVEL: case DIAMOND_SHOVEL:
case Material.DIAMOND_SWORD: case DIAMOND_SWORD:
return true; return true;
default: default:
@ -498,12 +498,12 @@ public final class ItemUtils {
*/ */
public static boolean isEnchantable(ItemStack item) { public static boolean isEnchantable(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.ENCHANTED_BOOK: case ENCHANTED_BOOK:
case Material.SHEARS: case SHEARS:
case Material.FISHING_ROD: case FISHING_ROD:
case Material.CARROT_ON_A_STICK: case CARROT_ON_A_STICK:
case Material.FLINT_AND_STEEL: case FLINT_AND_STEEL:
case Material.TRIDENT: case TRIDENT:
return true; return true;
default: default:
@ -553,21 +553,21 @@ public final class ItemUtils {
*/ */
public static boolean isMiningDrop(ItemStack item) { public static boolean isMiningDrop(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.COAL: case COAL:
case Material.COAL_ORE: case COAL_ORE:
case Material.DIAMOND: case DIAMOND:
case Material.DIAMOND_ORE: case DIAMOND_ORE:
case Material.EMERALD: case EMERALD:
case Material.EMERALD_ORE: case EMERALD_ORE:
case Material.GOLD_ORE: case GOLD_ORE:
case Material.IRON_ORE: case IRON_ORE:
case Material.LAPIS_ORE: case LAPIS_ORE:
case Material.REDSTONE_ORE: // Should we also have Glowing Redstone Ore here? case REDSTONE_ORE: // Should we also have Glowing Redstone Ore here?
case Material.REDSTONE: case REDSTONE:
case Material.GLOWSTONE_DUST: // Should we also have Glowstone here? case GLOWSTONE_DUST: // Should we also have Glowstone here?
case Material.QUARTZ: case QUARTZ:
case Material.NETHER_QUARTZ_ORE: case NETHER_QUARTZ_ORE:
case Material.LAPIS_LAZULI: case LAPIS_LAZULI:
return true; return true;
default: default:
@ -583,29 +583,29 @@ public final class ItemUtils {
*/ */
public static boolean isHerbalismDrop(ItemStack item) { public static boolean isHerbalismDrop(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.WHEAT: case WHEAT:
case Material.WHEAT_SEEDS: case WHEAT_SEEDS:
case Material.CARROT: case CARROT:
case Material.CHORUS_FRUIT: case CHORUS_FRUIT:
case Material.CHORUS_FLOWER: case CHORUS_FLOWER:
case Material.POTATO: case POTATO:
case Material.BEETROOT: case BEETROOT:
case Material.BEETROOT_SEEDS: case BEETROOT_SEEDS:
case Material.NETHER_WART: case NETHER_WART:
case Material.BROWN_MUSHROOM: case BROWN_MUSHROOM:
case Material.RED_MUSHROOM: case RED_MUSHROOM:
case Material.ROSE_RED: case ROSE_RED:
case Material.DANDELION_YELLOW: case DANDELION_YELLOW:
case Material.CACTUS: case CACTUS:
case Material.SUGAR_CANE: case SUGAR_CANE:
case Material.MELON: case MELON:
case Material.MELON_SEEDS: case MELON_SEEDS:
case Material.PUMPKIN: case PUMPKIN:
case Material.PUMPKIN_SEEDS: case PUMPKIN_SEEDS:
case Material.LILY_PAD: case LILY_PAD:
case Material.VINE: case VINE:
case Material.TALL_GRASS: case TALL_GRASS:
case Material.COCOA_BEANS: case COCOA_BEANS:
return true; return true;
default: default:
@ -621,48 +621,48 @@ public final class ItemUtils {
*/ */
public static boolean isMobDrop(ItemStack item) { public static boolean isMobDrop(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.STRING: case STRING:
case Material.FEATHER: case FEATHER:
case Material.CHICKEN: case CHICKEN:
case Material.COOKED_CHICKEN: case COOKED_CHICKEN:
case Material.LEATHER: case LEATHER:
case Material.BEEF: case BEEF:
case Material.COOKED_BEEF: case COOKED_BEEF:
case Material.PORKCHOP: case PORKCHOP:
case Material.COOKED_PORKCHOP: case COOKED_PORKCHOP:
case Material.WHITE_WOOL: case WHITE_WOOL:
case Material.BLACK_WOOL: case BLACK_WOOL:
case Material.BLUE_WOOL: case BLUE_WOOL:
case Material.BROWN_WOOL: case BROWN_WOOL:
case Material.CYAN_WOOL: case CYAN_WOOL:
case Material.GRAY_WOOL: case GRAY_WOOL:
case Material.GREEN_WOOL: case GREEN_WOOL:
case Material.LIGHT_BLUE_WOOL: case LIGHT_BLUE_WOOL:
case Material.LIGHT_GRAY_WOOL: case LIGHT_GRAY_WOOL:
case Material.LIME_WOOL: case LIME_WOOL:
case Material.MAGENTA_WOOL: case MAGENTA_WOOL:
case Material.ORANGE_WOOL: case ORANGE_WOOL:
case Material.PINK_WOOL: case PINK_WOOL:
case Material.PURPLE_WOOL: case PURPLE_WOOL:
case Material.RED_WOOL: case RED_WOOL:
case Material.YELLOW_WOOL: case YELLOW_WOOL:
case Material.IRON_INGOT: case IRON_INGOT:
case Material.SNOWBALL: case SNOWBALL:
case Material.BLAZE_ROD: case BLAZE_ROD:
case Material.SPIDER_EYE: case SPIDER_EYE:
case Material.GUNPOWDER: case GUNPOWDER:
case Material.ENDER_PEARL: case ENDER_PEARL:
case Material.GHAST_TEAR: case GHAST_TEAR:
case Material.MAGMA_CREAM: case MAGMA_CREAM:
case Material.BONE: case BONE:
case Material.ARROW: case ARROW:
case Material.SLIME_BALL: case SLIME_BALL:
case Material.NETHER_STAR: case NETHER_STAR:
case Material.ROTTEN_FLESH: case ROTTEN_FLESH:
case Material.GOLD_NUGGET: case GOLD_NUGGET:
case Material.EGG: case EGG:
case Material.ROSE_RED: case ROSE_RED:
case Material.COAL: case COAL:
return true; return true;
default: default:
@ -678,31 +678,31 @@ public final class ItemUtils {
*/ */
public static boolean isWoodcuttingDrop(ItemStack item) { public static boolean isWoodcuttingDrop(ItemStack item) {
switch (item.getType()) { switch (item.getType()) {
case Material.ACACIA_LOG: case ACACIA_LOG:
case Material.BIRCH_LOG: case BIRCH_LOG:
case Material.DARK_OAK_LOG: case DARK_OAK_LOG:
case Material.JUNGLE_LOG: case JUNGLE_LOG:
case Material.OAK_LOG: case OAK_LOG:
case Material.SPRUCE_LOG: case SPRUCE_LOG:
case Material.STRIPPED_ACACIA_LOG: case STRIPPED_ACACIA_LOG:
case Material.STRIPPED_BIRCH_LOG: case STRIPPED_BIRCH_LOG:
case Material.STRIPPED_DARK_OAK_LOG: case STRIPPED_DARK_OAK_LOG:
case Material.STRIPPED_JUNGLE_LOG: case STRIPPED_JUNGLE_LOG:
case Material.STRIPPED_OAK_LOG: case STRIPPED_OAK_LOG:
case Material.STRIPPED_SPRUCE_LOG: case STRIPPED_SPRUCE_LOG:
case Material.ACACIA_SAPLING: case ACACIA_SAPLING:
case Material.SPRUCE_SAPLING: case SPRUCE_SAPLING:
case Material.BIRCH_SAPLING: case BIRCH_SAPLING:
case Material.DARK_OAK_SAPLING: case DARK_OAK_SAPLING:
case Material.JUNGLE_SAPLING: case JUNGLE_SAPLING:
case Material.OAK_SAPLING: case OAK_SAPLING:
case Material.ACACIA_LEAVES: case ACACIA_LEAVES:
case Material.BIRCH_LEAVES: case BIRCH_LEAVES:
case Material.DARK_OAK_LEAVES: case DARK_OAK_LEAVES:
case Material.JUNGLE_LEAVES: case JUNGLE_LEAVES:
case Material.OAK_LEAVES: case OAK_LEAVES:
case Material.SPRUCE_LEAVES: case SPRUCE_LEAVES:
case Material.APPLE: case APPLE:
return true; return true;
default: default:

View File

@ -8,14 +8,14 @@ public final class MaterialUtils {
protected static boolean isOre(Material data) { protected static boolean isOre(Material data) {
switch (data) { switch (data) {
case Material.COAL_ORE: case COAL_ORE:
case Material.DIAMOND_ORE: case DIAMOND_ORE:
case Material.NETHER_QUARTZ_ORE: case NETHER_QUARTZ_ORE:
case Material.GOLD_ORE: case GOLD_ORE:
case Material.IRON_ORE: case IRON_ORE:
case Material.LAPIS_ORE: case LAPIS_ORE:
case Material.REDSTONE_ORE: case REDSTONE_ORE:
case Material.EMERALD_ORE: case EMERALD_ORE:
return true; return true;
default: default:
return mcMMO.getModManager().isCustomOre(data); return mcMMO.getModManager().isCustomOre(data);

View File

@ -7,6 +7,7 @@ import com.gmail.nossr50.datatypes.meta.OldName;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.runnables.MobHealthDisplayUpdaterTask; import com.gmail.nossr50.runnables.MobHealthDisplayUpdaterTask;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity; import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageByEntityEvent; import org.bukkit.event.entity.EntityDamageByEntityEvent;
@ -155,8 +156,8 @@ public final class MobHealthbarUtils {
*/ */
private static boolean isBoss(LivingEntity livingEntity) { private static boolean isBoss(LivingEntity livingEntity) {
switch (livingEntity.getType()) { switch (livingEntity.getType()) {
case EntityType.ENDER_DRAGON: case ENDER_DRAGON:
case EntityType.WITHER: case WITHER:
return true; return true;
default: default:

View File

@ -42,13 +42,13 @@ public class StringUtils {
public static String getFriendlyConfigBlockDataString(BlockData data) { public static String getFriendlyConfigBlockDataString(BlockData data) {
switch(data.getMaterial()){ switch(data.getMaterial()){
case Material.CHORUS_FLOWER: case CHORUS_FLOWER:
case Material.COCOA: case COCOA:
case Material.WHEAT: case WHEAT:
case Material.BEETROOTS: case BEETROOTS:
case Material.CARROTS: case CARROTS:
case Material.POTATOES: case POTATOES:
case Material.NETHER_WART: { case NETHER_WART: {
if (data instanceof Ageable) { if (data instanceof Ageable) {
Ageable ageData = (Ageable) data; Ageable ageData = (Ageable) data;
if (ageData.getAge() == ageData.getMaximumAge()) { if (ageData.getAge() == ageData.getMaximumAge()) {

View File

@ -1,4 +1,4 @@
package net.shatteredlands.shatt; package net.shatteredlands.shatt.backup;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;