mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-22 18:46:35 +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;
|
package com.sekwah.advancedportals.portals;
|
||||||
|
|
||||||
import com.sekwah.advancedportals.api.portaldata.PortalArg;
|
import com.sekwah.advancedportals.api.portaldata.PortalArg;
|
||||||
import java.util.HashSet;
|
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
|
import java.util.HashSet;
|
||||||
|
|
||||||
public class AdvancedPortal {
|
public class AdvancedPortal {
|
||||||
|
|
||||||
public Material trigger = null;
|
public Material trigger = null;
|
||||||
@ -62,4 +63,7 @@ public class AdvancedPortal {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasArg(String arg) {
|
||||||
|
return this.getArg(arg) != null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -383,7 +383,7 @@ public class Portal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
cooldown.put(player, System.currentTimeMillis());
|
cooldown.put(player, System.currentTimeMillis());
|
||||||
boolean showFailMessage = true;
|
boolean showFailMessage = !portal.hasArg("command.1");
|
||||||
|
|
||||||
//plugin.getLogger().info(portal.portalName + ":" + portal.destiation);
|
//plugin.getLogger().info(portal.portalName + ":" + portal.destiation);
|
||||||
boolean warped = false;
|
boolean warped = false;
|
||||||
@ -414,8 +414,7 @@ public class Portal {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (portal.getArg("command.1") != null) {
|
if (!portal.hasArg("command.1")) {
|
||||||
showFailMessage = false;
|
|
||||||
int commandLine = 1;
|
int commandLine = 1;
|
||||||
String command = portal.getArg("command." + commandLine);//portalData.getConfig().getString(portal.portalName+ ".portalArgs.command." + commandLine);
|
String command = portal.getArg("command." + commandLine);//portalData.getConfig().getString(portal.portalName+ ".portalArgs.command." + commandLine);
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user