From 053bb0491808cbfa2ab7f8d57137f7ffc8363312 Mon Sep 17 00:00:00 2001 From: Govindass Date: Thu, 3 Dec 2020 11:13:03 +0200 Subject: [PATCH] Remove unnecessary EventHandler --- .idea/jarRepositories.xml | 10 ++++ RediSkript.iml | 46 +++++++++++++++++++ .../net/limework/rediskript/RediSkript.java | 2 - .../elements/ExprVariableInChannel.java | 10 ++-- 4 files changed, 59 insertions(+), 9 deletions(-) diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml index 980494e..4b4d8ef 100644 --- a/.idea/jarRepositories.xml +++ b/.idea/jarRepositories.xml @@ -1,6 +1,11 @@ + + + + \ No newline at end of file diff --git a/src/main/java/net/limework/rediskript/RediSkript.java b/src/main/java/net/limework/rediskript/RediSkript.java index dc3eda5..4752049 100644 --- a/src/main/java/net/limework/rediskript/RediSkript.java +++ b/src/main/java/net/limework/rediskript/RediSkript.java @@ -31,8 +31,6 @@ public class RediSkript extends JavaPlugin { } @Override - //using HIGHEST event priority so it shuts down last and code can still execute well in "on script unload" and "on skript unload" events - @EventHandler(priority = EventPriority.LOWEST) public void onDisable() { if (rm != null) { rm.shutdown(); diff --git a/src/main/java/net/limework/rediskript/skript/elements/ExprVariableInChannel.java b/src/main/java/net/limework/rediskript/skript/elements/ExprVariableInChannel.java index a68b0d8..a8bc601 100644 --- a/src/main/java/net/limework/rediskript/skript/elements/ExprVariableInChannel.java +++ b/src/main/java/net/limework/rediskript/skript/elements/ExprVariableInChannel.java @@ -1,9 +1,12 @@ package net.limework.rediskript.skript.elements; +import ch.njol.skript.Skript; import ch.njol.skript.classes.Changer; import ch.njol.skript.lang.Expression; import ch.njol.skript.lang.SkriptParser; +import ch.njol.skript.lang.Variable; import ch.njol.skript.lang.util.SimpleExpression; +import ch.njol.skript.log.ErrorQuality; import ch.njol.skript.registrations.Classes; import ch.njol.skript.variables.SerializedVariable; import ch.njol.util.Kleenean; @@ -19,13 +22,6 @@ public class ExprVariableInChannel extends SimpleExpression { private Expression channel; @Override public boolean init(Expression[] expressions, int matchedPattern, Kleenean isDelayed, SkriptParser.ParseResult parser) { - //if (expressions[0] instanceof Variable) { - // Variable variable = (Variable) expressions[0]; - // System.out.println(variable.getName().toString()); - // String var = variable.getName().toString(); - // var = var.substring(1, var.length() - 1); - - //} name = (Expression) expressions[0]; channel = (Expression) expressions[1]; return true;