Skip to content

Commit

Permalink
chore: annotation newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed Jun 16, 2024
1 parent 7873b78 commit 264da4c
Show file tree
Hide file tree
Showing 42 changed files with 187 additions and 93 deletions.
1 change: 1 addition & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ IndentWidth: 4
TabWidth: 4
UseTab: Never
AllowShortFunctionsOnASingleLine: None
BreakAfterJavaFieldAnnotations: true
BreakBeforeBraces: Attach
ConstructorInitializerAllOnOneLineOrOnePerLine: true
BreakConstructorInitializers: BeforeComma
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
* @author sekwah41
*/
public class Destination implements TagTarget {
@Inject transient TagRegistry tagRegistry;
@Inject
transient TagRegistry tagRegistry;

private PlayerLocation loc;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@
* @author sekwah41
*/
public class AdvancedPortal implements TagTarget {
@Inject private transient TagRegistry tagRegistry;
@Inject
private transient TagRegistry tagRegistry;

private BlockLocation maxLoc;

private BlockLocation minLoc;

private final HashMap<String, String[]> 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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public class SubCommandRegistry {
*/
protected ArrayList<String> subCommands = new ArrayList<>();

@Inject private InfoLogger infoLogger;
@Inject
private InfoLogger infoLogger;

/**
* @param arg argument needed to activate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
* @author sekwah41
*/
public class TagRegistry {
@Inject AdvancedPortalsCore portalsCore;
@Inject
AdvancedPortalsCore portalsCore;

private final ArrayList<String> literalTags = new ArrayList<>();

Expand All @@ -22,7 +23,8 @@ public class TagRegistry {
private final Map<String, Tag.Creation> creationTags = new HashMap<>();
private final Map<String, Tag.TagStatus> statusTags = new HashMap<>();

@Inject private AdvancedPortalsCore pluginCore;
@Inject
private AdvancedPortalsCore pluginCore;

/**
* Portals to trigger when a portal is activated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@
public class WarpEffectRegistry {
private Map<String, WarpEffect> warpEffects = new HashMap();

@Inject private AdvancedPortalsCore portalsCore;
@Inject
private AdvancedPortalsCore portalsCore;

@Inject private InfoLogger infoLogger;
@Inject
private InfoLogger infoLogger;

/**
* Register a new warp effect.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Loading

0 comments on commit 264da4c

Please sign in to comment.