Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package fr.herllox.hsessentials;
- import org.bukkit.entity.Player;
- import org.bukkit.event.EventHandler;
- import org.bukkit.event.Listener;
- import org.bukkit.event.player.PlayerJoinEvent;
- import org.bukkit.plugin.java.JavaPlugin;
- import fr.herllox.commands.AdminCommands;
- import fr.herllox.commands.Commands;
- public class Main extends JavaPlugin implements Listener{
- private Main main;
- @Override
- public void onEnable() {
- getServer().getPluginManager().registerEvents(this, this);
- saveDefaultConfig();
- System.out.println("========================");
- System.out.println("Plugin HSEssentials Start");
- System.out.println("========================");
- getCommand("vanish").setExecutor(new AdminCommands(this));
- getCommand("setspawn").setExecutor(new AdminCommands(this));
- getCommand("spawn").setExecutor(new AdminCommands(this));
- getCommand("gamemode").setExecutor(new AdminCommands(this));
- getCommand("fly").setExecutor(new Commands(this));
- getCommand("msg").setExecutor(new Commands(this));
- getCommand("feed").setExecutor(new Commands(this));
- getCommand("heal").setExecutor(new Commands(this));
- getCommand("ping").setExecutor(new Commands(this));
- getCommand("craft").setExecutor(new Commands(this));
- getCommand("enderchest").setExecutor(new Commands(this));
- }
- @EventHandler
- public void OnPlayerJoin(PlayerJoinEvent event) {
- Player player = event.getPlayer();
- event.setJoinMessage(main.getConfig().getString("Messages.JoinMessage") +player.getName());
- }
- public void onDisable() {
- System.out.println("========================");
- System.out.println("Plugin HSEssentials Stop");
- System.out.println("========================");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement