Flog Material & Slot Fixed

This commit is contained in:
Driftay 2019-12-31 00:20:00 -05:00
parent 87f0810914
commit f7297c96c4

View File

@ -31,11 +31,9 @@ public class FAuditMenu extends GUIMenu {
} }
public void drawItems() { public void drawItems() {
int index = 0;
for (FLogType type : FLogType.values()) { for (FLogType type : FLogType.values()) {
if (type.getSlot() == -1) continue; if (type.getSlot() == -1) continue;
if (type != FLogType.F_TNT || FactionsPlugin.getInstance().getConfig().getBoolean("f-points.Enabled")) { if (type != FLogType.F_TNT || FactionsPlugin.getInstance().getConfig().getBoolean("f-points.Enabled")) {
if (index == 9) index = FactionsPlugin.getInstance().getConfig().getBoolean("f-points.Enabled") ? 11 : 12;
FactionLogs logs = FactionsPlugin.instance.getFlogManager().getFactionLogMap().get(faction.getId()); FactionLogs logs = FactionsPlugin.instance.getFlogManager().getFactionLogMap().get(faction.getId());
if (logs == null) logs = new FactionLogs(); if (logs == null) logs = new FactionLogs();
LinkedList<FactionLogs.FactionLog> recentLogs = logs.getMostRecentLogs().get(type); LinkedList<FactionLogs.FactionLog> recentLogs = logs.getMostRecentLogs().get(type);
@ -57,7 +55,7 @@ public class FAuditMenu extends GUIMenu {
lore.add(""); lore.add("");
if (logsLeft > 0) lore.add(CC.Yellow + "Left-Click " + CC.Gray + "to view more logs"); if (logsLeft > 0) lore.add(CC.Yellow + "Left-Click " + CC.Gray + "to view more logs");
lore.add(CC.Yellow + "Right-Click " + CC.Gray + "to toggle timestamps"); lore.add(CC.Yellow + "Right-Click " + CC.Gray + "to toggle timestamps");
setItem(index++, (new ClickableItemStack((new ItemBuilder(type.getMaterial())).name(CC.GreenB + type.getDisplayName()).lore(lore).build())).setClickCallback((click) -> { setItem(type.getSlot(), (new ClickableItemStack((new ItemBuilder(type.getMaterial())).name(CC.GreenB + type.getDisplayName()).lore(lore).build())).setClickCallback((click) -> {
click.setCancelled(true); click.setCancelled(true);
if (click.getClick() == ClickType.RIGHT) { if (click.getClick() == ClickType.RIGHT) {
showTimestamps = !showTimestamps; showTimestamps = !showTimestamps;
@ -72,7 +70,6 @@ public class FAuditMenu extends GUIMenu {
})); }));
} }
} }
} }
static class FAuditLogMenu extends GUIMenu { static class FAuditLogMenu extends GUIMenu {