From 154c2fde365d9a26defd473541f2837e6a8cc241 Mon Sep 17 00:00:00 2001 From: Adrien Prokopowicz Date: Sat, 2 Apr 2016 23:09:12 +0200 Subject: [PATCH] * BUG: Fix delete command confirmation message parsing. --- .../commands/maptool/DeleteConfirmCommand.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteConfirmCommand.java b/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteConfirmCommand.java index b737de6..9969d4e 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteConfirmCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/DeleteConfirmCommand.java @@ -32,10 +32,11 @@ public class DeleteConfirmCommand extends IoMCommand protected void run() throws CommandException { ImageMap map = getMapFromArgs(); - tellRaw("{text:\"You are going to delete \",extra:[{text:\""+ map.getId() +"\",color:gold},{text:\". Are you sure ? \",color:white}," + - "{text:\"[Confirm]\", color:green, clickEvent:{action:run_command,value:\"/maptool delete-noconfirm "+ map.getId() +"\"}, " + - "hoverEvent:{action:show_text,value:{text:\"This map will be deleted \",extra:[{text:\"forever\",color:red,bold:true,italic:true,underlined:true}, {text:\" !\", underlined:true}],underlined:true}}}]}"); - + String msg ="{\"text\":\"You are going to delete \",\"extra\":[{\"text\":\""+ map.getId() +"\",\"color\":\"gold\"},{\"text\":\". Are you sure ? \",\"color\":\"white\"}," + + "{\"text\":\"[Confirm]\", \"color\":\"green\", \"clickEvent\":{\"action\":\"run_command\",\"value\":\"/maptool delete-noconfirm "+ map.getId() +"\"}, " + + "\"hoverEvent\":{\"action\":\"show_text\",\"value\":{\"text\":\"This map will be deleted \",\"extra\":[{\"text\":\"forever\",\"color\":\"red\",\"bold\":true,\"italic\":true,\"underlined\":true}, {\"text\":\" !\", \"underlined\":true}],\"underlined\":true}}}]}"; + + tellRaw( msg); } @Override