Package ch.njol.skript.lang

Examples of ch.njol.skript.lang.Effect


    try {
      command = "" + command.substring(SkriptConfig.effectCommandToken.value().length()).trim();
      final RetainingLogHandler log = SkriptLogger.startRetainingLog();
      try {
        ScriptLoader.setCurrentEvent("effect command", EffectCommandEvent.class);
        final Effect e = Effect.parse(command, null);
        ScriptLoader.deleteCurrentEvent();
       
        if (e != null) {
          log.clear(); // ignore warnings and stuff
          log.printLog();
         
          sender.sendMessage(ChatColor.GRAY + "executing '" + ChatColor.stripColor(command) + "'");
          if (SkriptConfig.logPlayerCommands.value() && !(sender instanceof ConsoleCommandSender))
            Skript.info(sender.getName() + " issued effect command: " + command);
          e.run(new EffectCommandEvent(sender, command));
        } else {
          if (sender == Bukkit.getConsoleSender()) // log as SEVERE instead of INFO like printErrors below
            SkriptLogger.LOGGER.severe("Error in: " + ChatColor.stripColor(command));
          else
            sender.sendMessage(ChatColor.RED + "Error in: " + ChatColor.GRAY + ChatColor.stripColor(command));
View Full Code Here

TOP

Related Classes of ch.njol.skript.lang.Effect

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.