Cleaning, always cleaning

This commit is contained in:
Michel Roux 2012-05-10 10:28:31 +02:00
parent cd8febf077
commit de0492e0c1

View File

@ -4,7 +4,6 @@ import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -208,10 +207,9 @@ public class SimplyPlugin extends JavaPlugin {
return calculateGroupPermissions(default_group, world); return calculateGroupPermissions(default_group, world);
} }
Map<String, Boolean> perms = new LinkedHashMap<String, Boolean>(); Map<String, Boolean> perms = config.getPlayerPermissions(player);
List<String> groups = config.getPlayerGroups(player); List<String> groups = config.getPlayerGroups(player);
if (groups.isEmpty()) groups.add(default_group); if (groups.isEmpty()) groups.add(default_group);
perms.putAll(config.getPlayerPermissions(player));
// No containskey; world overrides non-world // No containskey; world overrides non-world
perms.putAll(config.getPlayerPermissions(player, world)); perms.putAll(config.getPlayerPermissions(player, world));