mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-25 15:35:11 +01:00
Improved Codestyle (11/?)
This commit is contained in:
parent
931d35495a
commit
bb27dd38ea
@ -116,7 +116,7 @@
|
||||
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
|
||||
<module name="RedundantImport"/>
|
||||
<module name="UnusedImports">
|
||||
<property name="processJavadoc" value="false"/>
|
||||
<property name="processJavadoc" value="true"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks for Size Violations. -->
|
||||
|
@ -69,7 +69,7 @@ public class EnchantmentCache implements Updatable {
|
||||
);
|
||||
name = String.valueOf(Configs.LANG.getString("enchantments." + enchantment.getKey().getKey().toLowerCase() + ".name"));
|
||||
type = enchantment.isCursed() ? EnchantmentType.CURSE : EnchantmentType.NORMAL;
|
||||
if(enchantment.isTreasure()) {
|
||||
if (enchantment.isTreasure()) {
|
||||
rarity = EnchantmentRarity.getByName(Configs.CONFIG.getString("rarity.vanilla-treasure-rarity"));
|
||||
} else {
|
||||
rarity = EnchantmentRarity.getByName(Configs.CONFIG.getString("rarity.vanilla-rarity"));
|
||||
|
@ -13,4 +13,4 @@ public class SnowArtifact extends Artifact {
|
||||
public Particle getParticle() {
|
||||
return Particle.SNOWBALL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,4 +16,4 @@ public class TearArtifact extends Artifact {
|
||||
public Particle getParticle() {
|
||||
return Particle.DRIPPING_OBSIDIAN_TEAR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,4 +50,4 @@ public class Ignite extends EcoEnchant {
|
||||
toIgnite.setType(Material.FIRE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,4 +34,4 @@ public class LiquidShot extends EcoEnchant {
|
||||
|
||||
event.setDamage(event.getDamage() * damageMultiplier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,4 +33,4 @@ public class Optics extends EcoEnchant {
|
||||
|
||||
event.setDamage(event.getDamage() * damageMultiplier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,4 +32,4 @@ public class Quadrilateralism extends EcoEnchant {
|
||||
|
||||
event.setDamage(event.getDamage() * damageMultiplier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,4 +44,4 @@ public class Radiance extends EcoEnchant {
|
||||
entity.addPotionEffect(new PotionEffect(PotionEffectType.GLOWING, duration, 0, false, false, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public class Reinforcement extends EcoEnchant {
|
||||
}
|
||||
|
||||
double reduction = this.getConfig().getDouble(EcoEnchants.CONFIG_LOCATION + "reduction-per-level");
|
||||
double multiplier = 1 - ((reduction/100) * level);
|
||||
double multiplier = 1 - ((reduction / 100) * level);
|
||||
event.setDamage(event.getDamage() * multiplier);
|
||||
}
|
||||
}
|
||||
|
@ -88,4 +88,4 @@ public class Spearfishing extends EcoEnchant {
|
||||
.push();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ public class StoneSwitcher extends EcoEnchant {
|
||||
|
||||
Material material;
|
||||
double random = NumberUtils.randFloat(0, 1);
|
||||
double band = 1/(double) this.getConfig().getStrings(EcoEnchants.CONFIG_LOCATION + "blocks").size();
|
||||
int selectedIndex = (int) Math.floor(random/band);
|
||||
double band = 1 / (double) this.getConfig().getStrings(EcoEnchants.CONFIG_LOCATION + "blocks").size();
|
||||
int selectedIndex = (int) Math.floor(random / band);
|
||||
selectedIndex = NumberUtils.equalIfOver(selectedIndex, this.getConfig().getStrings(EcoEnchants.CONFIG_LOCATION + "blocks").size() - 1);
|
||||
String materialName = this.getConfig().getStrings(EcoEnchants.CONFIG_LOCATION + "blocks").get(selectedIndex);
|
||||
material = Material.getMaterial(materialName.toUpperCase());
|
||||
|
@ -66,4 +66,4 @@ public class Vein extends EcoEnchant {
|
||||
|
||||
AnticheatManager.unexemptPlayer(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,4 +32,4 @@ public class WaterAspect extends EcoEnchant {
|
||||
|
||||
event.setDamage(event.getDamage() * damageMultiplier);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -61,4 +61,4 @@ public class Instability extends EcoEnchant {
|
||||
|
||||
event.getEntity().remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,9 @@ public class Pentashot extends EcoEnchant {
|
||||
velocity.rotateAroundY(radians);
|
||||
|
||||
Arrow arrow1 = shooter.launchProjectile(Arrow.class, velocity);
|
||||
if(EnchantChecks.mainhand(shooter, Enchantment.ARROW_FIRE)) arrow1.setFireTicks(Integer.MAX_VALUE);
|
||||
if (EnchantChecks.mainhand(shooter, Enchantment.ARROW_FIRE)) {
|
||||
arrow1.setFireTicks(Integer.MAX_VALUE);
|
||||
}
|
||||
arrow1.setPickupStatus(AbstractArrow.PickupStatus.DISALLOWED);
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface TridentStackProxy extends AbstractProxy {
|
||||
|
||||
/**
|
||||
* Get a trident's ItemStack.
|
||||
*
|
||||
|
@ -34,7 +34,10 @@ public class UpdateChecker {
|
||||
*/
|
||||
public void getVersion(@NotNull final Consumer<? super String> consumer) {
|
||||
this.getPlugin().getScheduler().runAsync(() -> {
|
||||
try (InputStream inputStream = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + this.getPlugin().getResourceId()).openStream(); Scanner scanner = new Scanner(inputStream)) {
|
||||
try (
|
||||
InputStream inputStream = new URL("https://api.spigotmc.org/legacy/update.php?resource=" + this.getPlugin().getResourceId()).openStream();
|
||||
Scanner scanner = new Scanner(inputStream)
|
||||
) {
|
||||
if (scanner.hasNext()) {
|
||||
consumer.accept(scanner.next());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user