Skip to content

Commit

Permalink
#2413 Always use ArrayList for LimboPlayer groups to prevent issue wi…
Browse files Browse the repository at this point in the history
…th Gson
  • Loading branch information
ljacqu committed Oct 9, 2021
1 parent a99daea commit 6be9cec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/fr/xephi/authme/data/limbo/LimboPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.bukkit.Location;
import org.bukkit.scheduler.BukkitTask;

import java.util.ArrayList;
import java.util.Collection;

/**
Expand All @@ -29,7 +30,7 @@ public LimboPlayer(Location loc, boolean operator, Collection<UserGroup> groups,
float flySpeed) {
this.loc = loc;
this.operator = operator;
this.groups = groups;
this.groups = new ArrayList<>(groups); // prevent bug #2413
this.canFly = fly;
this.walkSpeed = walkSpeed;
this.flySpeed = flySpeed;
Expand Down

0 comments on commit 6be9cec

Please sign in to comment.