Major refactoring. This WILL break any mcMMO-related plugin that

does not properly hook into the API classes. 

This consolidates the skill-related classes into their own individual
packages, and moves several misc skill classes into the main Skill
package as well. This also moves all Party & Spout related files into
their own respective packages as well.
This commit is contained in:
GJ
2013-01-22 12:43:25 -05:00
parent 00d50953ad
commit 6b0e7a9c61
95 changed files with 233 additions and 239 deletions

View File

@@ -1,67 +0,0 @@
package com.gmail.nossr50.commands.skills;
import com.gmail.nossr50.commands.SkillCommand;
import com.gmail.nossr50.datatypes.SkillType;
import com.gmail.nossr50.locale.LocaleLoader;
import com.gmail.nossr50.util.Permissions;
public class ExcavationCommand extends SkillCommand {
private String gigaDrillBreakerLength;
private String gigaDrillBreakerLengthEndurance;
private boolean canGigaDrill;
private boolean canTreasureHunt;
public ExcavationCommand() {
super(SkillType.EXCAVATION);
}
@Override
protected void dataCalculations() {
//GIGA DRILL BREAKER
String gigaDrillStrings[] = calculateLengthDisplayValues();
gigaDrillBreakerLength = gigaDrillStrings[0];
gigaDrillBreakerLengthEndurance = gigaDrillStrings[1];
}
@Override
protected void permissionsCheck() {
canGigaDrill = Permissions.gigaDrillBreaker(player);
canTreasureHunt = Permissions.excavationTreasures(player);
}
@Override
protected boolean effectsHeaderPermissions() {
return canGigaDrill || canTreasureHunt;
}
@Override
protected void effectsDisplay() {
luckyEffectsDisplay();
if (canGigaDrill) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Excavation.Effect.0"), LocaleLoader.getString("Excavation.Effect.1") }));
}
if (canTreasureHunt) {
player.sendMessage(LocaleLoader.getString("Effects.Template", new Object[] { LocaleLoader.getString("Excavation.Effect.2"), LocaleLoader.getString("Excavation.Effect.3") }));
}
}
@Override
protected boolean statsHeaderPermissions() {
return canGigaDrill;
}
@Override
protected void statsDisplay() {
if (canGigaDrill) {
if (hasEndurance) {
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", new Object[] { gigaDrillBreakerLength }) + LocaleLoader.getString("Perks.activationtime.bonus", new Object[] { gigaDrillBreakerLengthEndurance }));
}
else {
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", new Object[] { gigaDrillBreakerLength }));
}
}
}
}