mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-11 09:05:01 +02:00
Merge branch 'groupmanager' of github.com:essentials/Essentials into 2.9
This commit is contained in:
@@ -201,3 +201,4 @@ v 2.0:
|
|||||||
- Remove info node support from GlobalGroups. It should not have them as GlobalGroups are only permission collections.
|
- Remove info node support from GlobalGroups. It should not have them as GlobalGroups are only permission collections.
|
||||||
- Change order of data in Users.yml to [name, Group, SubGroup, Permissions, Info nodes].
|
- Change order of data in Users.yml to [name, Group, SubGroup, Permissions, Info nodes].
|
||||||
- Add alphabetically sorted user lists.
|
- Add alphabetically sorted user lists.
|
||||||
|
- allWorldsDataList now returns fully mirrored worlds which are not identical mirrors (fixes the /manselect list).
|
@@ -391,7 +391,7 @@ public class GroupManager extends JavaPlugin {
|
|||||||
senderPlayer = (Player) sender;
|
senderPlayer = (Player) sender;
|
||||||
|
|
||||||
if (!lastError.isEmpty() && !commandLabel.equalsIgnoreCase("manload")) {
|
if (!lastError.isEmpty() && !commandLabel.equalsIgnoreCase("manload")) {
|
||||||
sender.sendMessage(ChatColor.RED + "All commands are locked due to an error. Check the log and then try a '/manload'.)");
|
sender.sendMessage(ChatColor.RED + "All commands are locked due to an error." + ChatColor.BOLD + "" + ChatColor.UNDERLINE + "Check the log" + ChatColor.RESET + " and then try a '/manload'.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -406,7 +406,7 @@ public class GroupManager extends JavaPlugin {
|
|||||||
} else if (sender instanceof ConsoleCommandSender) {
|
} else if (sender instanceof ConsoleCommandSender) {
|
||||||
|
|
||||||
if (!lastError.isEmpty() && !commandLabel.equalsIgnoreCase("manload")) {
|
if (!lastError.isEmpty() && !commandLabel.equalsIgnoreCase("manload")) {
|
||||||
sender.sendMessage(ChatColor.RED + "All commands are locked due to an error. Check the log and then try a '/manload'.)");
|
sender.sendMessage(ChatColor.RED + "All commands are locked due to an error." + ChatColor.BOLD + "" + ChatColor.UNDERLINE + "Check the log" + ChatColor.RESET + " and then try a '/manload'.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1673,7 +1673,7 @@ public class GroupManager extends JavaPlugin {
|
|||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
|
|
||||||
if (!lastError.isEmpty()) {
|
if (!lastError.isEmpty()) {
|
||||||
sender.sendMessage(ChatColor.RED + "All commands are locked due to an error. Check the log and then try a '/manload'.)");
|
sender.sendMessage(ChatColor.RED + "All commands are locked due to an error." + ChatColor.BOLD + "" + ChatColor.UNDERLINE + "Check the log" + ChatColor.RESET + " and then try a '/manload'.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1838,7 +1838,7 @@ public class GroupManager extends JavaPlugin {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!isConsole && !isOpOverride && (!permissionHandler.hasGroupInInheritance(auxUser.getGroup(), auxGroup.getName()) && !permissionHandler.hasGroupInInheritance(auxGroup, auxUser.getGroupName()))) {
|
if (!isConsole && !isOpOverride && (!permissionHandler.hasGroupInInheritance(auxUser.getGroup(), auxGroup.getName()) && !permissionHandler.hasGroupInInheritance(auxGroup, auxUser.getGroupName()))) {
|
||||||
sender.sendMessage(ChatColor.RED + "You can't modify a player using groups with different heritage line.");
|
sender.sendMessage(ChatColor.RED + "You can't modify a player using groups with different inheritage line.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!isConsole && !isOpOverride && (permissionHandler.hasGroupInInheritance(auxGroup, auxUser.getGroupName()))) {
|
if (!isConsole && !isOpOverride && (permissionHandler.hasGroupInInheritance(auxGroup, auxUser.getGroupName()))) {
|
||||||
@@ -1854,9 +1854,9 @@ public class GroupManager extends JavaPlugin {
|
|||||||
|
|
||||||
case mantogglevalidate:
|
case mantogglevalidate:
|
||||||
validateOnlinePlayer = !validateOnlinePlayer;
|
validateOnlinePlayer = !validateOnlinePlayer;
|
||||||
sender.sendMessage(ChatColor.YELLOW + "Validade if player is online, now set to: " + Boolean.toString(validateOnlinePlayer));
|
sender.sendMessage(ChatColor.YELLOW + "Validate if player is online, now set to: " + Boolean.toString(validateOnlinePlayer));
|
||||||
if (!validateOnlinePlayer) {
|
if (!validateOnlinePlayer) {
|
||||||
sender.sendMessage(ChatColor.GOLD + "From now on you can edit players not connected... BUT:");
|
sender.sendMessage(ChatColor.GOLD + "From now on you can edit players that are not connected... BUT:");
|
||||||
sender.sendMessage(ChatColor.LIGHT_PURPLE + "From now on you should type the whole name of the player, correctly.");
|
sender.sendMessage(ChatColor.LIGHT_PURPLE + "From now on you should type the whole name of the player, correctly.");
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@@ -420,7 +420,7 @@ public class WorldDataHolder {
|
|||||||
throw new IllegalArgumentException("The file which should contain groups does not exist!\n" + groupsFile.getPath());
|
throw new IllegalArgumentException("The file which should contain groups does not exist!\n" + groupsFile.getPath());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new IllegalArgumentException("Error access the groups file!\n" + groupsFile.getPath());
|
throw new IllegalArgumentException("Error accessing the groups file!\n" + groupsFile.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
GroupManager.setLoaded(true);
|
GroupManager.setLoaded(true);
|
||||||
@@ -437,7 +437,7 @@ public class WorldDataHolder {
|
|||||||
throw new IllegalArgumentException("The file which should contain users does not exist!\n" + usersFile.getPath());
|
throw new IllegalArgumentException("The file which should contain users does not exist!\n" + usersFile.getPath());
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new IllegalArgumentException("Error access the users file!\n" + usersFile.getPath());
|
throw new IllegalArgumentException("Error accessing the users file!\n" + usersFile.getPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
GroupManager.setLoaded(true);
|
GroupManager.setLoaded(true);
|
||||||
|
@@ -692,7 +692,7 @@ public class WorldsHolder {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all physically loaded worlds which have at least
|
* Returns all physically loaded worlds which have at least
|
||||||
* one of their own data sets for users or groups.
|
* one of their own data sets for users or groups which isn't an identical mirror.
|
||||||
*
|
*
|
||||||
* @return ArrayList<OverloadedWorldHolder> of all loaded worlds
|
* @return ArrayList<OverloadedWorldHolder> of all loaded worlds
|
||||||
*/
|
*/
|
||||||
@@ -700,7 +700,7 @@ public class WorldsHolder {
|
|||||||
|
|
||||||
ArrayList<OverloadedWorldHolder> list = new ArrayList<OverloadedWorldHolder>();
|
ArrayList<OverloadedWorldHolder> list = new ArrayList<OverloadedWorldHolder>();
|
||||||
for (OverloadedWorldHolder data : worldsData.values()) {
|
for (OverloadedWorldHolder data : worldsData.values()) {
|
||||||
if ((!list.contains(data)) && (!mirrorsGroup.containsKey(data.getName().toLowerCase()) || !mirrorsUser.containsKey(data.getName().toLowerCase()))) {
|
if ((!list.contains(data))) { // && (!mirrorsGroup.containsKey(data.getName().toLowerCase()) || !mirrorsUser.containsKey(data.getName().toLowerCase()))) {
|
||||||
|
|
||||||
String worldNameLowered = data.getName().toLowerCase();
|
String worldNameLowered = data.getName().toLowerCase();
|
||||||
String usersMirror = mirrorsUser.get(worldNameLowered);
|
String usersMirror = mirrorsUser.get(worldNameLowered);
|
||||||
|
@@ -9,7 +9,7 @@ authors:
|
|||||||
- ElgarL
|
- ElgarL
|
||||||
commands:
|
commands:
|
||||||
manuadd:
|
manuadd:
|
||||||
description: Move a player to desired group.(Adds to the file if not exists)
|
description: Move a player to desired group. (Adds to the file if not exists)
|
||||||
usage: /<command> <player> <group> | optional [world]
|
usage: /<command> <player> <group> | optional [world]
|
||||||
permissions: groupmanager.manuadd
|
permissions: groupmanager.manuadd
|
||||||
manudel:
|
manudel:
|
||||||
@@ -29,7 +29,7 @@ commands:
|
|||||||
usage: /<command> <group>
|
usage: /<command> <group>
|
||||||
permissions: groupmanager.mangadd
|
permissions: groupmanager.mangadd
|
||||||
mangdel:
|
mangdel:
|
||||||
description: Removes group from the system(all it's users become default)
|
description: Removes group from the system (all it's users become default)
|
||||||
usage: /<command> <group>
|
usage: /<command> <group>
|
||||||
permissions: groupmanager.mangdel
|
permissions: groupmanager.mangdel
|
||||||
manuaddp:
|
manuaddp:
|
||||||
|
Reference in New Issue
Block a user