9
0
mirror of https://github.com/HibiscusMC/HMCCosmetics.git synced 2025-12-27 02:49:08 +00:00

Removed imports

This commit is contained in:
Fisher2911
2022-03-12 15:23:33 -05:00
parent 844e7c852f
commit 2beadca574
2 changed files with 12 additions and 16 deletions

View File

@@ -5,7 +5,6 @@ import io.github.fisher2911.hmccosmetics.concurrent.Threads;
import io.github.fisher2911.hmccosmetics.config.Settings;
import io.github.fisher2911.hmccosmetics.database.Database;
import io.github.fisher2911.hmccosmetics.gui.ArmorItem;
import io.github.fisher2911.hmccosmetics.hook.Hook;
import io.github.fisher2911.hmccosmetics.task.InfiniteTask;
import io.github.fisher2911.hmccosmetics.user.NPCUser;
import net.citizensnpcs.api.CitizensAPI;
@@ -75,20 +74,18 @@ public class CitizensHook implements Hook, Listener {
if (npc == null) return false;
final NPCUser user = this.npcs.get(npc.getId());
if (user == null) {
Threads.getInstance().execute(() -> {
this.database.loadNPCUser(
npc.getId(),
npc.getEntity(),
npcUser ->
Bukkit.getScheduler().runTask(
this.plugin,
() -> {
this.npcs.put(npc.getId(), npcUser);
this.setNpcCosmetic(npcUser, armorItem);
}
)
);
});
Threads.getInstance().execute(() -> this.database.loadNPCUser(
npc.getId(),
npc.getEntity(),
npcUser ->
Bukkit.getScheduler().runTask(
this.plugin,
() -> {
this.npcs.put(npc.getId(), npcUser);
this.setNpcCosmetic(npcUser, armorItem);
}
)
));
return true;
}
return this.setNpcCosmetic(user, armorItem);

View File

@@ -27,7 +27,6 @@ import org.jetbrains.annotations.Nullable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;