mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Escape home and warp descriptions properly in lists; allow warp update events to be cancelled
Signed-off-by: BuildTools <[email protected]>
This commit is contained in:
1 parent
3b5140f794
commit
7bf23541ef
5 files changed
+149
-97
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package me.william278.huskhomes2;
|
||||
|
||||
import de.themoep.minedown.MineDown;
|
||||
import me.william278.huskhomes2.teleport.points.Home;
|
||||
import me.william278.huskhomes2.teleport.points.Warp;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -8,7 +9,7 @@ public class EditingHandler {
|
||||
|
||||
public static void showEditHomeOptions(Player p, Home home) {
|
||||
MessageManager.sendMessage(p, "edit_home_title", home.getName());
|
||||
MessageManager.sendMessage(p, "edit_description", home.getDescription());
|
||||
p.spigot().sendMessage(new MineDown(MessageManager.getRawMessage("edit_description")).replaceFirst(false).replace("%1%", home.getDescription()).toComponent());
|
||||
MessageManager.sendMessage(p, "edit_location",
|
||||
Integer.toString((int) home.getX()),
|
||||
Integer.toString((int) home.getY()),
|
||||
@@ -36,7 +37,7 @@ public class EditingHandler {
|
||||
|
||||
public static void showEditWarpOptions(Player p, Warp warp) {
|
||||
MessageManager.sendMessage(p, "edit_warp_title", warp.getName());
|
||||
MessageManager.sendMessage(p, "edit_description", warp.getDescription());
|
||||
p.spigot().sendMessage(new MineDown(MessageManager.getRawMessage("edit_description")).replaceFirst(false).replace("%1%", warp.getDescription()).toComponent());
|
||||
MessageManager.sendMessage(p, "edit_location",
|
||||
Integer.toString((int) warp.getX()),
|
||||
Integer.toString((int) warp.getY()),
|
||||
|
||||
Reference in new issue
Block a user