This commit is contained in:
Xephi 2016-01-09 14:45:59 +01:00
parent c8fa9a146e
commit 18ed62b096
3 changed files with 14 additions and 12 deletions

View File

@ -83,7 +83,12 @@ public enum PlayerPermission implements PermissionNode {
/**
* Permission to use all player (non-admin) commands.
*/
PLAYER_ALL("authme.player.*");
PLAYER_ALL("authme.player.*"),
/**
* Permission to use to see own other accounts.
*/
SEE_OWN_ACCOUNTS("authme.player.showotheraccounts");
/**
* The permission node.

View File

@ -232,8 +232,6 @@ public class AsynchronousLogin {
return;
}
StringBuilder message = new StringBuilder("[AuthMe] ");
// String uuidaccounts =
// "[AuthMe] PlayerNames has %size% links to this UUID : ";
int i = 0;
for (String account : auths) {
i++;
@ -244,18 +242,13 @@ public class AsynchronousLogin {
message.append('.');
}
}
/*
* TODO: Active uuid system i = 0; for (String account : uuidlist) {
* i++; uuidaccounts = uuidaccounts + account; if (i != auths.size()) {
* uuidaccounts = uuidaccounts + ", "; } else { uuidaccounts =
* uuidaccounts + "."; } }
*/
for (Player player : Utils.getOnlinePlayers()) {
if (plugin.getPermissionsManager().hasPermission(player, PlayerPermission.SEE_OTHER_ACCOUNTS)) {
if (plugin.getPermissionsManager().hasPermission(player, PlayerPermission.SEE_OTHER_ACCOUNTS)
|| (player.getName().equals(this.player.getName())
&& plugin.getPermissionsManager().hasPermission(player, PlayerPermission.SEE_OWN_ACCOUNTS))) {
player.sendMessage("[AuthMe] The player " + auth.getNickname() + " has " + auths.size() + " accounts");
player.sendMessage(message.toString());
// player.sendMessage(uuidaccounts.replace("%size%",
// ""+uuidlist.size()));
}
}
}

View File

@ -141,6 +141,7 @@ permissions:
authme.player.seeotheraccounts: true
authme.player.unregister: true
authme.player.vip: true
authme.player.showownaccounts: true
authme.player.bypassantibot:
description: Permission node to bypass AntiBot protection.
default: false
@ -186,3 +187,6 @@ permissions:
authme.player.seeotheraccounts:
description: Permission for user to see other accounts.
default: false
authme.player.showownaccounts:
description: Permission for user to see own other accounts.
default: false