mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 19:24:44 +02:00
Clean up some of our messes.
This commit is contained in:
@ -1,9 +1,6 @@
|
||||
package com.gmail.nossr50.commands.party;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.*;
|
||||
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandExecutor;
|
||||
@ -220,13 +217,7 @@ public class PartyCommand implements TabExecutor {
|
||||
}
|
||||
|
||||
private String[] extractArgs(String[] args) {
|
||||
String[] newArgs = new String[args.length - 1];
|
||||
|
||||
for (int i = 1; i < args.length; i++) {
|
||||
newArgs[i - 1] = args[i];
|
||||
}
|
||||
|
||||
return newArgs;
|
||||
return Arrays.copyOfRange(args, 1, args.length - 1);
|
||||
}
|
||||
|
||||
private boolean isItemShareCategory(String category) {
|
||||
|
@ -47,7 +47,7 @@ public class PartyInfoCommand implements CommandExecutor {
|
||||
status.append(LocaleLoader.getString("Commands.Party.Status", party.getName(), LocaleLoader.getString("Party.Status." + (party.isLocked() ? "Locked" : "Unlocked")), party.getLevel()));
|
||||
|
||||
if (!party.hasReachedLevelCap()) {
|
||||
status.append(" (" + party.getXpToLevelPercentage() + ")");
|
||||
status.append(" (").append(party.getXpToLevelPercentage()).append(")");
|
||||
}
|
||||
|
||||
player.sendMessage(status.toString());
|
||||
@ -80,11 +80,7 @@ public class PartyInfoCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
private boolean isUnlockedFeature(Party party, PartyFeature partyFeature) {
|
||||
if (party.getLevel() < Config.getInstance().getPartyFeatureUnlockLevel(partyFeature)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return party.getLevel() >= Config.getInstance().getPartyFeatureUnlockLevel(partyFeature);
|
||||
}
|
||||
|
||||
private void displayShareModeInfo(Player player, Party party) {
|
||||
|
@ -38,7 +38,7 @@ public class PartyItemShareCommand implements CommandExecutor {
|
||||
return true;
|
||||
|
||||
case 3:
|
||||
boolean toggle = false;
|
||||
boolean toggle;
|
||||
|
||||
if (CommandUtils.shouldEnableToggle(args[2])) {
|
||||
toggle = true;
|
||||
|
Reference in New Issue
Block a user