Permalink
Browse files

Remove commented out plugin_cmd() function that is redundant

  • Loading branch information...
PseudoKnight committed Nov 3, 2017
1 parent bc5913e commit 8833e514db781e922c4971749858c1f4293082da
Showing with 0 additions and 87 deletions.
  1. +0 −87 src/main/java/com/laytonsmith/core/functions/Sandbox.java
@@ -62,93 +62,6 @@ public static String docs() {
+ " likely to have good documentation.";
}
//This broke as of 1.1
// @api
// public static class plugin_cmd extends AbstractFunction {
//
// public String getName() {
// return "plugin_cmd";
// }
//
// public Integer[] numArgs() {
// return new Integer[]{2};
// }
//
// public String docs() {
// return "void {plugin, cmd} ";
// }
//
// public Class<? extends CREThrowable>[] thrown() {
// return null;
// }
//
// public boolean isRestricted() {
// return true;
// }
//
// //
// public boolean preResolveVariables() {
// return true;
// }
//
// public CHVersion since() {
// return "0.0.0";
// }
//
// public Boolean runAsync() {
// return false;
// }
//
// public Construct exec(Target t, Environment env, Construct... args) throws ConfigRuntimeException {
// Object o = AliasCore.parent.getServer().getPluginManager();
// if (o instanceof SimplePluginManager) {
// SimplePluginManager spm = (SimplePluginManager) o;
// try {
// Method m = spm.getClass().getDeclaredMethod("getEventListeners", Event.Type.class);
// m.setAccessible(true);
// SortedSet<RegisteredListener> sl = (SortedSet<RegisteredListener>) m.invoke(spm, Event.Type.SERVER_COMMAND);
// for(RegisteredListener l : sl){
// if (l.getPlugin().getDescription().getName().equalsIgnoreCase(args[0].val())) {
// if(env.GetCommandSender() instanceof ConsoleCommandSender){
// l.callEvent(new ServerCommandEvent((ConsoleCommandSender)env.GetCommandSender(), args[1].val()));
// }
// }
// }
// SortedSet<RegisteredListener> ss = (SortedSet<RegisteredListener>) m.invoke(spm, Event.Type.PLAYER_COMMAND_PREPROCESS);
//
// for (RegisteredListener l : ss) {
// if (l.getPlugin().getDescription().getName().equalsIgnoreCase(args[0].val())) {
// if(env.GetCommandSender() instanceof MCPlayer){
// l.callEvent(new PlayerCommandPreprocessEvent(((BukkitMCPlayer)env.GetPlayer())._Player(), args[1].val()));
// }
// PluginCommand.class.getDeclaredMethods();
// Constructor c = PluginCommand.class.getDeclaredConstructor(String.class, Plugin.class);
// c.setAccessible(true);
// List<String> argList = Arrays.asList(args[1].val().split(" "));
// Command com = (Command) c.newInstance(argList.get(0).substring(1), l.getPlugin());
// l.getPlugin().onCommand(((BukkitMCCommandSender)env.GetCommandSender())._CommandSender(), com, argList.get(0).substring(1), argList.subList(1, argList.size()).toArray(new String[]{}));
// }
// }
// } catch (InstantiationException ex) {
// Logger.getLogger(Sandbox.class.getName()).log(Level.SEVERE, null, ex);
// } catch (IllegalAccessException ex) {
// Logger.getLogger(Sandbox.class.getName()).log(Level.SEVERE, null, ex);
// } catch (IllegalArgumentException ex) {
// Logger.getLogger(Sandbox.class.getName()).log(Level.SEVERE, null, ex);
// } catch (InvocationTargetException ex) {
// Logger.getLogger(Sandbox.class.getName()).log(Level.SEVERE, null, ex);
// } catch (NoSuchMethodException ex) {
// Logger.getLogger(Sandbox.class.getName()).log(Level.SEVERE, null, ex);
// } catch (SecurityException ex) {
// Logger.getLogger(Sandbox.class.getName()).log(Level.SEVERE, null, ex);
// }
// }
//
// return CVoid.VOID;
// }
// }
@api(environments={CommandHelperEnvironment.class})
public static class super_cancel extends AbstractFunction {

0 comments on commit 8833e51

Please sign in to comment.