From f73d5dbcf1779b533ca2b5201dff07eff2e9003a Mon Sep 17 00:00:00 2001 From: Rigby Date: Mon, 14 Mar 2011 22:13:58 +0000 Subject: [PATCH] GroupManager is going to be the death of me... this was a bad idea to support it. --- .../onarandombox/MultiVerseCore/MVPermissions.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/com/onarandombox/MultiVerseCore/MVPermissions.java b/src/com/onarandombox/MultiVerseCore/MVPermissions.java index 92077566..f7144b2c 100644 --- a/src/com/onarandombox/MultiVerseCore/MVPermissions.java +++ b/src/com/onarandombox/MultiVerseCore/MVPermissions.java @@ -72,15 +72,16 @@ public class MVPermissions { * @return */ public Boolean canEnterWorld(Player p, World w) { - // First check if we've got the Permissions plugin, we can't perform the group checks without it. - if(MultiVerseCore.Permissions==null) { - return true; // If we don't have it we must return true otherwise we are forcing people to use the Permissions plugin. + String group = ""; + + if(MultiVerseCore.GroupManager!=null){ + group = MultiVerseCore.GroupManager.getWorldsHolder().getWorldPermissions(p).getGroup(p.getName()); + } else if (MultiVerseCore.Permissions!=null){ + group = MultiVerseCore.Permissions.getGroup(p.getName(), p.getWorld().getName()); } List whiteList = this.plugin.worlds.get(w.getName()).joinWhitelist; List blackList = this.plugin.worlds.get(w.getName()).joinBlacklist; - @SuppressWarnings("deprecation") - String group = MultiVerseCore.Permissions.getGroup(p.getName()); boolean returnValue = true;