mirror of
https://github.com/songoda/EpicEnchants.git
synced 2024-06-26 14:44:44 +02:00
Code cleanup
This commit is contained in:
parent
1b132a3b0c
commit
b99896d41e
|
@ -17,7 +17,20 @@ import org.bukkit.event.entity.EntityExplodeEvent;
|
||||||
import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
|
import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
|
||||||
import org.bukkit.projectiles.ProjectileSource;
|
import org.bukkit.projectiles.ProjectileSource;
|
||||||
|
|
||||||
import static com.songoda.epicenchants.enums.TriggerType.*;
|
import static com.songoda.epicenchants.enums.TriggerType.ATTACK_MOB_MELEE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.ATTACK_MOB_RANGE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.ATTACK_PLAYER_MELEE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.ATTACK_PLAYER_RANGE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.DEFENSE_MOB_MELEE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.DEFENSE_MOB_RANGE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.DEFENSE_PLAYER_MELEE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.DEFENSE_PLAYER_RANGE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.EXPLOSION_DAMAGE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.FALL_DAMAGE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.FIRE_DAMAGE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.KILLED_MOB;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.LAVA_DAMAGE;
|
||||||
|
import static com.songoda.epicenchants.enums.TriggerType.POISON_DAMAGE;
|
||||||
|
|
||||||
public class EntityListener implements Listener {
|
public class EntityListener implements Listener {
|
||||||
private final EpicEnchants instance;
|
private final EpicEnchants instance;
|
||||||
|
|
|
@ -99,6 +99,8 @@ public class GeneralUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object parseJS(String toParse, String type, Object def) {
|
public static Object parseJS(String toParse, String type, Object def) {
|
||||||
|
// FIXME: JavaScript != Math...
|
||||||
|
// Input "false ? (8 * 3) : (4 * 3)" fails for obvious reasons
|
||||||
return MathUtils.eval(toParse, "[EpicEnchants] One of your " + type + " expressions is not properly formatted.");
|
return MathUtils.eval(toParse, "[EpicEnchants] One of your " + type + " expressions is not properly formatted.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user