Various removals of '&' for Javadoc to be happy

This commit is contained in:
KingRainbow44 2023-09-02 19:49:38 -04:00
parent 34589d0128
commit c08ab19d84
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE
9 changed files with 37 additions and 31 deletions

View File

@ -68,7 +68,7 @@ public class ConfigContainer {
}
}); updated.version = version();
try { // Save configuration & reload.
try { // Save configuration and reload.
Grasscutter.saveConfig(updated);
Grasscutter.loadConfig();
} catch (Exception exception) {

View File

@ -11,7 +11,7 @@ public final class ActionSetGlobalValue extends AbilityActionHandler {
@Override
public boolean execute(
Ability ability, AbilityModifierAction action, ByteString abilityData, GameEntity target) {
// Get the key & value.
// Get the key and value.
var valueKey = action.key;
var value = action.ratio;

View File

@ -8,9 +8,10 @@ import emu.grasscutter.game.player.*;
import emu.grasscutter.game.props.*;
import emu.grasscutter.net.proto.ActivityInfoOuterClass;
import emu.grasscutter.server.packet.send.PacketActivityScheduleInfoNotify;
import lombok.Getter;
import java.util.*;
import java.util.concurrent.*;
import lombok.Getter;
@SuppressWarnings("unchecked")
@Getter
@ -26,7 +27,7 @@ public class ActivityManager extends BasePlayerManager {
}
public static void loadActivityConfigData() {
// scan activity type handler & watcher type
// scan activity type handler and watcher type
var activityHandlerTypeMap = new HashMap<ActivityType, ConstructorAccess<?>>();
var activityWatcherTypeMap = new HashMap<WatcherTriggerType, ConstructorAccess<?>>();
Grasscutter.reflector

View File

@ -1,7 +1,5 @@
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;
@ -32,12 +30,15 @@ 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 java.util.*;
import java.util.stream.Stream;
import javax.annotation.*;
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;
@Entity(value = "avatars", useDiscriminator = false)
public class Avatar {
@Transient @Getter private final Int2ObjectMap<GameItem> equips;
@ -1299,7 +1300,7 @@ public class Avatar {
// Check if the avatar is a trial avatar.
if (this.getTrialAvatarId() > 0) {
// Add the artifacts & weapons for the avatar.
// Add the artifacts and weapons for the avatar.
trialAvatar.addAllTrialEquipList(
this.getEquips().values().stream().map(GameItem::toProto).toList());
}

View File

@ -71,7 +71,7 @@ public final class BargainRecord {
return this.result = BargainResultType.BARGAIN_COMPLETE_SUCC;
}
// Compare the offer against the mood & expected price.
// Compare the offer against the mood and expected price.
// The mood is out of 100; 1 mood should decrease the price by 100.
var moodAdjustment = (int) Math.floor(this.getCurrentMood() / 100.0);
var expectedPrice = this.getExpectedPrice() - moodAdjustment;

View File

@ -16,11 +16,12 @@ import emu.grasscutter.net.proto.ChildQuestOuterClass.ChildQuest;
import emu.grasscutter.net.proto.ParentQuestOuterClass.ParentQuest;
import emu.grasscutter.server.packet.send.*;
import emu.grasscutter.utils.*;
import java.util.*;
import java.util.stream.Collectors;
import lombok.*;
import org.bson.types.ObjectId;
import java.util.*;
import java.util.stream.Collectors;
@Entity(value = "quests", useDiscriminator = false)
public class GameMainQuest {
@Id private ObjectId id;
@ -328,11 +329,11 @@ public class GameMainQuest {
}
/**
* Checks if the quest has a teleport position. Returns true if it does & adds the target position
* & rotation to the list.
* Checks if the quest has a teleport position. Returns true if it does and adds the target position
* and rotation to the list.
*
* @param subId The sub-quest ID.
* @param posAndRot A list which will contain the position & rotation if the quest has a teleport.
* @param posAndRot A list which will contain the position and rotation if the quest has a teleport.
* @return True if the quest has a teleport position. False otherwise.
*/
public boolean hasTeleportPosition(int subId, List<Position> posAndRot) {
@ -340,7 +341,7 @@ public class GameMainQuest {
if (questTransmit == null) return false;
TeleportData.TransmitPoint transmitPoint =
questTransmit.getTransmit_points().size() > 0
!questTransmit.getTransmit_points().isEmpty()
? questTransmit.getTransmit_points().get(0)
: null;
if (transmitPoint == null) return false;

View File

@ -1,8 +1,5 @@
package emu.grasscutter.game.quest;
import static emu.grasscutter.GameConstants.DEBUG;
import static emu.grasscutter.config.Configuration.*;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.binout.*;
@ -15,12 +12,16 @@ import emu.grasscutter.net.proto.GivingRecordOuterClass.GivingRecord;
import emu.grasscutter.server.packet.send.*;
import io.netty.util.concurrent.FastThreadLocalThread;
import it.unimi.dsi.fastutil.ints.*;
import lombok.*;
import javax.annotation.Nonnull;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.Consumer;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import lombok.*;
import static emu.grasscutter.GameConstants.DEBUG;
import static emu.grasscutter.config.Configuration.*;
public final class QuestManager extends BasePlayerManager {
@Getter private final Player player;
@ -57,7 +58,7 @@ public final class QuestManager extends BasePlayerManager {
this.loggedQuests.addAll(
List.of(
31101, // Quest which holds talks 30902 and 30904.
35001, // Quest which unlocks world border & starts act 2.
35001, // Quest which unlocks world border and starts act 2.
30901, // Quest which is completed upon finishing all 3 initial dungeons.
30903, // Quest which is finished when re-entering scene 3. (home world)
30904, // Quest which unlocks the Adventurers' Guild

View File

@ -1,7 +1,5 @@
package emu.grasscutter.game.world;
import static emu.grasscutter.server.event.player.PlayerTeleportEvent.TeleportType.SCRIPT;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.excels.dungeon.DungeonData;
import emu.grasscutter.game.entity.*;
@ -20,10 +18,13 @@ import emu.grasscutter.server.game.GameServer;
import emu.grasscutter.server.packet.send.*;
import emu.grasscutter.utils.ConversionUtils;
import it.unimi.dsi.fastutil.ints.*;
import java.util.*;
import lombok.*;
import org.jetbrains.annotations.NotNull;
import java.util.*;
import static emu.grasscutter.server.event.player.PlayerTeleportEvent.TeleportType.SCRIPT;
public class World implements Iterable<Player> {
@Getter private final GameServer server;
@Getter private Player host;
@ -386,7 +387,7 @@ public class World implements Iterable<Player> {
// Call player teleport event.
PlayerTeleportEvent event =
new PlayerTeleportEvent(player, teleportProperties, player.getPosition());
// Call event & check if it was canceled.
// Call event and check if it was canceled.
event.call();
if (event.isCanceled()) {
return false; // Teleport was canceled.

View File

@ -1,7 +1,5 @@
package emu.grasscutter.server.http.dispatch;
import static emu.grasscutter.config.Configuration.*;
import com.google.gson.*;
import com.google.protobuf.ByteString;
import emu.grasscutter.*;
@ -18,11 +16,14 @@ import emu.grasscutter.server.http.objects.QueryCurRegionRspJson;
import emu.grasscutter.utils.*;
import io.javalin.Javalin;
import io.javalin.http.Context;
import org.slf4j.Logger;
import java.time.Instant;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Pattern;
import org.slf4j.Logger;
import static emu.grasscutter.config.Configuration.*;
/** Handles requests related to region queries. */
public final class RegionHandler implements Router {
@ -31,7 +32,7 @@ public final class RegionHandler implements Router {
private static String regionListResponseCN;
public RegionHandler() {
try { // Read & initialize region data.
try { // Read and initialize region data.
this.initialize();
} catch (Exception exception) {
Grasscutter.getLogger().error("Failed to initialize region data.", exception);