mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-22 10:36:06 +01:00
Add .dat worldname validation.
This commit is contained in:
parent
c0b36fefd8
commit
532469145d
@ -204,6 +204,11 @@ public class MVCommandManager extends PaperCommandManager {
|
||||
@NotNull BukkitCommandExecutionContext executionContext,
|
||||
@NotNull String worldName) {
|
||||
|
||||
if(worldName.contains(".dat")){
|
||||
executionContext.getSender().sendMessage(ChatColor.RED + "Multiverse cannot have a world name that contains '.dat'");
|
||||
throw new ConditionFailedException();
|
||||
}
|
||||
|
||||
File worldFolder = new File(this.plugin.getServer().getWorldContainer(), worldName);
|
||||
if (!worldFolder.isDirectory()) {
|
||||
//TODO: Possibly show potential worlds. Use flags.
|
||||
|
Loading…
Reference in New Issue
Block a user