From 264da4caa55258c48b97db7cf573110da2af73aa Mon Sep 17 00:00:00 2001 From: Sekwah Date: Sun, 16 Jun 2024 05:00:32 +0100 Subject: [PATCH] chore: annotation newlines --- .clang-format | 1 + .../core/AdvancedPortalsCore.java | 24 ++++++++++++------- .../advancedportals/core/CoreListeners.java | 12 ++++++---- .../desti/CreateDestiSubCommand.java | 6 +++-- .../desti/ListDestiSubCommand.java | 3 ++- .../desti/RemoveDestiSubCommand.java | 3 ++- .../desti/ShowDestiSubCommand.java | 18 +++++++++----- .../desti/TeleportDestiSubCommand.java | 3 ++- .../portal/CreatePortalSubCommand.java | 12 ++++++---- .../portal/EndGatewayBlockSubCommand.java | 3 ++- .../portal/EndPortalBlockSubCommand.java | 3 ++- .../portal/LangUpdateSubCommand.java | 6 +++-- .../portal/ListPortalsSubCommand.java | 3 ++- .../portal/PortalBlockSubCommand.java | 3 ++- .../portal/ReloadPortalSubCommand.java | 12 ++++++---- .../portal/RemovePortalSubCommand.java | 3 ++- .../portal/SelectorSubCommand.java | 6 +++-- .../portal/ShowPortalSubCommand.java | 18 +++++++++----- .../core/destination/Destination.java | 3 ++- .../core/portal/AdvancedPortal.java | 9 ++++--- .../core/registry/SubCommandRegistry.java | 3 ++- .../core/registry/TagRegistry.java | 6 +++-- .../core/registry/WarpEffectRegistry.java | 6 +++-- .../impl/DestinationRepositoryImpl.java | 3 ++- .../impl/PlayerDataRepositoryImpl.java | 3 ++- .../repository/impl/PortalRepositoryImpl.java | 3 ++- .../core/serializeddata/DataStorage.java | 6 +++-- .../serializeddata/ReflectiveConstructor.java | 3 ++- .../core/services/DestinationServices.java | 6 +++-- .../core/services/PlayerDataServices.java | 6 +++-- .../core/services/PortalServices.java | 12 ++++++---- .../core/tags/activation/CooldownTag.java | 9 ++++--- .../core/tags/activation/DestiTag.java | 6 +++-- .../core/tags/activation/PermissionTag.java | 9 ++++--- .../core/tags/activation/TriggerBlockTag.java | 3 ++- .../advancedportals/core/util/Lang.java | 6 +++-- .../advancedportals/core/warphandler/Tag.java | 12 ++++++---- .../advancedportals/spigot/Listeners.java | 9 ++++--- .../portal/UpdatePortalSubCommand.java | 9 ++++--- .../container/SpigotEntityContainer.java | 3 ++- .../container/SpigotPlayerContainer.java | 3 ++- .../spigot/warpeffects/SpigotWarpEffects.java | 3 ++- 42 files changed, 187 insertions(+), 93 deletions(-) diff --git a/.clang-format b/.clang-format index 5ed80b3f..983bb854 100644 --- a/.clang-format +++ b/.clang-format @@ -3,6 +3,7 @@ IndentWidth: 4 TabWidth: 4 UseTab: Never AllowShortFunctionsOnASingleLine: None +BreakAfterJavaFieldAnnotations: true BreakBeforeBraces: Attach ConstructorInitializerAllOnOneLineOrOnePerLine: true BreakConstructorInitializers: BeforeComma diff --git a/core/src/main/java/com/sekwah/advancedportals/core/AdvancedPortalsCore.java b/core/src/main/java/com/sekwah/advancedportals/core/AdvancedPortalsCore.java index c02bd713..3bbd8c62 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/AdvancedPortalsCore.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/AdvancedPortalsCore.java @@ -41,25 +41,33 @@ public class AdvancedPortalsCore { private static AdvancedPortalsCore instance; - @Inject private CommandRegister commandRegister; + @Inject + private CommandRegister commandRegister; private CommandWithSubCommands portalCommand; private CommandWithSubCommands destiCommand; - @Inject private ConfigRepository configRepository; + @Inject + private ConfigRepository configRepository; - @Inject private TagRegistry tagRegistry; + @Inject + private TagRegistry tagRegistry; - @Inject private PortalServices portalServices; + @Inject + private PortalServices portalServices; - @Inject private DestinationServices destinationServices; + @Inject + private DestinationServices destinationServices; - @Inject private PlayerDataServices playerDataRepository; + @Inject + private PlayerDataServices playerDataRepository; - @Inject private GameScheduler gameScheduler; + @Inject + private GameScheduler gameScheduler; // TEMP REMOVE THIS THIS IS JUST FOR DEV - @Inject private IPlayerDataRepository tempDataRepository; + @Inject + private IPlayerDataRepository tempDataRepository; public AdvancedPortalsCore(String mcVersion, File dataStorageLoc, InfoLogger infoLogger, diff --git a/core/src/main/java/com/sekwah/advancedportals/core/CoreListeners.java b/core/src/main/java/com/sekwah/advancedportals/core/CoreListeners.java index d2820f81..a3951bc6 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/CoreListeners.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/CoreListeners.java @@ -17,13 +17,17 @@ import java.util.Objects; public class CoreListeners { - @Inject private PlayerDataServices playerDataServices; + @Inject + private PlayerDataServices playerDataServices; - @Inject private PortalServices portalServices; + @Inject + private PortalServices portalServices; - @Inject private ConfigRepository configRepository; + @Inject + private ConfigRepository configRepository; - @Inject private GameScheduler gameScheduler; + @Inject + private GameScheduler gameScheduler; public void playerJoin(PlayerContainer player) { this.playerDataServices.setJoinCooldown(player); diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/CreateDestiSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/CreateDestiSubCommand.java index 0c1c9100..2033774b 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/CreateDestiSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/CreateDestiSubCommand.java @@ -17,9 +17,11 @@ import java.util.List; public class CreateDestiSubCommand extends CreateTaggedSubCommand { - @Inject TagRegistry tagRegistry; + @Inject + TagRegistry tagRegistry; - @Inject DestinationServices destinationServices; + @Inject + DestinationServices destinationServices; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/ListDestiSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/ListDestiSubCommand.java index be01d981..64900ec5 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/ListDestiSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/ListDestiSubCommand.java @@ -9,7 +9,8 @@ import java.util.stream.Collectors; public class ListDestiSubCommand implements SubCommand { - @Inject DestinationServices portalServices; + @Inject + DestinationServices portalServices; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/RemoveDestiSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/RemoveDestiSubCommand.java index b1c73093..ea5eac68 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/RemoveDestiSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/RemoveDestiSubCommand.java @@ -10,7 +10,8 @@ import java.util.List; public class RemoveDestiSubCommand implements SubCommand { - @Inject DestinationServices destinationServices; + @Inject + DestinationServices destinationServices; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/ShowDestiSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/ShowDestiSubCommand.java index 6fe0abe9..47af562d 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/ShowDestiSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/ShowDestiSubCommand.java @@ -23,17 +23,23 @@ */ public class ShowDestiSubCommand implements SubCommand, SubCommand.SubCommandOnInit { - @Inject PlayerDataServices tempDataServices; + @Inject + PlayerDataServices tempDataServices; - @Inject GameScheduler gameScheduler; + @Inject + GameScheduler gameScheduler; - @Inject AdvancedPortalsCore core; + @Inject + AdvancedPortalsCore core; - @Inject DestinationServices destinationServices; + @Inject + DestinationServices destinationServices; - @Inject ServerContainer serverContainer; + @Inject + ServerContainer serverContainer; - @Inject ConfigRepository config; + @Inject + ConfigRepository config; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/TeleportDestiSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/TeleportDestiSubCommand.java index 4b03feaa..26865bc4 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/TeleportDestiSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/desti/TeleportDestiSubCommand.java @@ -10,7 +10,8 @@ import java.util.List; public class TeleportDestiSubCommand implements SubCommand { - @Inject DestinationServices destinationServices; + @Inject + DestinationServices destinationServices; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/CreatePortalSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/CreatePortalSubCommand.java index d44ad663..762ff4f8 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/CreatePortalSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/CreatePortalSubCommand.java @@ -21,13 +21,17 @@ import java.util.List; public class CreatePortalSubCommand extends CreateTaggedSubCommand { - @Inject PortalServices portalServices; + @Inject + PortalServices portalServices; - @Inject TagRegistry tagRegistry; + @Inject + TagRegistry tagRegistry; - @Inject InfoLogger infoLogger; + @Inject + InfoLogger infoLogger; - @Inject ConfigRepository config; + @Inject + ConfigRepository config; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/EndGatewayBlockSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/EndGatewayBlockSubCommand.java index 8aea9f98..35bcde95 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/EndGatewayBlockSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/EndGatewayBlockSubCommand.java @@ -10,7 +10,8 @@ import java.util.List; public class EndGatewayBlockSubCommand implements SubCommand { - @Inject private AdvancedPortalsCore portalsCore; + @Inject + private AdvancedPortalsCore portalsCore; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/EndPortalBlockSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/EndPortalBlockSubCommand.java index 417d6ab6..bc5f570a 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/EndPortalBlockSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/EndPortalBlockSubCommand.java @@ -10,7 +10,8 @@ import java.util.List; public class EndPortalBlockSubCommand implements SubCommand { - @Inject private AdvancedPortalsCore portalsCore; + @Inject + private AdvancedPortalsCore portalsCore; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/LangUpdateSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/LangUpdateSubCommand.java index b4552a69..da54da87 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/LangUpdateSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/LangUpdateSubCommand.java @@ -17,8 +17,10 @@ import java.util.stream.Collectors; public class LangUpdateSubCommand implements SubCommand { - @Inject private AdvancedPortalsCore portalsCore; - @Inject private ConfigRepository configRepository; + @Inject + private AdvancedPortalsCore portalsCore; + @Inject + private ConfigRepository configRepository; public LangUpdateSubCommand() { } diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ListPortalsSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ListPortalsSubCommand.java index bd5a7b48..5cf42175 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ListPortalsSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ListPortalsSubCommand.java @@ -9,7 +9,8 @@ import java.util.stream.Collectors; public class ListPortalsSubCommand implements SubCommand { - @Inject PortalServices portalServices; + @Inject + PortalServices portalServices; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/PortalBlockSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/PortalBlockSubCommand.java index 2706cebd..6a6910c2 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/PortalBlockSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/PortalBlockSubCommand.java @@ -10,7 +10,8 @@ import java.util.List; public class PortalBlockSubCommand implements SubCommand { - @Inject private AdvancedPortalsCore portalsCore; + @Inject + private AdvancedPortalsCore portalsCore; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ReloadPortalSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ReloadPortalSubCommand.java index 4cabb53a..1af83111 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ReloadPortalSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ReloadPortalSubCommand.java @@ -12,13 +12,17 @@ import java.util.List; public class ReloadPortalSubCommand implements SubCommand { - @Inject private AdvancedPortalsCore portalsCore; + @Inject + private AdvancedPortalsCore portalsCore; - @Inject PortalServices portalServices; + @Inject + PortalServices portalServices; - @Inject DestinationServices destinationServices; + @Inject + DestinationServices destinationServices; - @Inject ConfigRepository configRepository; + @Inject + ConfigRepository configRepository; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/RemovePortalSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/RemovePortalSubCommand.java index 4fd0fa83..8e5fc1af 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/RemovePortalSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/RemovePortalSubCommand.java @@ -9,7 +9,8 @@ import java.util.List; public class RemovePortalSubCommand implements SubCommand { - @Inject PortalServices portalServices; + @Inject + PortalServices portalServices; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/SelectorSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/SelectorSubCommand.java index d115d6f2..e4e6bc5f 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/SelectorSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/SelectorSubCommand.java @@ -11,9 +11,11 @@ import java.util.List; public class SelectorSubCommand implements SubCommand { - @Inject private ConfigRepository configRepo; + @Inject + private ConfigRepository configRepo; - @Inject private AdvancedPortalsCore portalsCore; + @Inject + private AdvancedPortalsCore portalsCore; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ShowPortalSubCommand.java b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ShowPortalSubCommand.java index afd41b73..24dceab2 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ShowPortalSubCommand.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/commands/subcommands/portal/ShowPortalSubCommand.java @@ -29,17 +29,23 @@ public class ShowPortalSubCommand boolean alternate_show_trigger = true; - @Inject PlayerDataServices playerDataServices; + @Inject + PlayerDataServices playerDataServices; - @Inject GameScheduler gameScheduler; + @Inject + GameScheduler gameScheduler; - @Inject AdvancedPortalsCore core; + @Inject + AdvancedPortalsCore core; - @Inject ServerContainer serverContainer; + @Inject + ServerContainer serverContainer; - @Inject PortalServices portalServices; + @Inject + PortalServices portalServices; - @Inject ConfigRepository config; + @Inject + ConfigRepository config; final Color POS1_COLOR = new Color(0, 255, 0); final Color POS2_COLOR = new Color(255, 0, 0); diff --git a/core/src/main/java/com/sekwah/advancedportals/core/destination/Destination.java b/core/src/main/java/com/sekwah/advancedportals/core/destination/Destination.java index 8db517f1..0f6cb15a 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/destination/Destination.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/destination/Destination.java @@ -25,7 +25,8 @@ * @author sekwah41 */ public class Destination implements TagTarget { - @Inject transient TagRegistry tagRegistry; + @Inject + transient TagRegistry tagRegistry; private PlayerLocation loc; diff --git a/core/src/main/java/com/sekwah/advancedportals/core/portal/AdvancedPortal.java b/core/src/main/java/com/sekwah/advancedportals/core/portal/AdvancedPortal.java index 67e713bd..02b14b63 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/portal/AdvancedPortal.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/portal/AdvancedPortal.java @@ -19,7 +19,8 @@ * @author sekwah41 */ public class AdvancedPortal implements TagTarget { - @Inject private transient TagRegistry tagRegistry; + @Inject + private transient TagRegistry tagRegistry; private BlockLocation maxLoc; @@ -27,9 +28,11 @@ public class AdvancedPortal implements TagTarget { private final HashMap args = new HashMap<>(); - @Inject private transient PlayerDataServices playerDataServices; + @Inject + private transient PlayerDataServices playerDataServices; - @Inject transient ConfigRepository configRepository; + @Inject + transient ConfigRepository configRepository; public AdvancedPortal() { this.minLoc = new BlockLocation(); diff --git a/core/src/main/java/com/sekwah/advancedportals/core/registry/SubCommandRegistry.java b/core/src/main/java/com/sekwah/advancedportals/core/registry/SubCommandRegistry.java index 578c419c..9ac4f8e6 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/registry/SubCommandRegistry.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/registry/SubCommandRegistry.java @@ -25,7 +25,8 @@ public class SubCommandRegistry { */ protected ArrayList subCommands = new ArrayList<>(); - @Inject private InfoLogger infoLogger; + @Inject + private InfoLogger infoLogger; /** * @param arg argument needed to activate diff --git a/core/src/main/java/com/sekwah/advancedportals/core/registry/TagRegistry.java b/core/src/main/java/com/sekwah/advancedportals/core/registry/TagRegistry.java index 49e9124a..5704ee8e 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/registry/TagRegistry.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/registry/TagRegistry.java @@ -12,7 +12,8 @@ * @author sekwah41 */ public class TagRegistry { - @Inject AdvancedPortalsCore portalsCore; + @Inject + AdvancedPortalsCore portalsCore; private final ArrayList literalTags = new ArrayList<>(); @@ -22,7 +23,8 @@ public class TagRegistry { private final Map creationTags = new HashMap<>(); private final Map statusTags = new HashMap<>(); - @Inject private AdvancedPortalsCore pluginCore; + @Inject + private AdvancedPortalsCore pluginCore; /** * Portals to trigger when a portal is activated diff --git a/core/src/main/java/com/sekwah/advancedportals/core/registry/WarpEffectRegistry.java b/core/src/main/java/com/sekwah/advancedportals/core/registry/WarpEffectRegistry.java index 534c5fe0..3bedae3e 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/registry/WarpEffectRegistry.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/registry/WarpEffectRegistry.java @@ -13,9 +13,11 @@ public class WarpEffectRegistry { private Map warpEffects = new HashMap(); - @Inject private AdvancedPortalsCore portalsCore; + @Inject + private AdvancedPortalsCore portalsCore; - @Inject private InfoLogger infoLogger; + @Inject + private InfoLogger infoLogger; /** * Register a new warp effect. diff --git a/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/DestinationRepositoryImpl.java b/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/DestinationRepositoryImpl.java index 5c4be467..2a40fa3f 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/DestinationRepositoryImpl.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/DestinationRepositoryImpl.java @@ -13,7 +13,8 @@ public class DestinationRepositoryImpl implements IDestinationRepository { private final String fileLocation = "desti/"; - @Inject DataStorage dataStorage; + @Inject + DataStorage dataStorage; @Override public boolean save(String name, Destination destination) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/PlayerDataRepositoryImpl.java b/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/PlayerDataRepositoryImpl.java index a2790d45..2265017c 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/PlayerDataRepositoryImpl.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/PlayerDataRepositoryImpl.java @@ -9,7 +9,8 @@ public class PlayerDataRepositoryImpl implements IPlayerDataRepository { private final String fileLocation = "playerData/"; - @Inject DataStorage dataStorage; + @Inject + DataStorage dataStorage; @Override public boolean save(String name, PlayerData playerData) { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/PortalRepositoryImpl.java b/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/PortalRepositoryImpl.java index 187a8a56..8d55a62e 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/PortalRepositoryImpl.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/repository/impl/PortalRepositoryImpl.java @@ -13,7 +13,8 @@ public class PortalRepositoryImpl implements IPortalRepository { private final String fileLocation = "portals/"; - @Inject DataStorage dataStorage; + @Inject + DataStorage dataStorage; /** * In memory copy of the portal files as they will be accessed every diff --git a/core/src/main/java/com/sekwah/advancedportals/core/serializeddata/DataStorage.java b/core/src/main/java/com/sekwah/advancedportals/core/serializeddata/DataStorage.java index 43a32796..00c5be2d 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/serializeddata/DataStorage.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/serializeddata/DataStorage.java @@ -18,9 +18,11 @@ public class DataStorage { private final File dataFolder; - @Inject private AdvancedPortalsCore portalsCore; + @Inject + private AdvancedPortalsCore portalsCore; - @Inject private InfoLogger infoLogger; + @Inject + private InfoLogger infoLogger; public DataStorage(File dataStorageLoc) { this.dataFolder = dataStorageLoc; diff --git a/core/src/main/java/com/sekwah/advancedportals/core/serializeddata/ReflectiveConstructor.java b/core/src/main/java/com/sekwah/advancedportals/core/serializeddata/ReflectiveConstructor.java index a9678feb..f4c51bc6 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/serializeddata/ReflectiveConstructor.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/serializeddata/ReflectiveConstructor.java @@ -15,7 +15,8 @@ public class ReflectiveConstructor extends Constructor { private static final Unsafe unsafe = getUnsafe(); private final Class clazz; - @Inject private InfoLogger infoLogger; + @Inject + private InfoLogger infoLogger; public ReflectiveConstructor(Class clazz, LoaderOptions loadingConfig) { super(clazz, loadingConfig); diff --git a/core/src/main/java/com/sekwah/advancedportals/core/services/DestinationServices.java b/core/src/main/java/com/sekwah/advancedportals/core/services/DestinationServices.java index 668a8e2f..759a2668 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/services/DestinationServices.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/services/DestinationServices.java @@ -17,9 +17,11 @@ @Singleton public class DestinationServices { - @Inject private IDestinationRepository destinationRepository; + @Inject + private IDestinationRepository destinationRepository; - @Inject TagRegistry tagRegistry; + @Inject + TagRegistry tagRegistry; private final Map destinationCache = new HashMap<>(); diff --git a/core/src/main/java/com/sekwah/advancedportals/core/services/PlayerDataServices.java b/core/src/main/java/com/sekwah/advancedportals/core/services/PlayerDataServices.java index e275d97a..3236ecda 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/services/PlayerDataServices.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/services/PlayerDataServices.java @@ -19,9 +19,11 @@ public final class PlayerDataServices { */ private Map tempDataMap = new HashMap<>(); - @Inject private IPlayerDataRepository tempDataRepository; + @Inject + private IPlayerDataRepository tempDataRepository; - @Inject private ConfigRepository configRepository; + @Inject + private ConfigRepository configRepository; public PlayerData getPlayerData(PlayerContainer player) { return tempDataMap.computeIfAbsent(player.getUUID(), uuid -> { diff --git a/core/src/main/java/com/sekwah/advancedportals/core/services/PortalServices.java b/core/src/main/java/com/sekwah/advancedportals/core/services/PortalServices.java index 324e2568..0361127d 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/services/PortalServices.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/services/PortalServices.java @@ -19,15 +19,19 @@ @Singleton public class PortalServices { - @Inject private IPortalRepository portalRepository; + @Inject + private IPortalRepository portalRepository; - @Inject private transient PlayerDataServices playerDataServices; + @Inject + private transient PlayerDataServices playerDataServices; - @Inject private ConfigRepository configRepository; + @Inject + private ConfigRepository configRepository; private final Map portalCache = new HashMap<>(); - @Inject TagRegistry tagRegistry; + @Inject + TagRegistry tagRegistry; public void loadPortals() { List portalNames = portalRepository.getAllNames(); diff --git a/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/CooldownTag.java b/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/CooldownTag.java index 574ddb09..f4897ca5 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/CooldownTag.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/CooldownTag.java @@ -18,11 +18,14 @@ import javax.annotation.Nullable; public class CooldownTag implements Tag.Activation, Tag.Creation { - @Inject transient PlayerDataServices playerDataServices; + @Inject + transient PlayerDataServices playerDataServices; - @Inject transient ConfigRepository configRepository; + @Inject + transient ConfigRepository configRepository; - @Inject private InfoLogger infoLogger; + @Inject + private InfoLogger infoLogger; public static String TAG_NAME = "cooldown"; diff --git a/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/DestiTag.java b/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/DestiTag.java index 130abec5..65901520 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/DestiTag.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/DestiTag.java @@ -15,9 +15,11 @@ public class DestiTag implements Tag.Activation, Tag.AutoComplete, Tag.Split { public static String TAG_NAME = "destination"; - @Inject DestinationServices destinationServices; + @Inject + DestinationServices destinationServices; - @Inject WarpEffectRegistry warpEffectRegistry; + @Inject + WarpEffectRegistry warpEffectRegistry; private final TagType[] tagTypes = new TagType[] {TagType.PORTAL}; diff --git a/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/PermissionTag.java b/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/PermissionTag.java index e41bd58d..65cfa6e4 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/PermissionTag.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/PermissionTag.java @@ -12,11 +12,14 @@ import javax.inject.Inject; public class PermissionTag implements Tag.Activation { - @Inject transient PlayerDataServices playerDataServices; + @Inject + transient PlayerDataServices playerDataServices; - @Inject transient ConfigRepository configRepository; + @Inject + transient ConfigRepository configRepository; - @Inject private InfoLogger infoLogger; + @Inject + private InfoLogger infoLogger; public static String TAG_NAME = "permission"; diff --git a/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/TriggerBlockTag.java b/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/TriggerBlockTag.java index 72efee3e..d1d58b8d 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/TriggerBlockTag.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/tags/activation/TriggerBlockTag.java @@ -8,7 +8,8 @@ import javax.annotation.Nullable; public class TriggerBlockTag implements Tag.AutoComplete, Tag.Split { - @Inject private ServerContainer serverContainer; + @Inject + private ServerContainer serverContainer; public static String TAG_NAME = "triggerblock"; diff --git a/core/src/main/java/com/sekwah/advancedportals/core/util/Lang.java b/core/src/main/java/com/sekwah/advancedportals/core/util/Lang.java index bc7869cc..5b184b3f 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/util/Lang.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/util/Lang.java @@ -21,9 +21,11 @@ public class Lang { public static final Lang instance = new Lang(); private final HashMap languageMap = new HashMap<>(); - @Inject private DataStorage dataStorage; + @Inject + private DataStorage dataStorage; - @Inject private InfoLogger infoLogger; + @Inject + private InfoLogger infoLogger; public static final String DEFAULT_LANG = "en_GB"; diff --git a/core/src/main/java/com/sekwah/advancedportals/core/warphandler/Tag.java b/core/src/main/java/com/sekwah/advancedportals/core/warphandler/Tag.java index 94d3a87c..f39344a5 100644 --- a/core/src/main/java/com/sekwah/advancedportals/core/warphandler/Tag.java +++ b/core/src/main/java/com/sekwah/advancedportals/core/warphandler/Tag.java @@ -38,7 +38,8 @@ enum TagType { PORTAL, DESTINATION } String getName(); - @Nullable String[] getAliases(); + @Nullable + String[] getAliases(); String description(); @@ -50,9 +51,11 @@ interface AutoComplete extends Tag { * @param argData * @return */ - @Nullable List autoComplete(String argData); + @Nullable + List autoComplete(String argData); - @Nullable String splitString(); + @Nullable + String splitString(); } interface Split extends Tag { @@ -62,7 +65,8 @@ interface Split extends Tag { * * @return null if the tag does not support splitting */ - @Nullable String splitString(); + @Nullable + String splitString(); } /** diff --git a/spigot/src/main/java/com/sekwah/advancedportals/spigot/Listeners.java b/spigot/src/main/java/com/sekwah/advancedportals/spigot/Listeners.java index 96b8108e..41fefa63 100644 --- a/spigot/src/main/java/com/sekwah/advancedportals/spigot/Listeners.java +++ b/spigot/src/main/java/com/sekwah/advancedportals/spigot/Listeners.java @@ -27,11 +27,14 @@ * others it's easier to just check directly. */ public class Listeners implements Listener { - @Inject private CoreListeners coreListeners; + @Inject + private CoreListeners coreListeners; - @Inject private PortalServices portalServices; + @Inject + private PortalServices portalServices; - @Inject private ConfigRepository configRepository; + @Inject + private ConfigRepository configRepository; // Entity and portal events @EventHandler diff --git a/spigot/src/main/java/com/sekwah/advancedportals/spigot/commands/subcommands/portal/UpdatePortalSubCommand.java b/spigot/src/main/java/com/sekwah/advancedportals/spigot/commands/subcommands/portal/UpdatePortalSubCommand.java index da01a5a3..483d29b0 100644 --- a/spigot/src/main/java/com/sekwah/advancedportals/spigot/commands/subcommands/portal/UpdatePortalSubCommand.java +++ b/spigot/src/main/java/com/sekwah/advancedportals/spigot/commands/subcommands/portal/UpdatePortalSubCommand.java @@ -17,11 +17,14 @@ import org.bukkit.configuration.ConfigurationSection; public class UpdatePortalSubCommand implements SubCommand { - @Inject PortalServices portalServices; + @Inject + PortalServices portalServices; - @Inject DestinationServices destinationServices; + @Inject + DestinationServices destinationServices; - @Inject PortalServices portalService; + @Inject + PortalServices portalService; @Override public void onCommand(CommandSenderContainer sender, String[] args) { diff --git a/spigot/src/main/java/com/sekwah/advancedportals/spigot/connector/container/SpigotEntityContainer.java b/spigot/src/main/java/com/sekwah/advancedportals/spigot/connector/container/SpigotEntityContainer.java index cf8522cc..043eab7a 100644 --- a/spigot/src/main/java/com/sekwah/advancedportals/spigot/connector/container/SpigotEntityContainer.java +++ b/spigot/src/main/java/com/sekwah/advancedportals/spigot/connector/container/SpigotEntityContainer.java @@ -16,7 +16,8 @@ * from a player */ public class SpigotEntityContainer implements EntityContainer { - @Inject private AdvancedPortalsCore portalsCore; + @Inject + private AdvancedPortalsCore portalsCore; private final Entity entity; diff --git a/spigot/src/main/java/com/sekwah/advancedportals/spigot/connector/container/SpigotPlayerContainer.java b/spigot/src/main/java/com/sekwah/advancedportals/spigot/connector/container/SpigotPlayerContainer.java index 208f5909..51fe077c 100644 --- a/spigot/src/main/java/com/sekwah/advancedportals/spigot/connector/container/SpigotPlayerContainer.java +++ b/spigot/src/main/java/com/sekwah/advancedportals/spigot/connector/container/SpigotPlayerContainer.java @@ -22,7 +22,8 @@ */ public class SpigotPlayerContainer extends SpigotEntityContainer implements PlayerContainer { - @Inject private AdvancedPortalsCore portalsCore; + @Inject + private AdvancedPortalsCore portalsCore; private final Player player; diff --git a/spigot/src/main/java/com/sekwah/advancedportals/spigot/warpeffects/SpigotWarpEffects.java b/spigot/src/main/java/com/sekwah/advancedportals/spigot/warpeffects/SpigotWarpEffects.java index 39b519dc..d6534d22 100644 --- a/spigot/src/main/java/com/sekwah/advancedportals/spigot/warpeffects/SpigotWarpEffects.java +++ b/spigot/src/main/java/com/sekwah/advancedportals/spigot/warpeffects/SpigotWarpEffects.java @@ -4,7 +4,8 @@ import javax.inject.Inject; public class SpigotWarpEffects { - @Inject private WarpEffectRegistry warpEffectRegistry; + @Inject + private WarpEffectRegistry warpEffectRegistry; public void registerEffects() { warpEffectRegistry.registerEffect("ender", new EnderWarpEffect());