Coder Social home page Coder Social logo

windowy's Introduction

Hello I'm DayKoala .



DeviantArt


Experiences

DayKoala's GitHub stats Top Langs



windowy's People

Contributors

daykoala avatar poggit-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

windowy's Issues

[BUG] The callback isn't called on interact with an item

When you set an item with transaction, in certain circustances the callback isn't called, a code example:

$back = ItemFactory::getInstance()->get(ItemIds::BARRIER);
$back->setCustomName("§4§c Back ");

$inventory->setItem(22, $back, function (WindowTransaction $action) {
  // Kit::get() -> Kit (PluginBase)
  Kit::get()
    ->getLogger()
    ->info("Item clicked!");

  $action->cancel();

  $inventory = $action->getInventory();
  $inventory->clearAll();

  // public static function showKitTypes(Window &$window): void
  self::showKitTypes($inventory);
});

But, clicking the item don't show anything on console and the cancel action doesn't work

  • Platform: Android
  • PocketMine-MP Version: 4.2.0
  • Minecraft BE Version: 1.18.10
  • PHP Version: 8.0

.

vc tem whatsapp?

[BUG] Items with lore doesn't execute any callback

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.