-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
Environment:
Linux (Gentoo)
If a permission is created and added to the PluginManager in a plugin's onEnable(), and the permission is also defined by the server administrator in the server's permissions.yml file, the following error occurs:
```
[19:14:14 INFO]: [SkyWars] Enabling SkyWars v2.1.5-SNAPSHOT
[19:14:15 INFO]: [SkyWars] [Translations] Loading locale en.
[19:14:15 INFO]: [SkyWars] Using WorldEdit hook for arena creation.
[19:14:15 INFO]: [SkyWars] [Score] Using JSON backend
[19:14:15 ERROR]: Permission in permissions.yml was already defined
java.lang.IllegalArgumentException: The permission skywars.join is already defined!
at org.bukkit.plugin.SimplePluginManager.addPermission(SimplePluginManager.java:598) ~[craftbukkit-1.9.4.jar:git-Bukkit-0cd0397]
at org.bukkit.craftbukkit.v1_9_R2.CraftServer.loadCustomPermissions(CraftServer.java:780) [craftbukkit-1.9.4.jar:git-Bukkit-0cd0397]
at org.bukkit.craftbukkit.v1_9_R2.CraftServer.enablePlugins(CraftServer.java:327) [craftbukkit-1.9.4.jar:git-Bukkit-0cd0397]
at net.minecraft.server.v1_9_R2.MinecraftServer.t(MinecraftServer.java:407) [craftbukkit-1.9.4.jar:git-Bukkit-0cd0397]
at net.minecraft.server.v1_9_R2.MinecraftServer.l(MinecraftServer.java:372) [craftbukkit-1.9.4.jar:git-Bukkit-0cd0397]
at net.minecraft.server.v1_9_R2.MinecraftServer.a(MinecraftServer.java:327) [craftbukkit-1.9.4.jar:git-Bukkit-0cd0397]
at net.minecraft.server.v1_9_R2.DedicatedServer.init(DedicatedServer.java:240) [craftbukkit-1.9.4.jar:git-Bukkit-0cd0397]
at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:510) [craftbukkit-1.9.4.jar:git-Bukkit-0cd0397]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
[19:14:15 INFO]: Done (5.138s)! For help, type "help" or "?"
```
As you can see, the plugin enables successfully, but the error occurs after the plugin has been enabled.