BaloShulker v1.2
Enhanced GUI Titles: Custom Titles for Different Colored Shulker Boxes
In contrast to the approach used in version 1.1
, the next update v1.2
implements a more efficient solution by utilizing a HashMap
to validate the ItemStack
method.
-
First, we declare the
openedShulkers
variable:private val openedShulkers = HashMap<Player, ItemStack>()
-
Next, a mapping is created to accommodate custom titles for each colored shulker box:
private val shulkerBoxTitles = mapOf( Material.SHULKER_BOX to "&dBalo Shulker", // Default title for the regular shulker box Material.WHITE_SHULKER_BOX to "&fBalo Shulker trắng" // Add other shulker box titles here )
This new approach offers enhanced precision, as it directly targets each shulker box in the Minecraft vanilla game, rather than relying on item names that end with _SHULKER_BOX
. This flexibility enables us to provide a higher level of customization, export configurations, and more.
As part of this release, we've created this markdown to keep you informed about the exciting improvements introduced in version 1.2
.
⚠️ Warning:
This version has a duplication issue* that creates a duplicate GUI containing every item from within a shulker box. This problem arises due to a lingering ghost GUI
caused by memory leaks
. There is a slight chance that a player might have used /bs open
while simultaneously placing a shulker box, causing the GUI to appear even when the shulker box is placed underground. This bypasses the isShulkerBox(itemInMainHand)
and isShulkerBox(itemInOffHand)
checks. I recommend using version 1.4
or later
, as these issues have been patched in those releases.
Full Changelog: v1.1...v1.2
Author: @hoangxuanlam2007