Improved Codestyle (11/?)

This commit is contained in:
Auxilor 2020-12-28 16:34:27 +00:00
parent 931d35495a
commit bb27dd38ea
18 changed files with 23 additions and 19 deletions

View File

@ -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. -->

View File

@ -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);
}
}

View File

@ -7,7 +7,6 @@ import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull;
public interface TridentStackProxy extends AbstractProxy {
/**
* Get a trident's ItemStack.
*

View File

@ -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());
}