Merge branch 'v3.0' of git@github-home:webbukkit/dynmap.git into v3.0

This commit is contained in:
Mike Primm 2020-09-20 18:55:59 -05:00
commit 1ab80de88e
4 changed files with 18 additions and 4 deletions

2
.gitignore vendored
View File

@ -24,11 +24,13 @@
/bin
/dist
/manifest.mf
/run
# Mac filesystem dust
/.DS_Store
/dependency-reduced-pom.xml
*.log
/.gradle
/fabric-1.16.1_client.launch
/fabric-1.16.1_server.launch

View File

@ -565,8 +565,8 @@ block:id=dirt,allfaces=0:dirt,stdrot=true
# Coarse Dirt
block:id=coarse_dirt,allfaces=0:coarse_dirt,stdrot=true
# Pozdol
block:id=podzol,data=0,allsides=0:grass_block_snow,top=1000:grass_block_top,bottom=0:dirt,stdrot=true
block:id=podzol,data=1,allsides=1000:podzol_side,top=1000:podzol_top,bottom=0:dirt,stdrot=true
block:id=podzol,data=0,allsides=0:grass_block_snow,top=0:grass_block_top,bottom=0:dirt,stdrot=true
block:id=podzol,data=1,allsides=0:podzol_side,top=0:podzol_top,bottom=0:dirt,stdrot=true
# Cobblestone
block:id=cobblestone,allfaces=0:cobblestone,stdrot=true
# Wooden Plank (oak)

View File

@ -45,7 +45,13 @@ public class DynmapCommandExecutor implements Command<ServerCommandSource> {
@Override
public int run(CommandContext<ServerCommandSource> context) throws CommandSyntaxException {
String[] args = context.getInput().split("\\s+");
// Commands in brigadier may be proxied in Minecraft via a syntax like `/execute ... ... run dmap [args]`
// Dynmap will fail to parse this properly, so we find the starting position of the actual command being parsed after any forks or redirects.
// The start position of the range specifies where the actual command dynmap has registered starts
int start = context.getRange().getStart();
String dynmapInput = context.getInput().substring(start);
String[] args = dynmapInput.split("\\s+");
plugin.handleCommand(context.getSource(), cmd, Arrays.copyOfRange(args, 1, args.length));
return 1;
}

View File

@ -45,7 +45,13 @@ public class DynmapCommandExecutor implements Command<ServerCommandSource> {
@Override
public int run(CommandContext<ServerCommandSource> context) throws CommandSyntaxException {
String[] args = context.getInput().split("\\s+");
// Commands in brigadier may be proxied in Minecraft via a syntax like `/execute ... ... run dmap [args]`
// Dynmap will fail to parse this properly, so we find the starting position of the actual command being parsed after any forks or redirects.
// The start position of the range specifies where the actual command dynmap has registered starts
int start = context.getRange().getStart();
String dynmapInput = context.getInput().substring(start);
String[] args = dynmapInput.split("\\s+");
plugin.handleCommand(context.getSource(), cmd, Arrays.copyOfRange(args, 1, args.length));
return 1;
}