From e81a36e135a09dfa7ac30d8c46903dc29f6237b5 Mon Sep 17 00:00:00 2001 From: Spencer Date: Thu, 4 Jan 2018 19:15:38 -0500 Subject: [PATCH] Put a scary button when instantiation fails so support can notify devs --- .../mineplex/staffServer/ui/SupportHomePage.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/SupportHomePage.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/SupportHomePage.java index c21245812..0fb729978 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/SupportHomePage.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/ui/SupportHomePage.java @@ -21,6 +21,17 @@ public class SupportHomePage extends SupportPage buildPage(); } + private void buildUnavailableButton(int slot) + { + addItem(slot, new ShopItem(Material.BARRIER, "Unavailable", new String[] { + "Sorry, but this button is", + "not currently available.", + "", + "Please contact a developer", + "to get it fixed." + }, 1, true, true)); + } + private void buildPageButton(int slot,ShopItem shopItem, Class clazz) { Constructor pageConstructor; @@ -31,6 +42,7 @@ public class SupportHomePage extends SupportPage { System.out.println("Could not get page constructor:"); e.printStackTrace(); + buildUnavailableButton(slot); return; } @@ -42,6 +54,7 @@ public class SupportHomePage extends SupportPage { System.out.println("Could not instantiate page:"); e.printStackTrace(); + buildUnavailableButton(slot); } }); }