mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-19 13:51:22 +01:00
FireworkMeta uses CopyOnWriteArrayList instead of ArrayList, removes #getOwningPlayer()
This commit is contained in:
parent
4818e29d81
commit
f58dcbda46
@ -6,16 +6,16 @@ import org.jglrxavpok.hephaistos.nbt.NBTCompound;
|
||||
import org.jglrxavpok.hephaistos.nbt.NBTList;
|
||||
import org.jglrxavpok.hephaistos.nbt.NBTTypes;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
/**
|
||||
* Represents a firework rocket meta data and its effects.
|
||||
*/
|
||||
public class FireworkMeta extends ItemMeta {
|
||||
|
||||
private List<FireworkEffect> effects = new ArrayList<>();
|
||||
private List<FireworkEffect> effects = new CopyOnWriteArrayList<>();
|
||||
private byte flightDuration;
|
||||
|
||||
/**
|
||||
|
@ -35,17 +35,6 @@ public class PlayerHeadMeta extends ItemMeta {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the owner of the skull.
|
||||
*
|
||||
* @return The owner if the skull or {@code null}.
|
||||
*/
|
||||
@Nullable
|
||||
public Player getOwningPlayer() {
|
||||
return MinecraftServer.getConnectionManager().getPlayer(this.skullOwner);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the owner of the head.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user