summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/plugin/PluginManager.java9
-rw-r--r--src/main/java/org/bukkit/plugin/SimplePluginManager.java4
2 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/plugin/PluginManager.java b/src/main/java/org/bukkit/plugin/PluginManager.java
index f2c407d3..d137c565 100644
--- a/src/main/java/org/bukkit/plugin/PluginManager.java
+++ b/src/main/java/org/bukkit/plugin/PluginManager.java
@@ -242,4 +242,13 @@ public interface PluginManager {
* @return Set containing all subscribed permissions
*/
public Set<Permissible> getDefaultPermSubscriptions(boolean op);
+
+ /**
+ * Gets a set of all registered permissions.
+ *
+ * This set is a copy and will not be modified live.
+ *
+ * @return Set containing all current registered permissions
+ */
+ public Set<Permission> getPermissions();
}
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index 7f37d29e..1c25077a 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -537,4 +537,8 @@ public final class SimplePluginManager implements PluginManager {
return ImmutableSet.copyOf(map.keySet());
}
}
+
+ public Set<Permission> getPermissions() {
+ return new HashSet<Permission>(permissions.values());
+ }
}