Fixing Stuff...
Dieser Commit ist enthalten in:
Ursprung
8128d44011
Commit
0ef5f6dcb9
@ -529,7 +529,11 @@ public class TeamCommand extends BasicCommand {
|
||||
return;
|
||||
|
||||
List<SWListInv.SWListEntry<String>> colors = new ArrayList<>();
|
||||
COLOR_CODES.forEach(stringSWListEntry -> colors.add(new SWListInv.SWListEntry<>(stringSWListEntry.getItem().setName(stringSWListEntry.getItem().getTitle() + Team.get(user.getTeam()).getTeamKuerzel()), stringSWListEntry.getObject())));
|
||||
COLOR_CODES.forEach(stringSWListEntry -> {
|
||||
SWItem item = stringSWListEntry.getItem().clone();
|
||||
item.setName(stringSWListEntry.getItem().getTitle() + Team.get(user.getTeam()).getTeamKuerzel());
|
||||
colors.add(new SWListInv.SWListEntry<>(item, stringSWListEntry.getObject()));
|
||||
});
|
||||
|
||||
SWListInv<String> inv = new SWListInv<>(player, "§6Farbe wählen", colors, (click, element) -> {});
|
||||
inv.setCallback((click, element) -> {
|
||||
|
@ -156,4 +156,18 @@ public class SWItem {
|
||||
public void setLore(List<String> lore) {
|
||||
this.lore = lore;
|
||||
}
|
||||
|
||||
public SWItem clone() {
|
||||
SWItem item;
|
||||
if(color != 0) {
|
||||
item = new SWItem(title, color);
|
||||
}else {
|
||||
item = new SWItem(material, title);
|
||||
}
|
||||
item.setLore(lore);
|
||||
item.setCallback(callback);
|
||||
item.setEnchanted(enchanted);
|
||||
item.setHideAttributes(hideAttributes);
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ public class SWListInv<T> extends SWInventory {
|
||||
|
||||
@Override
|
||||
public void open(){
|
||||
setCallback(-999, (InvCallback.ClickType click) -> close());
|
||||
if(elements.size() > 54){
|
||||
if(page != 0)
|
||||
addItem(45, new SWItem("§eSeite zurück", 10), (InvCallback.ClickType click) -> {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren