1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-30 01:39:51 +02:00

Modified BetterLocation, and new Permission-System

This commit is contained in:
snowleo
2012-02-05 17:19:32 +01:00
parent 8080abacd6
commit 8ab5bad988
98 changed files with 874 additions and 710 deletions

View File

@@ -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()));
}