This commit is contained in:
Simon
2018-11-30 16:35:58 -05:00
parent 6c7a2f0a73
commit de45eb1827
10 changed files with 130 additions and 47 deletions

View File

@@ -14,14 +14,10 @@ public class BiomassPlugin extends ServerPlugin {
@Override
public void init(ServerConfiguration config, GameRegistry registry) {
listeners.add(new WorldCreationListener());
listeners.add(new WorldUpdateListener(config));
if (registry.isGameObjectRegistered("net.simon987.npcplugin.HarvesterNPC")) {
listeners.add(new ObjectDeathListener(config));
} else {
LogManager.LOGGER.severe("(BiomassPlugin) NPC plugin is not loaded so biomass will not spawn on death of HarvesterNPC");
}
listeners.add(new ObjectDeathListener(config));
registry.registerGameObject(BiomassBlob.class);
registry.registerItem(ItemBiomass.ID, ItemBiomass.class);

View File

@@ -19,7 +19,6 @@ public class ObjectDeathListener implements GameEventListener {
public ObjectDeathListener(ServerConfiguration config) {
biomassDropCount = config.getInt("harvester_biomass_drop_count");
}
@Override

View File

@@ -1,3 +1,4 @@
classpath=net.simon987.biomassplugin.BiomassPlugin
name=Biomass Plugin
version=1.0
version=1.0
depend=NPC Plugin