From 89a9954075e4091fc225255cdea914737574efd3 Mon Sep 17 00:00:00 2001 From: ShinyDialga Date: Fri, 31 Mar 2017 20:48:01 -0500 Subject: [PATCH] Update shop link to stratus buycraft --- .../main/java/tc/oc/commons/bukkit/chat/Links.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/chat/Links.java b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/chat/Links.java index d9ccc9b..5d7a0a8 100644 --- a/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/chat/Links.java +++ b/Commons/bukkit/src/main/java/tc/oc/commons/bukkit/chat/Links.java @@ -13,12 +13,17 @@ import tc.oc.commons.core.util.ExceptionUtils; public class Links { private Links() {} - public static final String HOST = "localhost"; // TODO: configurable + public static final String HOST = "stratus.network"; + public static final String SHOP_HOST = "stratusnetwork.buycraft.net"; public static URI homeUri(String path) throws URISyntaxException { return new URI("http", HOST, path, null); } + public static URI shopUri() throws URISyntaxException { + return new URI("http", SHOP_HOST, null, null); + } + public static URI homeUriSafe(String path) { return ExceptionUtils.propagate(() -> homeUri(path)); } @@ -39,8 +44,12 @@ public class Links { return homeLinkSafe("/"); } + public static BaseComponent shopLink(boolean compact) throws URISyntaxException { + return new LinkComponent(shopUri(), compact); + } + public static BaseComponent shopLink() { - return homeLinkSafe("/shop"); + return ExceptionUtils.propagate(() -> shopLink(true)); } public static BaseComponent appealLink() {