Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.maxl.warp.main;
- import java.io.File;
- import java.io.IOException;
- import org.bukkit.configuration.file.FileConfiguration;
- import org.bukkit.configuration.file.YamlConfiguration;
- import org.bukkit.plugin.java.JavaPlugin;
- import me.maxl.warp.commands.CMD_delWarp;
- import me.maxl.warp.commands.CMD_setWarp;
- import me.maxl.warp.commands.CMD_warp;
- public class Warp extends JavaPlugin {
- public File ordner = new File("plugins/Warpsystem");
- public File file = new File(ordner, "warps.yml");
- public FileConfiguration cfg = YamlConfiguration.loadConfiguration(file);
- @Override
- public void onEnable() {
- if(!file.exists()){
- try {
- file.createNewFile();
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- if(!ordner.exists()){
- ordner.mkdir();
- }
- getCommand("setWarp").setExecutor(new CMD_setWarp(this));
- getCommand("delWarp").setExecutor(new CMD_delWarp(this));
- getCommand("warp").setExecutor(new CMD_warp(this));
- System.out.println("[Warp] geladen!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment