Skip to content

Instantly share code, notes, and snippets.

@nathggns
Created October 8, 2011 21:14
Show Gist options
  • Select an option

  • Save nathggns/1272885 to your computer and use it in GitHub Desktop.

Select an option

Save nathggns/1272885 to your computer and use it in GitHub Desktop.
/* Created by Nathaniel Higgins - http://nath.is */
package net.minecraft.src;
import java.io.*;
import net.lahwran.obf.Packet3EventChat;
import net.lahwran.ChatCommandEvent;
import net.lahwran.fevents.Order;
public class mod_TuneCraft extends BaseMod
{
public mod_TuneCraft()
{
Packet3EventChat.register();
ChatCommandEvent.getHandlers("np").register(new TuneCraft_Event_np(this), Order.Default);
}
public String Version()
{
return "1.8.1";
}
}
/* Created by Nathaniel Higgins - http://nath.is */
package net.minecraft.src;
import net.lahwran.ChatCommandEvent;
import net.lahwran.fevents.Listener;
public class TuneCraft_Event_np implements Listener<ChatCommandEvent>
{
private final mod_TuneCraft tuneCraft;
public TuneCraft_Event_np(mod_TuneCraft tuneCraft)
{
this.tuneCraft = tuneCraft;
}
public void onEvent(ChatCommandEvent event)
{
System.err.println("Command ran " + event.command);
for (int i = 0; i<event.args.length; i++)
{
System.err.println("arg: " + event.args[i]);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment