IDEA Auto Inspect
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package me.skymc.taboolib.particle;
|
||||
|
||||
import me.skymc.taboolib.methods.ReflectionUtils;
|
||||
import me.skymc.taboolib.methods.ReflectionUtils.PackageType;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Location;
|
||||
@@ -7,9 +9,6 @@ import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import me.skymc.taboolib.methods.ReflectionUtils;
|
||||
import me.skymc.taboolib.methods.ReflectionUtils.PackageType;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
@@ -406,8 +405,8 @@ public enum EffLib {
|
||||
*/
|
||||
SWEEP_ATTACK("sweepAttack", 45, 9);
|
||||
|
||||
private static final Map<String, EffLib> NAME_MAP = new HashMap<String, EffLib>();
|
||||
private static final Map<Integer, EffLib> ID_MAP = new HashMap<Integer, EffLib>();
|
||||
private static final Map<String, EffLib> NAME_MAP = new HashMap<>();
|
||||
private static final Map<Integer, EffLib> ID_MAP = new HashMap<>();
|
||||
private final String name;
|
||||
private final int id;
|
||||
private final int requiredVersion;
|
||||
@@ -429,7 +428,7 @@ public enum EffLib {
|
||||
* @param requiredVersion Version which is required (1.x)
|
||||
* @param properties Properties of this particle effect
|
||||
*/
|
||||
private EffLib(String name, int id, int requiredVersion, ParticleProperty... properties) {
|
||||
EffLib(String name, int id, int requiredVersion, ParticleProperty... properties) {
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
this.requiredVersion = requiredVersion;
|
||||
@@ -478,10 +477,7 @@ public enum EffLib {
|
||||
* @return Whether the particle effect is supported or not
|
||||
*/
|
||||
public boolean isSupported() {
|
||||
if (requiredVersion == -1) {
|
||||
return true;
|
||||
}
|
||||
return ParticlePacket.getVersion() >= requiredVersion;
|
||||
return requiredVersion == -1 || ParticlePacket.getVersion() >= requiredVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -933,7 +929,7 @@ public enum EffLib {
|
||||
* @author DarkBlade12
|
||||
* @since 1.7
|
||||
*/
|
||||
public static enum ParticleProperty {
|
||||
public enum ParticleProperty {
|
||||
/**
|
||||
* The particle effect requires water to be displayed
|
||||
*/
|
||||
@@ -949,7 +945,7 @@ public enum EffLib {
|
||||
/**
|
||||
* The particle effect uses the offsets as color values
|
||||
*/
|
||||
COLORABLE;
|
||||
COLORABLE
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1393,7 +1389,6 @@ public enum EffLib {
|
||||
* @param longDistance Indicates whether the maximum distance is increased from 256 to 65536
|
||||
* @param data Data of the effect
|
||||
* @throws IllegalArgumentException If the speed is lower than 0
|
||||
* @see #ParticleEffect(ParticleEffect, float, float, float, float, int, boolean, ParticleData)
|
||||
*/
|
||||
public ParticlePacket(EffLib effect, Vector direction, float speed, boolean longDistance, ParticleData data) throws IllegalArgumentException {
|
||||
this(effect, (float) direction.getX(), (float) direction.getY(), (float) direction.getZ(), speed, 0, longDistance, data);
|
||||
@@ -1405,7 +1400,6 @@ public enum EffLib {
|
||||
* @param effect Particle effect
|
||||
* @param color Color of the particle
|
||||
* @param longDistance Indicates whether the maximum distance is increased from 256 to 65536
|
||||
* @see #ParticleEffect(ParticleEffect, float, float, float, float, int, boolean, ParticleData)
|
||||
*/
|
||||
public ParticlePacket(EffLib effect, ParticleColor color, boolean longDistance) {
|
||||
this(effect, color.getValueX(), color.getValueY(), color.getValueZ(), 1, 0, longDistance, null);
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package me.skymc.taboolib.particle;
|
||||
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Effect;
|
||||
import org.bukkit.Location;
|
||||
|
||||
public class ParticleUtils {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user