mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
CHATTY
This commit is contained in:
parent
93e0773758
commit
30c5a0d9cd
@ -322,9 +322,14 @@ public class ProjectManager {
|
||||
return activeProject != null && activeProject.isOpen();
|
||||
}
|
||||
|
||||
|
||||
public void open(VolmitSender sender, String dimm) {
|
||||
open(sender, 1337, dimm);
|
||||
}
|
||||
|
||||
public void open(VolmitSender sender, long seed, String dimm) {
|
||||
try {
|
||||
open(sender, dimm, () ->
|
||||
open(sender,seed, dimm, () ->
|
||||
{
|
||||
if (sender.isPlayer()) {
|
||||
}
|
||||
@ -336,14 +341,14 @@ public class ProjectManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void open(VolmitSender sender, String dimm, Runnable onDone) throws IrisException {
|
||||
public void open(VolmitSender sender, long seed, String dimm, Runnable onDone) throws IrisException {
|
||||
if (isProjectOpen()) {
|
||||
close();
|
||||
}
|
||||
|
||||
IrisProject project = new IrisProject(new File(getWorkspaceFolder(), dimm));
|
||||
activeProject = project;
|
||||
project.open(sender, onDone);
|
||||
project.open(sender, seed, onDone);
|
||||
}
|
||||
|
||||
public File getWorkspaceFolder(String... sub) {
|
||||
|
@ -18,19 +18,36 @@
|
||||
|
||||
package com.volmit.iris.core.decrees;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.engine.object.dimensional.IrisDimension;
|
||||
import com.volmit.iris.util.decree.DecreeExecutor;
|
||||
import com.volmit.iris.util.decree.annotations.Decree;
|
||||
import com.volmit.iris.util.decree.annotations.Param;
|
||||
import com.volmit.iris.util.format.C;
|
||||
|
||||
@Decree(name = "studio", aliases = {"std", "s"}, description = "Studio Commands")
|
||||
@Decree(name = "studio", aliases = {"std", "s"}, description = "Studio Commands", studio = true)
|
||||
public class CMDIrisStudio implements DecreeExecutor
|
||||
{
|
||||
@Decree(description = "Open a new studio world", aliases = "o")
|
||||
@Decree(description = "Open a new studio world", aliases = "o", sync = true)
|
||||
public void open(
|
||||
@Param(name = "dimension", defaultValue = "overworld", aliases = "dim")
|
||||
IrisDimension dimension)
|
||||
@Param(name = "dimension", defaultValue = "overworld", aliases = "dim", required = true)
|
||||
IrisDimension dimension,
|
||||
@Param(name = "seed", defaultValue = "1337", aliases = "s")
|
||||
long seed)
|
||||
{
|
||||
sender().sendMessage(message + "!");
|
||||
Iris.proj.open(sender(), dimension.getLoadKey());
|
||||
}
|
||||
|
||||
@Decree(description = "Close an open studio project", aliases = "x", sync = true)
|
||||
public void close()
|
||||
{
|
||||
if (!Iris.proj.isProjectOpen()) {
|
||||
sender().sendMessage(C.RED + "No open studio projects.");
|
||||
return;
|
||||
}
|
||||
|
||||
Iris.proj.getActiveProject().getActiveProvider().getTarget().getWorld().evacuate();
|
||||
Iris.proj.close();
|
||||
sender().sendMessage(C.YELLOW + "Project Closed");
|
||||
}
|
||||
}
|
||||
|
@ -98,12 +98,12 @@ public class IrisProject {
|
||||
}
|
||||
|
||||
public void open(VolmitSender sender) throws IrisException {
|
||||
open(sender, () ->
|
||||
open(sender, 1337, () ->
|
||||
{
|
||||
});
|
||||
}
|
||||
|
||||
public void open(VolmitSender sender, Runnable onDone) throws IrisException {
|
||||
public void open(VolmitSender sender, long seed, Runnable onDone) throws IrisException {
|
||||
if (isOpen()) {
|
||||
close();
|
||||
}
|
||||
@ -171,7 +171,7 @@ public class IrisProject {
|
||||
|
||||
|
||||
J.a(() -> activeProvider = (PlatformChunkGenerator) IrisToolbelt.createWorld()
|
||||
.seed(1337)
|
||||
.seed(seed)
|
||||
.sender(sender)
|
||||
.studio(true)
|
||||
.name("iris/" + UUID.randomUUID())
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
package com.volmit.iris.util.decree;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.plugin.VolmitSender;
|
||||
import com.volmit.iris.util.scheduling.ChronoLatch;
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
package com.volmit.iris.util.decree;
|
||||
|
||||
import com.volmit.iris.core.tools.IrisToolbelt;
|
||||
import com.volmit.iris.engine.framework.Engine;
|
||||
import com.volmit.iris.util.plugin.VolmitSender;
|
||||
|
||||
public interface DecreeExecutor {
|
||||
@ -26,6 +28,16 @@ public interface DecreeExecutor {
|
||||
return DecreeContext.get();
|
||||
}
|
||||
|
||||
default Engine engine()
|
||||
{
|
||||
if(sender().isPlayer())
|
||||
{
|
||||
return IrisToolbelt.access(sender().player().getWorld()).getEngine();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
default <T> T get(T v, T ifUndefined)
|
||||
{
|
||||
return v == null ? ifUndefined : v;
|
||||
|
@ -82,4 +82,21 @@ public class DecreeParameter {
|
||||
public Object getDefaultValue() throws DecreeParsingException, DecreeWhichException {
|
||||
return param.defaultValue().isEmpty() ? null : getHandler().parse(param.defaultValue());
|
||||
}
|
||||
|
||||
public boolean hasDefault() {
|
||||
return !param.defaultValue().isEmpty();
|
||||
}
|
||||
|
||||
public String example() {
|
||||
KList<?> ff = getHandler().getPossibilities();
|
||||
ff = ff != null ? ff : new KList<>();
|
||||
KList<String> f = ff.convert((i) -> getHandler().toStringForce(i));
|
||||
if(f.isEmpty())
|
||||
{
|
||||
f = new KList<>();
|
||||
f.add(getHandler().getRandomDefault());
|
||||
}
|
||||
|
||||
return f.getRandom();
|
||||
}
|
||||
}
|
||||
|
@ -37,6 +37,11 @@ public interface DecreeParameterHandler<T> {
|
||||
*/
|
||||
String toString(T t);
|
||||
|
||||
default String toStringForce(Object t)
|
||||
{
|
||||
return toString((T)t);
|
||||
}
|
||||
|
||||
/**
|
||||
* Should parse a String into the designated type
|
||||
* @param in The string to parse
|
||||
@ -90,4 +95,9 @@ public interface DecreeParameterHandler<T> {
|
||||
|
||||
return matches;
|
||||
}
|
||||
|
||||
default String getRandomDefault()
|
||||
{
|
||||
return "NOEXAMPLE";
|
||||
}
|
||||
}
|
||||
|
@ -36,6 +36,12 @@ public @interface Decree {
|
||||
*/
|
||||
String name() default "";
|
||||
|
||||
/**
|
||||
* Only allow if studio mode is enabled
|
||||
* @return defaults to false
|
||||
*/
|
||||
boolean studio() default false;
|
||||
|
||||
boolean sync() default false;
|
||||
|
||||
/**
|
||||
|
@ -27,6 +27,7 @@ import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeWhichException;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
@ -88,4 +89,10 @@ public class BiomeHandler implements DecreeParameterHandler<IrisBiome> {
|
||||
public boolean supports(Class<?> type) {
|
||||
return type.equals(IrisBiome.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return "biome";
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ package com.volmit.iris.util.decree.handlers;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
public class ByteHandler implements DecreeParameterHandler<Byte> {
|
||||
@Override
|
||||
@ -50,4 +51,10 @@ public class ByteHandler implements DecreeParameterHandler<Byte> {
|
||||
public boolean supports(Class<?> type) {
|
||||
return type.equals(Byte.class) || type.equals(byte.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return RNG.r.i(0, Byte.MAX_VALUE) + "";
|
||||
}
|
||||
}
|
||||
|
@ -89,4 +89,10 @@ public class DimensionHandler implements DecreeParameterHandler<IrisDimension> {
|
||||
public boolean supports(Class<?> type) {
|
||||
return type.equals(IrisDimension.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return "dimension";
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ package com.volmit.iris.util.decree.handlers;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
public class DoubleHandler implements DecreeParameterHandler<Double> {
|
||||
@Override
|
||||
@ -50,4 +52,10 @@ public class DoubleHandler implements DecreeParameterHandler<Double> {
|
||||
public String toString(Double f) {
|
||||
return f.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return Form.f(RNG.r.d(0, 99.99), 1) + "";
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ package com.volmit.iris.util.decree.handlers;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
public class FloatHandler implements DecreeParameterHandler<Float> {
|
||||
@Override
|
||||
@ -50,4 +52,10 @@ public class FloatHandler implements DecreeParameterHandler<Float> {
|
||||
public String toString(Float f) {
|
||||
return f.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return Form.f(RNG.r.d(0, 99.99), 1) + "";
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ package com.volmit.iris.util.decree.handlers;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
public class IntegerHandler implements DecreeParameterHandler<Integer> {
|
||||
@Override
|
||||
@ -50,4 +52,10 @@ public class IntegerHandler implements DecreeParameterHandler<Integer> {
|
||||
public String toString(Integer f) {
|
||||
return f.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return RNG.r.i(0, 99) + "";
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ package com.volmit.iris.util.decree.handlers;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
public class LongHandler implements DecreeParameterHandler<Long> {
|
||||
@Override
|
||||
@ -50,4 +51,10 @@ public class LongHandler implements DecreeParameterHandler<Long> {
|
||||
public String toString(Long f) {
|
||||
return f.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return RNG.r.i(0, 99) + "";
|
||||
}
|
||||
}
|
||||
|
@ -67,4 +67,10 @@ public class PlayerHandler implements DecreeParameterHandler<Player> {
|
||||
public boolean supports(Class<?> type) {
|
||||
return type.equals(Player.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return "playername";
|
||||
}
|
||||
}
|
||||
|
@ -87,4 +87,10 @@ public class RegionHandler implements DecreeParameterHandler<IrisRegion> {
|
||||
public boolean supports(Class<?> type) {
|
||||
return type.equals(IrisRegion.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return "region";
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ package com.volmit.iris.util.decree.handlers;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
public class ShortHandler implements DecreeParameterHandler<Short> {
|
||||
@Override
|
||||
@ -50,4 +51,10 @@ public class ShortHandler implements DecreeParameterHandler<Short> {
|
||||
public String toString(Short f) {
|
||||
return f.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return RNG.r.i(0, 99) + "";
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ package com.volmit.iris.util.decree.handlers;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.decree.DecreeParameterHandler;
|
||||
import com.volmit.iris.util.decree.exceptions.DecreeParsingException;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
|
||||
/**
|
||||
* Abstraction can sometimes breed stupidity
|
||||
@ -45,4 +46,11 @@ public class StringHandler implements DecreeParameterHandler<String> {
|
||||
public boolean supports(Class<?> type) {
|
||||
return type.equals(String.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return new KList<String>().qadd("text").qadd("string")
|
||||
.qadd("blah").qadd("derp").qadd("yolo").getRandom();
|
||||
}
|
||||
}
|
||||
|
@ -67,4 +67,10 @@ public class WorldHandler implements DecreeParameterHandler<World> {
|
||||
public boolean supports(Class<?> type) {
|
||||
return type.equals(World.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRandomDefault()
|
||||
{
|
||||
return "world";
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
package com.volmit.iris.util.decree.virtual;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.decree.DecreeContext;
|
||||
@ -82,10 +83,11 @@ public class VirtualDecreeCommand {
|
||||
|
||||
if(childRoot == null)
|
||||
{
|
||||
i.set(v, i.getType().getConstructor().newInstance());
|
||||
childRoot = i.getType().getConstructor().newInstance();
|
||||
i.set(v, childRoot);
|
||||
}
|
||||
|
||||
c.getNodes().add(createRoot(c, v));
|
||||
c.getNodes().add(createRoot(c, childRoot));
|
||||
}
|
||||
|
||||
for(Method i : v.getClass().getDeclaredMethods())
|
||||
@ -120,11 +122,20 @@ public class VirtualDecreeCommand {
|
||||
return "/" + n.reverse().qadd(getName()).toString(" ");
|
||||
}
|
||||
|
||||
public String getParentPath()
|
||||
{
|
||||
return getParent().getPath();
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return isNode() ? getNode().getName() : getType().getDeclaredAnnotation(Decree.class).name();
|
||||
}
|
||||
|
||||
private boolean isStudio() {
|
||||
return isNode() ? getNode().getDecree().studio() : getType().getDeclaredAnnotation(Decree.class).studio();
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return isNode() ? getNode().getDescription() : getType().getDeclaredAnnotation(Decree.class).description();
|
||||
@ -262,6 +273,12 @@ public class VirtualDecreeCommand {
|
||||
|
||||
public boolean invoke(VolmitSender sender, KList<String> args, KList<Integer> skip)
|
||||
{
|
||||
if(isStudio() && !IrisSettings.get().isStudio())
|
||||
{
|
||||
sender.sendMessage(C.RED + "To use Iris Studio Commands, please enable studio in Iris/settings.json (settings auto-reload)");
|
||||
return false;
|
||||
}
|
||||
|
||||
Iris.debug("@ " + getPath() + " with " + args.toString(", "));
|
||||
if(isNode())
|
||||
{
|
||||
|
@ -20,10 +20,12 @@ package com.volmit.iris.util.plugin;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.core.IrisSettings;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.decree.virtual.VirtualDecreeCommand;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import com.volmit.iris.util.format.Form;
|
||||
import com.volmit.iris.util.math.M;
|
||||
import com.volmit.iris.util.math.RNG;
|
||||
import com.volmit.iris.util.scheduling.J;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
@ -259,6 +261,11 @@ public class VolmitSender implements CommandSender {
|
||||
return MiniMessage.get().parse(a);
|
||||
}
|
||||
|
||||
private Component createComponentRaw(String message) {
|
||||
String t = C.translateAlternateColorCodes('&', getTag() + message);
|
||||
return MiniMessage.get().parse(t);
|
||||
}
|
||||
|
||||
public <T> void showWaiting(String passive, CompletableFuture<T> f) {
|
||||
AtomicInteger v = new AtomicInteger();
|
||||
AtomicReference<T> g = new AtomicReference<>();
|
||||
@ -301,6 +308,24 @@ public class VolmitSender implements CommandSender {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void sendMessageRaw(String message) {
|
||||
if (message.contains("<NOMINI>")) {
|
||||
s.sendMessage(message.replaceAll("\\Q<NOMINI>\\E", ""));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
Iris.audiences.sender(s).sendMessage(createComponentRaw(message));
|
||||
} catch (Throwable e) {
|
||||
String t = C.translateAlternateColorCodes('&', getTag() + message);
|
||||
String a = C.aura(t, IrisSettings.get().getGeneral().getSpinh(), IrisSettings.get().getGeneral().getSpins(), IrisSettings.get().getGeneral().getSpinb());
|
||||
|
||||
Iris.debug("<NOMINI>Failure to parse " + a);
|
||||
s.sendMessage(C.translateAlternateColorCodes('&', getTag() + message));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(String[] messages) {
|
||||
for (String str : messages)
|
||||
@ -335,6 +360,30 @@ public class VolmitSender implements CommandSender {
|
||||
return s.spigot();
|
||||
}
|
||||
|
||||
private String pickRandoms(int max, VirtualDecreeCommand i)
|
||||
{
|
||||
KList<String> m = new KList<>();
|
||||
for(int ix = 0; ix < max; ix++)
|
||||
{
|
||||
m.add((i.isNode()
|
||||
? (i.getNode().getParameters().isNotEmpty())
|
||||
? "<gradient:#aebef2:#aef0f2>Or: <gradient:#5ef288:#99f25e>"
|
||||
+ i.getParentPath()
|
||||
+ " <gradient:#42ecf5:#428df5>"
|
||||
+ i.getName() + " "
|
||||
+ i.getNode().getParameters().shuffleCopy(RNG.r).convert((f)
|
||||
-> (f.isRequired() || RNG.r.b(0.5)
|
||||
? "<gradient:#f2e15e:#c4d45b>" + f.getNames().getRandom() + "="
|
||||
+ "<gradient:#d665f0:#a37feb>" + f.example()
|
||||
: ""))
|
||||
.toString(" ")
|
||||
: ""
|
||||
: ""));
|
||||
}
|
||||
|
||||
return m.removeDuplicates().convert((iff) -> iff.replaceAll("\\Q \\E", " ")).toString("\n");
|
||||
}
|
||||
|
||||
public void sendDecreeHelp(VirtualDecreeCommand v) {
|
||||
int m = v.getNodes().size();
|
||||
|
||||
@ -342,7 +391,57 @@ public class VolmitSender implements CommandSender {
|
||||
{
|
||||
for(VirtualDecreeCommand i : v.getNodes())
|
||||
{
|
||||
sendMessage(i.getPath() + " - " + i.getDescription());
|
||||
if(isPlayer())
|
||||
{
|
||||
//@builder
|
||||
sendMessageRaw(
|
||||
"<hover:show_text:'"+
|
||||
i.getNames().copy().reverse().convert((f) -> "<gradient:#42ecf5:#428df5>" + f).toString(", ") + "\n"
|
||||
+ "<gradient:#dbf296:#e7f0ce>" + i.getDescription() + "\n"
|
||||
+ "<gradient:#a8e0a2:#aef2cd>" + (i.isNode()
|
||||
? ((i.getNode().getParameters().isEmpty()
|
||||
? "There are no parameters."
|
||||
: "Hover over all of the parameters to learn more.") + "\n")
|
||||
: "This is a command category. Run <gradient:#98eda5:#ccf0bd>" + i.getPath())
|
||||
+ (i.isNode()
|
||||
? (i.getNode().getParameters().isNotEmpty())
|
||||
? "<gradient:#aebef2:#aef0f2>Usage: <gradient:#5ef288:#99f25e>"
|
||||
+ i.getParentPath()
|
||||
+ " <gradient:#42ecf5:#428df5>"
|
||||
+ i.getName() + " "
|
||||
+ i.getNode().getParameters().convert((f)
|
||||
-> "<gradient:#d665f0:#a37feb>" + f.example())
|
||||
.toString(" ") + "\n"
|
||||
: ""
|
||||
: "")
|
||||
+ (i.isNode() ? pickRandoms(Math.min(i.getNode().getParameters().size() + 1, 5), i) : "")
|
||||
+ "'><click:suggest_command:" + i.getPath() + " >"
|
||||
+ "<gradient:#42ecf5:#428df5>" +i.getName() + "</click></hover>"
|
||||
+ (i.isNode() ?
|
||||
" " + i.getNode().getParameters().convert((f)
|
||||
-> "<hover:show_text:'"
|
||||
+ f.getNames().convert((ff) -> "<gradient:#d665f0:#a37feb>" + ff).toString(", ") + "\n"
|
||||
+ "<gradient:#dbf296:#e7f0ce>" + f.getDescription() + "\n"
|
||||
+ (f.isRequired()
|
||||
? "<gradient:#faa796:#f0ba78>This parameter is required."
|
||||
: (f.hasDefault()
|
||||
? "<gradient:#78dcf0:#baf7e5>Defaults to \""+f.getParam().defaultValue()+"\" if undefined."
|
||||
: "<gradient:#78dcf0:#baf7e5>This parameter is optional."))
|
||||
+ "'>"
|
||||
+ (f.isRequired() ? "<red>[" : "")
|
||||
+ "<gradient:#d665f0:#a37feb>" + f.getName()
|
||||
+ (f.isRequired() ? "<red>]<gray>" : "")
|
||||
+ "</hover>").toString(" ")
|
||||
: "<gradient:#afe3d3:#a2dae0> - Category of Commands"
|
||||
)
|
||||
);
|
||||
//@done
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
sendMessage(i.getPath() + "()");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user