mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
Run formatter & 'protogen'
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package emu.grasscutter.game.player;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
|
||||
|
||||
import dev.morphia.annotations.*;
|
||||
import emu.grasscutter.*;
|
||||
import emu.grasscutter.data.GameData;
|
||||
@@ -21,12 +23,9 @@ import emu.grasscutter.server.packet.send.*;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
import it.unimi.dsi.fastutil.ints.*;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
|
||||
import lombok.*;
|
||||
|
||||
@Entity
|
||||
public final class TeamManager extends BasePlayerDataManager {
|
||||
@@ -426,12 +425,11 @@ public final class TeamManager extends BasePlayerDataManager {
|
||||
|
||||
// Check if character changed
|
||||
var newAvatarEntity = this.getCurrentAvatarEntity();
|
||||
if (currentEntity != null &&
|
||||
newAvatarEntity != null &&
|
||||
currentEntity != newAvatarEntity) {
|
||||
if (currentEntity != null && newAvatarEntity != null && currentEntity != newAvatarEntity) {
|
||||
// Call PlayerSwitchAvatarEvent.
|
||||
var event = new PlayerSwitchAvatarEvent(this.getPlayer(),
|
||||
currentEntity.getAvatar(), newAvatarEntity.getAvatar());
|
||||
var event =
|
||||
new PlayerSwitchAvatarEvent(
|
||||
this.getPlayer(), currentEntity.getAvatar(), newAvatarEntity.getAvatar());
|
||||
if (!event.call()) return;
|
||||
|
||||
// Remove and Add
|
||||
@@ -766,8 +764,8 @@ public final class TeamManager extends BasePlayerDataManager {
|
||||
}
|
||||
|
||||
// Call PlayerSwitchAvatarEvent.
|
||||
var event = new PlayerSwitchAvatarEvent(this.getPlayer(),
|
||||
oldEntity.getAvatar(), newEntity.getAvatar());
|
||||
var event =
|
||||
new PlayerSwitchAvatarEvent(this.getPlayer(), oldEntity.getAvatar(), newEntity.getAvatar());
|
||||
if (!event.call()) return;
|
||||
|
||||
newEntity = event.getNewAvatarEntity();
|
||||
|
||||
Reference in New Issue
Block a user