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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1673 by torben, Fri Dec 23 10:27:05 2011 UTC revision 1674 by torben, Fri Dec 23 10:29:00 2011 UTC
# Line 20  public class GcCommand implements Comman Line 20  public class GcCommand implements Comman
20          public boolean onCommand(final CommandSender sender, Command command, String label, String[] args) {          public boolean onCommand(final CommandSender sender, Command command, String label, String[] args) {
21                                    
22                  if ( sender instanceof Player) {                                          if ( sender instanceof Player) {                        
23                          sender.sendMessage("gc can only be called from console!");                          if ( ! sender.isOp() ) {
24                          return false;                                  sender.sendMessage("gc can only be called from console - or by a server operator");
25                                    return false;
26                            }
27                  }                  }
28                                    
29                  System.gc();                  System.gc();

Legend:
Removed from v.1673  
changed lines
  Added in v.1674

  ViewVC Help
Powered by ViewVC 1.1.20