mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +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:/")) {
|
if (uriStr.startsWith("file:/")) {
|
||||||
File file = new File(uri.getPath());
|
File file = new File(uri.getPath());
|
||||||
name = file.getName();
|
name = file.getName();
|
||||||
|
try {
|
||||||
|
if (!MainUtil.isInSubDirectory(dir, file)) {
|
||||||
|
throw new RuntimeException(new CommandException("Invalid path"));
|
||||||
|
}
|
||||||
|
} catch (IOException ignore) {}
|
||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
isDir = true;
|
isDir = true;
|
||||||
color = "&6";
|
color = "&6";
|
||||||
|
Loading…
Reference in New Issue
Block a user