From eade61298113f13d5dccb246617b8edb8e8d1b47 Mon Sep 17 00:00:00 2001 From: sk89q Date: Mon, 17 Jan 2011 19:45:53 -0800 Subject: [PATCH] Fixed WorldGuard not getting group lists for permissions correctly. --- src/com/sk89q/worldguard/LocalPlayer.java | 2 +- src/com/sk89q/worldguard/bukkit/BukkitPlayer.java | 3 +-- src/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/com/sk89q/worldguard/LocalPlayer.java b/src/com/sk89q/worldguard/LocalPlayer.java index 08290506..173323ae 100644 --- a/src/com/sk89q/worldguard/LocalPlayer.java +++ b/src/com/sk89q/worldguard/LocalPlayer.java @@ -71,7 +71,7 @@ public abstract class LocalPlayer { * * @return */ - public abstract List getGroups(); + public abstract String[] getGroups(); @Override public boolean equals(Object obj) { diff --git a/src/com/sk89q/worldguard/bukkit/BukkitPlayer.java b/src/com/sk89q/worldguard/bukkit/BukkitPlayer.java index fbf2ee9c..0dee4d6c 100644 --- a/src/com/sk89q/worldguard/bukkit/BukkitPlayer.java +++ b/src/com/sk89q/worldguard/bukkit/BukkitPlayer.java @@ -19,7 +19,6 @@ package com.sk89q.worldguard.bukkit; -import java.util.List; import org.bukkit.Location; import org.bukkit.entity.Player; import com.sk89q.worldedit.Vector; @@ -61,7 +60,7 @@ public void ban(String msg) { } @Override - public List getGroups() { + public String[] getGroups() { return plugin.getGroups(player); } diff --git a/src/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java b/src/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java index 65377caf..8899cef6 100644 --- a/src/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java +++ b/src/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java @@ -24,9 +24,7 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; -import java.util.ArrayList; import java.util.HashSet; -import java.util.List; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; @@ -369,8 +367,8 @@ boolean hasPermission(Player player, String perm) { return perms.hasPermission(player.getName(), perm); } - List getGroups(Player player) { - return new ArrayList(); + String[] getGroups(Player player) { + return perms.getGroups(player.getName()); } BukkitPlayer wrapPlayer(Player player) {