summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2012-10-16 01:09:10 +0200
committersnowleo <schneeleo@gmail.com>2012-10-16 01:09:10 +0200
commitc412a225026211a4d4d73f5cd6baffda5942447b (patch)
treee78c29a6db484747c8768996c153229cbec459ab
parentc70caf800188cb4aaaf403c7ff758deb5fcda89e (diff)
downloadEssentials-c412a225026211a4d4d73f5cd6baffda5942447b.tar
Essentials-c412a225026211a4d4d73f5cd6baffda5942447b.tar.gz
Essentials-c412a225026211a4d4d73f5cd6baffda5942447b.tar.lz
Essentials-c412a225026211a4d4d73f5cd6baffda5942447b.tar.xz
Essentials-c412a225026211a4d4d73f5cd6baffda5942447b.zip
Add command option /ignore list
-rw-r--r--Essentials/src/net/ess3/commands/Commandignore.java15
-rw-r--r--Essentials/src/plugin.yml2
2 files changed, 14 insertions, 3 deletions
diff --git a/Essentials/src/net/ess3/commands/Commandignore.java b/Essentials/src/net/ess3/commands/Commandignore.java
index d0efc48c6..73b102246 100644
--- a/Essentials/src/net/ess3/commands/Commandignore.java
+++ b/Essentials/src/net/ess3/commands/Commandignore.java
@@ -2,6 +2,7 @@ package net.ess3.commands;
import static net.ess3.I18n._;
import net.ess3.api.IUser;
+import net.ess3.utils.Util;
public class Commandignore extends EssentialsCommand
@@ -13,8 +14,18 @@ public class Commandignore extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
- IUser player = ess.getUserMap().matchUserExcludingHidden(args[0], user.getPlayer());
-
+ IUser player;
+ try {
+ player = ess.getUserMap().matchUserExcludingHidden(args[0], user.getPlayer());
+ } catch(Exception e) {
+ if (args[0].equalsIgnoreCase("list")) {
+ user.sendMessage(Util.joinList(user.getData().getIgnore()));
+ throw new NoChargeException();
+ } else {
+ throw e;
+ }
+ }
+
if (user.isIgnoringPlayer(player))
{
user.setIgnoredPlayer(player, false);
diff --git a/Essentials/src/plugin.yml b/Essentials/src/plugin.yml
index 6be38184a..14b2eed7f 100644
--- a/Essentials/src/plugin.yml
+++ b/Essentials/src/plugin.yml
@@ -161,7 +161,7 @@ commands:
aliases: [ehome,homes,ehomes]
ignore:
description: Ignore other players.
- usage: /<command> <player>
+ usage: /<command> <player|list>
aliases: [eignore]
info:
description: Shows information set by the server owner