mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
SkillresetCommand.java Permission murder
This commit is contained in:
parent
bb96c00cb9
commit
15113ba7e4
@ -11,7 +11,6 @@ import com.gmail.nossr50.locale.LocaleLoader;
|
|||||||
import com.gmail.nossr50.skills.utilities.SkillTools;
|
import com.gmail.nossr50.skills.utilities.SkillTools;
|
||||||
import com.gmail.nossr50.skills.utilities.SkillType;
|
import com.gmail.nossr50.skills.utilities.SkillType;
|
||||||
import com.gmail.nossr50.util.Misc;
|
import com.gmail.nossr50.util.Misc;
|
||||||
import com.gmail.nossr50.util.Permissions;
|
|
||||||
import com.gmail.nossr50.util.Users;
|
import com.gmail.nossr50.util.Users;
|
||||||
|
|
||||||
public class SkillresetCommand implements CommandExecutor {
|
public class SkillresetCommand implements CommandExecutor {
|
||||||
@ -22,7 +21,7 @@ public class SkillresetCommand implements CommandExecutor {
|
|||||||
|
|
||||||
switch (args.length) {
|
switch (args.length) {
|
||||||
case 1:
|
case 1:
|
||||||
if (!Permissions.hasPermission(sender, "mcmmo.commands.skillreset")) {
|
if (!sender.hasPermission("mcmmo.commands.skillreset")) {
|
||||||
sender.sendMessage(command.getPermissionMessage());
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -45,14 +44,14 @@ public class SkillresetCommand implements CommandExecutor {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Permissions.hasPermission(sender, "mcmmo.commands.skillreset." + args[0].toLowerCase())) {
|
if (!sender.hasPermission("mcmmo.commands.skillreset." + args[0].toLowerCase())) {
|
||||||
sender.sendMessage(command.getPermissionMessage());
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!Permissions.hasPermission(sender, "mcmmo.commands.skillreset." + args[0].toLowerCase())) {
|
if (!sender.hasPermission("mcmmo.commands.skillreset." + args[0].toLowerCase())) {
|
||||||
sender.sendMessage(command.getPermissionMessage());
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -79,7 +78,7 @@ public class SkillresetCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
if (!Permissions.hasPermission(sender, "mcmmo.commands.skillreset.others")) {
|
if (!sender.hasPermission("mcmmo.commands.skillreset.others")) {
|
||||||
sender.sendMessage(command.getPermissionMessage());
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -98,14 +97,14 @@ public class SkillresetCommand implements CommandExecutor {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Permissions.hasPermission(sender, "mcmmo.commands.skillreset.others." + args[1].toLowerCase())) {
|
if (!sender.hasPermission("mcmmo.commands.skillreset.others." + args[1].toLowerCase())) {
|
||||||
sender.sendMessage(command.getPermissionMessage());
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!Permissions.hasPermission(sender, "mcmmo.commands.skillreset.others." + args[1].toLowerCase())) {
|
if (!sender.hasPermission("mcmmo.commands.skillreset.others." + args[1].toLowerCase())) {
|
||||||
sender.sendMessage(command.getPermissionMessage());
|
sender.sendMessage(command.getPermissionMessage());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user