mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Add in a console command handler so you can access the command console
This commit is contained in:
1 parent
1ec797cddb
commit
b0774b89c7
7 files changed
+115
-1
No files matched your search
@@ -15,13 +15,14 @@ package net.minecraft.src;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import cpw.mods.fml.common.IConsoleHandler;
|
||||
import cpw.mods.fml.common.ICraftingHandler;
|
||||
import cpw.mods.fml.common.IDispenseHandler;
|
||||
import cpw.mods.fml.common.INetworkHandler;
|
||||
import cpw.mods.fml.common.IPickupNotifier;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDispenseHandler, ICraftingHandler, INetworkHandler
|
||||
public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDispenseHandler, ICraftingHandler, INetworkHandler, IConsoleHandler
|
||||
{
|
||||
// CALLBACK MECHANISMS
|
||||
@Override
|
||||
@@ -82,6 +83,20 @@ public abstract class BaseMod implements IWorldGenerator, IPickupNotifier, IDisp
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean handleCommand(String command)
|
||||
{
|
||||
return onServerCommand(command);
|
||||
}
|
||||
/**
|
||||
* @param command
|
||||
* @return
|
||||
*/
|
||||
private boolean onServerCommand(String command)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// BASEMOD API
|
||||
/**
|
||||
* Override if you wish to provide a fuel item for the furnace and return the fuel value of the item
|
||||
|
||||
Reference in new issue
Block a user