mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
schem list validation
This commit is contained in:
parent
f65887c957
commit
a7c6d5e987
@ -603,6 +603,11 @@ public class SchematicCommands extends MethodCommands {
|
||||
if (uriStr.startsWith("file:/")) {
|
||||
File file = new File(uri.getPath());
|
||||
name = file.getName();
|
||||
try {
|
||||
if (!MainUtil.isInSubDirectory(dir, file)) {
|
||||
throw new RuntimeException(new CommandException("Invalid path"));
|
||||
}
|
||||
} catch (IOException ignore) {}
|
||||
if (file.isDirectory()) {
|
||||
isDir = true;
|
||||
color = "&6";
|
||||
|
Loading…
Reference in New Issue
Block a user