Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.Jonas.fly;
- import org.bukkit.Bukkit;
- import org.bukkit.command.Command;
- import org.bukkit.command.CommandSender;
- import org.bukkit.entity.Player;
- import org.bukkit.plugin.PluginManager;
- import org.bukkit.plugin.java.JavaPlugin;
- import Commands.fly;
- import Commands.gamemode;
- import Commands.heal;
- import Commands.waffe;
- import Commands.waffenliste;
- import Listener.JoinListener;
- import Listener.Waffen;
- public class main extends JavaPlugin{
- public static String fly = "fly.use";
- public static String gm = "fly.gamemode";
- String world = getConfig().getString("Config.world");
- String world2 = getConfig().getString("Config.world2");
- public static String fehler = "§cBenutze </fly> <on|off|author>!";
- @Override
- public void onEnable() {
- loadConfig();
- getCommand("fly").setExecutor(new fly());
- getCommand("gma").setExecutor(new gamemode());
- getCommand("gmc").setExecutor(new gamemode());
- getCommand("gms").setExecutor(new gamemode());
- getCommand("waffe").setExecutor(new waffe());
- getCommand("waffenliste").setExecutor(new waffenliste());
- getCommand("heal").setExecutor(new heal());
- PluginManager pm = this.getServer().getPluginManager();
- pm.registerEvents(new Waffen(), this);
- pm.registerEvents(new JoinListener(), this);
- System.out.println("[FLY] wurde erfolgreich gestartet");
- }
- @Override
- public void onDisable() {
- System.out.println("[FLY] wurde erfolgreich gestoppt");
- }
- public void loadConfig() {
- getConfig().options().copyDefaults(true);
- saveConfig();
- }
- @Override
- public boolean onCommand(CommandSender s, Command c, String label, String[] args) {
- Player p = (Player) s;
- if(c.getName().equalsIgnoreCase("hub")) {
- p.teleport(Bukkit.getWorld(world).getSpawnLocation());
- p.sendMessage("§cDu bist nun am Spawn");
- }
- if(c.getName().equalsIgnoreCase("ffa")) {
- p.teleport(Bukkit.getWorld(world2).getSpawnLocation());
- p.sendMessage("§cDu bist nun bei FFA");
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement