Fixed HTML formatting (#57)
Fixed HTML formatting + `markup=true` for creating markers + Bumped marker name length to 50 chars + Escaped HTML from marker names Co-authored-by: Joey Hines <joey@ahines.net> Reviewed-on: https://git.etztech.xyz/Minecraft/QoL/pulls/57 Reviewed-by: Etzelia <etzelia@hotmail.com>grief
parent
7f7c00e22b
commit
cc11677a18
|
@ -329,7 +329,7 @@ public class QoL extends JavaPlugin {
|
|||
playerMarker.deleteMarker();
|
||||
}
|
||||
|
||||
playerMarkerSet.createMarker(getMarkerName(player, name), name, player.getWorld().getName(), location.getX(), location.getY(), location.getZ(), icon, true);
|
||||
playerMarkerSet.createMarker(getMarkerName(player, name), name, true, player.getWorld().getName(), location.getX(), location.getY(), location.getZ(), icon, true);
|
||||
}
|
||||
|
||||
public Marker getPlayerMarker(Player player, String name) {
|
||||
|
|
|
@ -12,6 +12,7 @@ import org.dynmap.markers.MarkerSet;
|
|||
import xyz.etztech.qol.EtzTechUtil;
|
||||
import xyz.etztech.qol.Lang;
|
||||
import xyz.etztech.qol.QoL;
|
||||
import static org.apache.commons.lang.StringEscapeUtils.escapeHtml;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -58,7 +59,9 @@ public class MarkerCommand implements CommandExecutor, TabExecutor{
|
|||
name = (player).getDisplayName();
|
||||
}
|
||||
|
||||
if (name.length() > 25) {
|
||||
name = escapeHtml(name);
|
||||
|
||||
if (name.length() > 50) {
|
||||
EtzTechUtil.sms(player, ChatColor.RED + "Marker name too long, try a shorter name");
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue