summaryrefslogtreecommitdiffstats
path: root/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
diff options
context:
space:
mode:
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/commands/Commandafk.java')
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandafk.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
index dd1ccfb8e..a3e1fd141 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandafk.java
@@ -2,21 +2,17 @@ package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.api.IUser;
-import org.bukkit.Server;
+import com.earth2me.essentials.perm.Permissions;
import org.bukkit.entity.Player;
+import org.bukkit.permissions.PermissionDefault;
public class Commandafk extends EssentialsCommand
{
- public Commandafk()
- {
- super("afk");
- }
-
@Override
- public void run(Server server, IUser user, String commandLabel, String[] args) throws Exception
+ public void run(IUser user, String[] args) throws Exception
{
- if (args.length > 0 && user.isAuthorized("essentials.afk.others"))
+ if (args.length > 0 && user.isAuthorized(Permissions.AFK_OTHERS))
{
IUser afkUser = ess.getUser((Player)ess.getServer().matchPlayer(args[0]));
if (afkUser != null)
@@ -50,4 +46,10 @@ public class Commandafk extends EssentialsCommand
}
}
}
+
+ @Override
+ public PermissionDefault getPermissionDefault()
+ {
+ return PermissionDefault.TRUE;
+ }
}