diff --git a/PowerfulPerms/pom.xml b/PowerfulPerms/pom.xml new file mode 100644 index 0000000..b899851 --- /dev/null +++ b/PowerfulPerms/pom.xml @@ -0,0 +1,100 @@ + + + + PowerfulPerms-Parent + com.github.cheesesoftware + 4.5.2 + + 4.0.0 + + PowerfulPerms + + + + com.github.cheesesoftware + PowerfulPermsAPI + ${project.version} + + + + + + + . + true + PowerfulPerms/src/main/resources + + plugin.yml + bungee.yml + config.yml + data.yml + + + + + + maven-compiler-plugin + 3.2 + + 1.8 + 1.8 + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + + shade + + + + + org.apache.commons:commons-pool2 + redis.clients:jedis + com.github.cheesesoftware:PowerfulPermsAPI + com.googlecode.json-simple:json-simple + com.sk89q:worldedit + + + + + com.sk89q:worldedit + + com/sk89q/wepif/** + + + + + + redis.clients + com.github.cheesesoftware.PowerfulPerms.shaded.redis.clients + + + org.apache + com.github.cheesesoftware.PowerfulPerms.shaded.org.apache + + + org.json + com.github.cheesesoftware.PowerfulPerms.shaded.org.json + + + com.sk89q.wepif + com.github.cheesesoftware.PowerfulPerms.shaded.com.sk89q.wepif + + + org.mongodb + com.github.cheesesoftware.PowerfulPerms.shaded.org.mongodb + + + + + + + + + \ No newline at end of file diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/BukkitScheduler.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/BukkitScheduler.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/BukkitScheduler.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/BukkitScheduler.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/BungeeScheduler.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/BungeeScheduler.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/BungeeScheduler.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/BungeeScheduler.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PermissionCommandExecutor.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PermissionCommandExecutor.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PermissionCommandExecutor.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PermissionCommandExecutor.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPermissionManager.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPermissionManager.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPermissionManager.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPermissionManager.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPermissionPlayer.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPermissionPlayer.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPermissionPlayer.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPermissionPlayer.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPerms.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPerms.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPerms.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Bungee/PowerfulPerms.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/CustomPermissibleBase.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/CustomPermissibleBase.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/CustomPermissibleBase.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/CustomPermissibleBase.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/PermissibleBaseInjector.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/PermissibleBaseInjector.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/PermissibleBaseInjector.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/PermissibleBaseInjector.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/PermissionCommandExecutor.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/PermissionCommandExecutor.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/PermissionCommandExecutor.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/PermissionCommandExecutor.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPermissionManager.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPermissionManager.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPermissionManager.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPermissionManager.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPermissionPlayer.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPermissionPlayer.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPermissionPlayer.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPermissionPlayer.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPerms.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPerms.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPerms.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/PowerfulPerms.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/Redis/RedisConnection.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Redis/RedisConnection.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/Redis/RedisConnection.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Redis/RedisConnection.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/ImporterHook.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/ImporterHook.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/ImporterHook.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/ImporterHook.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/PowerfulPerms_Vault_Chat.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/PowerfulPerms_Vault_Chat.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/PowerfulPerms_Vault_Chat.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/PowerfulPerms_Vault_Chat.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/PowerfulPerms_Vault_Permissions.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/PowerfulPerms_Vault_Permissions.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/PowerfulPerms_Vault_Permissions.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/PowerfulPerms_Vault_Permissions.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/VaultHook.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/VaultHook.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/VaultHook.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/Vault/VaultHook.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/AboutCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/AboutCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/AboutCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/AboutCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/BaseCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/BaseCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/BaseCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/BaseCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/CommandResult.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/CommandResult.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/CommandResult.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/CommandResult.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupAddPermissionCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupAddPermissionCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupAddPermissionCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupAddPermissionCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupBaseCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupBaseCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupBaseCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupBaseCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupClearPermissionsCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupClearPermissionsCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupClearPermissionsCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupClearPermissionsCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupCreateCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupCreateCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupCreateCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupCreateCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupDeleteCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupDeleteCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupDeleteCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupDeleteCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupHasPermissionCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupHasPermissionCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupHasPermissionCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupHasPermissionCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupMembersCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupMembersCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupMembersCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupMembersCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupParentsCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupParentsCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupParentsCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupParentsCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupPrefixCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupPrefixCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupPrefixCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupPrefixCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupRemovePermissionCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupRemovePermissionCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupRemovePermissionCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupRemovePermissionCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupRenameCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupRenameCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupRenameCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupRenameCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSetLadderCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSetLadderCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSetLadderCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSetLadderCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSetRankCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSetRankCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSetRankCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSetRankCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSuffixCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSuffixCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSuffixCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/GroupSuffixCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/HasPermissionCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/HasPermissionCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/HasPermissionCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/HasPermissionCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/Paginator.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/Paginator.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/Paginator.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/Paginator.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ReloadCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ReloadCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ReloadCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ReloadCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ShowGroupsCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ShowGroupsCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ShowGroupsCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ShowGroupsCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ShowLaddersCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ShowLaddersCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ShowLaddersCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/ShowLaddersCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/SubCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/SubCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/SubCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/SubCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestBaseCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestBaseCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestBaseCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestBaseCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestDatabaseCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestDatabaseCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestDatabaseCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestDatabaseCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestRedisCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestRedisCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestRedisCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/TestRedisCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserAddGroupCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserAddGroupCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserAddGroupCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserAddGroupCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserAddPermissionCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserAddPermissionCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserAddPermissionCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserAddPermissionCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserBaseCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserBaseCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserBaseCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserBaseCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserClearPermissionsCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserClearPermissionsCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserClearPermissionsCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserClearPermissionsCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserCreateCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserCreateCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserCreateCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserCreateCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserDeleteCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserDeleteCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserDeleteCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserDeleteCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserDemoteCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserDemoteCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserDemoteCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserDemoteCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserHasPermissionCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserHasPermissionCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserHasPermissionCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserHasPermissionCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserPrefixCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserPrefixCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserPrefixCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserPrefixCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserPromoteCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserPromoteCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserPromoteCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserPromoteCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserRemoveGroupCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserRemoveGroupCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserRemoveGroupCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserRemoveGroupCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserRemovePermissionCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserRemovePermissionCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserRemovePermissionCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserRemovePermissionCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserSetRankCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserSetRankCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserSetRankCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserSetRankCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserSuffixCommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserSuffixCommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserSuffixCommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/UserSuffixCommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/Utils.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/Utils.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/command/Utils.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/command/Utils.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/CachedPlayer.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/CachedPlayer.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/CachedPlayer.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/CachedPlayer.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/ChatColor.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/ChatColor.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/ChatColor.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/ChatColor.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/ICommand.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/ICommand.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/ICommand.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/ICommand.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionContainer.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionContainer.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionContainer.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionContainer.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionManagerBase.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionManagerBase.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionManagerBase.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionManagerBase.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionManagerMiddle.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionManagerMiddle.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionManagerMiddle.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionManagerMiddle.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionPlayerBase.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionPlayerBase.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionPlayerBase.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PermissionPlayerBase.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PowerfulGroup.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PowerfulGroup.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PowerfulGroup.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PowerfulGroup.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PowerfulPermission.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PowerfulPermission.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PowerfulPermission.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/PowerfulPermission.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/SchedulerBase.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/SchedulerBase.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/SchedulerBase.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/SchedulerBase.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/UUIDFetcher.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/UUIDFetcher.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/UUIDFetcher.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/UUIDFetcher.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/Versioner.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/Versioner.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/Versioner.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/Versioner.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/event/PowerfulEventHandler.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/event/PowerfulEventHandler.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/common/event/PowerfulEventHandler.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/common/event/PowerfulEventHandler.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/DBResult.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/DBResult.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/database/DBResult.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/DBResult.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/Database.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/Database.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/database/Database.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/Database.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/DatabaseCredentials.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/DatabaseCredentials.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/database/DatabaseCredentials.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/DatabaseCredentials.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/IDatabase.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/IDatabase.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/database/IDatabase.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/IDatabase.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/MongoDBDatabase.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/MongoDBDatabase.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/database/MongoDBDatabase.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/MongoDBDatabase.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/MySQLDatabase.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/MySQLDatabase.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/database/MySQLDatabase.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/MySQLDatabase.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/SQL.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/SQL.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/database/SQL.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/SQL.java diff --git a/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/Util.java b/PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/Util.java similarity index 100% rename from src/main/java/com/github/cheesesoftware/PowerfulPerms/database/Util.java rename to PowerfulPerms/src/main/java/com/github/cheesesoftware/PowerfulPerms/database/Util.java diff --git a/src/main/resources/bungee.yml b/PowerfulPerms/src/main/resources/bungee.yml similarity index 100% rename from src/main/resources/bungee.yml rename to PowerfulPerms/src/main/resources/bungee.yml diff --git a/src/main/resources/config.yml b/PowerfulPerms/src/main/resources/config.yml similarity index 100% rename from src/main/resources/config.yml rename to PowerfulPerms/src/main/resources/config.yml diff --git a/src/main/resources/data.yml b/PowerfulPerms/src/main/resources/data.yml similarity index 100% rename from src/main/resources/data.yml rename to PowerfulPerms/src/main/resources/data.yml diff --git a/src/main/resources/plugin.yml b/PowerfulPerms/src/main/resources/plugin.yml similarity index 100% rename from src/main/resources/plugin.yml rename to PowerfulPerms/src/main/resources/plugin.yml diff --git a/PowerfulPermsAPI/pom.xml b/PowerfulPermsAPI/pom.xml new file mode 100644 index 0000000..c96a650 --- /dev/null +++ b/PowerfulPermsAPI/pom.xml @@ -0,0 +1,14 @@ + + + + PowerfulPerms-Parent + com.github.cheesesoftware + 4.5.2 + + 4.0.0 + + PowerfulPermsAPI + + \ No newline at end of file diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/CachedGroup.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/CachedGroup.java new file mode 100755 index 0000000..93536ad --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/CachedGroup.java @@ -0,0 +1,50 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.Date; + +public class CachedGroup { + private int id; + private int groupId; + private boolean negated; + private Date expires; + private int expireTaskId = -1; + + public CachedGroup(int id, int groupId, boolean negated, Date expires) { + this.id = id; + this.groupId = groupId; + this.negated = negated; + this.expires = expires; + } + + public int getId() { + return this.id; + } + + public int getGroupId() { + return this.groupId; + } + + public boolean isNegated() { + return this.negated; + } + + public Date getExpirationDate() { + return expires; + } + + public boolean willExpire() { + return expires != null; + } + + public boolean hasExpired() { + return willExpire() && getExpirationDate().before(new Date()); + } + + public int getExpireTaskId() { + return expireTaskId; + } + + public void setExpireTaskId(int taskId) { + this.expireTaskId = taskId; + } +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/DBDocument.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/DBDocument.java new file mode 100755 index 0000000..a17a747 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/DBDocument.java @@ -0,0 +1,48 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.Date; +import java.util.Map; + +public class DBDocument { + + protected Map data; + + public DBDocument(Map data) { + this.data = data; + } + + public Object get(String key) { + return data.get(key); + } + + public String getString(String key) { + return (String) data.get(key); + } + + public int getInt(String key) { + Object input = data.get(key); + if (input instanceof Long) { + return ((Long) input).intValue(); + } + return (Integer) input; + } + + public boolean getBoolean(String key) { + return (Boolean) data.get(key); + } + + public Timestamp getTimeStamp(String key) { + return (Timestamp) data.get(key); + } + + public Date getDate(String key) { + if (getTimeStamp(key) != null) { + Calendar start = Calendar.getInstance(); + start.setTimeInMillis(getTimeStamp(key).getTime()); + return start.getTime(); + } + return null; + } +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/DefaultPermissionPlayer.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/DefaultPermissionPlayer.java new file mode 100755 index 0000000..2ee7d85 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/DefaultPermissionPlayer.java @@ -0,0 +1,14 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.UUID; + +import com.google.common.base.Charsets; + +// ONLY!! set [default] to this! +public class DefaultPermissionPlayer { + + public static UUID getUUID() { + return java.util.UUID.nameUUIDFromBytes(("[default]").getBytes(Charsets.UTF_8)); + } + +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Event.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Event.java new file mode 100755 index 0000000..2667677 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Event.java @@ -0,0 +1,12 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +public class Event { + protected String name; + + public String getEventName() { + if (name == null) { + name = getClass().getSimpleName(); + } + return name; + } +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/EventHandler.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/EventHandler.java new file mode 100755 index 0000000..0c9f51b --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/EventHandler.java @@ -0,0 +1,11 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +public interface EventHandler { + + public void registerListener(PowerfulPermsListener listener); + + public void unregisterListener(PowerfulPermsListener listener); + + public void fireEvent(Event event); + +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Group.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Group.java new file mode 100755 index 0000000..c68519b --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Group.java @@ -0,0 +1,32 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.HashMap; +import java.util.List; + +public interface Group { + + public int getId(); + + public String getName(); + + public List getParents(); + + public String getPrefix(String server); + + public String getSuffix(String server); + + public HashMap getPrefixes(); + + public HashMap getSuffixes(); + + public List getOwnPermissions(); + + public List getPermissions(); + + public String getLadder(); + + public int getRank(); + + public void setParents(List parents); + +} \ No newline at end of file diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/GroupPermissionExpiredEvent.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/GroupPermissionExpiredEvent.java new file mode 100755 index 0000000..2e136d0 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/GroupPermissionExpiredEvent.java @@ -0,0 +1,19 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +public class GroupPermissionExpiredEvent extends Event { + private final Group group; + private final Permission permission; + + public GroupPermissionExpiredEvent(Group group, Permission permission) { + this.group = group; + this.permission = permission; + } + + public Group getGroup() { + return this.group; + } + + public Permission getPermission() { + return this.permission; + } +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/IScheduler.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/IScheduler.java new file mode 100755 index 0000000..e0f9b26 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/IScheduler.java @@ -0,0 +1,25 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.Date; + +public interface IScheduler { + public void runAsync(Runnable runnable, boolean sameThread); + + /* + * Note: Bungee can't run sync tasks, all of them are asynchronous. + */ + public void runSync(Runnable runnable, boolean sameThread); + + /* + * Note: Bungee can't run sync tasks, all of them are asynchronous. + */ + public void runSync(Runnable runnable); + + public int runRepeating(Runnable runnable, int seconds); + + public void stopRepeating(int taskId); + + public int runDelayed(Runnable runnable, Date when); + + public int runDelayed(Runnable runnable, long seconds); +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Pair.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Pair.java new file mode 100755 index 0000000..7d9d1d7 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Pair.java @@ -0,0 +1,49 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +public class Pair { + private A first; + private B second; + + public Pair(A first, B second) { + super(); + this.first = first; + this.second = second; + } + + public int hashCode() { + int hashFirst = first != null ? first.hashCode() : 0; + int hashSecond = second != null ? second.hashCode() : 0; + + return (hashFirst + hashSecond) * hashSecond + hashFirst; + } + + public boolean equals(Object other) { + if (other instanceof Pair) { + Pair otherPair = (Pair) other; + return ((this.first == otherPair.first || (this.first != null && otherPair.first != null && this.first.equals(otherPair.first))) && (this.second == otherPair.second || (this.second != null + && otherPair.second != null && this.second.equals(otherPair.second)))); + } + + return false; + } + + public String toString() { + return "(" + first + ", " + second + ")"; + } + + public A getFirst() { + return first; + } + + public void setFirst(A first) { + this.first = first; + } + + public B getSecond() { + return second; + } + + public void setSecond(B second) { + this.second = second; + } +} \ No newline at end of file diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Permission.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Permission.java new file mode 100755 index 0000000..9c176f3 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Permission.java @@ -0,0 +1,42 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.Date; + +public interface Permission { + + /** + * Returns the ID of this permission as it is stored in the database. + */ + public int getId(); + + /** + * Returns the permission string. + */ + public String getPermissionString(); + + /** + * Returns the name of the world the permission applies to. + */ + public String getWorld(); + + /** + * Returns the name of the server the permission applies to. If empty or "all", applies to all servers. + */ + public String getServer(); + + /** + * Returns the date when this permission expires. If no expiration date, it is null. + */ + public Date getExpirationDate(); + + /* + * Returns true if this is a timed permission. + */ + public boolean willExpire(); + + /* + * Returns true if this is a timed permission and has expired. + */ + public boolean hasExpired(); + +} \ No newline at end of file diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PermissionManager.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PermissionManager.java new file mode 100755 index 0000000..f4d8140 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PermissionManager.java @@ -0,0 +1,264 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.Date; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ExecutorService; + +import com.google.common.util.concurrent.ListenableFuture; + +import redis.clients.jedis.Jedis; + +public interface PermissionManager { + + // TODO: replace "with specified name" + + /* + * Returns the Redis connection. + */ + public Jedis getRedisConnection(); + + /* + * Returns the executor service. + */ + public ExecutorService getExecutor(); + + /* + * Returns the event handler. + */ + public EventHandler getEventHandler(); + + /** + * If using Redis: Tells other servers to reload groups. + */ + public void notifyReloadGroups(); + + /** + * If using Redis: Tells other servers to reload players. + */ + public void notifyReloadPlayers(); + + /** + * If using Redis: Tells other server to reload a player with the specified UUID. + */ + public void notifyReloadPlayer(UUID uuid); + + /** + * Reloads permission data for online players. + */ + public void reloadPlayers(); + + /** + * Reloads permission data for an online player with the specified name. + */ + public void reloadPlayer(String name); + + /** + * Reloads permission data for an online player with the specified UUID. + */ + public void reloadPlayer(UUID uuid); + + /** + * Reloads data for default players. + */ + public void reloadDefaultPlayers(boolean samethread); + + /** + * Returns the PermissionPlayer instance for the player with the specified UUID. Player has to be online. + */ + public PermissionPlayer getPermissionPlayer(UUID uuid); + + /** + * Returns the PermissionPlayer instance for the player with the specified name. Player has to be online. + */ + public PermissionPlayer getPermissionPlayer(String name); + + /** + * Reloads permission data for groups and finally reloads online players. + */ + public void reloadGroups(); + + /** + * Retrieves a group from its name. + */ + public Group getGroup(String groupName); + + /** + * Retrieves a group from its ID. + */ + public Group getGroup(int id); + + /** + * Retrieves a clone of all groups. + */ + public Map getGroups(); + + /** + * Retrieves all groups of the player with the specified name as they are in the database. + */ + public ListenableFuture>> getPlayerOwnGroups(UUID uuid); + + /** + * Retrieves all current groups of the player with the specified name. If player does not have any groups it includes the groups of player [default]. + */ + public ListenableFuture>> getPlayerCurrentGroups(UUID uuid); + + /** + * Retrieves the group with highest rank value of the player. + */ + public ListenableFuture getPlayerPrimaryGroup(UUID uuid); + + /** + * Checks if player uses groups from player [default]. + */ + public ListenableFuture isPlayerDefault(UUID uuid); + + /** + * Retrieves a DBDocument with permission data of the player with the specified name. + */ + public ListenableFuture getPlayerData(UUID uuid); + + /** + * Retrieves a map containing all the permissions of the player with the specified name. + */ + public ListenableFuture> getPlayerOwnPermissions(UUID uuid); + + /** + * Offline permission check. + */ + public ListenableFuture playerHasPermission(UUID uuid, String permission, String world, String server); + + /** + * Retrieves the prefix of the player with the specified name. + */ + public ListenableFuture getPlayerPrefix(UUID uuid, String ladder); + + /** + * Retrieves the prefix of the player with the specified name. + */ + public ListenableFuture getPlayerPrefix(UUID uuid); + + /** + * Retrieves the suffix of the player with the specified name. + */ + public ListenableFuture getPlayerSuffix(UUID uuid, String ladder); + + /** + * Retrieves the suffix of the player with the specified name. + */ + public ListenableFuture getPlayerSuffix(UUID uuid); + + /** + * Retrieves the own prefix of the player with the specified name. + */ + public ListenableFuture getPlayerOwnPrefix(UUID uuid); + + /** + * Retrieves the own suffix of the player with the specified name. + */ + public ListenableFuture getPlayerOwnSuffix(UUID uuid); + + /** + * Retrieves the prefix of the group with the specified name on the specified server. Set server to an empty String or "all" for all servers. + */ + public String getGroupPrefix(int groupId, String server); + + /** + * Retrieves the suffix of the group with the specified name on the specified server. Set server to an empty String or "all" for all servers. + */ + public String getGroupSuffix(int groupId, String server); + + /** + * Retrieves the prefixes of the group with the specified name. The map is indexed by server name. + */ + public HashMap getGroupServerPrefix(int groupId); + + /** + * Retrieves the suffixes of the group with the specified name. The map is indexed by server name. + */ + public HashMap getGroupServerSuffix(int groupId); + + /** + * Retrieves UUID from player name. If player is not online it uses Mojang API. + */ + public ListenableFuture getConvertUUID(final String playerName); + + /** + * Retrieves the scheduler used for sync and asynchronous operations, working on both BungeeCord and Spigot. + */ + public IScheduler getScheduler(); + + // Database accessing functions below + + public ListenableFuture createPlayer(String name, UUID uuid); + + public ListenableFuture addPlayerPermission(UUID uuid, String permission); + + public ListenableFuture addPlayerPermission(UUID uuid, String permission, String world, String server, final Date expires); + + public ListenableFuture removePlayerPermission(UUID uuid, String permission); + + public ListenableFuture removePlayerPermission(UUID uuid, String permission, String world, String server, final Date expires); + + public ListenableFuture removePlayerPermissions(UUID uuid); + + public ListenableFuture setPlayerPrefix(UUID uuid, String prefix); + + public ListenableFuture setPlayerSuffix(UUID uuid, String suffix); + + public ListenableFuture removePlayerGroup(UUID uuid, int groupId); + + public ListenableFuture removePlayerGroup(UUID uuid, int groupId, boolean negated); + + public ListenableFuture removePlayerGroup(UUID uuid, int groupId, String server, boolean negated, final Date expires); + + public ListenableFuture addPlayerGroup(UUID uuid, int groupId); + + public ListenableFuture addPlayerGroup(UUID uuid, int groupId, boolean negated); + + public ListenableFuture addPlayerGroup(UUID uuid, int groupId, String server, boolean negated, final Date expires); + + public ListenableFuture setPlayerRank(UUID uuid, int groupId); + + public ListenableFuture promotePlayer(UUID uuid, String ladder); + + public ListenableFuture demotePlayer(UUID uuid, String ladder); + + public ListenableFuture deletePlayer(UUID uuid); + + public ListenableFuture createGroup(String name, String ladder, int rank); + + public ListenableFuture deleteGroup(int groupId); + + public ListenableFuture addGroupPermission(int groupId, String permission); + + public ListenableFuture addGroupPermission(int groupId, String permission, String world, String server, final Date expires); + + public ListenableFuture removeGroupPermission(int groupId, String permission); + + public ListenableFuture removeGroupPermission(int groupId, String permission, String world, String server, final Date expires); + + public ListenableFuture removeGroupPermissions(int groupId); + + public ListenableFuture addGroupParent(int groupId, int parentGroupId); + + public ListenableFuture removeGroupParent(int groupId, int parentGroupId); + + public ListenableFuture setGroupPrefix(int groupId, String prefix); + + public ListenableFuture setGroupPrefix(int groupId, String prefix, String server); + + public ListenableFuture setGroupSuffix(int groupId, String suffix); + + public ListenableFuture setGroupSuffix(int groupId, String suffix, String server); + + public ListenableFuture setGroupLadder(int groupId, String ladder); + + public ListenableFuture setGroupRank(int groupId, int rank); + + public ListenableFuture setGroupName(int groupId, String name); + +} \ No newline at end of file diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PermissionPlayer.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PermissionPlayer.java new file mode 100755 index 0000000..4d6dd09 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PermissionPlayer.java @@ -0,0 +1,44 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.LinkedHashMap; +import java.util.List; + +public interface PermissionPlayer { + + public LinkedHashMap> getCachedGroups(); + + public List getCachedGroups(String server); + + public List getGroups(String server); + + public List getGroups(); + + public List getPermissions(); + + public List getPermissionsInEffect(); + + public List getAllPermissions(); + + public Boolean hasPermission(String permission); + + public boolean isPermissionSet(String permission); + + public Group getGroup(String ladder); + + public Group getPrimaryGroup(); + + public String getPrefix(String ladder); + + public String getSuffix(String ladder); + + public String getPrefix(); + + public String getSuffix(); + + public String getOwnPrefix(); + + public String getOwnSuffix(); + + public boolean isDefault(); + +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PlayerGroupExpiredEvent.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PlayerGroupExpiredEvent.java new file mode 100755 index 0000000..f837903 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PlayerGroupExpiredEvent.java @@ -0,0 +1,21 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.UUID; + +public class PlayerGroupExpiredEvent extends Event { + private final UUID playerUUID; + private final CachedGroup cachedGroup; + + public PlayerGroupExpiredEvent(UUID playerUUID, CachedGroup cachedGroup) { + this.playerUUID = playerUUID; + this.cachedGroup = cachedGroup; + } + + public UUID getPlayerUUID() { + return this.playerUUID; + } + + public CachedGroup getCachedGroup() { + return this.cachedGroup; + } +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PlayerLoadedEvent.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PlayerLoadedEvent.java new file mode 100755 index 0000000..2d79c34 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PlayerLoadedEvent.java @@ -0,0 +1,21 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.UUID; + +public class PlayerLoadedEvent extends Event { + private final UUID playerUUID; + private final String playerName; + + public PlayerLoadedEvent(UUID playerUUID, String playerName) { + this.playerUUID = playerUUID; + this.playerName = playerName; + } + + public UUID getPlayerUUID() { + return this.playerUUID; + } + + public String getPlayerName() { + return this.playerName; + } +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PlayerPermissionExpiredEvent.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PlayerPermissionExpiredEvent.java new file mode 100755 index 0000000..565fbe5 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PlayerPermissionExpiredEvent.java @@ -0,0 +1,21 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.UUID; + +public class PlayerPermissionExpiredEvent extends Event { + private final UUID playerUUID; + private final Permission permission; + + public PlayerPermissionExpiredEvent(UUID playerUUID, Permission permission) { + this.playerUUID = playerUUID; + this.permission = permission; + } + + public UUID getPlayerUUID() { + return this.playerUUID; + } + + public Permission getPermission() { + return this.permission; + } +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PowerfulEvent.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PowerfulEvent.java new file mode 100755 index 0000000..bdf060d --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PowerfulEvent.java @@ -0,0 +1,13 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Retention(RUNTIME) +@Target(METHOD) +public @interface PowerfulEvent { + +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PowerfulPermsListener.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PowerfulPermsListener.java new file mode 100755 index 0000000..76b2d7a --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PowerfulPermsListener.java @@ -0,0 +1,5 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +public interface PowerfulPermsListener { + +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PowerfulPermsPlugin.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PowerfulPermsPlugin.java new file mode 100755 index 0000000..4f04269 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/PowerfulPermsPlugin.java @@ -0,0 +1,42 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import java.util.Map; +import java.util.UUID; +import java.util.logging.Logger; + +public interface PowerfulPermsPlugin { + + public PermissionManager getPermissionManager(); + + public Logger getLogger(); + + public void runTaskAsynchronously(Runnable runnable); + + public void runTaskLater(Runnable runnable, int delay); + + public boolean isDebug(); + + public ServerMode getServerMode(); + + public boolean isPlayerOnline(UUID uuid); + + public boolean isPlayerOnline(String name); + + public UUID getPlayerUUID(String name); + + public String getPlayerName(UUID uuid); + + public Map getOnlinePlayers(); + + public void sendPlayerMessage(String name, String message); + + public void debug(String message); + + public int getOldVersion(); + + public String getVersion(); + + public void loadConfig(); + + public boolean isBungeeCord(); +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Response.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Response.java new file mode 100755 index 0000000..807ec77 --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/Response.java @@ -0,0 +1,20 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +public class Response { + + protected boolean success = false; + protected String response = ""; + + public Response(boolean success, String response) { + this.success = success; + this.response = response; + } + + public String getResponse() { + return this.response; + } + + public boolean succeeded() { + return this.success; + } +} diff --git a/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/ServerMode.java b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/ServerMode.java new file mode 100755 index 0000000..3a3dbeb --- /dev/null +++ b/PowerfulPermsAPI/src/main/java/com/github/cheesesoftware/PowerfulPermsAPI/ServerMode.java @@ -0,0 +1,7 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +public enum ServerMode { + ONLINE, + OFFLINE, + MIXED +} diff --git a/PowerfulPermsAPI/src/test/java/com/github/cheesesoftware/PowerfulPermsAPI/AppTest.java b/PowerfulPermsAPI/src/test/java/com/github/cheesesoftware/PowerfulPermsAPI/AppTest.java new file mode 100755 index 0000000..31edda9 --- /dev/null +++ b/PowerfulPermsAPI/src/test/java/com/github/cheesesoftware/PowerfulPermsAPI/AppTest.java @@ -0,0 +1,38 @@ +package com.github.cheesesoftware.PowerfulPermsAPI; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; + +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Rigourous Test :-) + */ + public void testApp() + { + assertTrue( true ); + } +} diff --git a/circle.yml b/circle.yml index 9e5fda8..eaae469 100644 --- a/circle.yml +++ b/circle.yml @@ -8,7 +8,8 @@ jobs: - checkout - run: mvn clean install - run: mkdir -p target/artifacts/ - - run: cp target/PowerfulPerms-*.jar target/artifacts/. + - run: cp PowerfulPerms/target/PowerfulPerms-*.jar target/artifacts/. + - run: cp PowerfulPermsAPI/target/PowerfulPermsAPI-*.jar target/artifacts/. - type: artifacts-store path: target/artifacts destination: artifacts \ No newline at end of file diff --git a/pom.xml b/pom.xml index c86faa4..b68691a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,8 +4,17 @@ 4.0.0 com.github.cheesesoftware - PowerfulPerms + PowerfulPerms-Parent + pom 4.5.2 + + PowerfulPermsAPI + PowerfulPerms + + + + UTF-8 + @@ -31,11 +40,6 @@ - - com.github.cheesesoftware - PowerfulPermsAPI - 1.5.0 - org.spigotmc spigot-api @@ -97,83 +101,4 @@ 2.13.3 - - - - - . - true - src/main/resources - - plugin.yml - bungee.yml - config.yml - data.yml - - - - - - maven-compiler-plugin - 3.2 - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-shade-plugin - - - package - - shade - - - - - org.apache.commons:commons-pool2 - redis.clients:jedis - com.github.cheesesoftware:PowerfulPermsAPI - com.googlecode.json-simple:json-simple - com.sk89q:worldedit - - - - - com.sk89q:worldedit - - com/sk89q/wepif/** - - - - - - redis.clients - com.github.cheesesoftware.PowerfulPerms.shaded.redis.clients - - - org.apache - com.github.cheesesoftware.PowerfulPerms.shaded.org.apache - - - org.json - com.github.cheesesoftware.PowerfulPerms.shaded.org.json - - - com.sk89q.wepif - com.github.cheesesoftware.PowerfulPerms.shaded.com.sk89q.wepif - - - org.mongodb - com.github.cheesesoftware.PowerfulPerms.shaded.org.mongodb - - - - - - - -