mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Because making it upper case broke all the things.
This commit is contained in:
@ -18,7 +18,7 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.metadata.FixedMetadataValue;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@ -202,7 +202,7 @@ public class Taming {
|
||||
* @param type Type of animal to summon
|
||||
* @param player Player summoning the animal
|
||||
*/
|
||||
public static void animalSummon(EntityType type, Player player, McMMO plugin) {
|
||||
public static void animalSummon(EntityType type, Player player, mcMMO plugin) {
|
||||
ItemStack item = player.getItemInHand();
|
||||
Material summonItem = null;
|
||||
int summonAmount = 0;
|
||||
|
@ -16,7 +16,7 @@ import org.bukkit.event.entity.EntityExplodeEvent;
|
||||
import org.bukkit.event.entity.ExplosionPrimeEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.datatypes.AbilityType;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@ -52,7 +52,7 @@ public class BlastMining {
|
||||
blocksDropped.add(temp);
|
||||
Mining.miningDrops(temp);
|
||||
|
||||
if (!McMMO.placeStore.isTrue(temp)) {
|
||||
if (!mcMMO.placeStore.isTrue(temp)) {
|
||||
for (int i = 1 ; i < extraDrops ; i++) {
|
||||
blocksDropped.add(temp);
|
||||
Mining.miningDrops(temp);
|
||||
@ -159,7 +159,7 @@ public class BlastMining {
|
||||
}
|
||||
|
||||
for (Block block : xp) {
|
||||
if (!McMMO.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
Mining.miningXP(player, block);
|
||||
}
|
||||
}
|
||||
@ -241,7 +241,7 @@ public class BlastMining {
|
||||
* @param player Player detonating the TNT
|
||||
* @param plugin mcMMO plugin instance
|
||||
*/
|
||||
public static void detonate(PlayerInteractEvent event, Player player, McMMO plugin) {
|
||||
public static void detonate(PlayerInteractEvent event, Player player, mcMMO plugin) {
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if (PP.getSkillLevel(SkillType.MINING) < 125)
|
||||
|
@ -11,7 +11,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.getspout.spoutapi.sound.SoundEffect;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.TreasuresConfig;
|
||||
import com.gmail.nossr50.config.mods.CustomBlocksConfig;
|
||||
@ -118,15 +118,15 @@ public class Excavation {
|
||||
public static void gigaDrillBreaker(Player player, Block block) {
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), Config.getInstance().getAbilityToolDamage());
|
||||
|
||||
if (!McMMO.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
||||
McMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
|
||||
Excavation.excavationProcCheck(block, player);
|
||||
Excavation.excavationProcCheck(block, player);
|
||||
}
|
||||
|
||||
if (McMMO.spoutEnabled) {
|
||||
if (mcMMO.spoutEnabled) {
|
||||
SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import org.bukkit.event.block.BlockBreakEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.config.mods.CustomBlocksConfig;
|
||||
import com.gmail.nossr50.datatypes.AbilityType;
|
||||
@ -73,7 +73,7 @@ public class Herbalism {
|
||||
* @param event The event to use for Green Thumb
|
||||
* @param plugin mcMMO plugin instance
|
||||
*/
|
||||
public static void herbalismProcCheck(final Block block, Player player, BlockBreakEvent event, McMMO plugin) {
|
||||
public static void herbalismProcCheck(final Block block, Player player, BlockBreakEvent event, mcMMO plugin) {
|
||||
final PlayerProfile PP = Users.getProfile(player);
|
||||
final int MAX_BONUS_LEVEL = 1000;
|
||||
|
||||
@ -94,7 +94,7 @@ public class Herbalism {
|
||||
switch (type) {
|
||||
case BROWN_MUSHROOM:
|
||||
case RED_MUSHROOM:
|
||||
if (!McMMO.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = Material.getMaterial(id);
|
||||
xp = Config.getInstance().getHerbalismXPMushrooms();
|
||||
}
|
||||
@ -105,7 +105,7 @@ public class Herbalism {
|
||||
Block b = block.getRelative(0, y, 0);
|
||||
if (b.getType().equals(Material.CACTUS)) {
|
||||
mat = Material.CACTUS;
|
||||
if (!McMMO.placeStore.isTrue(b)) {
|
||||
if (!mcMMO.placeStore.isTrue(b)) {
|
||||
if (herbLevel > MAX_BONUS_LEVEL || random.nextInt(1000) <= herbLevel) {
|
||||
catciDrops++;
|
||||
}
|
||||
@ -127,7 +127,7 @@ public class Herbalism {
|
||||
break;
|
||||
|
||||
case MELON_BLOCK:
|
||||
if (!McMMO.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = Material.MELON;
|
||||
xp = Config.getInstance().getHerbalismXPMelon();
|
||||
}
|
||||
@ -142,7 +142,7 @@ public class Herbalism {
|
||||
|
||||
case PUMPKIN:
|
||||
case JACK_O_LANTERN:
|
||||
if (!McMMO.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = Material.getMaterial(id);
|
||||
xp = Config.getInstance().getHerbalismXPPumpkin();
|
||||
}
|
||||
@ -150,7 +150,7 @@ public class Herbalism {
|
||||
|
||||
case RED_ROSE:
|
||||
case YELLOW_FLOWER:
|
||||
if (!McMMO.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = Material.getMaterial(id);
|
||||
xp = Config.getInstance().getHerbalismXPFlowers();
|
||||
}
|
||||
@ -161,7 +161,7 @@ public class Herbalism {
|
||||
Block b = block.getRelative(0, y, 0);
|
||||
if (b.getType().equals(Material.SUGAR_CANE_BLOCK)) {
|
||||
mat = Material.SUGAR_CANE;
|
||||
if (!McMMO.placeStore.isTrue(b)) {
|
||||
if (!mcMMO.placeStore.isTrue(b)) {
|
||||
if (herbLevel > MAX_BONUS_LEVEL || random.nextInt(1000) <= herbLevel) {
|
||||
caneDrops++;
|
||||
}
|
||||
@ -172,14 +172,14 @@ public class Herbalism {
|
||||
break;
|
||||
|
||||
case VINE:
|
||||
if (!McMMO.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = type;
|
||||
xp = Config.getInstance().getHerbalismXPVines();
|
||||
}
|
||||
break;
|
||||
|
||||
case WATER_LILY:
|
||||
if (!McMMO.placeStore.isTrue(block)) {
|
||||
if (!mcMMO.placeStore.isTrue(block)) {
|
||||
mat = type;
|
||||
xp = Config.getInstance().getHerbalismXPLilyPads();
|
||||
}
|
||||
@ -299,7 +299,7 @@ public class Herbalism {
|
||||
* @param event The event triggering the ability
|
||||
* @param plugin mcMMO plugin instance
|
||||
*/
|
||||
private static void greenThumbWheat(Block block, Player player, BlockBreakEvent event, McMMO plugin) {
|
||||
private static void greenThumbWheat(Block block, Player player, BlockBreakEvent event, mcMMO plugin) {
|
||||
final int MAX_BONUS_LEVEL = 1500;
|
||||
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
@ -11,7 +11,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.getspout.spoutapi.sound.SoundEffect;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@ -285,7 +285,7 @@ public class Mining {
|
||||
* @param block The block being broken
|
||||
*/
|
||||
public static void miningBlockCheck(Player player, Block block) {
|
||||
if (McMMO.placeStore.isTrue(block)) {
|
||||
if (mcMMO.placeStore.isTrue(block)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -322,16 +322,16 @@ public class Mining {
|
||||
return;
|
||||
}
|
||||
|
||||
if (McMMO.placeStore.isTrue(block)) {
|
||||
if (mcMMO.placeStore.isTrue(block)) {
|
||||
return;
|
||||
}
|
||||
|
||||
McMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), durabilityLoss);
|
||||
|
||||
miningBlockCheck(player, block);
|
||||
|
||||
if (McMMO.spoutEnabled) {
|
||||
if (mcMMO.spoutEnabled) {
|
||||
SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
||||
}
|
||||
}
|
||||
@ -367,16 +367,16 @@ public class Mining {
|
||||
case NETHERRACK:
|
||||
case SANDSTONE:
|
||||
case STONE:
|
||||
if (McMMO.placeStore.isTrue(block)) {
|
||||
if (mcMMO.placeStore.isTrue(block)) {
|
||||
return;
|
||||
}
|
||||
|
||||
McMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), durabilityLoss);
|
||||
|
||||
miningBlockCheck(player, block);
|
||||
|
||||
if (McMMO.spoutEnabled) {
|
||||
if (mcMMO.spoutEnabled) {
|
||||
SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.material.Tree;
|
||||
import org.getspout.spoutapi.sound.SoundEffect;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@ -107,7 +107,7 @@ public class WoodCutting {
|
||||
CustomBlock block = ModChecks.getCustomBlock(x);
|
||||
item = block.getItemDrop();
|
||||
|
||||
if (!McMMO.placeStore.isTrue(x)) {
|
||||
if (!mcMMO.placeStore.isTrue(x)) {
|
||||
WoodCutting.woodCuttingProcCheck(player, x);
|
||||
xp = block.getXpGain();
|
||||
}
|
||||
@ -156,7 +156,7 @@ public class WoodCutting {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!McMMO.placeStore.isTrue(x)) {
|
||||
if (!mcMMO.placeStore.isTrue(x)) {
|
||||
WoodCutting.woodCuttingProcCheck(player, x);
|
||||
|
||||
switch (species) {
|
||||
@ -232,7 +232,7 @@ public class WoodCutting {
|
||||
Block zNegative = currentBlock.getRelative(0, 0, -1);
|
||||
Block yPositive = currentBlock.getRelative(0, 1, 0);
|
||||
|
||||
if (!McMMO.placeStore.isTrue(currentBlock)) {
|
||||
if (!mcMMO.placeStore.isTrue(currentBlock)) {
|
||||
if (!isTooAggressive(currentBlock, xPositive) && BlockChecks.treeFellerCompatible(xPositive) && !toBeFelled.contains(xPositive)) {
|
||||
processTreeFelling(xPositive, toBeFelled);
|
||||
}
|
||||
@ -251,7 +251,7 @@ public class WoodCutting {
|
||||
}
|
||||
|
||||
if (BlockChecks.treeFellerCompatible(yPositive)) {
|
||||
if(!McMMO.placeStore.isTrue(currentBlock) && !toBeFelled.contains(yPositive)) {
|
||||
if(!mcMMO.placeStore.isTrue(currentBlock) && !toBeFelled.contains(yPositive)) {
|
||||
processTreeFelling(yPositive, toBeFelled);
|
||||
}
|
||||
}
|
||||
@ -351,7 +351,7 @@ public class WoodCutting {
|
||||
int xp = 0;
|
||||
TreeSpecies species = TreeSpecies.getByData(block.getData());
|
||||
|
||||
if (McMMO.placeStore.isTrue(block)) {
|
||||
if (mcMMO.placeStore.isTrue(block)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -393,13 +393,13 @@ public class WoodCutting {
|
||||
*/
|
||||
public static void leafBlower(Player player, Block block) {
|
||||
FakePlayerAnimationEvent armswing = new FakePlayerAnimationEvent(player);
|
||||
McMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
mcMMO.p.getServer().getPluginManager().callEvent(armswing);
|
||||
|
||||
if (Config.getInstance().getWoodcuttingRequiresTool()) {
|
||||
Skills.abilityDurabilityLoss(player.getItemInHand(), Config.getInstance().getAbilityToolDamage());
|
||||
}
|
||||
|
||||
if (McMMO.spoutEnabled) {
|
||||
if (mcMMO.spoutEnabled) {
|
||||
SpoutSounds.playSoundForPlayer(SoundEffect.POP, player, block.getLocation());
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.getspout.spoutapi.SpoutManager;
|
||||
import org.getspout.spoutapi.player.SpoutPlayer;
|
||||
|
||||
import com.gmail.nossr50.McMMO;
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.SkillType;
|
||||
@ -45,8 +45,8 @@ public class Repair {
|
||||
Skills.xpProcessing(player, PP, SkillType.REPAIR, dif * 10);
|
||||
|
||||
//CLANG CLANG
|
||||
if (McMMO.spoutEnabled) {
|
||||
SpoutSounds.playRepairNoise(player, McMMO.p);
|
||||
if (mcMMO.spoutEnabled) {
|
||||
SpoutSounds.playRepairNoise(player, mcMMO.p);
|
||||
}
|
||||
}
|
||||
|
||||
@ -241,7 +241,7 @@ public class Repair {
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
|
||||
if (!PP.getPlacedAnvil()) {
|
||||
if (McMMO.spoutEnabled) {
|
||||
if (mcMMO.spoutEnabled) {
|
||||
SpoutPlayer sPlayer = SpoutManager.getPlayer(player);
|
||||
|
||||
if (sPlayer.isSpoutCraftEnabled()) {
|
||||
|
@ -205,6 +205,19 @@ public class SimpleRepairManager implements RepairManager {
|
||||
ItemStack[] contents = inventory.getContents();
|
||||
for (int i = 0; i < contents.length; i++) {
|
||||
ItemStack item = contents[i];
|
||||
|
||||
//DEBUG TIME!
|
||||
if (item == null) {
|
||||
System.out.println("The item is null.");
|
||||
System.out.println("Content length: " + contents.length);
|
||||
System.out.println("Current contents: " + i);
|
||||
}
|
||||
else {
|
||||
System.out.println("The item is: " + item.toString());
|
||||
System.out.println("Content length: " + contents.length);
|
||||
System.out.println("Current contents: " + i);
|
||||
}
|
||||
|
||||
if (item.getTypeId() == itemId) {
|
||||
if (item.getData().getData() == metadata) {
|
||||
location = i;
|
||||
|
Reference in New Issue
Block a user