Fixed several bugs
This commit is contained in:
@@ -25,7 +25,6 @@ public final class Dullness extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(!EnchantmentUtils.passedChance(this, level))
|
||||
return;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public final class Frozen extends EcoEnchant {
|
||||
Player player = (Player) event.getEntity();
|
||||
LivingEntity victim = (LivingEntity) event.getDamager();
|
||||
|
||||
final int points = EnchantChecks.getArmorPoints(player, this, 1);
|
||||
final int points = EnchantChecks.getArmorPoints(player, this, 0);
|
||||
|
||||
if (points == 0)
|
||||
return;
|
||||
|
||||
@@ -39,6 +39,6 @@ public final class Launch extends EcoEnchant {
|
||||
double multiplier = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "multiplier");
|
||||
double boost = 1 + (multiplier * level);
|
||||
|
||||
Bukkit.getScheduler().runTaskLater(EcoEnchantsPlugin.getInstance(), () -> player.setVelocity(player.getVelocity().multiply(boost)), 1);
|
||||
Bukkit.getScheduler().runTask(EcoEnchantsPlugin.getInstance(), () -> player.setVelocity(player.getVelocity().multiply(boost)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public final class AntigriefGriefPrevention implements AntigriefWrapper {
|
||||
if(victim instanceof Player) {
|
||||
return claim == null;
|
||||
} else {
|
||||
if (claim != null) {
|
||||
if (claim != null && claim.ownerID != null) {
|
||||
return claim.ownerID.equals(player.getUniqueId());
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -4,24 +4,16 @@ import com.willfp.ecoenchants.EcoEnchantsPlugin;
|
||||
import com.willfp.ecoenchants.integrations.anvilgui.AnvilGUIIntegration;
|
||||
|
||||
public class AnvilGUIImpl implements AnvilGUIIntegration {
|
||||
private static Class<?> ANVIL_GUI_CLASS = null;
|
||||
private static final String ANVIL_GUI_CLASS = "net.wesjd.anvilgui.version.Wrapper" + EcoEnchantsPlugin.NMS_VERSION.substring(1) + "$AnvilContainer";
|
||||
|
||||
@Override
|
||||
public boolean isInstance(Object object) {
|
||||
assert ANVIL_GUI_CLASS != null;
|
||||
return object.getClass().equals(ANVIL_GUI_CLASS);
|
||||
return object.getClass().toString().equals(ANVIL_GUI_CLASS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPluginName() {
|
||||
return "AnvilGUI";
|
||||
}
|
||||
|
||||
static {
|
||||
try {
|
||||
ANVIL_GUI_CLASS = Class.forName("net.wesjd.anvilgui.version.Wrapper" + EcoEnchantsPlugin.NMS_VERSION.substring(1) + "$AnvilContainer");
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,4 @@ general-config:
|
||||
|
||||
config:
|
||||
chance-per-level: 2.5
|
||||
ticks-per-level: 5
|
||||
ticks-per-level: 10
|
||||
Reference in New Issue
Block a user