Open Murreey opened 7 years ago
idk why it's using the command method directly to do the paste. It'll break if any of the arguments are changed. In this case I added some flags to control whether entities or biomes are pasted e.g. //paste -e
Using the proper API, or the command dispatcher would be better, since it wouldn't break if any commands are tweaked.
I've temporarily fixed this by adding the previous method without the new flags.
Hi, I will have to go relearn everything. Off the top of my head I'm guessing I wanted to use something built into the command, but you are right, that does sound like a misuse.
Also, skcp_set
won't work with normal WorldEdit as the command was changed (ages ago). It should work with the latest FAWE which has the method.
Example of using the dispatcher:
String cmd = "/paste";
if (airless) cmd += " -a";
if (origin) cmd += " -o";
if (select) cmd += " -s";
CommandLocals locals = new CommandLocals();
locals.put(Actor.class, user);
locals.put("arguments", cmd);
WorldEdit.getInstance().getPlatformManager().getCommandManager().getDispatcher().call(cmd, locals, new String[0]);
Example of using the API:
Since updating to 1.12 I'm getting this error when trying to use skcb_paste():
Doesn't happen with only WorldEdit, but does with FAWE. I'm running latest builds of everything.
(Might also be relevant to @boy0001)