Files
purpur-fantasy-stick/src/main/java/games/dmg/fantasystick/passive/LowLightVision.java
T
dmg 079555900c
Release / release (push) Successful in 8m51s
feat(passives): add low-light vision
2026-09-21 00:12:43 -04:00

30 lines
1.2 KiB
Java

package games.dmg.fantasystick.passive;
import games.dmg.fantasystick.progression.Stat;
import games.dmg.fantasystick.session.EquipmentSessions;
import java.math.BigInteger;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.bukkit.potion.PotionEffectType;
/** Current-session native Night Vision I layer for the learned character passive. */
public final class LowLightVision implements AutoCloseable {
public static final String ID = "low_light_vision";
private final PersistentPotionEffect effect;
public LowLightVision(EquipmentSessions sessions) {
effect = new PersistentPotionEffect(ID, PotionEffectType.NIGHT_VISION, 0, false, sessions);
}
public PassiveDefinition definition() {
return new PassiveDefinition(ID, "Low-Light Vision", Map.of(Stat.WIS, BigInteger.valueOf(12)), Set.of(), BigInteger.ONE,
List.of("Continuously provides native Night Vision I while this character is active.",
"Preserves unrelated Night Vision and does not change light, darkness or mob behavior."));
}
public void install(org.bukkit.plugin.Plugin plugin) { effect.install(plugin); }
public void sweep() { effect.sweep(); }
@Override public void close() { effect.close(); }
}