From 43c3ebc1f58d24108a0242c7511bd3fa4f85f40e Mon Sep 17 00:00:00 2001 From: Vlammar Date: Wed, 17 Jun 2020 16:23:41 +0200 Subject: [PATCH 1/5] init --- .../java/fr/moribus/imageonmap/image/ImageRendererExecutor.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/fr/moribus/imageonmap/image/ImageRendererExecutor.java b/src/main/java/fr/moribus/imageonmap/image/ImageRendererExecutor.java index 615cd2d..3a0e5ff 100644 --- a/src/main/java/fr/moribus/imageonmap/image/ImageRendererExecutor.java +++ b/src/main/java/fr/moribus/imageonmap/image/ImageRendererExecutor.java @@ -69,6 +69,7 @@ public class ImageRendererExecutor extends Worker public ImageMap run() throws Throwable { final URLConnection connection = url.openConnection(); + connection.addRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0"); connection.connect(); if (connection instanceof HttpURLConnection) From b699b1e3df3698e3602ed6676145661c1b78d6a6 Mon Sep 17 00:00:00 2001 From: Vlammar Date: Wed, 17 Jun 2020 23:21:19 +0200 Subject: [PATCH 2/5] test --- testforwebhook.test | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 testforwebhook.test diff --git a/testforwebhook.test b/testforwebhook.test new file mode 100644 index 0000000..e69de29 From 89032977d5edf17801a7f593e68d1748c1560067 Mon Sep 17 00:00:00 2001 From: Vlammar Date: Wed, 17 Jun 2020 23:25:48 +0200 Subject: [PATCH 3/5] test --- testforwebhook.test | 1 + 1 file changed, 1 insertion(+) diff --git a/testforwebhook.test b/testforwebhook.test index e69de29..9daeafb 100644 --- a/testforwebhook.test +++ b/testforwebhook.test @@ -0,0 +1 @@ +test From c139539366f3de08da1bb4a66ce63e487c1adc96 Mon Sep 17 00:00:00 2001 From: Vlammar Date: Tue, 30 Jun 2020 00:49:01 +0200 Subject: [PATCH 4/5] fixed the /maptool list command not working, issue #100 --- .../imageonmap/commands/maptool/ListCommand.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java b/src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java index 8ff19d1..58ae3e6 100644 --- a/src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java +++ b/src/main/java/fr/moribus/imageonmap/commands/maptool/ListCommand.java @@ -46,10 +46,8 @@ import fr.zcraft.zlib.components.commands.CommandInfo; import fr.zcraft.zlib.components.i18n.I; import fr.zcraft.zlib.components.rawtext.RawText; import fr.zcraft.zlib.components.rawtext.RawTextPart; -import fr.zcraft.zlib.tools.items.ItemStackBuilder; import fr.zcraft.zlib.tools.text.RawMessage; import org.bukkit.ChatColor; -import org.bukkit.Material; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; @@ -92,14 +90,19 @@ public class ListCommand extends IoMCommand .then(map.getId()) .color(ChatColor.WHITE) .command(GetCommand.class, map.getId()) - .hover(new ItemStackBuilder(Material.FILLED_MAP) + .hover(new RawText() + .then(map.getName()).style(ChatColor.BOLD, ChatColor.GREEN).then("\n") + .then(map.getId() + ", " + size).color(ChatColor.GRAY).then("\n\n") + .then(I.t("{white}Click{gray} to get this map")) + ); + /*.hover(new ItemStackBuilder(Material.FILLED_MAP) .title(ChatColor.GREEN + "" + ChatColor.BOLD + map.getName()) .lore(ChatColor.GRAY + map.getId() + ", " + size) .lore("") .lore(I.t("{white}Click{gray} to get this map")) .hideAttributes() .item() - ); + );*/ } @Override From c8955f18828659c5b6362550f7f618ec77287e0c Mon Sep 17 00:00:00 2001 From: Vlammar <36545324+Vlammar@users.noreply.github.com> Date: Tue, 30 Jun 2020 00:59:37 +0200 Subject: [PATCH 5/5] Delete testforwebhook.test useless --- testforwebhook.test | 1 - 1 file changed, 1 deletion(-) delete mode 100644 testforwebhook.test diff --git a/testforwebhook.test b/testforwebhook.test deleted file mode 100644 index 9daeafb..0000000 --- a/testforwebhook.test +++ /dev/null @@ -1 +0,0 @@ -test