From ef55e5515c81cbe260f6d48b3233b467e1983fd2 Mon Sep 17 00:00:00 2001 From: hamusuke Date: Wed, 12 Oct 2022 20:37:53 +0900 Subject: [PATCH] fix: ConcurrentModificationError by removing gadget (#1849) --- .../game/entity/EntitySolarIsotomaClientGadget.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/entity/EntitySolarIsotomaClientGadget.java b/src/main/java/emu/grasscutter/game/entity/EntitySolarIsotomaClientGadget.java index d2561c6d5..def54fa76 100644 --- a/src/main/java/emu/grasscutter/game/entity/EntitySolarIsotomaClientGadget.java +++ b/src/main/java/emu/grasscutter/game/entity/EntitySolarIsotomaClientGadget.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.entity; -import emu.grasscutter.game.entity.platform.EntitySolarIsotomaElevatorPlatform; import emu.grasscutter.game.entity.platform.EntityPlatform; +import emu.grasscutter.game.entity.platform.EntitySolarIsotomaElevatorPlatform; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.world.Scene; import emu.grasscutter.net.proto.EvtCreateGadgetNotifyOuterClass; @@ -21,13 +21,11 @@ public class EntitySolarIsotomaClientGadget extends EntityClientGadget { //Create solar isotoma elevator and send to all. this.platformGadget = new EntitySolarIsotomaElevatorPlatform(this, getScene(), getOwner(), ELEVATOR_GADGET_ID, getPosition(), getRotation()); getScene().addEntity(this.platformGadget); - getOwner().getTeamManager().getGadgets().add(this.platformGadget); } @Override public void onRemoved() { //Remove solar isotoma elevator entity. getScene().removeEntity(this.platformGadget); - getOwner().getTeamManager().getGadgets().remove(this.platformGadget); } }