Changes some sign coloring and adds some missing info to the readme
Makes the Disconnected message red Makes the highlighting characters (><) white when cycling stargate destinations Moves markPortalWithInvalidGate to PortalSignDrawer Adds missing translation strings for reloaded and signInvalidGate to the readme Moves some extra spacing around the >< characters
This commit is contained in:
@ -10,9 +10,7 @@ import net.knarcraft.stargate.portal.PortalLocation;
|
||||
import net.knarcraft.stargate.portal.PortalOptions;
|
||||
import net.knarcraft.stargate.portal.PortalOwner;
|
||||
import net.knarcraft.stargate.portal.PortalRegistry;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Sign;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
@ -20,6 +18,8 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.Scanner;
|
||||
|
||||
import static net.knarcraft.stargate.portal.PortalSignDrawer.markPortalWithInvalidGate;
|
||||
|
||||
/**
|
||||
* Helper class for saving and loading portal save files
|
||||
*/
|
||||
@ -257,19 +257,4 @@ public final class PortalFileHelper {
|
||||
portal.getPortalOpener().closePortal(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks a portal with an invalid gate by changing its sign and writing to the console
|
||||
*
|
||||
* @param portalLocation <p>The location of the portal with an invalid gate</p>
|
||||
* @param gateName <p>The name of the invalid gate type</p>
|
||||
* @param lineIndex <p>The index of the line the invalid portal was found at</p>
|
||||
*/
|
||||
private static void markPortalWithInvalidGate(PortalLocation portalLocation, String gateName, int lineIndex) {
|
||||
Sign sign = (Sign) portalLocation.getSignLocation().getBlock().getState();
|
||||
sign.setLine(3, ChatColor.DARK_RED + Stargate.getString("signInvalidGate"));
|
||||
sign.update();
|
||||
|
||||
Stargate.logInfo(String.format("Gate layout on line %d does not exist [%s]", lineIndex, gateName));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user