1
0
mirror of https://github.com/moparisthebest/xAuth synced 2024-12-22 07:08:51 -05:00

Cleaning up

This commit is contained in:
Zach Iverson 2011-07-30 04:29:57 -04:00
parent 658d8da32d
commit 8f073800ad
4 changed files with 0 additions and 60 deletions

View File

@ -1 +0,0 @@
Will write when I have time.

View File

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

View File

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

View File

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