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))
|
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_CREATE))
|
||||||
{
|
{
|
||||||
sender.sendMessage("No permission!");
|
sender.sendMessage(Cache.noPermissions);
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(args.length < 3)
|
if(args.length < 3)
|
||||||
|
@ -14,8 +14,8 @@ public class NounsDeleteSubCommand
|
|||||||
{
|
{
|
||||||
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_DELETE))
|
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_DELETE))
|
||||||
{
|
{
|
||||||
sender.sendMessage("No permission!");
|
sender.sendMessage(Cache.noPermissions);
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(args.length < 2) {
|
if(args.length < 2) {
|
||||||
|
@ -16,8 +16,8 @@ public class NounsListSubCommand
|
|||||||
|
|
||||||
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_LIST))
|
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_LIST))
|
||||||
{
|
{
|
||||||
sender.sendMessage("No permission!");
|
sender.sendMessage(Cache.noPermissions);
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage("Pronouns List:");
|
sender.sendMessage("Pronouns List:");
|
||||||
|
@ -14,8 +14,8 @@ public class NounsSetSubCommand
|
|||||||
|
|
||||||
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_SET))
|
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_SET))
|
||||||
{
|
{
|
||||||
sender.sendMessage("No permission!");
|
sender.sendMessage(Cache.noPermissions);
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(args.length < 3)
|
if(args.length < 3)
|
||||||
|
@ -15,8 +15,8 @@ public class NounsUpdateSubCmd
|
|||||||
|
|
||||||
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_UPDATE))
|
if(!PermissionManager.hasPermission(sender, Permission.NOUNS_UPDATE))
|
||||||
{
|
{
|
||||||
sender.sendMessage("No permission!");
|
sender.sendMessage(Cache.noPermissions);
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package wtf.beatrice.nounspicker.utils;
|
package wtf.beatrice.nounspicker.utils;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@ -13,4 +14,6 @@ public class Cache
|
|||||||
public static DatabaseManager dbManager;
|
public static DatabaseManager dbManager;
|
||||||
|
|
||||||
public static List<String> pronouns = new ArrayList<>();
|
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