mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-20 18:32:49 +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
|
@ -172,4 +172,5 @@ v 2.0:
|
|||
- Added missing confirmation message on '/manload'.
|
||||
- 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.
|
||||
- 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])");
|
||||
return false;
|
||||
}
|
||||
// Select the relevant world
|
||||
dataHolder = worldsHolder.getWorldData((args.length == 3)? args[2]:Bukkit.getWorlds().get(0).getName());
|
||||
permissionHandler = dataHolder.getPermissionsHandler();
|
||||
|
||||
// Select the relevant world (if specified)
|
||||
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)) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue