mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Better context yes
This commit is contained in:
parent
a060c01f58
commit
f42e418346
@ -191,8 +191,6 @@ public class CommandIris implements DecreeExecutor {
|
||||
PlatformChunkGenerator plat = IrisToolbelt.access(player().getWorld());
|
||||
Engine engine = plat.getEngine();
|
||||
try {
|
||||
int vd = radius;
|
||||
int rg = 0;
|
||||
Chunk cx = player().getLocation().getChunk();
|
||||
KList<Runnable> js = new KList<>();
|
||||
BurstExecutor b = MultiBurst.burst.burst();
|
||||
|
@ -449,7 +449,7 @@ public class VirtualDecreeCommand {
|
||||
value = update;
|
||||
}
|
||||
|
||||
if (i.isContextual() && value == null) {
|
||||
if (sender.isPlayer() && i.isContextual() && value == null) {
|
||||
DecreeContextHandler<?> ch = DecreeContextHandler.contextHandlers.get(i.getType());
|
||||
|
||||
if (ch != null) {
|
||||
|
@ -544,17 +544,15 @@ public class VolmitSender implements CommandSender {
|
||||
String nHoverTitle = p.getNames().convert((ff) -> "<#d665f0>" + ff).toString(", ");
|
||||
String nDescription = "<#3fe05a>✎ <#6ad97d><font:minecraft:uniform>" + p.getDescription();
|
||||
String nUsage;
|
||||
String context = "";
|
||||
if (p.isRequired()) {
|
||||
if (p.isContextual() && isPlayer()) {
|
||||
nUsage = "<#ff9900>➱ <#ffcc00><font:minecraft:uniform>The value may be derived from environment context" + newline;
|
||||
} else if (p.isRequired()) {
|
||||
nUsage = "<#db4321>⚠ <#faa796><font:minecraft:uniform>This parameter is required.";
|
||||
} else if (p.hasDefault()) {
|
||||
nUsage = "<#2181db>✔ <#78dcf0><font:minecraft:uniform>Defaults to \"" + p.getParam().defaultValue() + "\" if undefined.";
|
||||
} else {
|
||||
nUsage = "<#a73abd>✔ <#78dcf0><font:minecraft:uniform>This parameter is optional.";
|
||||
}
|
||||
if (p.isContextual()) {
|
||||
context = "<#ff9900>➱ <#ffcc00><font:minecraft:uniform>The value may be derived from environment context" + newline;
|
||||
}
|
||||
String type = "<#cc00ff>✢ <#ff33cc><font:minecraft:uniform>This parameter is of type " + p.getType().getSimpleName();
|
||||
String fullTitle;
|
||||
if (p.isRequired()) {
|
||||
@ -567,7 +565,6 @@ public class VolmitSender implements CommandSender {
|
||||
.append("<hover:show_text:'")
|
||||
.append(nHoverTitle).append(newline)
|
||||
.append(nDescription).append(newline)
|
||||
.append(context)
|
||||
.append(nUsage).append(newline)
|
||||
.append(type)
|
||||
.append("'>")
|
||||
|
Loading…
x
Reference in New Issue
Block a user