Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Mar 7, 2023
1 parent b02a3d8 commit a29e7cb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
12 changes: 0 additions & 12 deletions main/src/main/java/net/citizensnpcs/Citizens.java
Expand Up @@ -70,7 +70,6 @@
import net.citizensnpcs.commands.TraitCommands;
import net.citizensnpcs.commands.WaypointCommands;
import net.citizensnpcs.editor.Editor;
import net.citizensnpcs.model.ModelRegistry;
import net.citizensnpcs.npc.CitizensNPCRegistry;
import net.citizensnpcs.npc.CitizensTraitFactory;
import net.citizensnpcs.npc.NPCSelector;
Expand All @@ -94,7 +93,6 @@ public class Citizens extends JavaPlugin implements CitizensPlugin {
private Settings config;
private boolean enabled;
private LocationLookup locationLookup;
private ModelRegistry modelRegistry;
private final NMSHelper nmsHelper = new NMSHelper() {
private boolean SUPPORT_OWNER_PROFILE = true;

Expand Down Expand Up @@ -247,10 +245,6 @@ public LocationLookup getLocationLookup() {
return locationLookup;
}

public ModelRegistry getModelRegistry() {
return modelRegistry;
}

@Override
public NPCRegistry getNamedNPCRegistry(String name) {
if (name.equals(npcRegistry.getName()))
Expand Down Expand Up @@ -390,7 +384,6 @@ public void onDisable() {
Editor.leaveAll();
despawnNPCs(saveOnDisable);
HandlerList.unregisterAll(this);
modelRegistry.reset();
npcRegistry = null;
locationLookup = null;
enabled = false;
Expand Down Expand Up @@ -443,7 +436,6 @@ public void onEnable() {
return new ShopTrait(shops);
}));
selector = new NPCSelector(this);
modelRegistry = new ModelRegistry();

Bukkit.getPluginManager().registerEvents(new EventListen(storedRegistries), this);
Bukkit.getPluginManager().registerEvents(new Placeholders(), this);
Expand Down Expand Up @@ -517,12 +509,9 @@ public void reload() throws NPCLoadException {
despawnNPCs(false);
ProfileFetcher.reset();
Skin.clearCache();
modelRegistry.reset();

getServer().getPluginManager().callEvent(new CitizensPreReloadEvent());

modelRegistry.load(new File(Setting.RESOURCE_PACK_PATH.asString()), new File(getDataFolder(), "models"));

saves.reloadFromSource();
saves.loadInto(npcRegistry);

Expand Down Expand Up @@ -628,7 +617,6 @@ public void storeNPCs(boolean async) {
private class CitizensLoadTask implements Runnable {
@Override
public void run() {
modelRegistry.load(new File(Setting.RESOURCE_PACK_PATH.asString()), new File(getDataFolder(), "models"));
saves.loadInto(npcRegistry);
shops.load();

Expand Down
Expand Up @@ -20,7 +20,6 @@
import net.citizensnpcs.api.trait.trait.PlayerFilter;
import net.citizensnpcs.api.trait.trait.Spawned;
import net.citizensnpcs.api.trait.trait.Speech;
import net.citizensnpcs.model.ModelTrait;
import net.citizensnpcs.trait.Age;
import net.citizensnpcs.trait.Anchors;
import net.citizensnpcs.trait.ArmorStandTrait;
Expand Down Expand Up @@ -91,7 +90,6 @@ public CitizensTraitFactory(Citizens plugin) {
registerTrait(TraitInfo.create(Inventory.class));
registerTrait(TraitInfo.create(LookClose.class));
registerTrait(TraitInfo.create(MirrorTrait.class));
registerTrait(TraitInfo.create(ModelTrait.class).withSupplier(() -> new ModelTrait(plugin.getModelRegistry())));
registerTrait(TraitInfo.create(MountTrait.class));
registerTrait(TraitInfo.create(MobType.class).asDefaultTrait());
registerTrait(TraitInfo.create(OcelotModifiers.class));
Expand Down

0 comments on commit a29e7cb

Please sign in to comment.