mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-12-17 22:38:45 +01:00
if( -> if (
This commit is contained in:
@@ -25,9 +25,9 @@ public class AdminChatCommand extends BaseCommand {
|
||||
@Default @Conditions(CommandManager.ADMIN_CONDITION)
|
||||
public void processCommand(String[] args) {
|
||||
BukkitCommandIssuer bukkitCommandIssuer = (BukkitCommandIssuer) getCurrentCommandIssuer();
|
||||
if(args == null || args.length == 0) {
|
||||
if (args == null || args.length == 0) {
|
||||
//Process with no arguments
|
||||
if(bukkitCommandIssuer.isPlayer()) {
|
||||
if (bukkitCommandIssuer.isPlayer()) {
|
||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
||||
pluginRef.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.ADMIN);
|
||||
} else {
|
||||
@@ -35,10 +35,10 @@ public class AdminChatCommand extends BaseCommand {
|
||||
mcMMO.p.getLogger().info("You cannot switch chat channels as console, please provide full arguments.");
|
||||
}
|
||||
} else {
|
||||
if(bukkitCommandIssuer.isPlayer()) {
|
||||
if (bukkitCommandIssuer.isPlayer()) {
|
||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
||||
|
||||
if(mmoPlayer == null)
|
||||
if (mmoPlayer == null)
|
||||
return;
|
||||
|
||||
//Message contains the original command so it needs to be passed to this method to trim it
|
||||
|
||||
@@ -30,9 +30,9 @@ public class PartyChatCommand extends BaseCommand {
|
||||
public void processCommand(String[] args) {
|
||||
BukkitCommandIssuer bukkitCommandIssuer = (BukkitCommandIssuer) getCurrentCommandIssuer();
|
||||
|
||||
if(args == null || args.length == 0) {
|
||||
if (args == null || args.length == 0) {
|
||||
//Process with no arguments
|
||||
if(bukkitCommandIssuer.isPlayer()) {
|
||||
if (bukkitCommandIssuer.isPlayer()) {
|
||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
||||
pluginRef.getChatManager().setOrToggleChatChannel(mmoPlayer, ChatChannel.PARTY);
|
||||
} else {
|
||||
@@ -45,7 +45,7 @@ public class PartyChatCommand extends BaseCommand {
|
||||
/*
|
||||
* Player Logic
|
||||
*/
|
||||
if(bukkitCommandIssuer.getIssuer() instanceof Player) {
|
||||
if (bukkitCommandIssuer.getIssuer() instanceof Player) {
|
||||
McMMOPlayer mmoPlayer = UserManager.getPlayer(bukkitCommandIssuer.getPlayer());
|
||||
processCommandArgsPlayer(mmoPlayer, args);
|
||||
/*
|
||||
@@ -72,14 +72,14 @@ public class PartyChatCommand extends BaseCommand {
|
||||
* @param args command arguments
|
||||
*/
|
||||
private void processCommandArgsConsole(@NotNull String[] args) {
|
||||
if(args.length <= 1) {
|
||||
if (args.length <= 1) {
|
||||
//Only specific a party and not the message
|
||||
mcMMO.p.getLogger().severe("You need to specify a party name and then write a message afterwards.");
|
||||
} else {
|
||||
//Grab party
|
||||
Party targetParty = mcMMO.p.getPartyManager().getParty(args[0]);
|
||||
|
||||
if(targetParty != null) {
|
||||
if (targetParty != null) {
|
||||
pluginRef.getChatManager().processConsoleMessage(StringUtils.buildStringAfterNthElement(args, 1), targetParty);
|
||||
} else {
|
||||
mcMMO.p.getLogger().severe("A party with that name doesn't exist!");
|
||||
|
||||
Reference in New Issue
Block a user