Fix perm return value, add global noperm message
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
cf11743a44
commit
fb128d2e26
@ -15,8 +15,8 @@ public class NounsCreateSubCommand
|
||||
|
||||
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_CREATE))
|
||||
{
|
||||
sender.sendMessage("No permission!");
|
||||
return false;
|
||||
sender.sendMessage(Cache.noPermissions);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(args.length < 3)
|
||||
|
@ -14,8 +14,8 @@ public class NounsDeleteSubCommand
|
||||
{
|
||||
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_DELETE))
|
||||
{
|
||||
sender.sendMessage("No permission!");
|
||||
return false;
|
||||
sender.sendMessage(Cache.noPermissions);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(args.length < 2) {
|
||||
|
@ -16,8 +16,8 @@ public class NounsListSubCommand
|
||||
|
||||
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_LIST))
|
||||
{
|
||||
sender.sendMessage("No permission!");
|
||||
return false;
|
||||
sender.sendMessage(Cache.noPermissions);
|
||||
return true;
|
||||
}
|
||||
|
||||
sender.sendMessage("Pronouns List:");
|
||||
|
@ -14,8 +14,8 @@ public class NounsSetSubCommand
|
||||
|
||||
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_SET))
|
||||
{
|
||||
sender.sendMessage("No permission!");
|
||||
return false;
|
||||
sender.sendMessage(Cache.noPermissions);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(args.length < 3)
|
||||
|
@ -15,8 +15,8 @@ public class NounsUpdateSubCmd
|
||||
|
||||
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_UPDATE))
|
||||
{
|
||||
sender.sendMessage("No permission!");
|
||||
return false;
|
||||
sender.sendMessage(Cache.noPermissions);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package wtf.beatrice.nounspicker.utils;
|
||||
|
||||
import org.bukkit.ChatColor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -13,4 +14,6 @@ public class Cache
|
||||
public static DatabaseManager dbManager;
|
||||
|
||||
public static List<String> pronouns = new ArrayList<>();
|
||||
|
||||
public static String noPermissions = ChatColor.RED + "Sorry, you do not have permissions to use this command!";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user