Fix perm return value, add global noperm message
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bea 2022-10-24 22:50:31 +02:00
parent cf11743a44
commit fb128d2e26
6 changed files with 14 additions and 11 deletions

View File

@ -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)

View File

@ -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) {

View File

@ -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:");

View File

@ -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)

View File

@ -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;
}

View File

@ -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!";
}