From 8f073800ad0145db718b0f954d565df6cac45250 Mon Sep 17 00:00:00 2001 From: Zach Iverson Date: Sat, 30 Jul 2011 04:29:57 -0400 Subject: [PATCH] Cleaning up --- README.md | 1 - .../cypherx/xauth/commands/xAuthCommand.java | 1 - .../java/com/cypherx/xauth/xAuthHelp.java | 28 ----------------- .../com/cypherx/xauth/xAuthPermissions.java | 30 ------------------- 4 files changed, 60 deletions(-) delete mode 100644 README.md delete mode 100644 src/main/java/com/cypherx/xauth/xAuthHelp.java delete mode 100644 src/main/java/com/cypherx/xauth/xAuthPermissions.java diff --git a/README.md b/README.md deleted file mode 100644 index dfa7e15..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -Will write when I have time. \ No newline at end of file diff --git a/src/main/java/com/cypherx/xauth/commands/xAuthCommand.java b/src/main/java/com/cypherx/xauth/commands/xAuthCommand.java index 51e888a..1694d5c 100644 --- a/src/main/java/com/cypherx/xauth/commands/xAuthCommand.java +++ b/src/main/java/com/cypherx/xauth/commands/xAuthCommand.java @@ -8,7 +8,6 @@ import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player; - import com.cypherx.xauth.Account; import com.cypherx.xauth.TeleLocation; import com.cypherx.xauth.Util; diff --git a/src/main/java/com/cypherx/xauth/xAuthHelp.java b/src/main/java/com/cypherx/xauth/xAuthHelp.java deleted file mode 100644 index a999177..0000000 --- a/src/main/java/com/cypherx/xauth/xAuthHelp.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.cypherx.xauth; - -import me.taylorkelly.help.Help; -import org.bukkit.plugin.Plugin; - -public class xAuthHelp { - public static void setup(xAuth plugin) { - Plugin test = plugin.getServer().getPluginManager().getPlugin("Help"); - if (test != null) { - Help helpPlugin = ((Help) test); - String[] permissions = new String[]{"xauth.admin.register", "xauth.admin.changepw", "xauth.admin.logout", "xauth.admin.unregister", "xauth.admin.location", "xauth.admin.config", "xauth.admin.reload"}; - helpPlugin.registerCommand("register [password] (email)", "Create an in-game account linked to your player name", plugin, true); - helpPlugin.registerCommand("login [password]", "Authenticate yourself as the account owner", plugin, true); - helpPlugin.registerCommand("changepw [old password] [new password]", "Change your password", plugin); - helpPlugin.registerCommand("logout", "Terminate your session", plugin); - helpPlugin.registerCommand("xauth register [player] [password] (email)", "Create an account for [player]", plugin, permissions[0]); - helpPlugin.registerCommand("xauth changepw [player] [new password]", "Change [player]'s password to [new password]", plugin, permissions[1]); - helpPlugin.registerCommand("xauth logout [player]", "Terminate [player]'s session", plugin, permissions[2]); - helpPlugin.registerCommand("xauth unregister [player]", "Remove [player]'s account", plugin, permissions[3]); - helpPlugin.registerCommand("xauth location set", "Set your current location as this worlds teleport location", plugin, permissions[4]); - helpPlugin.registerCommand("xauth location remove", "Remove this worlds teleport location", plugin, permissions[4]); - helpPlugin.registerCommand("xauth config [setting] (new value)", "View info about or change a setting", plugin, permissions[5]); - helpPlugin.registerCommand("xauth reload", "Reload the xAuth configuration and accounts", plugin, permissions[6]); - xAuthLog.info("'Help' support enabled"); - } else - xAuthLog.info("'Help' isn't detected. No /help support"); - } -} \ No newline at end of file diff --git a/src/main/java/com/cypherx/xauth/xAuthPermissions.java b/src/main/java/com/cypherx/xauth/xAuthPermissions.java deleted file mode 100644 index 2dacee9..0000000 --- a/src/main/java/com/cypherx/xauth/xAuthPermissions.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.cypherx.xauth; - -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - -import com.nijiko.permissions.PermissionHandler; -import com.nijikokun.bukkit.Permissions.Permissions; - -public class xAuthPermissions { - private static PermissionHandler permissionHandler; - - public static void setup(xAuth plugin) { - Plugin permissionsPlugin = plugin.getServer().getPluginManager().getPlugin("Permissions"); - - if (permissionHandler == null) { - if (permissionsPlugin != null) { - permissionHandler = ((Permissions) permissionsPlugin).getHandler(); - xAuthLog.info("'Permission' support enabled"); - } else - xAuthLog.info("Permission system not detected, defaulting to OP"); - } - } - - public static boolean has(Player player, String permission) { - if (permissionHandler == null) - return player.isOp(); - - return permissionHandler.has(player, permission); - } -} \ No newline at end of file