Files
ForestryMC/src/main/java/forestry/plugins/ForestryPlugin.java
T

111 lines
2.5 KiB
Java
Raw Normal View History

2014-05-02 21:31:20 +02:00
/*******************************************************************************
2014-08-07 08:29:25 +02:00
* Copyright (c) 2011-2014 SirSengir.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
2014-08-07 02:56:58 -07:00
* http://www.gnu.org/licenses/lgpl-3.0.txt
2014-05-02 21:31:20 +02:00
*
2014-08-07 08:29:25 +02:00
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
2014-05-02 21:31:20 +02:00
******************************************************************************/
package forestry.plugins;
import cpw.mods.fml.common.IFuelHandler;
2014-05-02 21:31:20 +02:00
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
import cpw.mods.fml.common.network.IGuiHandler;
import forestry.core.interfaces.IOreDictionaryHandler;
import forestry.core.interfaces.IPacketHandler;
import forestry.core.interfaces.IPickupHandler;
import forestry.core.interfaces.IResupplyHandler;
import forestry.core.interfaces.ISaveEventHandler;
import java.util.EnumSet;
2014-12-15 08:15:21 -08:00
import java.util.Random;
import net.minecraft.command.ICommand;
import net.minecraft.world.World;
2014-05-02 21:31:20 +02:00
public abstract class ForestryPlugin {
2014-05-02 21:31:20 +02:00
public boolean isAvailable() {
return true;
2014-05-02 21:31:20 +02:00
}
public String getFailMessage() {
return "";
2014-05-02 21:31:20 +02:00
}
public EnumSet<PluginManager.Module> getDependancies() {
return EnumSet.of(PluginManager.Module.CORE);
}
protected void preInit() {
}
protected void doInit() {
}
protected void postInit() {
}
protected void disabledInit() {
2014-05-02 21:31:20 +02:00
}
public boolean processIMCMessage(IMCMessage message) {
return false;
}
public IGuiHandler getGuiHandler() {
return null;
}
public ISaveEventHandler getSaveEventHandler() {
return null;
}
public IOreDictionaryHandler getDictionaryHandler() {
return null;
}
public void generateSurface(World world, Random rand, int chunkX, int chunkZ) {
}
public IPacketHandler getPacketHandler() {
return null;
}
public IPickupHandler getPickupHandler() {
return null;
}
public IResupplyHandler getResupplyHandler() {
return null;
}
public ICommand[] getConsoleCommands() {
return null;
}
public IFuelHandler getFuelHandler() {
return null;
}
protected void registerItems() {
}
2014-05-02 21:31:20 +02:00
protected void registerBackpackItems() {
}
2014-05-02 21:31:20 +02:00
protected void registerCrates() {
}
2014-05-02 21:31:20 +02:00
protected void registerRecipes() {
}
2014-05-02 21:31:20 +02:00
@Override
public String toString() {
Plugin info = getClass().getAnnotation(Plugin.class);
if (info == null)
return getClass().getSimpleName();
return info.name() + " Plugin";
}
2014-05-02 21:31:20 +02:00
}