mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-18 13:24:43 +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:
@ -45,8 +45,8 @@ public class PartyCommand implements CommandExecutor {
|
||||
return true;
|
||||
}
|
||||
|
||||
player = (Player) sender;
|
||||
mcMMOPlayer = UserManager.getPlayer(player);
|
||||
mcMMOPlayer = UserManager.getPlayer(sender.getName());
|
||||
player = mcMMOPlayer.getPlayer();
|
||||
|
||||
if (args.length < 1) {
|
||||
if (!mcMMOPlayer.inParty()) {
|
||||
@ -121,7 +121,6 @@ public class PartyCommand implements CommandExecutor {
|
||||
case OWNER:
|
||||
return partyChangeOwnerCommand.onCommand(sender, command, label, args);
|
||||
case LOCK:
|
||||
// Fallthrough
|
||||
case UNLOCK:
|
||||
return partyLockCommand.onCommand(sender, command, label, args);
|
||||
case PASSWORD:
|
||||
|
Reference in New Issue
Block a user