/[projects]/miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/GcCommand.java
ViewVC logotype

Annotation of /miscJava/bukkit-minecraft-plugins/HoerupUtils/src/main/java/dk/thoerup/bukkit/hoeruputils/GcCommand.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1684 - (hide annotations) (download)
Fri Jan 27 12:21:27 2012 UTC (12 years, 4 months ago) by torben
File size: 877 byte(s)
move source to mvn structure
1 torben 1673 package dk.thoerup.bukkit.hoeruputils;
2    
3     import java.io.File;
4     import java.io.IOException;
5    
6     import org.bukkit.ChatColor;
7     import org.bukkit.Location;
8     import org.bukkit.World;
9     import org.bukkit.command.Command;
10     import org.bukkit.command.CommandExecutor;
11     import org.bukkit.command.CommandSender;
12     import org.bukkit.entity.Player;
13     import org.bukkit.plugin.Plugin;
14     import org.bukkit.configuration.Configuration;
15     import org.bukkit.configuration.file.YamlConfiguration;
16    
17     public class GcCommand implements CommandExecutor {
18    
19     @Override
20     public boolean onCommand(final CommandSender sender, Command command, String label, String[] args) {
21    
22     if ( sender instanceof Player) {
23 torben 1674 if ( ! sender.isOp() ) {
24     sender.sendMessage("gc can only be called from console - or by a server operator");
25     return false;
26     }
27 torben 1673 }
28    
29     System.gc();
30     sender.sendMessage("ok");
31     return true;
32     }
33     }

  ViewVC Help
Powered by ViewVC 1.1.20