Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.hibba.plugin;
- import org.bukkit.event.Listener;
- import org.bukkit.plugin.PluginManager;
- import org.bukkit.plugin.java.JavaPlugin;
- import commands.captcha;
- import commands.clear;
- import commands.adminsword;
- import commands.menu;
- import commands.spawn;
- import commands.staff;
- import event.block.BlockBreak;
- import event.inventory.InventoryClick;
- import event.player.PlayerChat;
- import event.player.PlayerJoin;
- public class Plugin extends JavaPlugin implements Listener {
- public void onEnable() {
- registerCommands();
- registerEvents();
- registerConfig();
- }
- public void onDisable() {
- }
- public void registerCommands() {
- this.getCommand("adminsword").setExecutor(new adminsword());
- this.getCommand("captcha").setExecutor(new captcha());
- this.getCommand("clear").setExecutor(new clear());
- this.getCommand("menu").setExecutor(new menu());
- this.getCommand("spawn").setExecutor(new spawn());
- this.getCommand("staff").setExecutor(new staff(this));
- }
- public void registerEvents() {
- PluginManager pm = getServer().getPluginManager();
- pm.registerEvents(new BlockBreak(), this);
- pm.registerEvents(new PlayerChat(), this);
- pm.registerEvents(new PlayerJoin(this), this);
- pm.registerEvents(new InventoryClick(), this);
- }
- private void registerConfig() {
- getConfig().options().copyDefaults(true);
- saveConfig();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement