mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-08-20 18:32:49 +00:00
All GroupManager commands issued by players are now echoed in the
console.
This commit is contained in:
parent
1fd5222d40
commit
2bdc00dc14
|
@ -10,4 +10,5 @@ v 1.1:
|
||||||
- GroupManager will now generate a fresh Users and Groups yml if either file is empty.
|
- GroupManager will now generate a fresh Users and Groups yml if either file is empty.
|
||||||
- Fix for an infinite loop bug with the new Bukkit Perms during a new user creation.
|
- Fix for an infinite loop bug with the new Bukkit Perms during a new user creation.
|
||||||
- Fixed BukkitPerms population. Wasn't correctly setting superperms.
|
- Fixed BukkitPerms population. Wasn't correctly setting superperms.
|
||||||
- Push updates to superperms for all valid GM commands.
|
- Push updates to superperms for all valid GM commands.
|
||||||
|
- All GroupManager commands issued by players are now echoed in the console.
|
|
@ -25,6 +25,7 @@ import java.util.logging.Logger;
|
||||||
import org.anjocaido.groupmanager.dataholder.worlds.WorldsHolder;
|
import org.anjocaido.groupmanager.dataholder.worlds.WorldsHolder;
|
||||||
import org.anjocaido.groupmanager.utils.GMLoggerHandler;
|
import org.anjocaido.groupmanager.utils.GMLoggerHandler;
|
||||||
import org.anjocaido.groupmanager.utils.PermissionCheckResult;
|
import org.anjocaido.groupmanager.utils.PermissionCheckResult;
|
||||||
|
import org.anjocaido.groupmanager.utils.Tasks;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
|
@ -218,6 +219,7 @@ public class GroupManager extends JavaPlugin {
|
||||||
senderPlayer = (Player) sender;
|
senderPlayer = (Player) sender;
|
||||||
senderUser = worldsHolder.getWorldData(senderPlayer).getUser(senderPlayer.getName());
|
senderUser = worldsHolder.getWorldData(senderPlayer).getUser(senderPlayer.getName());
|
||||||
senderGroup = senderUser.getGroup();
|
senderGroup = senderUser.getGroup();
|
||||||
|
System.out.println("[PLAYER_COMMAND] " + senderPlayer.getName() + ": /" + commandLabel + " " + Tasks.join(args, " "));
|
||||||
if (senderPlayer.isOp() || worldsHolder.getWorldPermissions(senderPlayer).has(senderPlayer, "groupmanager." + cmd.getName())) {
|
if (senderPlayer.isOp() || worldsHolder.getWorldPermissions(senderPlayer).has(senderPlayer, "groupmanager." + cmd.getName())) {
|
||||||
playerCanDo = true;
|
playerCanDo = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ import org.bukkit.event.server.PluginEnableEvent;
|
||||||
import org.bukkit.event.server.ServerListener;
|
import org.bukkit.event.server.ServerListener;
|
||||||
import org.bukkit.permissions.Permission;
|
import org.bukkit.permissions.Permission;
|
||||||
import org.bukkit.permissions.PermissionAttachment;
|
import org.bukkit.permissions.PermissionAttachment;
|
||||||
import org.bukkit.permissions.PermissionAttachmentInfo;
|
//import org.bukkit.permissions.PermissionAttachmentInfo;
|
||||||
import org.bukkit.plugin.Plugin;
|
import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
|
|
||||||
|
|
10
EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/Tasks.java
Executable file → Normal file
10
EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/Tasks.java
Executable file → Normal file
|
@ -111,4 +111,14 @@ public abstract class Tasks {
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static String join(String[] arr, String separator) {
|
||||||
|
if (arr.length == 0)
|
||||||
|
return "";
|
||||||
|
String out = arr[0].toString();
|
||||||
|
for (int i = 1; i < arr.length; i++)
|
||||||
|
out += separator + arr[i];
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue