From 8ab5bad988f7ad9c8a1fafd504cf108f3ec84cc3 Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 5 Feb 2012 17:19:32 +0100 Subject: Modified BetterLocation, and new Permission-System --- .../com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'EssentialsGeoIP/src') diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java index 19cc06dc4..45d21d89c 100644 --- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java +++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java @@ -4,6 +4,7 @@ import static com.earth2me.essentials.I18n._; import com.earth2me.essentials.api.IEssentials; import com.earth2me.essentials.api.IReload; import com.earth2me.essentials.api.IUser; +import com.earth2me.essentials.perm.Permissions; import com.maxmind.geoip.Location; import com.maxmind.geoip.LookupService; import com.maxmind.geoip.regionName; @@ -45,7 +46,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IReload public void onPlayerJoin(final PlayerJoinEvent event) { final IUser u = ess.getUser(event.getPlayer()); - if (u.isAuthorized("essentials.geoip.hide")) + if (Permissions.GEOIP_HIDE.isAuthorized(u)) { return; } @@ -93,7 +94,7 @@ public class EssentialsGeoIPPlayerListener implements Listener, IReload for (Player player : event.getPlayer().getServer().getOnlinePlayers()) { final IUser user = ess.getUser(player); - if (user.isAuthorized("essentials.geoip.show")) + if (Permissions.GEOIP_SHOW.isAuthorized(user)) { user.sendMessage(_("geoipJoinFormat", user.getDisplayName(), builder.toString())); } -- cgit v1.2.3