Format code [skip actions]

This commit is contained in:
github-actions 2023-06-01 01:06:12 +00:00
parent 73c23707b4
commit b1b8abc627
4 changed files with 15 additions and 19 deletions

View File

@ -1,5 +1,7 @@
package emu.grasscutter.game.avatar;
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
import dev.morphia.annotations.*;
import emu.grasscutter.GameConstants;
import emu.grasscutter.data.GameData;
@ -30,14 +32,11 @@ import emu.grasscutter.net.proto.TrialAvatarInfoOuterClass.TrialAvatarInfo;
import emu.grasscutter.server.packet.send.*;
import emu.grasscutter.utils.helpers.ProtoHelper;
import it.unimi.dsi.fastutil.ints.*;
import lombok.*;
import org.bson.types.ObjectId;
import javax.annotation.*;
import java.util.*;
import java.util.stream.Stream;
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
import javax.annotation.*;
import lombok.*;
import org.bson.types.ObjectId;
@Entity(value = "avatars", useDiscriminator = false)
public class Avatar {
@ -230,8 +229,7 @@ public class Avatar {
/**
* @return The avatar's equipped weapon.
*/
@Nullable
public GameItem getWeapon() {
@Nullable public GameItem getWeapon() {
return this.getEquipBySlot(EquipType.EQUIP_WEAPON);
}

View File

@ -1,5 +1,7 @@
package emu.grasscutter.game.inventory;
import static emu.grasscutter.config.Configuration.INVENTORY_LIMITS;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.common.ItemParamData;
@ -15,11 +17,8 @@ import emu.grasscutter.server.packet.send.*;
import emu.grasscutter.utils.Utils;
import it.unimi.dsi.fastutil.ints.*;
import it.unimi.dsi.fastutil.longs.*;
import java.util.*;
import static emu.grasscutter.config.Configuration.INVENTORY_LIMITS;
public class Inventory extends BasePlayerManager implements Iterable<GameItem> {
private final Long2ObjectMap<GameItem> store;
private final Int2ObjectMap<InventoryTab> inventoryTypes;

View File

@ -4,6 +4,7 @@ import lombok.*;
public abstract class BasePlayerManager {
protected final transient Player player;
@Getter
@Setter(AccessLevel.PROTECTED)
protected boolean loaded = false;

View File

@ -1,5 +1,8 @@
package emu.grasscutter.utils;
import static emu.grasscutter.utils.FileUtils.getResourcePath;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.config.ConfigContainer;
import emu.grasscutter.data.DataLoader;
@ -8,9 +11,6 @@ import emu.grasscutter.utils.objects.Returnable;
import io.javalin.http.Context;
import io.netty.buffer.*;
import it.unimi.dsi.fastutil.ints.*;
import org.slf4j.Logger;
import javax.annotation.Nullable;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.*;
@ -18,9 +18,8 @@ import java.time.*;
import java.time.temporal.TemporalAdjusters;
import java.util.*;
import java.util.concurrent.ThreadLocalRandom;
import static emu.grasscutter.utils.FileUtils.getResourcePath;
import static emu.grasscutter.utils.lang.Language.translate;
import javax.annotation.Nullable;
import org.slf4j.Logger;
@SuppressWarnings({"UnusedReturnValue", "BooleanMethodIsAlwaysInverted"})
public final class Utils {
@ -481,8 +480,7 @@ public final class Utils {
}
/**
* Waits for the task to return true.
* This will halt the thread until the task returns true.
* Waits for the task to return true. This will halt the thread until the task returns true.
*
* @param runnable The task to run.
*/