Use ArrayList instead of LinkedList

This commit is contained in:
filoghost 2021-05-02 20:32:39 +02:00
parent 1f6adc8679
commit a7a7fcc68b

View File

@ -12,9 +12,9 @@ import me.filoghost.holographicdisplays.placeholder.PlaceholderManager;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.plugin.Plugin; import org.bukkit.plugin.Plugin;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedList;
import java.util.List; import java.util.List;
public class APIHologramManager extends BaseHologramManager<APIHologram> { public class APIHologramManager extends BaseHologramManager<APIHologram> {
@ -34,7 +34,7 @@ public class APIHologramManager extends BaseHologramManager<APIHologram> {
} }
public Collection<Hologram> getHologramsByPlugin(Plugin plugin) { public Collection<Hologram> getHologramsByPlugin(Plugin plugin) {
List<Hologram> ownedHolograms = new LinkedList<>(); List<Hologram> ownedHolograms = new ArrayList<>();
for (APIHologram hologram : getHolograms()) { for (APIHologram hologram : getHolograms()) {
if (hologram.getOwnerPlugin().equals(plugin)) { if (hologram.getOwnerPlugin().equals(plugin)) {