Skip to content

Commit

Permalink
misc: 优化import
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Oct 22, 2023
1 parent 5cd3303 commit 76b9458
Show file tree
Hide file tree
Showing 23 changed files with 12 additions and 61 deletions.
10 changes: 8 additions & 2 deletions src/main/java/xiamomc/morph/MorphManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
import xiamomc.morph.events.api.gameplay.PlayerUnMorphEvent;
import xiamomc.morph.events.api.lifecycle.ManagerFinishedInitializeEvent;
import xiamomc.morph.interfaces.IManagePlayerData;
import xiamomc.morph.messages.*;
import xiamomc.morph.messages.CommandStrings;
import xiamomc.morph.messages.HintStrings;
import xiamomc.morph.messages.MessageUtils;
import xiamomc.morph.messages.MorphStrings;
import xiamomc.morph.messages.vanilla.VanillaMessageStore;
import xiamomc.morph.misc.*;
import xiamomc.morph.misc.permissions.CommonPermissions;
Expand All @@ -38,7 +41,10 @@
import xiamomc.morph.network.commands.S2C.map.S2CPartialMapCommand;
import xiamomc.morph.network.commands.S2C.set.*;
import xiamomc.morph.network.server.MorphClientHandler;
import xiamomc.morph.providers.*;
import xiamomc.morph.providers.DisguiseProvider;
import xiamomc.morph.providers.FallbackProvider;
import xiamomc.morph.providers.PlayerDisguiseProvider;
import xiamomc.morph.providers.VanillaDisguiseProvider;
import xiamomc.morph.skills.MorphSkillHandler;
import xiamomc.morph.skills.SkillCooldownInfo;
import xiamomc.morph.skills.SkillType;
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/xiamomc/morph/MorphPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.kyori.adventure.text.minimessage.MiniMessage;
import org.bstats.bukkit.Metrics;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.event.Listener;
import org.bukkit.plugin.PluginManager;
import org.bukkit.scoreboard.Scoreboard;
Expand All @@ -16,13 +15,11 @@
import xiamomc.morph.interfaces.IManageRequests;
import xiamomc.morph.messages.MessageUtils;
import xiamomc.morph.messages.MorphMessageStore;
import xiamomc.morph.messages.UpdateStrings;
import xiamomc.morph.messages.vanilla.VanillaMessageStore;
import xiamomc.morph.misc.PlayerOperationSimulator;
import xiamomc.morph.misc.UpdateHandler;
import xiamomc.morph.misc.integrations.gsit.GSitCompactProcessor;
import xiamomc.morph.misc.integrations.placeholderapi.PlaceholderIntegration;
import xiamomc.morph.network.modrinthapi.ModrinthVersionResponse;
import xiamomc.morph.network.server.MorphClientHandler;
import xiamomc.morph.skills.MorphSkillHandler;
import xiamomc.morph.storage.skill.SkillAbilityConfigurationStore;
Expand All @@ -31,13 +28,6 @@
import xiamomc.pluginbase.Messages.MessageStore;
import xiamomc.pluginbase.XiaMoJavaPlugin;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;

public final class MorphPlugin extends XiaMoJavaPlugin
{
private static MorphPlugin instance;
Expand Down
8 changes: 0 additions & 8 deletions src/main/java/xiamomc/morph/abilities/impl/FlyAbility.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
package xiamomc.morph.abilities.impl;

import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import net.minecraft.world.phys.Vec3;
import org.bukkit.GameEvent;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.player.PlayerGameModeChangeEvent;
import org.bukkit.event.player.PlayerMoveEvent;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.event.player.PlayerToggleFlightEvent;
import org.jetbrains.annotations.NotNull;
import xiamomc.morph.MorphManager;
import xiamomc.morph.abilities.AbilityType;
Expand All @@ -22,13 +16,11 @@
import xiamomc.morph.config.ConfigOption;
import xiamomc.morph.config.MorphConfigManager;
import xiamomc.morph.misc.DisguiseState;
import xiamomc.morph.utilities.MathUtils;
import xiamomc.pluginbase.Annotations.Initializer;
import xiamomc.pluginbase.Annotations.Resolved;
import xiamomc.pluginbase.Bindables.Bindable;

import java.util.List;
import java.util.Map;

public class FlyAbility extends MorphAbility<FlyOption>
{
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/xiamomc/morph/abilities/impl/SpiderAbility.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
import xiamomc.pluginbase.Annotations.Initializer;
import xiamomc.pluginbase.Bindables.Bindable;

import java.util.List;

public class SpiderAbility extends NoOpOptionAbility
{
private final Bindable<Boolean> modifyBox = new Bindable<>(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import xiamomc.morph.abilities.AbilityType;
import xiamomc.morph.abilities.impl.OnAttackAbility;
import xiamomc.morph.abilities.options.ExtraKnockbackOption;
import xiamomc.morph.misc.DisguiseState;
import xiamomc.pluginbase.Annotations.Resolved;

public class ExtraKnockbackAbility extends OnAttackAbility<ExtraKnockbackOption>
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/xiamomc/morph/backends/DisguiseWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.minecraft.nbt.TagType;
import net.minecraft.world.entity.EntityDimensions;
import net.minecraft.world.phys.AABB;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
Expand All @@ -19,8 +18,6 @@
import xiamomc.morph.misc.DisguiseState;
import xiamomc.morph.utilities.EntityTypeUtils;

import java.util.UUID;

/**
* A wrapper that holds the underlying disguise instance
* @param <T> Type of the disguise instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import xiamomc.pluginbase.Utilities.ColorUtils;

import java.util.Random;
import java.util.UUID;
import java.util.function.BiConsumer;

public class LibsDisguiseWrapper extends DisguiseWrapper<Disguise>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import xiamomc.morph.MorphPlugin;
import xiamomc.morph.MorphPluginObject;
import xiamomc.morph.commands.MorphPluginCommand;
import xiamomc.morph.messages.MessageUtils;
import xiamomc.morph.messages.UpdateStrings;
import xiamomc.morph.misc.UpdateHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import xiamomc.morph.messages.CommonStrings;
import xiamomc.morph.messages.HelpStrings;
import xiamomc.morph.messages.MessageUtils;
import xiamomc.morph.messages.MorphStrings;
import xiamomc.morph.misc.MorphParameters;
import xiamomc.pluginbase.Annotations.Resolved;
import xiamomc.pluginbase.Command.ISubCommand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import net.kyori.adventure.text.Component;
import net.minecraft.server.commands.PlaceCommand;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
import xiamomc.morph.config.ConfigOption;
import xiamomc.morph.config.MorphConfigManager;
import xiamomc.morph.events.api.gameplay.PlayerMorphEarlyEvent;
import xiamomc.morph.events.api.gameplay.PlayerMorphEvent;
import xiamomc.morph.events.api.gameplay.PlayerUnMorphEarlyEvent;
import xiamomc.morph.events.api.gameplay.PlayerUnMorphEvent;
import xiamomc.morph.misc.MorphParameters;
import xiamomc.pluginbase.Annotations.Initializer;
import xiamomc.pluginbase.Annotations.Resolved;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;
import java.util.Stack;
import java.util.concurrent.ConcurrentHashMap;

public class InteractionMirrorProcessor extends MorphPluginObject implements Listener
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/xiamomc/morph/messages/UpdateStrings.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import xiamomc.pluginbase.Messages.FormattableMessage;

import java.text.Format;

public class UpdateStrings extends AbstractMorphStrings
{
public static FormattableMessage messageHeaderFooter()
Expand Down
1 change: 0 additions & 1 deletion src/main/java/xiamomc/morph/misc/DisguiseTypes.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package xiamomc.morph.misc;

import org.bukkit.NamespacedKey;
import xiamomc.morph.MorphManager;

import java.util.Arrays;

Expand Down
11 changes: 0 additions & 11 deletions src/main/java/xiamomc/morph/misc/NilCommandSource.java
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
package xiamomc.morph.misc;

import net.kyori.adventure.identity.Identified;
import net.kyori.adventure.text.Component;
import org.bukkit.Server;
import org.bukkit.command.CommandSender;
import org.bukkit.craftbukkit.v1_20_R2.command.ServerCommandSender;
import org.bukkit.permissions.Permission;
import org.bukkit.permissions.PermissionAttachment;
import org.bukkit.permissions.PermissionAttachmentInfo;
import org.bukkit.plugin.Plugin;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Set;
import java.util.UUID;

public final class NilCommandSource extends ServerCommandSender
{
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/xiamomc/morph/misc/UpdateHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import org.apache.hc.client5.http.config.RequestConfig;
import org.apache.hc.client5.http.impl.classic.CloseableHttpResponse;
import org.apache.hc.client5.http.impl.classic.HttpClients;
import org.apache.hc.core5.http.HttpEntity;
import org.apache.hc.core5.http.HttpResponse;
import org.apache.hc.core5.http.io.entity.EntityUtils;
import org.apache.hc.core5.net.URIBuilder;
import org.bukkit.Bukkit;
Expand All @@ -31,7 +29,6 @@

import java.util.ArrayList;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package xiamomc.morph.network.server;

import io.netty.buffer.Unpooled;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import net.kyori.adventure.text.Component;
Expand All @@ -9,7 +8,6 @@
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
import net.minecraft.resources.ResourceLocation;
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftPlayer;
import org.bukkit.entity.Player;
import org.bukkit.plugin.messaging.MessageTooLargeException;
import org.bukkit.plugin.messaging.Messenger;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.bukkit.scoreboard.Scoreboard;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import xiamomc.morph.MorphManager;
import xiamomc.morph.RevealingHandler;
import xiamomc.morph.abilities.AbilityHandler;
import xiamomc.morph.backends.DisguiseBackend;
Expand All @@ -25,7 +24,6 @@
import xiamomc.morph.network.server.ServerSetEquipCommand;
import xiamomc.morph.skills.MorphSkillHandler;
import xiamomc.morph.skills.SkillType;
import xiamomc.pluginbase.Annotations.Initializer;
import xiamomc.pluginbase.Annotations.Resolved;
import xiamomc.pluginbase.Messages.MessageStore;
import xiamomc.pluginbase.Utilities.ColorUtils;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package xiamomc.morph.skills.impl;

import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.item.alchemy.Potion;
import net.minecraft.world.item.alchemy.PotionUtils;
import net.minecraft.world.item.alchemy.Potions;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/xiamomc/morph/transforms/Recorder.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package xiamomc.morph.transforms;

import java.lang.module.Configuration;
import java.util.function.Consumer;

public class Recorder<T>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import net.minecraft.world.entity.ai.goal.WrappedGoal;
import net.minecraft.world.entity.ai.targeting.TargetingConditions;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.phys.AABB;
import org.bukkit.craftbukkit.v1_20_R2.entity.CraftMob;
import org.bukkit.entity.Entity;
import org.bukkit.entity.EntityType;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/xiamomc/morph/utilities/EntityTypeUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import xiamomc.morph.misc.DisguiseTypes;

import java.util.Arrays;
import java.util.Locale;
import java.util.Map;
import java.util.Set;

Expand Down
1 change: 0 additions & 1 deletion src/main/java/xiamomc/morph/utilities/ReflectionUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.EntityDimensions;
import org.jetbrains.annotations.Nullable;
import xiamomc.pluginbase.Exceptions.NullDependencyException;

import java.lang.reflect.Field;
Expand Down

0 comments on commit 76b9458

Please sign in to comment.