I have a error with my plugin and I dont know how to fix it This is my plugin info package me.VoidNation.Tutorial; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.java.JavaPlugin; public class Main extends JavaPlugin { public void onEnable() { getLogger.info("Plugin Made By crazyface2000"); } public void onDisable() { getLogger.info("Plugin Disabled"); } public boolean onCommand(CommandSender sender, Command cmd, String[] args) { if(sender instanceof Player){ Player player = (Player) sender; if(cmd.getName().equalsIgnoreCase("hub")){ String hub = "spawn " + player.getName(); Bukkit.dispatchCommand(Bukkit.getConsoleSender(), hub); player.sendMessage(ChatColor.DARK_BLUE + "You have been Teleported"); } } return false; } } And this is my plugin.yml name: Tutorial author: Crazyface2000 version: 1 description: Allows User to Teleport To Spawn via /hub main: me.VoidNation.Tutorial.Main commands: hub: description: Teleports User to spawn What have I done wrong?
Firstly please use the syntax blocks, makes it nicer to read!!! Secondly you have an error? is it the plugin doesnt make pancakes? Point is if you have an error, paste the code it tells us whats the problem and where the problem is, with this information we can help you
Crazyface2000 Try to make the player send the console message instead of executing the command through console., And please use the code option provided by bukkit for clean code spacings, and also add on to what NoLiver92 please add a stack trace for more help, We can find where your problem(line) actually exist and we can help you fix it instantly.