FireworkMeta uses CopyOnWriteArrayList instead of ArrayList, removes #getOwningPlayer()

This commit is contained in:
R0bbyYT 2020-12-25 10:40:02 +01:00
parent 4818e29d81
commit f58dcbda46
2 changed files with 2 additions and 13 deletions

View File

@ -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;
/**

View File

@ -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.
*