Fixes some minor formatting issues
This commit is contained in:
parent
7f08763624
commit
248caee620
@ -262,8 +262,8 @@ public final class StargateGateConfig {
|
|||||||
if (colors[colorIndex].equalsIgnoreCase("inverted")) {
|
if (colors[colorIndex].equalsIgnoreCase("inverted")) {
|
||||||
//Convert from ChatColor to awt.Color to Bukkit.Color then invert and convert to ChatColor
|
//Convert from ChatColor to awt.Color to Bukkit.Color then invert and convert to ChatColor
|
||||||
java.awt.Color color = defaultColors[colorIndex].getColor();
|
java.awt.Color color = defaultColors[colorIndex].getColor();
|
||||||
parsedColor = ColorHelper.fromColor(ColorHelper.invert(Color.fromRGB(color.getRed(),
|
parsedColor = ColorHelper.fromColor(ColorHelper.invert(Color.fromRGB(color.getRed(), color.getGreen(),
|
||||||
color.getGreen(), color.getBlue())));
|
color.getBlue())));
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
parsedColor = ChatColor.of(colors[colorIndex]);
|
parsedColor = ChatColor.of(colors[colorIndex]);
|
||||||
|
@ -95,8 +95,7 @@ public class PortalEventListener implements Listener {
|
|||||||
|
|
||||||
Portal exitPortal = teleportation.getExit();
|
Portal exitPortal = teleportation.getExit();
|
||||||
//Overwrite respawn location to respawn in front of the portal
|
//Overwrite respawn location to respawn in front of the portal
|
||||||
event.setRespawnLocation(new PlayerTeleporter(exitPortal, respawningPlayer).getExit(respawningPlayer,
|
event.setRespawnLocation(new PlayerTeleporter(exitPortal, respawningPlayer).getExit());
|
||||||
respawningPlayer.getLocation()));
|
|
||||||
//Properly close the portal to prevent it from staying in a locked state until it times out
|
//Properly close the portal to prevent it from staying in a locked state until it times out
|
||||||
exitPortal.getPortalOpener().closePortal(false);
|
exitPortal.getPortalOpener().closePortal(false);
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,14 @@ import org.bukkit.Color;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
public class ColorHelper {
|
/**
|
||||||
|
* A helper class for dealing with colors
|
||||||
|
*/
|
||||||
|
public final class ColorHelper {
|
||||||
|
|
||||||
|
private ColorHelper() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inverts the given color
|
* Inverts the given color
|
||||||
|
Loading…
x
Reference in New Issue
Block a user