Skip to content

Commit 61bf5b8

Browse files
Create Tutorial
1 parent b7e7226 commit 61bf5b8

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

‎Episode_14/Episode_15/Tutorial‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package me.dabuseck.Tutorial;
2+
3+
import org.bukkit.event.Listener;
4+
import org.bukkit.plugin.java.JavaPlugin;
5+
6+
import me.dabuseck.Tutorial.Events.EventsClass;
7+
import net.md_5.bungee.api.ChatColor;
8+
9+
public class Tutorial extends JavaPlugin implements Listener {
10+
11+
public void onEnable() {
12+
13+
Commands commands = new Commands();
14+
15+
getCommand(commands.cmd1).setExecutor(commands);
16+
getCommand(commands.cmd2).setExecutor(commands);
17+
18+
19+
getServer().getConsoleSender().sendMessage(ChatColor.GREEN + "\n\nTutorial has been Enabled\n\n");
20+
getServer().getPluginManager().registerEvents(new EventsClass(), this);
21+
loadConfig();
22+
}
23+
24+
public void onDisable() {
25+
getServer().getConsoleSender().sendMessage(ChatColor.RED + "\n\nTutorial has been Disabled\n\n");
26+
}
27+
28+
public void loadConfig() {
29+
getConfig().options().copyDefaults(true);
30+
saveConfig();
31+
}
32+
33+
}

0 commit comments

Comments
 (0)