Fix '/Sub Delete' for internally hosted servers

This commit is contained in:
ME1312 2017-04-10 12:25:33 -04:00
parent 98187137c4
commit 21dbe876d4
7 changed files with 3 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,4 +2,4 @@ Manifest-Version: 1.0
Class-Path: BungeeCord.jar Class-Path: BungeeCord.jar
Main-Class: net.ME1312.SubServers.Bungee.Launch Main-Class: net.ME1312.SubServers.Bungee.Launch
Implementation-Version: 2.11.2j Implementation-Version: 2.11.2j
Specification-Version: 1 Specification-Version: 0

View File

@ -139,11 +139,11 @@ public class InternalHost extends Host {
public boolean deleteSubServer(UUID player, String name) throws InterruptedException { public boolean deleteSubServer(UUID player, String name) throws InterruptedException {
if (Util.isNull(name)) throw new NullPointerException(); if (Util.isNull(name)) throw new NullPointerException();
File from = new File(getDirectory(), servers.get(name.toLowerCase()).getDirectory());
if (removeSubServer(player, name)) { if (removeSubServer(player, name)) {
new Thread(() -> { new Thread(() -> {
UniversalFile to = new UniversalFile(plugin.dir, "SubServers:Recently Deleted:" + name.toLowerCase()); UniversalFile to = new UniversalFile(plugin.dir, "SubServers:Recently Deleted:" + name.toLowerCase());
try { try {
File from = new File(getDirectory(), servers.get(name.toLowerCase()).getDirectory());
if (from.exists()) { if (from.exists()) {
System.out.println("SubServers > Removing Files..."); System.out.println("SubServers > Removing Files...");
if (to.exists()) { if (to.exists()) {

View File

@ -1,6 +1,6 @@
name: 'SubServers-Client-Bukkit' name: 'SubServers-Client-Bukkit'
main: 'net.ME1312.SubServers.Client.Bukkit.SubPlugin' main: 'net.ME1312.SubServers.Client.Bukkit.SubPlugin'
version: '2.11.2e' version: '2.11.2f'
authors: [ME1312] authors: [ME1312]
softdepend: [TitleManager] softdepend: [TitleManager]
website: 'http://www.ME1312.net/' website: 'http://www.ME1312.net/'