mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2025-02-17 04:41:21 +01:00
Updated libreforge
This commit is contained in:
parent
91ff9c4394
commit
9c0a320eec
@ -3,6 +3,6 @@ version rootProject.version
|
|||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.willfp:libreforge:3.40.0'
|
implementation 'com.willfp:libreforge:3.40.1'
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -10,10 +10,15 @@ import com.willfp.libreforge.conditions.ConfiguredCondition;
|
|||||||
import com.willfp.libreforge.effects.ConfiguredEffect;
|
import com.willfp.libreforge.effects.ConfiguredEffect;
|
||||||
import com.willfp.libreforge.effects.Effects;
|
import com.willfp.libreforge.effects.Effects;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
import lombok.val;
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class CustomEcoEnchantLevel implements Holder {
|
public class CustomEcoEnchantLevel implements Holder {
|
||||||
@ -104,7 +109,21 @@ public class CustomEcoEnchantLevel implements Holder {
|
|||||||
+ '}';
|
+ '}';
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@NotNull
|
||||||
|
@Override
|
||||||
|
public List<String> getNotMetLines(@NotNull final Player player) {
|
||||||
|
List<String> lines = new ArrayList<>();
|
||||||
|
|
||||||
|
for (ConfiguredCondition condition : this.getConditions()) {
|
||||||
|
if (!condition.isMet(player)) {
|
||||||
|
lines.addAll(Objects.requireNonNullElse(condition.getNotMetLines(), new ArrayList<>()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return lines;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NotNull
|
||||||
@Override
|
@Override
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return this.parent.getKey().getKey() + "_" + this.level;
|
return this.parent.getKey().getKey() + "_" + this.level;
|
||||||
|
Loading…
Reference in New Issue
Block a user