mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 06:28:57 +00:00
Error trap registering permissions.
This commit is contained in:
1 parent
c4aae51c63
commit
f758f273be
1 file changed
+5
-1
@@ -146,7 +146,11 @@ public class Chat extends JavaPlugin {
|
|||||||
public void registerPermissions() {
|
public void registerPermissions() {
|
||||||
// Register all Permissions.
|
// Register all Permissions.
|
||||||
for (String perm : getChannelsHandler().getAllPermissions()) {
|
for (String perm : getChannelsHandler().getAllPermissions()) {
|
||||||
pm.addPermission(new Permission(perm, new HashMap<String, Boolean>()));
|
try {
|
||||||
|
pm.addPermission(new Permission(perm, new HashMap<String, Boolean>()));
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
//permission already registered.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user