Hi! im here again, im used your plugin because it's a very good plugin, but when im try to set an item lore, the item callback doesn't work anymore, this is my code:
public static function showKitTypes(CustomWindow &$inventory): void
{
$basic = ItemFactory::getInstance()->get(ItemIds::GRASS);
$basic->setCustomName("§r§8 - Default kits");
$basic->setLore(array("", "§7Click here to view all", "§7default kits on the server", ""));
$vips = ItemFactory::getInstance()->get(ItemIds::CHEST);
$vips->setCustomName("§r§5 - Kits VIP");
$vips->setLore(array("", "§7Click here to view all", "§7vip kits on the server", ""));
$inventory->setItem(15, $vips, function (WindowTransaction $action) {
$action->cancel();
$w = $action->getInventory();
$w->clearAll();
// public static function showKits(Player $player, CustomWindow &$inventory, int $type): void
self::showKits($action->getPlayer(), $w, Kit::TYPE_VIP);
});
$inventory->setItem(11, $basic, function (WindowTransaction $action) {
$action->cancel();
$w = $action->getInventory();
$w->clearAll();
// public static function showKits(Player $player, CustomWindow &$inventory, int $type): void
self::showKits($action->getPlayer(), $w, Kit::TYPE_BASIC);
});
}
I really enjoy your plugin, but this is bad and im using \n
on the item name to make a lore
Extra information:
Device: Samsung Galaxy a30
PocketMine-MP Version: 4.2.1
PHP Version: 8.0
Running on: localhost:19132
duplicate