mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 11:44:42 +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:
@ -24,6 +24,15 @@ public final class PartyManager {
|
||||
|
||||
private PartyManager() {}
|
||||
|
||||
public static boolean checkPartyExistence(Player player, Party party, String partyName) {
|
||||
if (party == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
player.sendMessage(LocaleLoader.getString("Commands.Party.AlreadyExists", partyName));
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean changeOrJoinParty(McMMOPlayer mcMMOPlayer, Player player, Party oldParty, String newPartyName) {
|
||||
if (mcMMOPlayer.inParty()) {
|
||||
if (!handlePartyChangeEvent(player, oldParty.getName(), newPartyName, EventReason.CHANGED_PARTIES)) {
|
||||
|
Reference in New Issue
Block a user