Minor code cleanup

This commit is contained in:
Auxilor
2020-12-16 16:06:02 +00:00
parent 07b60b2683
commit 270f056dce
5 changed files with 5 additions and 7 deletions

View File

@@ -12,7 +12,7 @@ import java.util.List;
public abstract class AbstractTabCompleter implements TabCompleter {
private final AbstractCommand command;
public AbstractTabCompleter(AbstractCommand command) {
protected AbstractTabCompleter(AbstractCommand command) {
this.command = command;
}

View File

@@ -55,8 +55,8 @@ public class Aiming extends EcoEnchant {
double force = arrow.getVelocity().clone().length() / 3;
force = NumberUtils.equalIfOver(force, 1);
if(this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "require-full-force")) {
if(force < 0.9) return;
if(this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "require-full-force") && force < 0.9) {
return;
}
if(this.getConfig().getBool(EcoEnchants.CONFIG_LOCATION + "scale-on-force")) {

View File

@@ -205,11 +205,11 @@ public class AnvilMerge {
outEnchantLevels.addAndGet(integer);
}
}));
leftEnchants.forEach((((enchantment, integer) -> {
leftEnchants.forEach(((enchantment, integer) -> {
if (EcoEnchants.getFromEnchantment(enchantment) != null) {
outEnchantLevels.addAndGet(integer);
}
})));
}));
totalEnchantLevelDelta = Math.abs(outEnchantLevels.intValue() - inEnchantLevels.intValue());

View File

@@ -23,7 +23,6 @@ public class AntigriefFactionsUUID implements AntigriefWrapper {
@Override
public boolean canCreateExplosion(Player player, Location location) {
FPlayer fplayer = FPlayers.getInstance().getByPlayer(player);
FLocation flocation = new FLocation(location);
Faction faction = Board.getInstance().getFactionAt(flocation);

View File

@@ -30,7 +30,6 @@ public class ArrowListeners implements Listener {
ItemStack item = entity.getEquipment().getItemInMainHand();
if (item == null) return;
if (item.getType().equals(Material.AIR)) return;
if (!item.hasItemMeta()) return;
if (item.getItemMeta() == null) return;