mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Metadata does nothing, apparently.
This commit is contained in:
parent
a5219055ef
commit
b78299bbbd
@ -13,7 +13,7 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
||||
import com.gmail.nossr50.util.Misc;
|
||||
|
||||
public class Archery {
|
||||
static AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||
private static AdvancedConfig advancedConfig = AdvancedConfig.getInstance();
|
||||
private static Random random = new Random();
|
||||
private static List<TrackedEntity> trackedEntities = new ArrayList<TrackedEntity>();
|
||||
|
||||
@ -30,14 +30,13 @@ public class Archery {
|
||||
|
||||
protected static void incrementTrackerValue(LivingEntity livingEntity) {
|
||||
for (TrackedEntity trackedEntity : trackedEntities) {
|
||||
if (trackedEntity.getLivingEntity() == livingEntity) {
|
||||
if (trackedEntity.getLivingEntity().getEntityId() == livingEntity.getEntityId()) {
|
||||
trackedEntity.incrementArrowCount();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//If the entity isn't tracked yet
|
||||
addToTracker(livingEntity);
|
||||
addToTracker(livingEntity); //If the entity isn't tracked yet
|
||||
}
|
||||
|
||||
protected static void addToTracker(LivingEntity livingEntity) {
|
||||
|
@ -14,13 +14,11 @@ public class ArcheryBonusDamageEventHandler {
|
||||
}
|
||||
|
||||
protected void calculateDamageBonus() {
|
||||
double damageBonus = ((manager.getSkillLevel() / Archery.BONUS_DAMAGE_INCREASE_LEVEL) * Archery.BONUS_DAMAGE_INCREASE_PERCENT);
|
||||
this.damageBonusPercent = ((manager.getSkillLevel() / Archery.BONUS_DAMAGE_INCREASE_LEVEL) * Archery.BONUS_DAMAGE_INCREASE_PERCENT);
|
||||
|
||||
if (damageBonus > Archery.BONUS_DAMAGE_MAX_BONUS_PERCENTAGE) {
|
||||
damageBonus = Archery.BONUS_DAMAGE_MAX_BONUS_PERCENTAGE;
|
||||
if (damageBonusPercent > Archery.BONUS_DAMAGE_MAX_BONUS_PERCENTAGE) {
|
||||
damageBonusPercent = Archery.BONUS_DAMAGE_MAX_BONUS_PERCENTAGE;
|
||||
}
|
||||
|
||||
this.damageBonusPercent = damageBonus;
|
||||
}
|
||||
|
||||
protected void modifyEventDamage() {
|
||||
|
@ -26,7 +26,11 @@ public class Misc {
|
||||
public static final int PLAYER_RESPAWN_COOLDOWN_SECONDS = 5;
|
||||
|
||||
public static boolean isCitizensNPC(Player player) {
|
||||
return player.hasMetadata("NPC");
|
||||
if (player == null || Users.getProfile(player) == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user