package dk.thoerup.bukkit.waterworld; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.command.Command; import org.bukkit.command.CommandExecutor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; public class WaterTeleportCommand implements CommandExecutor { @Override public boolean onCommand(final CommandSender sender, Command command, String label, String[] args) { if (!(sender instanceof Player)) { // it's not a console command return false; } Player p = (Player) sender; if (!p.hasPermission("waterworld.tp") ) { p.sendMessage("You don't have permission to TP directly into WaterWorld"); return true; } World water = sender.getServer().getWorld("world_water"); Location dest = new Location(water, 0, 65,0); p.teleport( dest ); return true; } }