mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-12 05:08:48 +00:00
Fix 'manuadd' to use the default or selected world (via 'manselect'), if
the world is not specified in the command.
This commit is contained in:
parent
cdae0898c7
commit
cd24ffbada
|
@ -173,3 +173,4 @@ v 2.0:
|
||||||
- Stop the error on shutdown if GM failed to load at startup.
|
- Stop the error on shutdown if GM failed to load at startup.
|
||||||
- GroupManager will now generate it's own log (in the GM folder) to keep things tidy, but also to account of those players unable to find/access their server.log.
|
- GroupManager will now generate it's own log (in the GM folder) to keep things tidy, but also to account of those players unable to find/access their server.log.
|
||||||
- Startup errors will now lock out ALL commands other than '/manload'
|
- Startup errors will now lock out ALL commands other than '/manload'
|
||||||
|
- Fix 'manuadd' to use the default or selected world (via 'manselect'), if the world is not specified in the command.
|
|
@ -457,9 +457,18 @@ public class GroupManager extends JavaPlugin {
|
||||||
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player> <group> | optional [world])");
|
sender.sendMessage(ChatColor.RED + "Review your arguments count! (/<command> <player> <group> | optional [world])");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Select the relevant world
|
|
||||||
dataHolder = worldsHolder.getWorldData((args.length == 3)? args[2]:Bukkit.getWorlds().get(0).getName());
|
// Select the relevant world (if specified)
|
||||||
permissionHandler = dataHolder.getPermissionsHandler();
|
if (args.length == 3) {
|
||||||
|
dataHolder = worldsHolder.getWorldData(args[2]);
|
||||||
|
permissionHandler = dataHolder.getPermissionsHandler();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validating state of sender
|
||||||
|
if (dataHolder == null || permissionHandler == null) {
|
||||||
|
if (!setDefaultWorldHandler(sender))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
|
if ((validateOnlinePlayer) && ((match = validatePlayer(args[0], sender)) == null)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue