implement RecursionsFunction

This commit is contained in:
dfsek
2020-12-23 15:09:42 -07:00
parent 63e59692e2
commit 7fe7dac57a
23 changed files with 173 additions and 80 deletions

View File

@@ -32,9 +32,14 @@ public class LoadRawCommand extends LoadCommand implements DebugCommand {
@Override
public boolean execute(@NotNull Player sender, @NotNull Command command, @NotNull String s, @NotNull String[] args) {
TerraWorld terraWorld = getMain().getWorld(new BukkitWorld(sender.getWorld()));
terraWorld.getConfig().getScriptRegistry().get(args[0]).execute(new Location(new BukkitWorld(sender.getWorld()), sender.getLocation().getX(), sender.getLocation().getY(), sender.getLocation().getZ()), Rotation.fromDegrees(90 * ThreadLocalRandom.current().nextInt(4)));
TerraWorld terraWorld = getMain().getWorld(new BukkitWorld(sender.getWorld()));
long t = System.nanoTime();
terraWorld.getConfig().getScriptRegistry().get(args[0]).execute(new Location(new BukkitWorld(sender.getWorld()), sender.getLocation().getX(), sender.getLocation().getY(), sender.getLocation().getZ()), Rotation.fromDegrees(90 * ThreadLocalRandom.current().nextInt(4)), 0);
long l = System.nanoTime() - t;
sender.sendMessage("Took " + ((double) l) / 1000000 + "ms");
/*
try {