Merge pull request 'showRanks' (#57) from showRanks into master
Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
30f5a3430b
@ -1,5 +1,6 @@
|
||||
package de.steamwar.schematicsystem.commands;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import de.steamwar.inventory.SWInventory;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
import de.steamwar.inventory.SWListInv;
|
||||
@ -100,7 +101,9 @@ class GUI {
|
||||
if(schem.getSchemOwner() == SteamwarUser.get(p.getUniqueId()).getId()){
|
||||
if(schem.getSchemType().writeable()){
|
||||
List<CheckedSchematic> checkedSchematics = CheckedSchematic.getLastDeclined(p.getUniqueId());
|
||||
for(CheckedSchematic checkedSchematic : checkedSchematics) {
|
||||
ListIterator<CheckedSchematic> i = checkedSchematics.listIterator(checkedSchematics.size());
|
||||
while(i.hasPrevious()) {
|
||||
CheckedSchematic checkedSchematic = i.previous();
|
||||
if(checkedSchematic.getSchemName().equals(schem.getSchemName()) &&
|
||||
checkedSchematic.getSchemOwner() == schem.getSchemOwner()) {
|
||||
inv.setItem(1, SWItem.getDye(10), (byte) 10, "§eStatus " + schem.getSchemType().name(), Collections.singletonList("§7" + checkedSchematic.getDeclineReason()), false, click -> {});
|
||||
@ -165,6 +168,8 @@ class GUI {
|
||||
m = SWItem.getMaterial(schem.getItem());
|
||||
|
||||
SWItem item = new SWItem(m, "§e" + schem.getSchemName(), Collections.singletonList("§7" + schem.getSchemType().name()), !schem.getSchemType().writeable(), click -> {});
|
||||
if(schem.getRank() > 0)
|
||||
item.setLore(Lists.newArrayList("§7" + schem.getSchemType().name(), "§8Rang " + schem.getRank()));
|
||||
schemList.add(new SWListInv.SWListEntry<>(item, schem));
|
||||
}
|
||||
|
||||
|
@ -292,6 +292,9 @@ public class SchematicCommand implements CommandExecutor {
|
||||
type.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, TextComponent.fromLegacyText("§eTyp ändern")));
|
||||
type.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, "/schem changetype " + schematic.getSchemName()));
|
||||
}
|
||||
if(schematic.getRank() > 0){
|
||||
type.addExtra("§8Rang " + schematic.getRank());
|
||||
}
|
||||
player.spigot().sendMessage(type);
|
||||
|
||||
if(SteamwarUser.get(schematic.getSchemOwner()).getUUID().equals(player.getUniqueId())){
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren