Comments (4)
Can you send the code you're using to create the menu?
from invmenu.
` $menu_items = ChestMenuAPI::getMenuItems($menu_name);
$maxslot = 0;
foreach (array_keys($menu_items) as $key) {
$item = $menu_items[$key];
if (is_array($item) and $key != 'actions') {
if ($maxslot < $item['slot']) {
$maxslot = $item['slot'];
}
}
}
if ($maxslot > 26) {
$menu = InvMenu::create(InvMenu::TYPE_DOUBLE_CHEST);
$this->chest = InvMenu::TYPE_DOUBLE_CHEST;
} else {
$menu = InvMenu::create(InvMenu::TYPE_CHEST);
$this->chest = InvMenu::TYPE_CHEST;
}
$menu->readonly();
$menu->setName(TextFormat::GOLD.$menu_name);
$inv = $menu->getInventory();
$inv->clearAll();
foreach (array_keys($menu_items) as $key) {
$data = $menu_items[$key];
if (is_array($data) and $key != 'actions') {
$item = ItemAPI::getItem($data);
$bool = true;
if ($data['permissions'] != "") {
if (!$data['Show-Perms']) {
if (!$player->hasPermission($data['permissions'])) {
$bool = false;
}
}
}
if ($bool) {
$inv->setItem($data['slot'], $item);
}
}
}
$menu->setListener([$this, "onTransaction"]);
$menu->setInventoryCloseListener(function(Player $player, BaseFakeInventory $inventory) : void{
ItemAPI::setItems($player, ConfigAPI::getMainMenu(), MenuType::HOT_BAR_TYPE);
});
$menu->send($player);
}
`
This is the code we are using.
from invmenu.
Fixed by latest pmmp version
from invmenu.
No it is not fixed
from invmenu.
Related Issues (20)
- Error HOT 3
- crash HOT 1
- Question HOT 3
- Pm5 Change HOT 16
- How can we add vanilla blocks in menu? HOT 2
- Is is possible to add custom items? HOT 6
- Is it possible to add custom texture in invmenu? HOT 6
- Inventory sending HOT 11
- Sending InvMenu HOT 14
- Menu Not Work HOT 1
- Minecart chest stuff HOT 3
- Inv Bug HOT 2
- Crash
- Is it possible to open another gui when one is closed? HOT 1
- Register custom menu PM5 HOT 1
- Bug?
- 5.10.0 Error Handler
- Chestshop İnventory window dosent close in the background
- Cannot open another gui from the first gui opened by the player HOT 5
- I'm using the api and it closes when I drop an item
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from invmenu.