mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
Further simplifications of sender for clarity
This commit is contained in:
parent
ade88a6055
commit
6abef569e8
@ -430,24 +430,23 @@ public class VolmitSender implements CommandSender {
|
|||||||
|
|
||||||
/// Command
|
/// Command
|
||||||
// Contains main command & aliases
|
// Contains main command & aliases
|
||||||
String title = i.getPath() + " >" + "<#46826a>⇀<gradient:#42ecf5:#428df5> " + i.getName();
|
String realText = i.getPath() + " >" + "<#46826a>⇀<gradient:#42ecf5:#428df5> " + i.getName();
|
||||||
String hoverTitle = i.getNames().copy().reverse().convert((f) -> "<#42ecf5>" + f).toString(", ");
|
String hoverTitle = i.getNames().copy().reverse().convert((f) -> "<#42ecf5>" + f).toString(", ");
|
||||||
String description = "<#3fe05a>✎ <#6ad97d><font:minecraft:uniform>" + i.getDescription();
|
String description = "<#3fe05a>✎ <#6ad97d><font:minecraft:uniform>" + i.getDescription();
|
||||||
String usage = "<#bbe03f>✒ <#a8e0a2>";
|
String usage = "<#bbe03f>✒ <#a8e0a2><font:minecraft:uniform>";
|
||||||
String onClick = "<click:";
|
String onClick;
|
||||||
if (i.isNode()) {
|
if (i.isNode()) {
|
||||||
if (i.getNode().getParameters().isEmpty()){
|
if (i.getNode().getParameters().isEmpty()){
|
||||||
usage += "<font:minecraft:uniform>There are no parameters. Click to run.";
|
usage += "There are no parameters. Click to run.";
|
||||||
onClick += "run_command";
|
onClick = "run_command";
|
||||||
} else {
|
} else {
|
||||||
usage += "<font:minecraft:uniform>Hover over all of the parameters to learn more.";
|
usage += "Hover over all of the parameters to learn more.";
|
||||||
onClick += "suggest_command";
|
onClick = "suggest_command";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
usage += "<font:minecraft:uniform>This is a command category. Click to run.";
|
usage += "This is a command category. Click to run.";
|
||||||
onClick += "run_command";
|
onClick = "run_command";
|
||||||
}
|
}
|
||||||
onClick += ":" + title + "</click>";
|
|
||||||
|
|
||||||
String suggestion = "";
|
String suggestion = "";
|
||||||
String suggestions = "";
|
String suggestions = "";
|
||||||
@ -501,21 +500,24 @@ public class VolmitSender implements CommandSender {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Wrapper
|
/// Wrapper
|
||||||
StringBuilder wrapper = new StringBuilder()
|
String wrapper =
|
||||||
.append("<hover:show_text:'")
|
"<hover:show_text:'" +
|
||||||
.append(hoverTitle).append(newline)
|
hoverTitle + newline +
|
||||||
.append(description).append(newline)
|
description + newline +
|
||||||
.append(usage)
|
usage +
|
||||||
.append(suggestion)
|
suggestion +
|
||||||
.append(suggestions)
|
suggestions +
|
||||||
.append("'>")
|
"'>" +
|
||||||
.append(onClick)
|
"<click:" +
|
||||||
.append("</hover>")
|
onClick +
|
||||||
.append(" ")
|
":" +
|
||||||
.append(nodes);
|
realText +
|
||||||
|
"</click>" +
|
||||||
|
"</hover>" +
|
||||||
|
" " +
|
||||||
|
nodes;
|
||||||
|
|
||||||
sendMessageRaw(wrapper.toString());
|
sendMessageRaw(wrapper);
|
||||||
System.out.println(wrapper);
|
|
||||||
} else {
|
} else {
|
||||||
sendMessage(i.getPath());
|
sendMessage(i.getPath());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user