mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-21 11:24:47 +01:00
Convert to the far superior config system
This commit is contained in:
@@ -20,6 +20,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.lang.Math;
|
||||
import java.util.*;
|
||||
|
||||
import static emu.grasscutter.Configuration.*;
|
||||
|
||||
public class StaminaManager {
|
||||
|
||||
// TODO: Skiff state detection?
|
||||
@@ -224,9 +226,10 @@ public class StaminaManager {
|
||||
|
||||
// Returns new stamina and sends PlayerPropNotify
|
||||
public int setStamina(GameSession session, String reason, int newStamina) {
|
||||
if (!Grasscutter.getConfig().OpenStamina) {
|
||||
if (!GAME_OPTIONS.staminaUsage) {
|
||||
newStamina = player.getProperty(PlayerProperty.PROP_MAX_STAMINA);
|
||||
}
|
||||
|
||||
// set stamina
|
||||
player.setProperty(PlayerProperty.PROP_CUR_PERSIST_STAMINA, newStamina);
|
||||
session.send(new PacketPlayerPropNotify(player, PlayerProperty.PROP_CUR_PERSIST_STAMINA));
|
||||
|
||||
Reference in New Issue
Block a user