Dieser Commit ist enthalten in:
Ursprung
c59da8ff49
Commit
d58ae049cf
@ -23,7 +23,7 @@ public class ModCommand extends SWCommand {
|
||||
|
||||
private static final Statement get = new Statement("SELECT * FROM Mods WHERE ModName = ? AND Platform = ?");
|
||||
|
||||
private static final Statement getAll = new Statement("SELECT * FROM Mods WHERE ModType = 0 ORDER BY ModName DESC LIMIT ?, ?");
|
||||
private static final Statement getAll = new Statement("SELECT * FROM Mods ORDER BY ModName DESC LIMIT ?, ?");
|
||||
|
||||
public ModCommand() {
|
||||
super("mod", "bungeecore.softreload", "mods");
|
||||
@ -31,22 +31,26 @@ public class ModCommand extends SWCommand {
|
||||
|
||||
@Register(value = "a")
|
||||
public void genericCommand(ProxiedPlayer p) {
|
||||
new SWStreamInv<>(p,Message.parse("MOD_COMMAND_GUI_TITLE",p), (click, element) -> {
|
||||
SWInventory swInventory = new SWInventory(p,5,"Mod Changer");
|
||||
SWStreamInv<ModEntry> swStreamInv = new SWStreamInv<>(p,Message.parse("MOD_COMMAND_GUI_TITLE",p), (click, element) -> {
|
||||
openGradingWindow(p,element);
|
||||
},page -> getMods(page,45).stream().map(mod -> new SWListInv.SWListEntry<>(getModItem(mod),mod)).collect(Collectors.toList()));
|
||||
|
||||
String modName = element.modName;
|
||||
int modPlatform = element.platform.get();
|
||||
swStreamInv.open();
|
||||
}
|
||||
|
||||
swInventory.addItem(0,new SWItem("GRAY_CONCRETE","Unclassified"), (click1 -> set.update(0,modName,modPlatform)));
|
||||
private void openGradingWindow(ProxiedPlayer p,ModEntry element) {
|
||||
SWInventory swInventory = new SWInventory(p,9,Message.parse("MOD_COMMAND_GUI",p));
|
||||
|
||||
swInventory.addItem(1,new SWItem("GREEN_CONCRETE", "Allowed"), (click1 -> set.update(1,modName,modPlatform)));
|
||||
swInventory.addItem(2,new SWItem("YELLOW_CONCRETE", "Pending"),(click1 -> set.update(2,modName,modPlatform)));
|
||||
swInventory.addItem(3,new SWItem("RED_CONCRETE","Forbidden"),(click1 -> set.update(3,modName,modPlatform)));
|
||||
swInventory.addItem(4,new SWItem("PURPLE_CONCRETE", "YT_only"),(click1 -> set.update(4,modName,modPlatform)));
|
||||
String modName = element.modName;
|
||||
int modPlatform = element.platform.get();
|
||||
|
||||
swInventory.open();
|
||||
swInventory.addItem(2,new SWItem("GRAY_CONCRETE","Unclassified"), (click1 -> set.update(0,modName,modPlatform)));
|
||||
swInventory.addItem(3,new SWItem("GREEN_CONCRETE", "Allowed"), (click1 -> set.update(1,modName,modPlatform)));
|
||||
swInventory.addItem(4,new SWItem("YELLOW_CONCRETE", "Pending"),(click1 -> set.update(2,modName,modPlatform)));
|
||||
swInventory.addItem(5,new SWItem("RED_CONCRETE","Forbidden"),(click1 -> set.update(3,modName,modPlatform)));
|
||||
swInventory.addItem(6,new SWItem("PURPLE_CONCRETE", "YT_only"),(click1 -> set.update(4,modName,modPlatform)));
|
||||
|
||||
},page -> getMods(page,45).stream().map(mod -> new SWListInv.SWListEntry<>(getModItem(mod),mod)).collect(Collectors.toList())).open();
|
||||
swInventory.open();
|
||||
}
|
||||
|
||||
private SWItem getModItem(ModEntry modEntry) {
|
||||
|
@ -665,4 +665,5 @@ MOD_NO_MORE_UNCLASSIFIED_MODS=§7No more unclassified mods found in databank!
|
||||
MOD_FOUND_NEXT_MOD=§7Next unclassified mod is {0}!
|
||||
MOD_COMMAND_NOT_FOUND_IN_DATABASE=§7The Mod {0} on platform {1} was§c not §7found in the database!
|
||||
MOD_COMMAND_INFO=§7The mod {0} on platform {1} is of the type {2}.
|
||||
MOD_COMMAND_GUI_TITLE="§7Unclassified Mods"
|
||||
MOD_COMMAND_GUI_TITLE=§7Unclassified Mods
|
||||
MOD_COMMAND_GUI=§7Mod Type Changer
|
In neuem Issue referenzieren
Einen Benutzer sperren