Fix UI for PlayWire changes
Fix memory leak in Menu (cherry picked from commit 770c899)
This commit is contained in:
parent
36c26c0b2c
commit
2a81f2b317
@ -20,11 +20,11 @@ public class PlayWireButton implements GuiItem
|
|||||||
.setTitle(C.cGreen + C.Bold + "Watch an Ad!")
|
.setTitle(C.cGreen + C.Bold + "Watch an Ad!")
|
||||||
.addLore(
|
.addLore(
|
||||||
C.cWhite + "You have already redeemed your",
|
C.cWhite + "You have already redeemed your",
|
||||||
C.cWhite + "250 Shards for watching the Ad!",
|
C.cWhite + "100 Shards for watching the Ad!",
|
||||||
" ",
|
" ",
|
||||||
C.cWhite + "You can watch it again, but you won't earn any shards!",
|
C.cWhite + "You can watch it again, but you won't earn any shards!",
|
||||||
" ",
|
" ",
|
||||||
C.cWhite + "You can watch the Ad once every 12 hours.",
|
C.cWhite + "You can watch the Ad once every hour.",
|
||||||
" ",
|
" ",
|
||||||
C.cWhite + "Ads help us keep Mineplex awesome",
|
C.cWhite + "Ads help us keep Mineplex awesome",
|
||||||
C.cRedB + "Be sure to have your AdBlocker disabled!",
|
C.cRedB + "Be sure to have your AdBlocker disabled!",
|
||||||
@ -36,10 +36,10 @@ public class PlayWireButton implements GuiItem
|
|||||||
private static final ItemStack ENABLED_ICON = new ItemBuilder(Material.TRIPWIRE_HOOK)
|
private static final ItemStack ENABLED_ICON = new ItemBuilder(Material.TRIPWIRE_HOOK)
|
||||||
.setTitle(C.cGreen + C.Bold + "Watch an Ad!")
|
.setTitle(C.cGreen + C.Bold + "Watch an Ad!")
|
||||||
.addLore(
|
.addLore(
|
||||||
C.cYellow + "Earn a 250 Shard Reward",
|
C.cYellow + "Earn a 100 Shard Reward",
|
||||||
C.cWhite + "by checking out our partner's Advertisement",
|
C.cWhite + "by checking out our partner's Advertisement",
|
||||||
" ",
|
" ",
|
||||||
C.cWhite + "You can watch the Ad once every 12 hours.",
|
C.cWhite + "You can watch the Ad once every hour.",
|
||||||
" ",
|
" ",
|
||||||
C.cWhite + "Ads help us keep Mineplex awesome",
|
C.cWhite + "Ads help us keep Mineplex awesome",
|
||||||
C.cRedB + "Be sure to have your AdBlocker disabled!",
|
C.cRedB + "Be sure to have your AdBlocker disabled!",
|
||||||
|
@ -6,6 +6,7 @@ import org.bukkit.event.EventHandler;
|
|||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||||
import org.bukkit.event.inventory.InventoryCloseEvent;
|
import org.bukkit.event.inventory.InventoryCloseEvent;
|
||||||
|
import org.bukkit.event.player.PlayerQuitEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listener for the Menu system
|
* Listener for the Menu system
|
||||||
@ -73,4 +74,10 @@ public class MenuListener implements Listener
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler
|
||||||
|
public void onQuit(PlayerQuitEvent event)
|
||||||
|
{
|
||||||
|
Menu.remove(event.getPlayer().getUniqueId());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user