mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
PlayerListener cleanup
This commit is contained in:
@ -193,7 +193,7 @@ public enum AbilityType {
|
||||
return BlockChecks.canBeGigaDrillBroken(block);
|
||||
|
||||
case GREEN_TERRA:
|
||||
return BlockChecks.makeMossy(block);
|
||||
return BlockChecks.canMakeMossy(block);
|
||||
|
||||
case LEAF_BLOWER:
|
||||
return block.getType() == Material.LEAVES;
|
||||
|
@ -23,6 +23,7 @@ import com.gmail.nossr50.util.Users;
|
||||
public class Skills {
|
||||
static AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||
public static int abilityLengthIncreaseLevel = advancedConfig.getAbilityLength();
|
||||
public static boolean abilitiesEnabled = Config.getInstance().getAbilitiesEnabled();
|
||||
|
||||
/**
|
||||
* Checks to see if the cooldown for an item or ability is expired.
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.gmail.nossr50.skills.mining;
|
||||
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
|
||||
public class BlastMining {
|
||||
public static int rank1 = AdvancedConfig.getInstance().getBlastMiningRank1();
|
||||
@ -12,5 +13,7 @@ public class BlastMining {
|
||||
public static int rank7 = AdvancedConfig.getInstance().getBlastMiningRank7();
|
||||
public static int rank8 = AdvancedConfig.getInstance().getBlastMiningRank8();
|
||||
|
||||
public static int detonatorID = Config.getInstance().getDetonatorItemID();
|
||||
|
||||
public final static int MAXIMUM_REMOTE_DETONATION_DISTANCE = 100;
|
||||
}
|
||||
|
@ -27,10 +27,6 @@ public class MiningManager extends SkillManager{
|
||||
* @param plugin mcMMO plugin instance
|
||||
*/
|
||||
public void detonate(PlayerInteractEvent event) {
|
||||
if (Misc.isNPC(player)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (skillLevel < BlastMining.rank1) {
|
||||
return;
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ import org.getspout.spoutapi.player.SpoutPlayer;
|
||||
|
||||
import com.gmail.nossr50.mcMMO;
|
||||
import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.config.Config;
|
||||
import com.gmail.nossr50.datatypes.PlayerProfile;
|
||||
import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillType;
|
||||
@ -33,6 +34,8 @@ public class Repair {
|
||||
public static boolean arcaneForgingDowngrades = advancedConfig.getArcaneForgingDowngradeEnabled();
|
||||
public static boolean arcaneForgingEnchantLoss = advancedConfig.getArcaneForgingEnchantLossEnabled();
|
||||
|
||||
public static int anvilID = Config.getInstance().getRepairAnvilId();
|
||||
|
||||
/**
|
||||
* Handle the XP gain for repair events.
|
||||
*
|
||||
|
@ -15,15 +15,15 @@ import com.gmail.nossr50.locale.LocaleLoader;
|
||||
import com.gmail.nossr50.skills.SkillType;
|
||||
import com.gmail.nossr50.util.ItemChecks;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
import com.gmail.nossr50.util.Permissions;
|
||||
import com.gmail.nossr50.util.Users;
|
||||
|
||||
public class Salvage {
|
||||
private static Config configInstance = Config.getInstance();
|
||||
public static int salvageUnlockLevel = Config.getInstance().getSalvageUnlockLevel();
|
||||
public static int anvilID = Config.getInstance().getSalvageAnvilId();
|
||||
|
||||
public static void handleSalvage(final Player player, final Location location, final ItemStack inHand) {
|
||||
if (!Permissions.salvage(player) || !configInstance.getSalvageEnabled()) {
|
||||
if (!configInstance.getSalvageEnabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -162,9 +162,6 @@ public class TamingManager extends SkillManager {
|
||||
* @param summonAmount The amount of material needed to summon the entity
|
||||
*/
|
||||
private void callOfTheWild(EntityType type, int summonAmount) {
|
||||
if (player == null)
|
||||
return;
|
||||
|
||||
if (!Permissions.callOfTheWild(player)) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user