diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java index ae18148a4..dd6061460 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitCalculatorFactory.java @@ -36,7 +36,7 @@ import me.lucko.luckperms.common.calculators.PermissionProcessor; import me.lucko.luckperms.common.calculators.processors.MapProcessor; import me.lucko.luckperms.common.calculators.processors.RegexProcessor; import me.lucko.luckperms.common.calculators.processors.WildcardProcessor; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import java.util.UUID; diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitListener.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitListener.java index ebe611d26..0e95ec03b 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitListener.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/BukkitListener.java @@ -25,7 +25,7 @@ package me.lucko.luckperms.bukkit; import me.lucko.luckperms.bukkit.inject.Injector; import me.lucko.luckperms.bukkit.model.LPPermissible; import me.lucko.luckperms.common.constants.Message; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.AbstractListener; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java index 26fe641ef..13c9ee5d0 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/LPBukkitPlugin.java @@ -45,16 +45,19 @@ import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.contexts.ContextManager; import me.lucko.luckperms.common.contexts.ServerCalculator; import me.lucko.luckperms.common.core.UuidCache; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Importer; -import me.lucko.luckperms.common.groups.GroupManager; +import me.lucko.luckperms.common.managers.GroupManager; +import me.lucko.luckperms.common.managers.TrackManager; +import me.lucko.luckperms.common.managers.UserManager; +import me.lucko.luckperms.common.managers.impl.GenericGroupManager; +import me.lucko.luckperms.common.managers.impl.GenericTrackManager; +import me.lucko.luckperms.common.managers.impl.GenericUserManager; import me.lucko.luckperms.common.messaging.RedisMessaging; import me.lucko.luckperms.common.storage.Storage; import me.lucko.luckperms.common.storage.StorageFactory; import me.lucko.luckperms.common.tasks.ExpireTemporaryTask; import me.lucko.luckperms.common.tasks.UpdateTask; -import me.lucko.luckperms.common.tracks.TrackManager; -import me.lucko.luckperms.common.users.User; -import me.lucko.luckperms.common.users.UserManager; import me.lucko.luckperms.common.utils.*; import org.bukkit.World; import org.bukkit.command.PluginCommand; @@ -197,9 +200,9 @@ public class LPBukkitPlugin extends JavaPlugin implements LuckPermsPlugin { // load internal managers getLog().info("Loading internal permission managers..."); uuidCache = new UuidCache(getConfiguration().isOnlineMode()); - userManager = new UserManager(this); - groupManager = new GroupManager(this); - trackManager = new TrackManager(); + userManager = new GenericUserManager(this); + groupManager = new GenericGroupManager(this); + trackManager = new GenericTrackManager(); importer = new Importer(commandManager); consecutiveExecutor = new ConsecutiveExecutor(commandManager); calculatorFactory = new BukkitCalculatorFactory(this); diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationBPermissions.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationBPermissions.java index 47aeb3603..1283c1f0e 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationBPermissions.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationBPermissions.java @@ -31,7 +31,8 @@ import me.lucko.luckperms.common.commands.CommandResult; import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Constants; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; @@ -123,7 +124,7 @@ public class MigrationBPermissions extends SubCommand { // Make a LuckPerms group for the one being migrated. plugin.getStorage().createAndLoadGroup(groupName).join(); - me.lucko.luckperms.common.groups.Group lpGroup = plugin.getGroupManager().get(groupName); + me.lucko.luckperms.common.core.model.Group lpGroup = plugin.getGroupManager().get(groupName); try { LogEntry.build() .actor(Constants.getConsoleUUID()).actorName(Constants.getConsoleName()) @@ -159,7 +160,7 @@ public class MigrationBPermissions extends SubCommand { // Make a LuckPerms user for the one being migrated. plugin.getStorage().loadUser(uuid, "null").join(); - me.lucko.luckperms.common.users.User lpUser = plugin.getUserManager().get(uuid); + User lpUser = plugin.getUserManager().get(uuid); migrateHolder(plugin, world, user, lpUser); diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationGroupManager.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationGroupManager.java index deabc1ffd..b75f90177 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationGroupManager.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationGroupManager.java @@ -73,7 +73,7 @@ public class MigrationGroupManager extends SubCommand { for (Group g : gg.getGroupList()) { plugin.getStorage().createAndLoadGroup(g.getName().toLowerCase()).join(); - me.lucko.luckperms.common.groups.Group group = plugin.getGroupManager().get(g.getName().toLowerCase()); + me.lucko.luckperms.common.core.model.Group group = plugin.getGroupManager().get(g.getName().toLowerCase()); try { LogEntry.build() .actor(Constants.getConsoleUUID()).actorName(Constants.getConsoleName()) @@ -196,7 +196,7 @@ public class MigrationGroupManager extends SubCommand { for (Map.Entry, Boolean>> e : groups.entrySet()) { plugin.getStorage().createAndLoadGroup(e.getKey()).join(); - me.lucko.luckperms.common.groups.Group group = plugin.getGroupManager().get(e.getKey()); + me.lucko.luckperms.common.core.model.Group group = plugin.getGroupManager().get(e.getKey()); try { LogEntry.build() .actor(Constants.getConsoleUUID()).actorName(Constants.getConsoleName()) @@ -239,7 +239,7 @@ public class MigrationGroupManager extends SubCommand { for (Map.Entry, Boolean>> e : users.entrySet()) { plugin.getStorage().loadUser(e.getKey(), "null").join(); - me.lucko.luckperms.common.users.User user = plugin.getUserManager().get(e.getKey()); + me.lucko.luckperms.common.core.model.User user = plugin.getUserManager().get(e.getKey()); for (Map.Entry, Boolean> n : e.getValue().entrySet()) { // n.key.key = world diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPermissionsEx.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPermissionsEx.java index bdbdb0d05..ae979a68d 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPermissionsEx.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPermissionsEx.java @@ -33,9 +33,9 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Constants; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import ru.tehkode.permissions.NativeInterface; diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPowerfulPerms.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPowerfulPerms.java index 298230701..9873c90c5 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPowerfulPerms.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationPowerfulPerms.java @@ -36,9 +36,9 @@ import me.lucko.luckperms.common.commands.CommandResult; import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Constants; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; @@ -252,7 +252,7 @@ public class MigrationPowerfulPerms extends SubCommand { Map groups = pm.getGroups(); // All versions for (Group g : groups.values()) { plugin.getStorage().createAndLoadGroup(g.getName().toLowerCase()).join(); - final me.lucko.luckperms.common.groups.Group group = plugin.getGroupManager().get(g.getName().toLowerCase()); + final me.lucko.luckperms.common.core.model.Group group = plugin.getGroupManager().get(g.getName().toLowerCase()); try { LogEntry.build() .actor(Constants.getConsoleUUID()).actorName(Constants.getConsoleName()) diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationZPermissions.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationZPermissions.java index ad64363f1..f63a544c5 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationZPermissions.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/migration/MigrationZPermissions.java @@ -30,10 +30,10 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; -import me.lucko.luckperms.common.core.PermissionHolder; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.PermissionHolder; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import org.tyrannyofheaven.bukkit.zPermissions.ZPermissionsService; diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/LPPermissible.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/LPPermissible.java index 9b442a212..1e6e8473d 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/LPPermissible.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/model/LPPermissible.java @@ -27,7 +27,7 @@ import lombok.NonNull; import me.lucko.luckperms.api.Contexts; import me.lucko.luckperms.api.Tristate; import me.lucko.luckperms.bukkit.LPBukkitPlugin; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.permissions.*; diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultChatHook.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultChatHook.java index feb655f2e..f18ac84fa 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultChatHook.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultChatHook.java @@ -29,9 +29,9 @@ import me.lucko.luckperms.api.caching.MetaData; import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.core.NodeBuilder; import me.lucko.luckperms.common.core.NodeFactory; -import me.lucko.luckperms.common.core.PermissionHolder; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.PermissionHolder; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.ExtractedContexts; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultPermissionHook.java b/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultPermissionHook.java index 5ea2a0c78..dbfebcdf2 100644 --- a/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultPermissionHook.java +++ b/bukkit/src/main/java/me/lucko/luckperms/bukkit/vault/VaultPermissionHook.java @@ -33,9 +33,9 @@ import me.lucko.luckperms.api.Tristate; import me.lucko.luckperms.api.caching.PermissionData; import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.bukkit.LPBukkitPlugin; -import me.lucko.luckperms.common.core.PermissionHolder; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.PermissionHolder; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectLacksException; import net.milkbowl.vault.permission.Permission; diff --git a/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java b/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java index c5ee8ac16..59629ebf5 100644 --- a/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java +++ b/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeCalculatorFactory.java @@ -31,7 +31,7 @@ import me.lucko.luckperms.common.calculators.PermissionProcessor; import me.lucko.luckperms.common.calculators.processors.MapProcessor; import me.lucko.luckperms.common.calculators.processors.RegexProcessor; import me.lucko.luckperms.common.calculators.processors.WildcardProcessor; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; @AllArgsConstructor public class BungeeCalculatorFactory implements CalculatorFactory { diff --git a/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeListener.java b/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeListener.java index 20109373f..8661a2f11 100644 --- a/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeListener.java +++ b/bungee/src/main/java/me/lucko/luckperms/bungee/BungeeListener.java @@ -26,8 +26,8 @@ import me.lucko.luckperms.api.Contexts; import me.lucko.luckperms.api.event.events.UserFirstLoginEvent; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.core.UuidCache; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.defaults.Rule; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.AbstractListener; import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.connection.PendingConnection; diff --git a/bungee/src/main/java/me/lucko/luckperms/bungee/LPBungeePlugin.java b/bungee/src/main/java/me/lucko/luckperms/bungee/LPBungeePlugin.java index 94cb10f0c..f8de87f8d 100644 --- a/bungee/src/main/java/me/lucko/luckperms/bungee/LPBungeePlugin.java +++ b/bungee/src/main/java/me/lucko/luckperms/bungee/LPBungeePlugin.java @@ -39,16 +39,19 @@ import me.lucko.luckperms.common.config.LPConfiguration; import me.lucko.luckperms.common.contexts.ContextManager; import me.lucko.luckperms.common.contexts.ServerCalculator; import me.lucko.luckperms.common.core.UuidCache; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Importer; -import me.lucko.luckperms.common.groups.GroupManager; +import me.lucko.luckperms.common.managers.GroupManager; +import me.lucko.luckperms.common.managers.TrackManager; +import me.lucko.luckperms.common.managers.UserManager; +import me.lucko.luckperms.common.managers.impl.GenericGroupManager; +import me.lucko.luckperms.common.managers.impl.GenericTrackManager; +import me.lucko.luckperms.common.managers.impl.GenericUserManager; import me.lucko.luckperms.common.messaging.RedisMessaging; import me.lucko.luckperms.common.storage.Storage; import me.lucko.luckperms.common.storage.StorageFactory; import me.lucko.luckperms.common.tasks.ExpireTemporaryTask; import me.lucko.luckperms.common.tasks.UpdateTask; -import me.lucko.luckperms.common.tracks.TrackManager; -import me.lucko.luckperms.common.users.User; -import me.lucko.luckperms.common.users.UserManager; import me.lucko.luckperms.common.utils.*; import net.md_5.bungee.api.config.ServerInfo; import net.md_5.bungee.api.connection.ProxiedPlayer; @@ -150,9 +153,9 @@ public class LPBungeePlugin extends Plugin implements LuckPermsPlugin { // load internal managers getLog().info("Loading internal permission managers..."); uuidCache = new UuidCache(getConfiguration().isOnlineMode()); - userManager = new UserManager(this); - groupManager = new GroupManager(this); - trackManager = new TrackManager(); + userManager = new GenericUserManager(this); + groupManager = new GenericGroupManager(this); + trackManager = new GenericTrackManager(); importer = new Importer(commandManager); consecutiveExecutor = new ConsecutiveExecutor(commandManager); calculatorFactory = new BungeeCalculatorFactory(this); diff --git a/bungee/src/main/java/me/lucko/luckperms/bungee/migration/MigrationBungeePerms.java b/bungee/src/main/java/me/lucko/luckperms/bungee/migration/MigrationBungeePerms.java index 25620861a..2bcb7cb16 100644 --- a/bungee/src/main/java/me/lucko/luckperms/bungee/migration/MigrationBungeePerms.java +++ b/bungee/src/main/java/me/lucko/luckperms/bungee/migration/MigrationBungeePerms.java @@ -65,7 +65,7 @@ public class MigrationBungeePerms extends SubCommand { // Make a LuckPerms group for the one being migrated plugin.getStorage().createAndLoadGroup(g.getName().toLowerCase()).join(); - me.lucko.luckperms.common.groups.Group group = plugin.getGroupManager().get(g.getName().toLowerCase()); + me.lucko.luckperms.common.core.model.Group group = plugin.getGroupManager().get(g.getName().toLowerCase()); try { LogEntry.build() .actor(Constants.getConsoleUUID()).actorName(Constants.getConsoleName()) @@ -189,7 +189,7 @@ public class MigrationBungeePerms extends SubCommand { // Make a LuckPerms user for the one being migrated. plugin.getStorage().loadUser(u.getUUID(), "null").join(); - me.lucko.luckperms.common.users.User user = plugin.getUserManager().get(u.getUUID()); + me.lucko.luckperms.common.core.model.User user = plugin.getUserManager().get(u.getUUID()); // Migrate global perms for (String perm : u.getPerms()) { diff --git a/common/src/main/java/me/lucko/luckperms/common/LuckPermsPlugin.java b/common/src/main/java/me/lucko/luckperms/common/LuckPermsPlugin.java index f0c9d881b..2bbbcd57b 100644 --- a/common/src/main/java/me/lucko/luckperms/common/LuckPermsPlugin.java +++ b/common/src/main/java/me/lucko/luckperms/common/LuckPermsPlugin.java @@ -34,13 +34,13 @@ import me.lucko.luckperms.common.config.LPConfiguration; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.contexts.ContextManager; import me.lucko.luckperms.common.core.UuidCache; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Importer; -import me.lucko.luckperms.common.groups.GroupManager; +import me.lucko.luckperms.common.managers.GroupManager; +import me.lucko.luckperms.common.managers.TrackManager; +import me.lucko.luckperms.common.managers.UserManager; import me.lucko.luckperms.common.messaging.RedisMessaging; import me.lucko.luckperms.common.storage.Storage; -import me.lucko.luckperms.common.tracks.TrackManager; -import me.lucko.luckperms.common.users.User; -import me.lucko.luckperms.common.users.UserManager; import me.lucko.luckperms.common.utils.BufferedRequest; import me.lucko.luckperms.common.utils.DebugHandler; import me.lucko.luckperms.common.utils.LocaleManager; diff --git a/common/src/main/java/me/lucko/luckperms/common/api/ApiProvider.java b/common/src/main/java/me/lucko/luckperms/common/api/ApiProvider.java index 75ef11b52..ad50d5691 100644 --- a/common/src/main/java/me/lucko/luckperms/common/api/ApiProvider.java +++ b/common/src/main/java/me/lucko/luckperms/common/api/ApiProvider.java @@ -33,7 +33,7 @@ import me.lucko.luckperms.api.event.LPListener; import me.lucko.luckperms.common.LuckPermsPlugin; import me.lucko.luckperms.common.api.internal.*; import me.lucko.luckperms.common.core.NodeBuilder; -import me.lucko.luckperms.common.users.UserIdentifier; +import me.lucko.luckperms.common.core.UserIdentifier; import java.util.Optional; import java.util.Set; @@ -127,7 +127,7 @@ public class ApiProvider implements LuckPermsApi { @Override public User getUser(@NonNull UUID uuid) { - final me.lucko.luckperms.common.users.User user = plugin.getUserManager().get(uuid); + final me.lucko.luckperms.common.core.model.User user = plugin.getUserManager().get(uuid); return user == null ? null : new UserLink(user); } @@ -138,7 +138,7 @@ public class ApiProvider implements LuckPermsApi { @Override public User getUser(@NonNull String name) { - final me.lucko.luckperms.common.users.User user = plugin.getUserManager().get(name); + final me.lucko.luckperms.common.core.model.User user = plugin.getUserManager().get(name); return user == null ? null : new UserLink(user); } @@ -165,7 +165,7 @@ public class ApiProvider implements LuckPermsApi { @Override public Group getGroup(@NonNull String name) { - final me.lucko.luckperms.common.groups.Group group = plugin.getGroupManager().get(name); + final me.lucko.luckperms.common.core.model.Group group = plugin.getGroupManager().get(name); return group == null ? null : new GroupLink(group); } @@ -186,7 +186,7 @@ public class ApiProvider implements LuckPermsApi { @Override public Track getTrack(@NonNull String name) { - final me.lucko.luckperms.common.tracks.Track track = plugin.getTrackManager().get(name); + final me.lucko.luckperms.common.core.model.Track track = plugin.getTrackManager().get(name); return track == null ? null : new TrackLink(track); } diff --git a/common/src/main/java/me/lucko/luckperms/common/api/internal/GroupLink.java b/common/src/main/java/me/lucko/luckperms/common/api/internal/GroupLink.java index 3b5782250..16e4c8512 100644 --- a/common/src/main/java/me/lucko/luckperms/common/api/internal/GroupLink.java +++ b/common/src/main/java/me/lucko/luckperms/common/api/internal/GroupLink.java @@ -35,19 +35,19 @@ import java.util.List; import static me.lucko.luckperms.common.api.internal.Utils.*; /** - * Provides a link between {@link Group} and {@link me.lucko.luckperms.common.groups.Group} + * Provides a link between {@link Group} and {@link me.lucko.luckperms.common.core.model.Group} */ @EqualsAndHashCode(of = {"name"}, callSuper = false) @SuppressWarnings("unused") public class GroupLink extends PermissionHolderLink implements Group { @Getter(AccessLevel.PACKAGE) - private final me.lucko.luckperms.common.groups.Group master; + private final me.lucko.luckperms.common.core.model.Group master; @Getter private final String name; - public GroupLink(@NonNull me.lucko.luckperms.common.groups.Group master) { + public GroupLink(@NonNull me.lucko.luckperms.common.core.model.Group master) { super(master); this.master = master; this.name = master.getName(); diff --git a/common/src/main/java/me/lucko/luckperms/common/api/internal/PermissionHolderLink.java b/common/src/main/java/me/lucko/luckperms/common/api/internal/PermissionHolderLink.java index cbbcf4cfb..74b345c45 100644 --- a/common/src/main/java/me/lucko/luckperms/common/api/internal/PermissionHolderLink.java +++ b/common/src/main/java/me/lucko/luckperms/common/api/internal/PermissionHolderLink.java @@ -33,15 +33,15 @@ import me.lucko.luckperms.exceptions.ObjectLacksException; import java.util.*; import static me.lucko.luckperms.common.api.internal.Utils.*; -import static me.lucko.luckperms.common.core.PermissionHolder.exportToLegacy; +import static me.lucko.luckperms.common.core.model.PermissionHolder.exportToLegacy; /** - * Provides a link between {@link PermissionHolder} and {@link me.lucko.luckperms.common.core.PermissionHolder} + * Provides a link between {@link PermissionHolder} and {@link me.lucko.luckperms.common.core.model.PermissionHolder} */ @SuppressWarnings("unused") @AllArgsConstructor public class PermissionHolderLink implements PermissionHolder { - private final me.lucko.luckperms.common.core.PermissionHolder master; + private final me.lucko.luckperms.common.core.model.PermissionHolder master; @Override public String getObjectName() { diff --git a/common/src/main/java/me/lucko/luckperms/common/api/internal/TrackLink.java b/common/src/main/java/me/lucko/luckperms/common/api/internal/TrackLink.java index 376f8c559..c1d5d7004 100644 --- a/common/src/main/java/me/lucko/luckperms/common/api/internal/TrackLink.java +++ b/common/src/main/java/me/lucko/luckperms/common/api/internal/TrackLink.java @@ -36,19 +36,19 @@ import java.util.List; import static me.lucko.luckperms.common.api.internal.Utils.checkGroup; /** - * Provides a link between {@link Track} and {@link me.lucko.luckperms.common.tracks.Track} + * Provides a link between {@link Track} and {@link me.lucko.luckperms.common.core.model.Track} */ @EqualsAndHashCode(of = {"name"}) @SuppressWarnings("unused") public class TrackLink implements Track { @Getter(AccessLevel.PACKAGE) - private final me.lucko.luckperms.common.tracks.Track master; + private final me.lucko.luckperms.common.core.model.Track master; @Getter private final String name; - public TrackLink(@NonNull me.lucko.luckperms.common.tracks.Track master) { + public TrackLink(@NonNull me.lucko.luckperms.common.core.model.Track master) { this.master = master; this.name = master.getName(); } diff --git a/common/src/main/java/me/lucko/luckperms/common/api/internal/UserLink.java b/common/src/main/java/me/lucko/luckperms/common/api/internal/UserLink.java index d4369848e..f99e3a239 100644 --- a/common/src/main/java/me/lucko/luckperms/common/api/internal/UserLink.java +++ b/common/src/main/java/me/lucko/luckperms/common/api/internal/UserLink.java @@ -38,19 +38,19 @@ import java.util.UUID; import static me.lucko.luckperms.common.api.internal.Utils.*; /** - * Provides a link between {@link User} and {@link me.lucko.luckperms.common.users.User} + * Provides a link between {@link User} and {@link me.lucko.luckperms.common.core.model.User} */ @EqualsAndHashCode(of = {"uuid"}, callSuper = false) @SuppressWarnings("unused") public class UserLink extends PermissionHolderLink implements User { @Getter - private final me.lucko.luckperms.common.users.User master; + private final me.lucko.luckperms.common.core.model.User master; @Getter private final UUID uuid; - public UserLink(@NonNull me.lucko.luckperms.common.users.User master) { + public UserLink(@NonNull me.lucko.luckperms.common.core.model.User master) { super(master); this.master = master; this.uuid = master.getUuid(); diff --git a/common/src/main/java/me/lucko/luckperms/common/caching/PermissionCache.java b/common/src/main/java/me/lucko/luckperms/common/caching/PermissionCache.java index c55725ab4..7d368fc33 100644 --- a/common/src/main/java/me/lucko/luckperms/common/caching/PermissionCache.java +++ b/common/src/main/java/me/lucko/luckperms/common/caching/PermissionCache.java @@ -29,7 +29,7 @@ import me.lucko.luckperms.api.Tristate; import me.lucko.luckperms.api.caching.PermissionData; import me.lucko.luckperms.common.calculators.CalculatorFactory; import me.lucko.luckperms.common.calculators.PermissionCalculator; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/common/src/main/java/me/lucko/luckperms/common/caching/UserCache.java b/common/src/main/java/me/lucko/luckperms/common/caching/UserCache.java index b0b7a1941..1e0aa2755 100644 --- a/common/src/main/java/me/lucko/luckperms/common/caching/UserCache.java +++ b/common/src/main/java/me/lucko/luckperms/common/caching/UserCache.java @@ -35,7 +35,7 @@ import me.lucko.luckperms.api.caching.MetaData; import me.lucko.luckperms.api.caching.PermissionData; import me.lucko.luckperms.api.caching.UserData; import me.lucko.luckperms.common.calculators.CalculatorFactory; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.ExtractedContexts; import java.util.Set; diff --git a/common/src/main/java/me/lucko/luckperms/common/calculators/CalculatorFactory.java b/common/src/main/java/me/lucko/luckperms/common/calculators/CalculatorFactory.java index a3c293043..4df1f0701 100644 --- a/common/src/main/java/me/lucko/luckperms/common/calculators/CalculatorFactory.java +++ b/common/src/main/java/me/lucko/luckperms/common/calculators/CalculatorFactory.java @@ -23,7 +23,7 @@ package me.lucko.luckperms.common.calculators; import me.lucko.luckperms.api.Contexts; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; /** * Creates a calculator instance given a set of contexts diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/SubCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/SubCommand.java index 5770ca28c..ae43809bd 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/SubCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/SubCommand.java @@ -29,9 +29,9 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.PermissionCache; import java.util.*; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedMainCommand.java index 4c5d27229..8b3b8606a 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedMainCommand.java @@ -30,7 +30,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.utils.Predicates; import java.util.ArrayList; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedSubCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedSubCommand.java index 02d77c4df..66a3cb405 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedSubCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/SharedSubCommand.java @@ -33,9 +33,9 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.PermissionHolder; +import me.lucko.luckperms.common.core.model.User; import java.util.Collections; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/CommandMeta.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/CommandMeta.java index 1e208b726..7e931b6fe 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/CommandMeta.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/CommandMeta.java @@ -25,7 +25,7 @@ package me.lucko.luckperms.common.commands.generic.meta; import com.google.common.collect.ImmutableList; import me.lucko.luckperms.common.commands.generic.SharedMainCommand; import me.lucko.luckperms.common.commands.generic.SharedSubCommand; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; public class CommandMeta extends SharedMainCommand { public CommandMeta(boolean user) { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddPrefix.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddPrefix.java index 6a0b5e958..b229d1d9e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddPrefix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddPrefix.java @@ -33,7 +33,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddSuffix.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddSuffix.java index b8270c448..59727e3dc 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddSuffix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddSuffix.java @@ -33,7 +33,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempPrefix.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempPrefix.java index 197bd3b63..f1e381bc5 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempPrefix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempPrefix.java @@ -33,7 +33,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.DateUtil; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempSuffix.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempSuffix.java index f231d01ae..569f8bb7d 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempSuffix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaAddTempSuffix.java @@ -33,7 +33,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.DateUtil; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaClear.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaClear.java index 68fac33dd..74546922f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaClear.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaClear.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaInfo.java index 858983a7d..3a6d32b8a 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaInfo.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.utils.ExtractedContexts; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemovePrefix.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemovePrefix.java index 2b5007569..b2afec15c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemovePrefix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemovePrefix.java @@ -34,7 +34,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveSuffix.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveSuffix.java index 0d4ac7448..e63dd7856 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveSuffix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveSuffix.java @@ -34,7 +34,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempPrefix.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempPrefix.java index da02d8939..34a34ed0e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempPrefix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempPrefix.java @@ -34,7 +34,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempSuffix.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempSuffix.java index 2d11ebca5..b458cd8a2 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempSuffix.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaRemoveTempSuffix.java @@ -34,7 +34,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSet.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSet.java index c39b55879..3c54d6952 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSet.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSet.java @@ -34,7 +34,7 @@ import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSetTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSetTemp.java index 277c69a9a..4cb25d4ce 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSetTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaSetTemp.java @@ -34,7 +34,7 @@ import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.DateUtil; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnset.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnset.java index 4e2c9600a..6028ba260 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnset.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnset.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnsetTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnsetTemp.java index 64854959d..06e40e08c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnsetTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/meta/MetaUnsetTemp.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderShowTracks.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderShowTracks.java index d71824928..9093a53a4 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderShowTracks.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/other/HolderShowTracks.java @@ -31,7 +31,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/CommandParent.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/CommandParent.java index 2f63a996e..881ca7eba 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/CommandParent.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/CommandParent.java @@ -25,7 +25,7 @@ package me.lucko.luckperms.common.commands.generic.parent; import com.google.common.collect.ImmutableList; import me.lucko.luckperms.common.commands.generic.SharedMainCommand; import me.lucko.luckperms.common.commands.generic.SharedSubCommand; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; public class CommandParent extends SharedMainCommand { public CommandParent(boolean user) { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAdd.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAdd.java index 1d466ec5c..9e41c2171 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAdd.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAdd.java @@ -32,9 +32,9 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAddTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAddTemp.java index 765741480..6df3b398f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAddTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentAddTemp.java @@ -32,9 +32,9 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; import me.lucko.luckperms.common.utils.DateUtil; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentInfo.java index 545a4237b..0592b8e30 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentInfo.java @@ -30,7 +30,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemove.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemove.java index b7581f301..132fe53b1 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemove.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemove.java @@ -32,9 +32,9 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemoveTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemoveTemp.java index 967be40f0..e74305be2 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemoveTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentRemoveTemp.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentSet.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentSet.java index 0a70a3df5..15369fa2a 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentSet.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/parent/ParentSet.java @@ -32,10 +32,10 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.PermissionHolder; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/CommandPermission.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/CommandPermission.java index 3aed0904e..01fb72e52 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/CommandPermission.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/CommandPermission.java @@ -25,7 +25,7 @@ package me.lucko.luckperms.common.commands.generic.permission; import com.google.common.collect.ImmutableList; import me.lucko.luckperms.common.commands.generic.SharedMainCommand; import me.lucko.luckperms.common.commands.generic.SharedSubCommand; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; public class CommandPermission extends SharedMainCommand { public CommandPermission(boolean user) { diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheck.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheck.java index 2dc41967b..727762124 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheck.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheck.java @@ -33,7 +33,7 @@ import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeBuilder; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheckInherits.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheckInherits.java index ccb21ba1d..cc5fd5bd7 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheckInherits.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionCheckInherits.java @@ -34,7 +34,7 @@ import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.InheritanceInfo; import me.lucko.luckperms.common.core.NodeBuilder; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionInfo.java index f5b1db80a..93c3e13f4 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionInfo.java @@ -30,7 +30,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSet.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSet.java index 20f7a5534..d4ec5858c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSet.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSet.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSetTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSetTemp.java index ea36d1bd0..1b726646c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSetTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionSetTemp.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.DateUtil; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnset.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnset.java index 2fc453fc6..a12ff07d6 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnset.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnset.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnsetTemp.java b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnsetTemp.java index 51200adf3..b5698b1bc 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnsetTemp.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/generic/permission/PermissionUnsetTemp.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.data.LogEntry; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/DeleteGroup.java b/common/src/main/java/me/lucko/luckperms/common/commands/group/DeleteGroup.java index c80b6d527..4a96ae986 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/DeleteGroup.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/group/DeleteGroup.java @@ -29,8 +29,8 @@ import me.lucko.luckperms.common.commands.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Group; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; import me.lucko.luckperms.common.utils.Predicates; import java.util.ArrayList; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupBulkChange.java b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupBulkChange.java index 7930b0884..c43230c8b 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupBulkChange.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupBulkChange.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; -import me.lucko.luckperms.common.groups.Group; +import me.lucko.luckperms.common.core.model.Group; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClear.java b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClear.java index bc7166aae..8f3e4bc43 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClear.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClear.java @@ -32,8 +32,8 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Group; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClone.java b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClone.java index ec396edbe..2618f8fb6 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClone.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupClone.java @@ -30,8 +30,8 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Group; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; import me.lucko.luckperms.common.utils.ArgumentChecker; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupInfo.java index ad7725a0f..ab2434111 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupInfo.java @@ -29,7 +29,7 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.groups.Group; +import me.lucko.luckperms.common.core.model.Group; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupMainCommand.java index 573961bf2..6e8754d85 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupMainCommand.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.generic.parent.CommandParent; import me.lucko.luckperms.common.commands.generic.permission.CommandPermission; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; -import me.lucko.luckperms.common.groups.Group; +import me.lucko.luckperms.common.core.model.Group; import java.util.ArrayList; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupRename.java b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupRename.java index bc98952a9..70a448537 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupRename.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/group/GroupRename.java @@ -30,8 +30,8 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Group; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; import me.lucko.luckperms.common.utils.ArgumentChecker; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/group/ListGroups.java b/common/src/main/java/me/lucko/luckperms/common/commands/group/ListGroups.java index f887663d3..14360f87f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/group/ListGroups.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/group/ListGroups.java @@ -29,7 +29,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.groups.Group; +import me.lucko.luckperms.common.core.model.Group; import me.lucko.luckperms.common.utils.Predicates; import java.util.ArrayList; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java index e805585cd..4e9482fdd 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/misc/ExportCommand.java @@ -32,10 +32,10 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Constants; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.groups.Group; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.storage.Storage; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.Predicates; import java.io.BufferedWriter; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/DeleteTrack.java b/common/src/main/java/me/lucko/luckperms/common/commands/track/DeleteTrack.java index c4bb7d9ce..4b3147f73 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/DeleteTrack.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/track/DeleteTrack.java @@ -29,8 +29,8 @@ import me.lucko.luckperms.common.commands.SingleCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Track; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.tracks.Track; import me.lucko.luckperms.common.utils.Predicates; import java.util.ArrayList; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackAppend.java b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackAppend.java index 116a0ece5..bed8ca976 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackAppend.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackAppend.java @@ -31,9 +31,9 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.tracks.Track; import me.lucko.luckperms.common.utils.ArgumentChecker; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClear.java b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClear.java index 300793d3c..fc0d0681d 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClear.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClear.java @@ -29,8 +29,8 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Track; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.tracks.Track; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClone.java b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClone.java index 4810d92b9..32320c250 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClone.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackClone.java @@ -30,8 +30,8 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Track; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.tracks.Track; import me.lucko.luckperms.common.utils.ArgumentChecker; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInfo.java index 368259fb5..0ec79f3de 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInfo.java @@ -30,7 +30,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.tracks.Track; +import me.lucko.luckperms.common.core.model.Track; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInsert.java b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInsert.java index 07a39747d..413a83cdc 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInsert.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackInsert.java @@ -31,9 +31,9 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.tracks.Track; import me.lucko.luckperms.common.utils.ArgumentChecker; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackMainCommand.java index 8e9f7cf24..974967eff 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackMainCommand.java @@ -28,7 +28,7 @@ import me.lucko.luckperms.common.commands.Command; import me.lucko.luckperms.common.commands.MainCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; -import me.lucko.luckperms.common.tracks.Track; +import me.lucko.luckperms.common.core.model.Track; import java.util.ArrayList; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRemove.java b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRemove.java index db0739d24..b875094a0 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRemove.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRemove.java @@ -31,8 +31,8 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Track; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.tracks.Track; import me.lucko.luckperms.common.utils.ArgumentChecker; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRename.java b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRename.java index 55c38971d..de393de50 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRename.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/track/TrackRename.java @@ -30,8 +30,8 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Track; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.tracks.Track; import me.lucko.luckperms.common.utils.ArgumentChecker; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserBulkChange.java b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserBulkChange.java index a3edd8584..2902cfc6e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserBulkChange.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserBulkChange.java @@ -32,7 +32,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserClear.java b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserClear.java index 2dae40351..b18d9f6e4 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserClear.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserClear.java @@ -32,8 +32,8 @@ import me.lucko.luckperms.common.commands.utils.ArgumentUtils; import me.lucko.luckperms.common.commands.utils.ContextHelper; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserDemote.java b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserDemote.java index 218a7d332..f8d140402 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserDemote.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserDemote.java @@ -38,10 +38,10 @@ import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.ArgumentChecker; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserGetUUID.java b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserGetUUID.java index 46a9b6a23..04ba818e3 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserGetUUID.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserGetUUID.java @@ -29,7 +29,7 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.Predicates; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserInfo.java b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserInfo.java index 9b7638998..7b64817e5 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserInfo.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserInfo.java @@ -34,7 +34,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.DateUtil; import me.lucko.luckperms.common.utils.Predicates; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserMainCommand.java b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserMainCommand.java index 9d7e42be2..efe11e584 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserMainCommand.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserMainCommand.java @@ -34,7 +34,7 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Patterns; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import java.util.List; import java.util.UUID; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserPromote.java b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserPromote.java index c29ba9a87..096985d74 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserPromote.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserPromote.java @@ -38,10 +38,10 @@ import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.ArgumentChecker; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserSwitchPrimaryGroup.java b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserSwitchPrimaryGroup.java index 99b641587..d11f02981 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/user/UserSwitchPrimaryGroup.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/user/UserSwitchPrimaryGroup.java @@ -30,9 +30,9 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.LogEntry; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditGroup.java b/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditGroup.java index 3f08152b4..720580f89 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditGroup.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditGroup.java @@ -32,8 +32,8 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.storage.Storage; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditPermission.java b/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditPermission.java index b5fe0e479..a50a851ff 100644 --- a/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditPermission.java +++ b/common/src/main/java/me/lucko/luckperms/common/commands/usersbulkedit/BulkEditPermission.java @@ -32,8 +32,8 @@ import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.constants.Message; import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.core.NodeFactory; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.storage.Storage; -import me.lucko.luckperms.common.users.User; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/core/NodeBuilder.java b/common/src/main/java/me/lucko/luckperms/common/core/NodeBuilder.java index 62df4421e..67f72eb0b 100644 --- a/common/src/main/java/me/lucko/luckperms/common/core/NodeBuilder.java +++ b/common/src/main/java/me/lucko/luckperms/common/core/NodeBuilder.java @@ -29,6 +29,7 @@ import me.lucko.luckperms.api.Node; import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.api.context.MutableContextSet; import me.lucko.luckperms.common.constants.Patterns; +import me.lucko.luckperms.common.core.model.ImmutableNode; import me.lucko.luckperms.common.utils.ArgumentChecker; import java.util.List; diff --git a/common/src/main/java/me/lucko/luckperms/common/users/UserIdentifier.java b/common/src/main/java/me/lucko/luckperms/common/core/UserIdentifier.java similarity index 97% rename from common/src/main/java/me/lucko/luckperms/common/users/UserIdentifier.java rename to common/src/main/java/me/lucko/luckperms/common/core/UserIdentifier.java index 6e7e3d580..d009207ca 100644 --- a/common/src/main/java/me/lucko/luckperms/common/users/UserIdentifier.java +++ b/common/src/main/java/me/lucko/luckperms/common/core/UserIdentifier.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.users; +package me.lucko.luckperms.common.core; import lombok.*; import me.lucko.luckperms.common.utils.Identifiable; diff --git a/common/src/main/java/me/lucko/luckperms/common/groups/Group.java b/common/src/main/java/me/lucko/luckperms/common/core/model/Group.java similarity index 93% rename from common/src/main/java/me/lucko/luckperms/common/groups/Group.java rename to common/src/main/java/me/lucko/luckperms/common/core/model/Group.java index b5bd2f391..3ed8e83ad 100644 --- a/common/src/main/java/me/lucko/luckperms/common/groups/Group.java +++ b/common/src/main/java/me/lucko/luckperms/common/core/model/Group.java @@ -20,13 +20,12 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.groups; +package me.lucko.luckperms.common.core.model; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.ToString; import me.lucko.luckperms.common.LuckPermsPlugin; -import me.lucko.luckperms.common.core.PermissionHolder; import me.lucko.luckperms.common.utils.Identifiable; @ToString(of = {"name"}) @@ -39,7 +38,7 @@ public class Group extends PermissionHolder implements Identifiable { @Getter private final String name; - Group(String name, LuckPermsPlugin plugin) { + public Group(String name, LuckPermsPlugin plugin) { super(name, plugin); this.name = name; } diff --git a/common/src/main/java/me/lucko/luckperms/common/core/ImmutableNode.java b/common/src/main/java/me/lucko/luckperms/common/core/model/ImmutableNode.java similarity index 99% rename from common/src/main/java/me/lucko/luckperms/common/core/ImmutableNode.java rename to common/src/main/java/me/lucko/luckperms/common/core/model/ImmutableNode.java index 934ccbba4..5711e9b8f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/core/ImmutableNode.java +++ b/common/src/main/java/me/lucko/luckperms/common/core/model/ImmutableNode.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.core; +package me.lucko.luckperms.common.core.model; import com.google.common.base.Preconditions; import com.google.common.base.Splitter; diff --git a/common/src/main/java/me/lucko/luckperms/common/core/PermissionHolder.java b/common/src/main/java/me/lucko/luckperms/common/core/model/PermissionHolder.java similarity index 99% rename from common/src/main/java/me/lucko/luckperms/common/core/PermissionHolder.java rename to common/src/main/java/me/lucko/luckperms/common/core/model/PermissionHolder.java index 69c6d322d..4fb3251cb 100644 --- a/common/src/main/java/me/lucko/luckperms/common/core/PermissionHolder.java +++ b/common/src/main/java/me/lucko/luckperms/common/core/model/PermissionHolder.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.core; +package me.lucko.luckperms.common.core.model; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -39,7 +39,10 @@ import me.lucko.luckperms.common.api.internal.GroupLink; import me.lucko.luckperms.common.api.internal.PermissionHolderLink; import me.lucko.luckperms.common.caching.MetaHolder; import me.lucko.luckperms.common.commands.utils.Util; -import me.lucko.luckperms.common.groups.Group; +import me.lucko.luckperms.common.core.InheritanceInfo; +import me.lucko.luckperms.common.core.NodeBuilder; +import me.lucko.luckperms.common.core.NodeFactory; +import me.lucko.luckperms.common.core.PriorityComparator; import me.lucko.luckperms.common.utils.Cache; import me.lucko.luckperms.common.utils.ExtractedContexts; import me.lucko.luckperms.common.utils.ImmutableLocalizedNode; diff --git a/common/src/main/java/me/lucko/luckperms/common/tracks/Track.java b/common/src/main/java/me/lucko/luckperms/common/core/model/Track.java similarity index 98% rename from common/src/main/java/me/lucko/luckperms/common/tracks/Track.java rename to common/src/main/java/me/lucko/luckperms/common/core/model/Track.java index 4c5100eeb..1026adc3f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/tracks/Track.java +++ b/common/src/main/java/me/lucko/luckperms/common/core/model/Track.java @@ -20,14 +20,13 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.tracks; +package me.lucko.luckperms.common.core.model; import com.google.common.collect.ImmutableList; import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.ToString; -import me.lucko.luckperms.common.groups.Group; import me.lucko.luckperms.common.utils.Identifiable; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectLacksException; diff --git a/common/src/main/java/me/lucko/luckperms/common/users/User.java b/common/src/main/java/me/lucko/luckperms/common/core/model/User.java similarity index 94% rename from common/src/main/java/me/lucko/luckperms/common/users/User.java rename to common/src/main/java/me/lucko/luckperms/common/core/model/User.java index fd831fc2a..a4f0d563e 100644 --- a/common/src/main/java/me/lucko/luckperms/common/users/User.java +++ b/common/src/main/java/me/lucko/luckperms/common/core/model/User.java @@ -20,7 +20,7 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.users; +package me.lucko.luckperms.common.core.model; import lombok.EqualsAndHashCode; import lombok.Getter; @@ -31,7 +31,7 @@ import me.lucko.luckperms.api.event.events.UserPermissionRefreshEvent; import me.lucko.luckperms.common.LuckPermsPlugin; import me.lucko.luckperms.common.api.internal.UserLink; import me.lucko.luckperms.common.caching.UserCache; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.UserIdentifier; import me.lucko.luckperms.common.utils.BufferedRequest; import me.lucko.luckperms.common.utils.Identifiable; @@ -76,13 +76,13 @@ public class User extends PermissionHolder implements Identifiable the class used to identify each object held in this manager * @param the class this manager is "managing" */ -public abstract class AbstractManager> implements Function { +public abstract class AbstractManager> implements Manager { private final LoadingCache objects = CacheBuilder.newBuilder() .build(new CacheLoader() { @@ -52,51 +52,35 @@ public abstract class AbstractManager> implements F } }); - public final Map getAll() { + @Override + public Map getAll() { return ImmutableMap.copyOf(objects.asMap()); } - /** - * Get an object by id - * @param id The id to search by - * @return a {@link T} object if the object is loaded or makes and returns a new object - */ - public final T getOrMake(I id) { + @Override + public T getOrMake(I id) { return objects.getUnchecked(id); } - /** - * Get an object by id - * @param id The id to search by - * @return a {@link T} object if the object is loaded, returns null if the object is not loaded - */ - public final T get(I id) { + @Override + public T get(I id) { return objects.getIfPresent(id); } - /** - * Check to see if a object is loaded or not - * @param id The id of the object - * @return true if the object is loaded - */ - public final boolean isLoaded(I id) { + @Override + public boolean isLoaded(I id) { return objects.asMap().containsKey(id); } - /** - * Removes and unloads the object from the manager - * @param t The object to unload - */ - public final void unload(T t) { + @Override + public void unload(T t) { if (t != null) { objects.invalidate(t.getId()); } } - /** - * Unloads all objects from the manager - */ - public final void unloadAll() { + @Override + public void unloadAll() { objects.invalidateAll(); } diff --git a/common/src/main/java/me/lucko/luckperms/common/managers/GroupManager.java b/common/src/main/java/me/lucko/luckperms/common/managers/GroupManager.java new file mode 100644 index 000000000..230bfc9c4 --- /dev/null +++ b/common/src/main/java/me/lucko/luckperms/common/managers/GroupManager.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2016 Lucko (Luck) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.lucko.luckperms.common.managers; + +import me.lucko.luckperms.common.core.model.Group; + +public interface GroupManager extends Manager { + +} diff --git a/common/src/main/java/me/lucko/luckperms/common/managers/Manager.java b/common/src/main/java/me/lucko/luckperms/common/managers/Manager.java new file mode 100644 index 000000000..fff83b50c --- /dev/null +++ b/common/src/main/java/me/lucko/luckperms/common/managers/Manager.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2016 Lucko (Luck) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.lucko.luckperms.common.managers; + +import me.lucko.luckperms.common.utils.Identifiable; + +import java.util.Map; +import java.util.function.Function; + +/** + * A class which manages instances of a class + * @param the class used to identify each object held in this manager + * @param the class this manager is "managing" + */ +public interface Manager> extends Function { + + /** + * Gets a map containing all cached instances held by this manager. + * @return all instances held in this manager + */ + Map getAll(); + + /** + * Gets or creates an object by id + * @param id The id to search by + * @return a {@link T} object if the object is loaded or makes and returns a new object + */ + T getOrMake(I id); + + /** + * Get an object by id + * @param id The id to search by + * @return a {@link T} object if the object is loaded, returns null if the object is not loaded + */ + T get(I id); + + /** + * Check to see if a object is loaded or not + * @param id The id of the object + * @return true if the object is loaded + */ + boolean isLoaded(I id); + + /** + * Removes and unloads the object from the manager + * @param t The object to unload + */ + void unload(T t); + + /** + * Unloads all objects from the manager + */ + void unloadAll(); + +} diff --git a/common/src/main/java/me/lucko/luckperms/common/managers/TrackManager.java b/common/src/main/java/me/lucko/luckperms/common/managers/TrackManager.java new file mode 100644 index 000000000..a53dc3ba3 --- /dev/null +++ b/common/src/main/java/me/lucko/luckperms/common/managers/TrackManager.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2016 Lucko (Luck) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.lucko.luckperms.common.managers; + +import me.lucko.luckperms.common.core.model.Track; + +public interface TrackManager extends Manager { + +} diff --git a/common/src/main/java/me/lucko/luckperms/common/managers/UserManager.java b/common/src/main/java/me/lucko/luckperms/common/managers/UserManager.java new file mode 100644 index 000000000..aeb487831 --- /dev/null +++ b/common/src/main/java/me/lucko/luckperms/common/managers/UserManager.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2016 Lucko (Luck) + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package me.lucko.luckperms.common.managers; + +import me.lucko.luckperms.common.core.UserIdentifier; +import me.lucko.luckperms.common.core.model.User; +import me.lucko.luckperms.common.utils.Identifiable; + +import java.util.UUID; + +public interface UserManager extends Manager { + + /** + * Get a user object by name + * @param name The name to search by + * @return a {@link User} object if the user is loaded, returns null if the user is not loaded + */ + User get(String name); + + /** + * Get a user object by uuid + * @param uuid The uuid to search by + * @return a {@link User} object if the user is loaded, returns null if the user is not loaded + */ + User get(UUID uuid); + + /** + * Gives the user the default group if necessary. + * @param user the user to give to + */ + boolean giveDefaultIfNeeded(User user, boolean save); + + /** + * Check whether the user's state indicates that they should be persisted to storage. + * @param user the user to check + * @return true if the user should be saved + */ + boolean shouldSave(User user); + + /** + * Checks to see if the user is online, and if they are not, runs {@link #unload(Identifiable)} + * @param user The user to be cleaned up + */ + void cleanup(User user); + + /** + * Reloads the data of all online users + */ + void updateAllUsers(); + +} diff --git a/common/src/main/java/me/lucko/luckperms/common/groups/GroupManager.java b/common/src/main/java/me/lucko/luckperms/common/managers/impl/GenericGroupManager.java similarity index 81% rename from common/src/main/java/me/lucko/luckperms/common/groups/GroupManager.java rename to common/src/main/java/me/lucko/luckperms/common/managers/impl/GenericGroupManager.java index bc497f61c..32abec3b0 100644 --- a/common/src/main/java/me/lucko/luckperms/common/groups/GroupManager.java +++ b/common/src/main/java/me/lucko/luckperms/common/managers/impl/GenericGroupManager.java @@ -20,23 +20,21 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.groups; +package me.lucko.luckperms.common.managers.impl; import lombok.RequiredArgsConstructor; import me.lucko.luckperms.common.LuckPermsPlugin; -import me.lucko.luckperms.common.utils.AbstractManager; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.managers.AbstractManager; +import me.lucko.luckperms.common.managers.GroupManager; @RequiredArgsConstructor -public class GroupManager extends AbstractManager { +public class GenericGroupManager extends AbstractManager implements GroupManager { private final LuckPermsPlugin plugin; - /** - * Makes a new group object - * @param name The name of the group - * @return a new {@link Group} object - */ @Override public Group apply(String name) { return new Group(name, plugin); } + } \ No newline at end of file diff --git a/common/src/main/java/me/lucko/luckperms/common/tracks/TrackManager.java b/common/src/main/java/me/lucko/luckperms/common/managers/impl/GenericTrackManager.java similarity index 79% rename from common/src/main/java/me/lucko/luckperms/common/tracks/TrackManager.java rename to common/src/main/java/me/lucko/luckperms/common/managers/impl/GenericTrackManager.java index 17e8df1f6..f38cb97e2 100644 --- a/common/src/main/java/me/lucko/luckperms/common/tracks/TrackManager.java +++ b/common/src/main/java/me/lucko/luckperms/common/managers/impl/GenericTrackManager.java @@ -20,19 +20,17 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.tracks; +package me.lucko.luckperms.common.managers.impl; -import me.lucko.luckperms.common.utils.AbstractManager; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.managers.AbstractManager; +import me.lucko.luckperms.common.managers.TrackManager; -public class TrackManager extends AbstractManager { +public class GenericTrackManager extends AbstractManager implements TrackManager { - /** - * Makes a new track object - * @param name The name of the track - * @return a new {@link Track} object - */ @Override public Track apply(String name) { return new Track(name); } + } diff --git a/common/src/main/java/me/lucko/luckperms/common/users/UserManager.java b/common/src/main/java/me/lucko/luckperms/common/managers/impl/GenericUserManager.java similarity index 92% rename from common/src/main/java/me/lucko/luckperms/common/users/UserManager.java rename to common/src/main/java/me/lucko/luckperms/common/managers/impl/GenericUserManager.java index 65d0ac193..224f84ef4 100644 --- a/common/src/main/java/me/lucko/luckperms/common/users/UserManager.java +++ b/common/src/main/java/me/lucko/luckperms/common/managers/impl/GenericUserManager.java @@ -20,12 +20,15 @@ * SOFTWARE. */ -package me.lucko.luckperms.common.users; +package me.lucko.luckperms.common.managers.impl; import lombok.RequiredArgsConstructor; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.common.LuckPermsPlugin; -import me.lucko.luckperms.common.utils.AbstractManager; +import me.lucko.luckperms.common.core.UserIdentifier; +import me.lucko.luckperms.common.core.model.User; +import me.lucko.luckperms.common.managers.AbstractManager; +import me.lucko.luckperms.common.managers.UserManager; import me.lucko.luckperms.common.utils.Identifiable; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; @@ -33,9 +36,16 @@ import java.util.Set; import java.util.UUID; @RequiredArgsConstructor -public class UserManager extends AbstractManager { +public class GenericUserManager extends AbstractManager implements UserManager { private final LuckPermsPlugin plugin; + @Override + public User apply(UserIdentifier id) { + return id.getUsername() == null ? + new User(id.getUuid(), plugin) : + new User(id.getUuid(), id.getUsername(), plugin); + } + /** * Get a user object by name * @param name The name to search by @@ -138,11 +148,4 @@ public class UserManager extends AbstractManager { }); }); } - - @Override - public User apply(UserIdentifier id) { - return id.getUsername() == null ? - new User(id.getUuid(), plugin) : - new User(id.getUuid(), id.getUsername(), plugin); - } } diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/AbstractStorage.java b/common/src/main/java/me/lucko/luckperms/common/storage/AbstractStorage.java index 3fcfd4cd8..9c2568f9c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/AbstractStorage.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/AbstractStorage.java @@ -27,13 +27,13 @@ import lombok.RequiredArgsConstructor; import lombok.experimental.Delegate; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.LuckPermsPlugin; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Log; -import me.lucko.luckperms.common.groups.Group; import me.lucko.luckperms.common.storage.backing.AbstractBacking; import me.lucko.luckperms.common.storage.wrappings.BufferedOutputStorage; import me.lucko.luckperms.common.storage.wrappings.TolerantStorage; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; import java.util.Set; import java.util.UUID; diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/SplitBacking.java b/common/src/main/java/me/lucko/luckperms/common/storage/SplitBacking.java index 0146011a9..7f2e64840 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/SplitBacking.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/SplitBacking.java @@ -25,11 +25,11 @@ package me.lucko.luckperms.common.storage; import com.google.common.collect.ImmutableMap; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.LuckPermsPlugin; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Log; -import me.lucko.luckperms.common.groups.Group; import me.lucko.luckperms.common.storage.backing.AbstractBacking; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; import java.util.Map; import java.util.Set; diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/Storage.java b/common/src/main/java/me/lucko/luckperms/common/storage/Storage.java index 2177d3356..12cbbb367 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/Storage.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/Storage.java @@ -23,10 +23,10 @@ package me.lucko.luckperms.common.storage; import me.lucko.luckperms.api.LogEntry; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Log; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; import java.util.Set; import java.util.UUID; diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/backing/AbstractBacking.java b/common/src/main/java/me/lucko/luckperms/common/storage/backing/AbstractBacking.java index 00fab17fb..a64f437da 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/backing/AbstractBacking.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/backing/AbstractBacking.java @@ -28,10 +28,10 @@ import lombok.RequiredArgsConstructor; import lombok.Setter; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.LuckPermsPlugin; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Log; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; import java.util.Set; import java.util.UUID; diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/backing/JSONBacking.java b/common/src/main/java/me/lucko/luckperms/common/storage/backing/JSONBacking.java index f39425f10..1ba8c3a4b 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/backing/JSONBacking.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/backing/JSONBacking.java @@ -26,19 +26,19 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import lombok.Cleanup; import me.lucko.luckperms.common.LuckPermsPlugin; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.groups.GroupManager; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.tracks.TrackManager; -import me.lucko.luckperms.common.users.User; -import me.lucko.luckperms.common.users.UserIdentifier; +import me.lucko.luckperms.common.core.UserIdentifier; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; +import me.lucko.luckperms.common.managers.GroupManager; +import me.lucko.luckperms.common.managers.TrackManager; import java.io.*; import java.util.*; import java.util.concurrent.Callable; import java.util.stream.Collectors; -import static me.lucko.luckperms.common.core.PermissionHolder.exportToLegacy; +import static me.lucko.luckperms.common.core.model.PermissionHolder.exportToLegacy; @SuppressWarnings("ResultOfMethodCallIgnored") public class JSONBacking extends FlatfileBacking { diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/backing/MongoDBBacking.java b/common/src/main/java/me/lucko/luckperms/common/storage/backing/MongoDBBacking.java index a094fe175..265895be1 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/backing/MongoDBBacking.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/backing/MongoDBBacking.java @@ -31,21 +31,21 @@ import com.mongodb.client.MongoDatabase; import com.mongodb.client.model.InsertOneOptions; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.LuckPermsPlugin; +import me.lucko.luckperms.common.core.UserIdentifier; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Log; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.groups.GroupManager; +import me.lucko.luckperms.common.managers.GroupManager; +import me.lucko.luckperms.common.managers.TrackManager; import me.lucko.luckperms.common.storage.DatastoreConfiguration; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.tracks.TrackManager; -import me.lucko.luckperms.common.users.User; -import me.lucko.luckperms.common.users.UserIdentifier; import org.bson.Document; import java.util.*; import java.util.concurrent.Callable; import java.util.stream.Collectors; -import static me.lucko.luckperms.common.core.PermissionHolder.exportToLegacy; +import static me.lucko.luckperms.common.core.model.PermissionHolder.exportToLegacy; @SuppressWarnings("unchecked") public class MongoDBBacking extends AbstractBacking { diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/backing/SQLBacking.java b/common/src/main/java/me/lucko/luckperms/common/storage/backing/SQLBacking.java index 5f5bdd167..9e3b4ae1c 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/backing/SQLBacking.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/backing/SQLBacking.java @@ -26,13 +26,13 @@ import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import me.lucko.luckperms.api.LogEntry; import me.lucko.luckperms.common.LuckPermsPlugin; +import me.lucko.luckperms.common.core.UserIdentifier; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Log; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.groups.GroupManager; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.tracks.TrackManager; -import me.lucko.luckperms.common.users.User; -import me.lucko.luckperms.common.users.UserIdentifier; +import me.lucko.luckperms.common.managers.GroupManager; +import me.lucko.luckperms.common.managers.TrackManager; import java.lang.reflect.Type; import java.sql.Connection; @@ -41,7 +41,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.*; -import static me.lucko.luckperms.common.core.PermissionHolder.exportToLegacy; +import static me.lucko.luckperms.common.core.model.PermissionHolder.exportToLegacy; abstract class SQLBacking extends AbstractBacking { private static final QueryPS EMPTY_PS = preparedStatement -> {}; diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/backing/YAMLBacking.java b/common/src/main/java/me/lucko/luckperms/common/storage/backing/YAMLBacking.java index 05627c4c8..35eceefa5 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/backing/YAMLBacking.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/backing/YAMLBacking.java @@ -24,12 +24,12 @@ package me.lucko.luckperms.common.storage.backing; import lombok.Cleanup; import me.lucko.luckperms.common.LuckPermsPlugin; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.groups.GroupManager; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.tracks.TrackManager; -import me.lucko.luckperms.common.users.User; -import me.lucko.luckperms.common.users.UserIdentifier; +import me.lucko.luckperms.common.core.UserIdentifier; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; +import me.lucko.luckperms.common.managers.GroupManager; +import me.lucko.luckperms.common.managers.TrackManager; import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.Yaml; @@ -38,7 +38,7 @@ import java.util.*; import java.util.concurrent.Callable; import java.util.stream.Collectors; -import static me.lucko.luckperms.common.core.PermissionHolder.exportToLegacy; +import static me.lucko.luckperms.common.core.model.PermissionHolder.exportToLegacy; @SuppressWarnings({"unchecked", "ResultOfMethodCallIgnored"}) public class YAMLBacking extends FlatfileBacking { diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/wrappings/BufferedOutputStorage.java b/common/src/main/java/me/lucko/luckperms/common/storage/wrappings/BufferedOutputStorage.java index 6433a0e41..d65933af1 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/wrappings/BufferedOutputStorage.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/wrappings/BufferedOutputStorage.java @@ -26,11 +26,11 @@ import lombok.AccessLevel; import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.experimental.Delegate; -import me.lucko.luckperms.common.groups.Group; +import me.lucko.luckperms.common.core.UserIdentifier; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.storage.Storage; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; -import me.lucko.luckperms.common.users.UserIdentifier; import me.lucko.luckperms.common.utils.Buffer; import java.util.UUID; diff --git a/common/src/main/java/me/lucko/luckperms/common/storage/wrappings/TolerantStorage.java b/common/src/main/java/me/lucko/luckperms/common/storage/wrappings/TolerantStorage.java index 3ec094863..6da2144a5 100644 --- a/common/src/main/java/me/lucko/luckperms/common/storage/wrappings/TolerantStorage.java +++ b/common/src/main/java/me/lucko/luckperms/common/storage/wrappings/TolerantStorage.java @@ -26,11 +26,11 @@ import lombok.AccessLevel; import lombok.RequiredArgsConstructor; import lombok.experimental.Delegate; import me.lucko.luckperms.api.LogEntry; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.Track; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Log; -import me.lucko.luckperms.common.groups.Group; import me.lucko.luckperms.common.storage.Storage; -import me.lucko.luckperms.common.tracks.Track; -import me.lucko.luckperms.common.users.User; import java.util.Set; import java.util.UUID; diff --git a/common/src/main/java/me/lucko/luckperms/common/tasks/ExpireTemporaryTask.java b/common/src/main/java/me/lucko/luckperms/common/tasks/ExpireTemporaryTask.java index 7c5e776a8..bef08af9f 100644 --- a/common/src/main/java/me/lucko/luckperms/common/tasks/ExpireTemporaryTask.java +++ b/common/src/main/java/me/lucko/luckperms/common/tasks/ExpireTemporaryTask.java @@ -24,8 +24,8 @@ package me.lucko.luckperms.common.tasks; import lombok.AllArgsConstructor; import me.lucko.luckperms.common.LuckPermsPlugin; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.User; @AllArgsConstructor public class ExpireTemporaryTask implements Runnable { diff --git a/common/src/main/java/me/lucko/luckperms/common/utils/AbstractListener.java b/common/src/main/java/me/lucko/luckperms/common/utils/AbstractListener.java index de4c98086..535abee96 100644 --- a/common/src/main/java/me/lucko/luckperms/common/utils/AbstractListener.java +++ b/common/src/main/java/me/lucko/luckperms/common/utils/AbstractListener.java @@ -26,8 +26,8 @@ import lombok.AllArgsConstructor; import me.lucko.luckperms.api.event.events.UserFirstLoginEvent; import me.lucko.luckperms.common.LuckPermsPlugin; import me.lucko.luckperms.common.core.UuidCache; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.defaults.Rule; -import me.lucko.luckperms.common.users.User; import java.util.UUID; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/LPSpongePlugin.java b/sponge/src/main/java/me/lucko/luckperms/sponge/LPSpongePlugin.java index 38bd58dd6..9fa27738c 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/LPSpongePlugin.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/LPSpongePlugin.java @@ -39,16 +39,19 @@ import me.lucko.luckperms.common.constants.Permission; import me.lucko.luckperms.common.contexts.ContextManager; import me.lucko.luckperms.common.contexts.ServerCalculator; import me.lucko.luckperms.common.core.UuidCache; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.data.Importer; -import me.lucko.luckperms.common.groups.GroupManager; +import me.lucko.luckperms.common.managers.GroupManager; +import me.lucko.luckperms.common.managers.TrackManager; +import me.lucko.luckperms.common.managers.UserManager; +import me.lucko.luckperms.common.managers.impl.GenericGroupManager; +import me.lucko.luckperms.common.managers.impl.GenericTrackManager; +import me.lucko.luckperms.common.managers.impl.GenericUserManager; import me.lucko.luckperms.common.messaging.RedisMessaging; import me.lucko.luckperms.common.storage.Storage; import me.lucko.luckperms.common.storage.StorageFactory; import me.lucko.luckperms.common.tasks.ExpireTemporaryTask; import me.lucko.luckperms.common.tasks.UpdateTask; -import me.lucko.luckperms.common.tracks.TrackManager; -import me.lucko.luckperms.common.users.User; -import me.lucko.luckperms.common.users.UserManager; import me.lucko.luckperms.common.utils.*; import me.lucko.luckperms.sponge.commands.SpongeMainCommand; import me.lucko.luckperms.sponge.contexts.WorldCalculator; @@ -196,9 +199,9 @@ public class LPSpongePlugin implements LuckPermsPlugin { // load internal managers getLog().info("Loading internal permission managers..."); uuidCache = new UuidCache(getConfiguration().isOnlineMode()); - userManager = new UserManager(this); - groupManager = new GroupManager(this); - trackManager = new TrackManager(); + userManager = new GenericUserManager(this); + groupManager = new GenericGroupManager(this); + trackManager = new GenericTrackManager(); importer = new Importer(commandManager); consecutiveExecutor = new ConsecutiveExecutor(commandManager); calculatorFactory = new SpongeCalculatorFactory(this); diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java b/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java index edacbc988..21dfcd324 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeCalculatorFactory.java @@ -31,7 +31,7 @@ import me.lucko.luckperms.common.calculators.PermissionProcessor; import me.lucko.luckperms.common.calculators.processors.MapProcessor; import me.lucko.luckperms.common.calculators.processors.RegexProcessor; import me.lucko.luckperms.common.calculators.processors.WildcardProcessor; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.sponge.calculators.DefaultsProcessor; import me.lucko.luckperms.sponge.calculators.SpongeWildcardProcessor; import me.lucko.luckperms.sponge.service.LuckPermsService; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeListener.java b/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeListener.java index 21f3e0c87..588262422 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeListener.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/SpongeListener.java @@ -26,7 +26,7 @@ import co.aikar.timings.Timing; import me.lucko.luckperms.api.caching.UserData; import me.lucko.luckperms.api.context.MutableContextSet; import me.lucko.luckperms.common.constants.Message; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.AbstractListener; import me.lucko.luckperms.sponge.timings.LPTiming; import org.spongepowered.api.entity.living.player.Player; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionManager.java b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionManager.java index c4bd725ae..4d4a2c4db 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionManager.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionManager.java @@ -30,8 +30,8 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.Predicates; import org.spongepowered.api.Sponge; import org.spongepowered.api.plugin.PluginContainer; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionsEx.java b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionsEx.java index 027afc7bb..2b94d4a35 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionsEx.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationPermissionsEx.java @@ -30,8 +30,8 @@ import me.lucko.luckperms.common.commands.SubCommand; import me.lucko.luckperms.common.commands.sender.Sender; import me.lucko.luckperms.common.commands.utils.Util; import me.lucko.luckperms.common.constants.Permission; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.common.utils.Predicates; import me.lucko.luckperms.sponge.LPSpongePlugin; import me.lucko.luckperms.sponge.service.LuckPermsService; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationUtils.java b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationUtils.java index 8320d1d74..f3f0b8679 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationUtils.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/migration/MigrationUtils.java @@ -26,7 +26,7 @@ import lombok.experimental.UtilityClass; import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.core.NodeBuilder; import me.lucko.luckperms.common.core.NodeFactory; -import me.lucko.luckperms.common.core.PermissionHolder; +import me.lucko.luckperms.common.core.model.PermissionHolder; import me.lucko.luckperms.common.utils.ExtractedContexts; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.sponge.service.LuckPermsService; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsGroupSubject.java b/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsGroupSubject.java index 0673c78ca..5f1c3cdc8 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsGroupSubject.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsGroupSubject.java @@ -30,7 +30,7 @@ import lombok.Getter; import me.lucko.luckperms.api.LocalizedNode; import me.lucko.luckperms.api.Node; import me.lucko.luckperms.api.context.ContextSet; -import me.lucko.luckperms.common.groups.Group; +import me.lucko.luckperms.common.core.model.Group; import me.lucko.luckperms.common.utils.ExtractedContexts; import me.lucko.luckperms.sponge.timings.LPTiming; import org.spongepowered.api.command.CommandSource; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsSubjectData.java b/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsSubjectData.java index 04243baef..d652a5bbd 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsSubjectData.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsSubjectData.java @@ -33,9 +33,9 @@ import me.lucko.luckperms.api.Node; import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.core.NodeBuilder; import me.lucko.luckperms.common.core.NodeFactory; -import me.lucko.luckperms.common.core.PermissionHolder; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.core.model.PermissionHolder; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.exceptions.ObjectAlreadyHasException; import me.lucko.luckperms.exceptions.ObjectLacksException; import me.lucko.luckperms.sponge.timings.LPTiming; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsUserSubject.java b/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsUserSubject.java index 6df07f0e2..19785395b 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsUserSubject.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/service/LuckPermsUserSubject.java @@ -29,7 +29,7 @@ import lombok.EqualsAndHashCode; import lombok.Getter; import me.lucko.luckperms.api.caching.MetaData; import me.lucko.luckperms.api.context.ContextSet; -import me.lucko.luckperms.common.users.User; +import me.lucko.luckperms.common.core.model.User; import me.lucko.luckperms.sponge.timings.LPTiming; import org.spongepowered.api.Sponge; import org.spongepowered.api.command.CommandSource; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/GroupCollection.java b/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/GroupCollection.java index 9cc7faff7..13911d486 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/GroupCollection.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/GroupCollection.java @@ -31,8 +31,8 @@ import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.UncheckedExecutionException; import lombok.NonNull; import me.lucko.luckperms.api.context.ContextSet; -import me.lucko.luckperms.common.groups.Group; -import me.lucko.luckperms.common.groups.GroupManager; +import me.lucko.luckperms.common.core.model.Group; +import me.lucko.luckperms.common.managers.GroupManager; import me.lucko.luckperms.common.utils.ArgumentChecker; import me.lucko.luckperms.common.utils.ImmutableCollectors; import me.lucko.luckperms.sponge.service.LuckPermsGroupSubject; diff --git a/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/UserCollection.java b/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/UserCollection.java index 0453cb50f..ee1462a5e 100644 --- a/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/UserCollection.java +++ b/sponge/src/main/java/me/lucko/luckperms/sponge/service/collections/UserCollection.java @@ -32,9 +32,9 @@ import com.google.common.util.concurrent.UncheckedExecutionException; import lombok.NonNull; import me.lucko.luckperms.api.context.ContextSet; import me.lucko.luckperms.common.commands.utils.Util; -import me.lucko.luckperms.common.users.User; -import me.lucko.luckperms.common.users.UserIdentifier; -import me.lucko.luckperms.common.users.UserManager; +import me.lucko.luckperms.common.core.UserIdentifier; +import me.lucko.luckperms.common.core.model.User; +import me.lucko.luckperms.common.managers.UserManager; import me.lucko.luckperms.common.utils.ImmutableCollectors; import me.lucko.luckperms.sponge.service.LuckPermsService; import me.lucko.luckperms.sponge.service.LuckPermsUserSubject;