Fixed error message for no destination and a command

This commit is contained in:
Alastair Hawkes 2017-04-13 14:41:16 +01:00
parent 6800134600
commit f34ffe8916
2 changed files with 7 additions and 4 deletions

View File

@ -1,11 +1,12 @@
package com.sekwah.advancedportals.portals;
import com.sekwah.advancedportals.api.portaldata.PortalArg;
import java.util.HashSet;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import java.util.HashSet;
public class AdvancedPortal {
public Material trigger = null;
@ -62,4 +63,7 @@ public class AdvancedPortal {
return null;
}
public boolean hasArg(String arg) {
return this.getArg(arg) != null;
}
}

View File

@ -383,7 +383,7 @@ public class Portal {
}
}
cooldown.put(player, System.currentTimeMillis());
boolean showFailMessage = true;
boolean showFailMessage = !portal.hasArg("command.1");
//plugin.getLogger().info(portal.portalName + ":" + portal.destiation);
boolean warped = false;
@ -414,8 +414,7 @@ public class Portal {
}
}
if (portal.getArg("command.1") != null) {
showFailMessage = false;
if (!portal.hasArg("command.1")) {
int commandLine = 1;
String command = portal.getArg("command." + commandLine);//portalData.getConfig().getString(portal.portalName+ ".portalArgs.command." + commandLine);
do {