Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.logging.Logger;
- import org.bukkit.Bukkit;
- import org.bukkit.event.Listener;
- import org.bukkit.plugin.java.JavaPlugin;
- /**
- * Repository for general static methods.
- * @author Hanii Puppy <[email protected]>
- */
- public class SM
- {
- /**
- * Initialises the static methods class, assigning values to variables required.
- * @param plugin The instance of the plugin.
- */
- public static void initialise(JavaPlugin plugin)
- {
- SM.plugin = plugin;
- logger = plugin.getLogger();
- }
- static JavaPlugin plugin;
- static Logger logger;
- /**
- * Gets the instance of the SimpleSplegg plugin.
- * @return The Simple Splegg plugin.
- */
- public static JavaPlugin getPlugin()
- { return plugin; }
- /**
- * Registers a listener.
- * @param listenertoregister The listener class to register.
- */
- public static void registerListener(Listener listenertoregister)
- { Bukkit.getPluginManager().registerEvents(listenertoregister, plugin); }
- /**
- * Prints a message to the console.
- * @param message The message to print.
- */
- public static void print(String message)
- { logger.info(message); }
- }
Advertisement
Add Comment
Please, Sign In to add comment