Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
ef55e551
Unverified
Commit
ef55e551
authored
Oct 12, 2022
by
hamusuke
Committed by
GitHub
Oct 12, 2022
Browse files
fix: ConcurrentModificationError by removing gadget (#1849)
parent
55847123
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/game/entity/EntitySolarIsotomaClientGadget.java
View file @
ef55e551
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
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment