mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 02:25:49 +01:00
Fixed error message for no destination and a command
This commit is contained in:
parent
6800134600
commit
f34ffe8916
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user