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
# gradle
*.bin
*.lock
bin
/.gradle
/mcMMO-core/.gradle
/mcMMO-core/gradle

View File

@ -8,9 +8,35 @@ version '2.2.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
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 {
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'
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,14 +8,14 @@ public final class MaterialUtils {
protected static boolean isOre(Material data) {
switch (data) {
case Material.COAL_ORE:
case Material.DIAMOND_ORE:
case Material.NETHER_QUARTZ_ORE:
case Material.GOLD_ORE:
case Material.IRON_ORE:
case Material.LAPIS_ORE:
case Material.REDSTONE_ORE:
case Material.EMERALD_ORE:
case COAL_ORE:
case DIAMOND_ORE:
case NETHER_QUARTZ_ORE:
case GOLD_ORE:
case IRON_ORE:
case LAPIS_ORE:
case REDSTONE_ORE:
case EMERALD_ORE:
return true;
default:
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.runnables.MobHealthDisplayUpdaterTask;
import org.bukkit.ChatColor;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
@ -155,8 +156,8 @@ public final class MobHealthbarUtils {
*/
private static boolean isBoss(LivingEntity livingEntity) {
switch (livingEntity.getType()) {
case EntityType.ENDER_DRAGON:
case EntityType.WITHER:
case ENDER_DRAGON:
case WITHER:
return true;
default:

View File

@ -42,13 +42,13 @@ public class StringUtils {
public static String getFriendlyConfigBlockDataString(BlockData data) {
switch(data.getMaterial()){
case Material.CHORUS_FLOWER:
case Material.COCOA:
case Material.WHEAT:
case Material.BEETROOTS:
case Material.CARROTS:
case Material.POTATOES:
case Material.NETHER_WART: {
case CHORUS_FLOWER:
case COCOA:
case WHEAT:
case BEETROOTS:
case CARROTS:
case POTATOES:
case NETHER_WART: {
if (data instanceof Ageable) {
Ageable ageData = (Ageable) data;
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.mcMMO;