Skip to content

Commit

Permalink
unroll wildcard imports
Browse files Browse the repository at this point in the history
  • Loading branch information
oh-noey committed Sep 1, 2024
1 parent 61198ab commit f7fd831
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 10 deletions.
40 changes: 33 additions & 7 deletions Movecraft/src/main/java/net/countercraft/movecraft/Movecraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@
package net.countercraft.movecraft;

import net.countercraft.movecraft.async.AsyncManager;
import net.countercraft.movecraft.commands.*;
import net.countercraft.movecraft.commands.CraftInfoCommand;
import net.countercraft.movecraft.commands.CraftReportCommand;
import net.countercraft.movecraft.commands.CraftTypeCommand;
import net.countercraft.movecraft.commands.CruiseCommand;
import net.countercraft.movecraft.commands.ManOverboardCommand;
import net.countercraft.movecraft.commands.MovecraftCommand;
import net.countercraft.movecraft.commands.PilotCommand;
import net.countercraft.movecraft.commands.ReleaseCommand;
import net.countercraft.movecraft.commands.RotateCommand;
import net.countercraft.movecraft.commands.ScuttleCommand;
import net.countercraft.movecraft.config.DataPackService;
import net.countercraft.movecraft.config.Settings;
import net.countercraft.movecraft.config.SettingsService;
Expand All @@ -33,11 +42,29 @@
import net.countercraft.movecraft.lifecycle.ListenerLifecycleService;
import net.countercraft.movecraft.lifecycle.ServiceHost;
import net.countercraft.movecraft.lifecycle.WorkerServiceHost;
import net.countercraft.movecraft.listener.*;
import net.countercraft.movecraft.listener.BlockListener;
import net.countercraft.movecraft.listener.CraftPilotListener;
import net.countercraft.movecraft.listener.CraftReleaseListener;
import net.countercraft.movecraft.listener.InteractListener;
import net.countercraft.movecraft.listener.PlayerListener;
import net.countercraft.movecraft.localisation.I18nSupport;
import net.countercraft.movecraft.mapUpdater.MapUpdateManager;
import net.countercraft.movecraft.processing.WorldManager;
import net.countercraft.movecraft.sign.*;
import net.countercraft.movecraft.sign.AscendSign;
import net.countercraft.movecraft.sign.CraftSign;
import net.countercraft.movecraft.sign.CruiseSign;
import net.countercraft.movecraft.sign.DescendSign;
import net.countercraft.movecraft.sign.HelmSign;
import net.countercraft.movecraft.sign.MoveSign;
import net.countercraft.movecraft.sign.NameSign;
import net.countercraft.movecraft.sign.PilotSign;
import net.countercraft.movecraft.sign.RelativeMoveSign;
import net.countercraft.movecraft.sign.ReleaseSign;
import net.countercraft.movecraft.sign.RemoteSign;
import net.countercraft.movecraft.sign.ScuttleSign;
import net.countercraft.movecraft.sign.SpeedSign;
import net.countercraft.movecraft.sign.SubcraftRotateSign;
import net.countercraft.movecraft.sign.TeleportSign;
import net.countercraft.movecraft.support.SmoothTeleportFactory;
import net.countercraft.movecraft.support.WorldHandlerFactory;
import org.bukkit.plugin.java.JavaPlugin;
Expand All @@ -49,8 +76,6 @@

public class Movecraft extends JavaPlugin {
private static Movecraft instance;

private Logger logger;
private boolean shuttingDown;
private Injector injector;

Expand All @@ -67,8 +92,9 @@ public void onDisable() {

@Override
public void onEnable() {
Logger logger = getLogger();
injector = Injectors.manual();
injector.registerInstance(getLogger());
injector.registerInstance(logger);
injector.registerInstance(this);
injector.register(AsyncManager.class);
injector.register(MapUpdateManager.class);
Expand Down Expand Up @@ -108,6 +134,7 @@ public void onEnable() {
injector.register(PlayerListener.class);
injector.register(ChunkManager.class);

//TODO: Sign rework
getServer().getPluginManager().registerEvents(new AscendSign(), this);
getServer().getPluginManager().registerEvents(new CraftSign(), this);
getServer().getPluginManager().registerEvents(new CruiseSign(), this);
Expand Down Expand Up @@ -147,7 +174,6 @@ public void onEnable() {
public void onLoad() {
super.onLoad();
instance = this;
logger = getLogger();
saveDefaultConfig();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import net.countercraft.movecraft.CruiseDirection;
import net.countercraft.movecraft.Movecraft;
import net.countercraft.movecraft.MovecraftLocation;
import net.countercraft.movecraft.lifecycle.Service;
import net.countercraft.movecraft.async.rotation.RotationTask;
import net.countercraft.movecraft.async.translation.TranslationTask;
import net.countercraft.movecraft.craft.Craft;
Expand All @@ -38,10 +37,15 @@
import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
import org.bukkit.scheduler.BukkitRunnable;
import org.jetbrains.annotations.NotNull;

import java.util.*;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

Expand Down

0 comments on commit f7fd831

Please sign in to comment.