Skip to content

Instantly share code, notes, and snippets.

@azenla
Last active December 21, 2015 20:29
Show Gist options
  • Save azenla/6361378 to your computer and use it in GitHub Desktop.
Save azenla/6361378 to your computer and use it in GitHub Desktop.
New Annotation Based Plugins
package com.github.kaendfinger.tpsigns;
import org.minetweak.plugins.Plugin;
import org.minetweak.plugins.PluginInfo;
import org.minetweak.plugins.event.PluginEnableEvent;
import org.minetweak.util.TweakLogger;
@Plugin
public class TPSigns {
@Plugin.Instance
public static TPSigns instance;
@Plugin.Logger
public static TweakLogger logger;
@Plugin.Info
public PluginInfo pluginInfo;
@Plugin.Handler
public void onEnable(PluginEnableEvent event) {
logger.info("Successfully Enabled TPSigns by " + pluginInfo.getAuthor());
event.registerListener(new SignListener());
event.registerCommand("warp", new CommandWarp());
event.registerCommand("setwarp", new CommandSetWarp());
WarpManager.load();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment