diff --git a/api/README.MD b/api/README.MD index 5fd30bd0..560b1e6c 100644 --- a/api/README.MD +++ b/api/README.MD @@ -10,6 +10,7 @@ A lot of developers use maven to build projects more easily. **Repository: SirBlobman Public** Maven: + ```xml @@ -21,6 +22,7 @@ Maven: ``` Gradle Groovy: + ```groovy repositories { maven { @@ -31,6 +33,7 @@ repositories { ``` Gradle Kotlin: + ```kotlin repositories { maven("https://nexus.sirblobman.xyz/public/") @@ -40,6 +43,7 @@ repositories { **Dependency: CombatLogX API** Maven: + ```xml @@ -61,6 +65,7 @@ Maven: ``` Gradle Groovy: + ```groovy dependencies { compileOnly 'com.github.sirblobman.api:core:2.9-SNAPSHOT' @@ -69,6 +74,7 @@ dependencies { ``` Gradle Kotlin: + ```kotlin dependencies { compileOnly("com.github.sirblobman.api:core:2.9-SNAPSHOT") diff --git a/api/src/main/java/com/github/sirblobman/combatlogx/api/configuration/PunishConfiguration.java b/api/src/main/java/com/github/sirblobman/combatlogx/api/configuration/PunishConfiguration.java index cc70e09f..5b3a4e05 100644 --- a/api/src/main/java/com/github/sirblobman/combatlogx/api/configuration/PunishConfiguration.java +++ b/api/src/main/java/com/github/sirblobman/combatlogx/api/configuration/PunishConfiguration.java @@ -110,7 +110,7 @@ public void setKickIgnoreListInverted(boolean inverted) { public boolean isKickIgnored(@NotNull String reason) { boolean ignore = isInIgnoreList(reason); boolean inverted = isKickIgnoreListInverted(); - return (inverted != ignore); + return (inverted != ignore); } private boolean isInIgnoreList(@NotNull String reason) { diff --git a/expansion/compatibility/HuskSync/src/main/java/combatlogx/expansion/compatibility/husksync/ListenerHuskSync.java b/expansion/compatibility/HuskSync/src/main/java/combatlogx/expansion/compatibility/husksync/ListenerHuskSync.java index 447dcd8d..e6a07da5 100644 --- a/expansion/compatibility/HuskSync/src/main/java/combatlogx/expansion/compatibility/husksync/ListenerHuskSync.java +++ b/expansion/compatibility/HuskSync/src/main/java/combatlogx/expansion/compatibility/husksync/ListenerHuskSync.java @@ -137,7 +137,7 @@ private void checkData(@NotNull PlayerData playerData) { Optional optionalStatus = userData.getStatus(); if (optionalStatus.isPresent()) { StatusData statusData = optionalStatus.get(); - if(!playerData.isKeepLevel()) { + if (!playerData.isKeepLevel()) { statusData.totalExperience = playerData.getTotalExperience(); statusData.expLevel = playerData.getNewLevel(); statusData.expProgress = playerData.getNewExperience(); @@ -152,7 +152,7 @@ private void checkData(@NotNull PlayerData playerData) { api.setUserData(user, userData).whenCompleteAsync(this::printSyncResult).join(); printDebug("Set HuskSync user data for player '" + user.uuid + "'."); - if(!playerData.isKeepInventory()) { + if (!playerData.isKeepInventory()) { printDebug("Death event had keepInventory = false, fetching items..."); List drops = new ArrayList<>(); Collections.addAll(drops, inventoryMap.getContents()); diff --git a/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/DamageEffectsConfiguration.java b/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/DamageEffectsConfiguration.java index 9936fc98..a73c5928 100644 --- a/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/DamageEffectsConfiguration.java +++ b/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/DamageEffectsConfiguration.java @@ -9,8 +9,8 @@ import combatlogx.expansion.damage.effects.effect.Blood; public final class DamageEffectsConfiguration implements IConfigurable { - private boolean allDamage; private final Blood blood; + private boolean allDamage; public DamageEffectsConfiguration() { this.allDamage = false; diff --git a/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/effect/Blood.java b/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/effect/Blood.java index 0340ae5a..68c8539a 100644 --- a/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/effect/Blood.java +++ b/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/effect/Blood.java @@ -13,8 +13,8 @@ import com.github.sirblobman.api.shaded.xseries.particles.XParticle; public final class Blood implements DamageEffect, IConfigurable { - private boolean enabled; private final Offset offset; + private boolean enabled; private Color color; private float size; private double ringRate; @@ -36,6 +36,10 @@ public boolean isEnabled() { return this.enabled; } + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + @Override public void load(@NotNull ConfigurationSection section) { setEnabled(section.getBoolean("enabled", true)); @@ -70,10 +74,6 @@ public void play(@NotNull Player player) { XParticle.ring(rate, radius, tubeRadius, display); } - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } - public @NotNull Offset getOffset() { return this.offset; } diff --git a/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/effect/DamageEffect.java b/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/effect/DamageEffect.java index fd859095..61cd3f08 100644 --- a/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/effect/DamageEffect.java +++ b/expansion/damage-effects/src/main/java/combatlogx/expansion/damage/effects/effect/DamageEffect.java @@ -6,5 +6,6 @@ public interface DamageEffect { boolean isEnabled(); + void play(@NotNull Player player); } diff --git a/expansion/rewards/src/main/java/combatlogx/expansion/rewards/configuration/Reward.java b/expansion/rewards/src/main/java/combatlogx/expansion/rewards/configuration/Reward.java index 54207abd..2a144410 100644 --- a/expansion/rewards/src/main/java/combatlogx/expansion/rewards/configuration/Reward.java +++ b/expansion/rewards/src/main/java/combatlogx/expansion/rewards/configuration/Reward.java @@ -34,15 +34,13 @@ public final class Reward implements IConfigurable { private final Set mobTypeList; private final Set worldList; private final List commandList; + private final Map requirementMap; private String permissionName; private int chance; private int maxChance; private boolean mobWhiteList; private boolean worldWhiteList; private boolean randomCommand; - - private final Map requirementMap; - private transient Permission permission; public Reward(@NotNull RewardExpansion expansion, @NotNull String id) { diff --git a/gradle.properties b/gradle.properties index 7bd7e0e5..46624733 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,5 @@ org.gradle.parallel=true org.gradle.caching=true - version.spigot=1.8.8-R0.1-SNAPSHOT version.core=2.9-SNAPSHOT version.api=11.4-SNAPSHOT diff --git a/plugin/src/main/java/com/github/sirblobman/combatlogx/command/combatlogx/SubCommandVersion.java b/plugin/src/main/java/com/github/sirblobman/combatlogx/command/combatlogx/SubCommandVersion.java index b08025ec..b0bb1e10 100644 --- a/plugin/src/main/java/com/github/sirblobman/combatlogx/command/combatlogx/SubCommandVersion.java +++ b/plugin/src/main/java/com/github/sirblobman/combatlogx/command/combatlogx/SubCommandVersion.java @@ -139,7 +139,7 @@ private void addDependencyInformation(@NotNull List list) { PluginManager pluginManager = Bukkit.getPluginManager(); for (String dependencyName : fullDependencyList) { Plugin dependency = pluginManager.getPlugin(dependencyName); - if(dependency == null) { + if (dependency == null) { list.add(listElement(dependencyName).append(Component.space()).append(missingText)); continue; }