From 880ce5300634c98c5e50e11625aad6d9fd698345 Mon Sep 17 00:00:00 2001 From: gravityfox Date: Wed, 14 Sep 2016 03:05:31 -0700 Subject: [PATCH] Auto optimize code. --- .../sponge/foxcore/mod/FCClientNetworkManager.java | 1 - .../foxdenstudio/sponge/foxcore/mod/FoxCoreClientMain.java | 2 -- .../sponge/foxcore/plugin/command/CommandHUD.java | 2 +- .../sponge/foxcore/plugin/command/FCCommandBase.java | 1 - .../sponge/foxcore/plugin/command/FCCommandDispatcher.java | 2 +- .../sponge/foxcore/plugin/state/FCStateManager.java | 2 +- .../sponge/foxcore/plugin/state/SelectionStateField.java | 2 -- .../sponge/foxcore/plugin/state/SourceState.java | 6 +++--- 8 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/main/java/net/foxdenstudio/sponge/foxcore/mod/FCClientNetworkManager.java b/src/main/java/net/foxdenstudio/sponge/foxcore/mod/FCClientNetworkManager.java index 64accc1..48d5039 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxcore/mod/FCClientNetworkManager.java +++ b/src/main/java/net/foxdenstudio/sponge/foxcore/mod/FCClientNetworkManager.java @@ -33,7 +33,6 @@ import io.netty.channel.ChannelInboundHandlerAdapter; import net.foxdenstudio.sponge.foxcore.common.network.IClientPacket; import net.foxdenstudio.sponge.foxcore.common.network.IServerPacketListener; -import net.foxdenstudio.sponge.foxcore.plugin.FCServerNetworkManager; import net.minecraft.network.PacketBuffer; import net.minecraftforge.fml.common.network.ByteBufUtils; import net.minecraftforge.fml.common.network.FMLEmbeddedChannel; diff --git a/src/main/java/net/foxdenstudio/sponge/foxcore/mod/FoxCoreClientMain.java b/src/main/java/net/foxdenstudio/sponge/foxcore/mod/FoxCoreClientMain.java index c65ee05..6811dda 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxcore/mod/FoxCoreClientMain.java +++ b/src/main/java/net/foxdenstudio/sponge/foxcore/mod/FoxCoreClientMain.java @@ -32,10 +32,8 @@ import net.foxdenstudio.sponge.foxcore.mod.render.RenderHandler; import net.minecraft.client.Minecraft; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLLoadCompleteEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; diff --git a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/CommandHUD.java b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/CommandHUD.java index 69739d5..88d94f4 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/CommandHUD.java +++ b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/CommandHUD.java @@ -1,10 +1,10 @@ package net.foxdenstudio.sponge.foxcore.plugin.command; import com.google.common.collect.ImmutableList; +import net.foxdenstudio.sponge.foxcore.common.util.CacheMap; import net.foxdenstudio.sponge.foxcore.plugin.FCConfigManager; import net.foxdenstudio.sponge.foxcore.plugin.command.util.AdvCmdParser; import net.foxdenstudio.sponge.foxcore.plugin.util.Aliases; -import net.foxdenstudio.sponge.foxcore.common.util.CacheMap; import org.spongepowered.api.Sponge; import org.spongepowered.api.command.CommandException; import org.spongepowered.api.command.CommandResult; diff --git a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/FCCommandBase.java b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/FCCommandBase.java index 0ee9fff..ce94532 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/FCCommandBase.java +++ b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/FCCommandBase.java @@ -1,6 +1,5 @@ package net.foxdenstudio.sponge.foxcore.plugin.command; -import com.google.common.collect.ImmutableList; import org.spongepowered.api.command.CommandCallable; import org.spongepowered.api.command.CommandException; import org.spongepowered.api.command.CommandResult; diff --git a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/FCCommandDispatcher.java b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/FCCommandDispatcher.java index 4eb0835..742de65 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/FCCommandDispatcher.java +++ b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/command/FCCommandDispatcher.java @@ -372,7 +372,7 @@ public Text getUsage(CommandSource source) { return build.build(); } - protected class CommandHelp extends FCCommandBase{ + protected class CommandHelp extends FCCommandBase { @Override public CommandResult process(CommandSource source, String arguments) throws CommandException { diff --git a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/FCStateManager.java b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/FCStateManager.java index abd0624..23e4aef 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/FCStateManager.java +++ b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/FCStateManager.java @@ -25,8 +25,8 @@ package net.foxdenstudio.sponge.foxcore.plugin.state; -import net.foxdenstudio.sponge.foxcore.plugin.state.factory.IStateFieldFactory; import net.foxdenstudio.sponge.foxcore.common.util.CacheMap; +import net.foxdenstudio.sponge.foxcore.plugin.state.factory.IStateFieldFactory; import org.spongepowered.api.command.CommandSource; import org.spongepowered.api.util.GuavaCollectors; diff --git a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/SelectionStateField.java b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/SelectionStateField.java index a600351..dbe8153 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/SelectionStateField.java +++ b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/SelectionStateField.java @@ -28,8 +28,6 @@ import com.google.common.collect.ImmutableList; import net.foxdenstudio.sponge.foxcore.plugin.command.util.ProcessResult; import net.foxdenstudio.sponge.foxcore.plugin.selection.ISelection; -import net.foxdenstudio.sponge.foxcore.plugin.state.SourceState; -import net.foxdenstudio.sponge.foxcore.plugin.state.StateFieldBase; import org.spongepowered.api.command.CommandException; import org.spongepowered.api.command.CommandSource; import org.spongepowered.api.text.Text; diff --git a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/SourceState.java b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/SourceState.java index 0af2cfe..c6f2f08 100644 --- a/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/SourceState.java +++ b/src/main/java/net/foxdenstudio/sponge/foxcore/plugin/state/SourceState.java @@ -87,7 +87,7 @@ public Optional getOrCreateFromAlias(String alias) { } else return Optional.empty(); } - public void flush(){ + public void flush() { this.flush(true); } @@ -96,7 +96,7 @@ public void flush(boolean updateScoreboard) { if (updateScoreboard) updateScoreboard(); } - public void flush(String field){ + public void flush(String field) { this.flush(true, field); } @@ -105,7 +105,7 @@ public void flush(boolean updateScoreboard, String field) { if (updateScoreboard) updateScoreboard(); } - public void flush(String... fields){ + public void flush(String... fields) { this.flush(true, fields); }