From a316d6ccdcac3ce5e1d54ae226ca1fcdea71b7a4 Mon Sep 17 00:00:00 2001 From: weaondara Date: Sun, 31 Mar 2013 12:30:46 +0300 Subject: [PATCH 1/3] Update PermissionCheckEvent.java --- .../java/net/md_5/bungee/api/event/PermissionCheckEvent.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/main/java/net/md_5/bungee/api/event/PermissionCheckEvent.java b/api/src/main/java/net/md_5/bungee/api/event/PermissionCheckEvent.java index 9c3830787..d997a9dd2 100644 --- a/api/src/main/java/net/md_5/bungee/api/event/PermissionCheckEvent.java +++ b/api/src/main/java/net/md_5/bungee/api/event/PermissionCheckEvent.java @@ -23,6 +23,10 @@ public class PermissionCheckEvent extends Event * The command sender being checked for a permission. */ private final CommandSender sender; + /** + * The permission to check. + */ + private final String permission; /** * The outcome of this permission check. */ From d684f5de6976451ecb69ff568f653227f5224207 Mon Sep 17 00:00:00 2001 From: weaondara Date: Sun, 31 Mar 2013 12:36:21 +0300 Subject: [PATCH 2/3] added permission in constructor --- proxy/src/main/java/net/md_5/bungee/UserConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java index ba4fa908b..3ed68cae1 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -250,7 +250,7 @@ public final class UserConnection implements ProxiedPlayer @Synchronized("permMutex") public boolean hasPermission(String permission) { - return bungee.getPluginManager().callEvent( new PermissionCheckEvent( this, permissions.contains( permission ) ) ).hasPermission(); + return bungee.getPluginManager().callEvent( new PermissionCheckEvent( this, permission, permissions.contains( permission ) ) ).hasPermission(); } @Override From 88a52bc4e92de356e938af0835910d2e5205bfa0 Mon Sep 17 00:00:00 2001 From: weaondara Date: Sun, 31 Mar 2013 16:25:53 +0300 Subject: [PATCH 3/3] set displayName in function setDisplayName --- proxy/src/main/java/net/md_5/bungee/UserConnection.java | 1 + 1 file changed, 1 insertion(+) diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java index 3ed68cae1..4a04e8eb8 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -92,6 +92,7 @@ public final class UserConnection implements ProxiedPlayer public void setDisplayName(String name) { Preconditions.checkArgument( name.length() <= 16, "Display name cannot be longer than 16 characters" ); + displayName=name; bungee.getTabListHandler().onDisconnect( this ); bungee.getTabListHandler().onConnect( this ); }