Giter Club home page Giter Club logo

Comments (14)

Muqsit avatar Muqsit commented on July 30, 2024

There aren't any set limitations against sharing menu instances across plugins

from invmenu.

ItsSachan avatar ItsSachan commented on July 30, 2024

from same plugin is possible?

from invmenu.

Muqsit avatar Muqsit commented on July 30, 2024

Yes

from invmenu.

ItsSachan avatar ItsSachan commented on July 30, 2024

public function MainMenu(DeterministicInvMenuTransaction $transaction) {

$player = $transaction->getPlayer();
$action = $transaction->getAction();
$inventory = $action->getInventory();
$item = $transaction->getItemClicked();

if($item->getCustomName() === "Minions"){
  $this->cobble($sender);
}

}

It is not sending menu which is in another folder

from invmenu.

SwiftyMCPE avatar SwiftyMCPE commented on July 30, 2024

Show the full code

from invmenu.

SwiftyMCPE avatar SwiftyMCPE commented on July 30, 2024

Maybe you not imported that

from invmenu.

ItsSachan avatar ItsSachan commented on July 30, 2024
getServer()->getPluginManager()->registerEvents($this, $this); $this->getLogger()->info("RecipeGUI by ItzSachan"); $this->saveDefaultConfig(); if(!InvMenuHandler::isRegistered()){ InvMenuHandler::register($this); } } public function onCommand(CommandSender $sender, Command $command, string $label, array $args): bool{ switch($command->getName()){ case "recipe": if($sender->hasPermission("recipe.cmd")){ $this->recipe($sender); } else { $sender->sendMessage("You Don't Have Permission To Use This Command"); } } return true; } public function recipe(Player $player) { $menu = InvMenu::create(InvMenu::TYPE_DOUBLE_CHEST); $menu->setName("§l§6Fast Travel GUI"); $menu->setListener(InvMenu::readonly(Closure::fromCallable([$this, "MainMenu"] ))); $menu->readonly(); $menu->getInventory()->setItem(13, VanillaBlocks::GRASS()->asItem()->setCustomName("Minions")); $menu->send($player); } public function MainMenu(DeterministicInvMenuTransaction $transaction) { $player = $transaction->getPlayer(); $action = $transaction->getAction(); $inventory = $action->getInventory(); $item = $transaction->getItemClicked(); if($item->getCustomName() === "Minions"){ $this->cobble($sender); } } }

from invmenu.

SwiftyMCPE avatar SwiftyMCPE commented on July 30, 2024

LMAO it's not readable

from invmenu.

ItsSachan avatar ItsSachan commented on July 30, 2024

oh

from invmenu.

SwiftyMCPE avatar SwiftyMCPE commented on July 30, 2024

Send me in discord

from invmenu.

ItsSachan avatar ItsSachan commented on July 30, 2024

ur username?

from invmenu.

SwiftyMCPE avatar SwiftyMCPE commented on July 30, 2024

AstroAI#0060

from invmenu.

SwiftyMCPE avatar SwiftyMCPE commented on July 30, 2024

Are u alive?

from invmenu.

ItsSachan avatar ItsSachan commented on July 30, 2024

can u help?

from invmenu.

Related Issues (20)

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.