Removing pair completly
Dieser Commit ist enthalten in:
Ursprung
7ca97476bd
Commit
052aa44d12
@ -2,7 +2,6 @@ package de.steamwar.inventory;
|
|||||||
|
|
||||||
import de.steamwar.sql.Schematic;
|
import de.steamwar.sql.Schematic;
|
||||||
import de.steamwar.sql.SchematicType;
|
import de.steamwar.sql.SchematicType;
|
||||||
import javafx.util.Pair;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -16,17 +15,6 @@ public class SWListInv<T> extends SWInventory {
|
|||||||
private List<SWListEntry<T>> elements;
|
private List<SWListEntry<T>> elements;
|
||||||
private int page;
|
private int page;
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public SWListInv(Player p, String t, ListCallback<T> c, List<Pair<SWItem, T>> l) {
|
|
||||||
super(p, (l.size()>45) ? 54 : (l.size() + 9-l.size()%9), t);
|
|
||||||
callback = c;
|
|
||||||
//Only here for backwards compatibility
|
|
||||||
elements = new LinkedList<>();
|
|
||||||
for(Pair<SWItem, T> pair : l)
|
|
||||||
elements.add(new SWListEntry<>(pair.getKey(), pair.getValue()));
|
|
||||||
page = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public SWListInv(Player p, String t, List<SWListEntry<T>> l, ListCallback<T> c){
|
public SWListInv(Player p, String t, List<SWListEntry<T>> l, ListCallback<T> c){
|
||||||
super(p, (l.size()>45) ? 54 : (l.size() + 9-l.size()%9), t);
|
super(p, (l.size()>45) ? 54 : (l.size() + 9-l.size()%9), t);
|
||||||
callback = c;
|
callback = c;
|
||||||
@ -79,18 +67,6 @@ public class SWListInv<T> extends SWInventory {
|
|||||||
void clicked(ClickType click, T element);
|
void clicked(ClickType click, T element);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static List<Pair<SWItem, UUID>> createPlayerList(Player without){
|
|
||||||
List<Pair<SWItem, UUID>> onlinePlayers = new ArrayList<>();
|
|
||||||
for(Player player : Bukkit.getOnlinePlayers()){
|
|
||||||
if(without != null && player.getUniqueId().equals(without.getUniqueId()))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
onlinePlayers.add(new Pair<>(SWItem.getPlayerSkull(player), player.getUniqueId()));
|
|
||||||
}
|
|
||||||
return onlinePlayers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<SWListEntry<UUID>> createPlayerList(UUID without){
|
public static List<SWListEntry<UUID>> createPlayerList(UUID without){
|
||||||
List<SWListEntry<UUID>> onlinePlayers = new ArrayList<>();
|
List<SWListEntry<UUID>> onlinePlayers = new ArrayList<>();
|
||||||
for(Player player : Bukkit.getOnlinePlayers()){
|
for(Player player : Bukkit.getOnlinePlayers()){
|
||||||
@ -102,28 +78,6 @@ public class SWListInv<T> extends SWInventory {
|
|||||||
return onlinePlayers;
|
return onlinePlayers;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
public static List<Pair<SWItem, Schematic>> getSchemList(int warkingUserId, SchematicType type){
|
|
||||||
List<Pair<SWItem, Schematic>> schemList = new ArrayList<>();
|
|
||||||
|
|
||||||
List<Schematic> schems;
|
|
||||||
if(type == null)
|
|
||||||
schems = Schematic.getSchemsAccessibleByUser(warkingUserId);
|
|
||||||
else
|
|
||||||
schems = Schematic.getSchemsOfType(warkingUserId, type);
|
|
||||||
|
|
||||||
for(Schematic s : schems){
|
|
||||||
Material m;
|
|
||||||
if(s.getItem().isEmpty())
|
|
||||||
m = SWItem.getMaterial("CAULDRON_ITEM");
|
|
||||||
else
|
|
||||||
m = SWItem.getMaterial(s.getItem());
|
|
||||||
SWItem item = new SWItem(m,"§e" + s.getSchemName());
|
|
||||||
schemList.add(new Pair<>(item, s));
|
|
||||||
}
|
|
||||||
return schemList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static List<SWListEntry<Schematic>> getSchemList(SchematicType type, int steamwarUserId){
|
public static List<SWListEntry<Schematic>> getSchemList(SchematicType type, int steamwarUserId){
|
||||||
List<SWListEntry<Schematic>> schemList = new ArrayList<>();
|
List<SWListEntry<Schematic>> schemList = new ArrayList<>();
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren