mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-25 08:35:27 +02:00
Clean up on all of our commands. Abstracted experience commands and
hardcore commands. Moved lots of duplicated code to functions in CommandUtils.java. Split /ptp into individual commands, just like /party. Used ternary logic to simplify some of our /skillname stat displays. Fixed skill guide to not allow for negative pages. Simplified logic for many /skillname data calculations. Use permission checks to prevent calculating data that will never be displayed. Made the skill guide into its own command.
This commit is contained in:
@@ -18,9 +18,11 @@ public class ExcavationCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void dataCalculations() {
|
||||
// GIGA DRILL BREAKER
|
||||
String gigaDrillStrings[] = calculateLengthDisplayValues();
|
||||
gigaDrillBreakerLength = gigaDrillStrings[0];
|
||||
gigaDrillBreakerLengthEndurance = gigaDrillStrings[1];
|
||||
if (canGigaDrill) {
|
||||
String gigaDrillStrings[] = calculateLengthDisplayValues();
|
||||
gigaDrillBreakerLength = gigaDrillStrings[0];
|
||||
gigaDrillBreakerLengthEndurance = gigaDrillStrings[1];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,12 +57,7 @@ public class ExcavationCommand extends SkillCommand {
|
||||
@Override
|
||||
protected void statsDisplay() {
|
||||
if (canGigaDrill) {
|
||||
if (hasEndurance) {
|
||||
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", gigaDrillBreakerLength) + LocaleLoader.getString("Perks.activationtime.bonus", gigaDrillBreakerLengthEndurance));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", gigaDrillBreakerLength));
|
||||
}
|
||||
player.sendMessage(LocaleLoader.getString("Excavation.Effect.Length", gigaDrillBreakerLength) + (hasEndurance ? LocaleLoader.getString("Perks.activationtime.bonus", gigaDrillBreakerLengthEndurance) : ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user