Removes the replacement of spaces to underscores for the cleanString method
Some checks failed
EpicKnarvik97/Stargate/pipeline/head There was a failure building this commit
Some checks failed
EpicKnarvik97/Stargate/pipeline/head There was a failure building this commit
This commit is contained in:
parent
e1a3d2d560
commit
51f5420f9e
@ -304,8 +304,7 @@ public class Portal {
|
||||
* @return <p>The clean string</p>
|
||||
*/
|
||||
public static String cleanString(String string) {
|
||||
string = ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', string));
|
||||
return string.toLowerCase().replace(' ', '_');
|
||||
return ChatColor.stripColor(ChatColor.translateAlternateColorCodes('&', string)).toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -247,7 +247,7 @@ public class PortalSignDrawer {
|
||||
* @param sign <p>The sign to re-draw</p>
|
||||
*/
|
||||
private void drawFixedSign(Sign sign) {
|
||||
Portal destinationPortal = PortalHandler.getByName(Portal.cleanString(portal.getDestinationName()),
|
||||
Portal destinationPortal = PortalHandler.getByName(Portal.cleanString(portal.getDestinationName()),
|
||||
portal.getCleanNetwork());
|
||||
String destinationName = portal.getOptions().isRandom() ? Stargate.getString("signRandom") :
|
||||
(destinationPortal != null ? destinationPortal.getName() : portal.getDestinationName());
|
||||
@ -259,7 +259,7 @@ public class PortalSignDrawer {
|
||||
setLine(sign, 2, highlightColor + "(" + mainColor + fixColor(portal.getNetwork()) +
|
||||
highlightColor + ")");
|
||||
}
|
||||
Portal destination = PortalHandler.getByName(Portal.cleanString(portal.getDestinationName()),
|
||||
Portal destination = PortalHandler.getByName(Portal.cleanString(portal.getDestinationName()),
|
||||
portal.getNetwork());
|
||||
if (destination == null && !portal.getOptions().isRandom()) {
|
||||
setLine(sign, 3, errorColor + Stargate.getString("signDisconnected"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user