summaryrefslogtreecommitdiffstats
path: root/EssentialsGroupManager
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2011-09-20 14:49:42 +0100
committerElgarL <ElgarL@palmergames.com>2011-09-20 14:49:42 +0100
commit2bdc00dc143695f8b24c237bdee8389faf5ea0aa (patch)
tree61d0ee1a1be77538d451c92f277ca6ae05d4822b /EssentialsGroupManager
parent1fd5222d40bad99a7f66a44c0b85b761100e2029 (diff)
downloadEssentials-2bdc00dc143695f8b24c237bdee8389faf5ea0aa.tar
Essentials-2bdc00dc143695f8b24c237bdee8389faf5ea0aa.tar.gz
Essentials-2bdc00dc143695f8b24c237bdee8389faf5ea0aa.tar.lz
Essentials-2bdc00dc143695f8b24c237bdee8389faf5ea0aa.tar.xz
Essentials-2bdc00dc143695f8b24c237bdee8389faf5ea0aa.zip
All GroupManager commands issued by players are now echoed in the
console.
Diffstat (limited to 'EssentialsGroupManager')
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java2
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java2
-rw-r--r--[-rwxr-xr-x]EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/Tasks.java10
4 files changed, 15 insertions, 2 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 7777af29d..50f6d0f4d 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -10,4 +10,5 @@ v 1.1:
- 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.
- Fixed BukkitPerms population. Wasn't correctly setting superperms.
- - Push updates to superperms for all valid GM commands. \ No newline at end of file
+ - Push updates to superperms for all valid GM commands.
+ - All GroupManager commands issued by players are now echoed in the console. \ No newline at end of file
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
index 8e77e2f07..b48c3feae 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/GroupManager.java
@@ -25,6 +25,7 @@ import java.util.logging.Logger;
import org.anjocaido.groupmanager.dataholder.worlds.WorldsHolder;
import org.anjocaido.groupmanager.utils.GMLoggerHandler;
import org.anjocaido.groupmanager.utils.PermissionCheckResult;
+import org.anjocaido.groupmanager.utils.Tasks;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
@@ -218,6 +219,7 @@ public class GroupManager extends JavaPlugin {
senderPlayer = (Player) sender;
senderUser = worldsHolder.getWorldData(senderPlayer).getUser(senderPlayer.getName());
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())) {
playerCanDo = true;
}
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
index b82a8f473..ae22076a9 100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/permissions/BukkitPermissions.java
@@ -43,7 +43,7 @@ import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.event.server.ServerListener;
import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionAttachment;
-import org.bukkit.permissions.PermissionAttachmentInfo;
+//import org.bukkit.permissions.PermissionAttachmentInfo;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.PluginManager;
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/Tasks.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/Tasks.java
index 579ee72a6..8e4d58dde 100755..100644
--- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/Tasks.java
+++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/utils/Tasks.java
@@ -111,4 +111,14 @@ public abstract class Tasks {
}
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;
+ }
+
}