package dk.thoerup.bukkit.hoeruputils; import java.io.File; import java.io.IOException; 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; import org.bukkit.plugin.Plugin; import org.bukkit.configuration.Configuration; import org.bukkit.configuration.file.YamlConfiguration; public class GcCommand implements CommandExecutor { @Override public boolean onCommand(final CommandSender sender, Command command, String label, String[] args) { if ( sender instanceof Player) { if ( ! sender.isOp() ) { sender.sendMessage("gc can only be called from console - or by a server operator"); return false; } } System.gc(); sender.sendMessage("ok"); return true; } }