1.0.6 • Published 3 years ago

@bdsx/hsmenu v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

HSMenu Plugin

The plugin for bdsx

Example

import { HSDoubleChest, HSMenu } from "@bdsx/hsmenu";
import { ItemStack } from "bdsx/bds/inventory";
import { ServerPlayer } from "bdsx/bds/player";
import { events } from "bdsx/event";

events.playerJump.on((ev) => {
    // will be destructed by the library
    const diamond = ItemStack.constructWith("minecraft:diamond");
    diamond.setCustomName("§bDiamond");
    diamond.setCustomLore(["my precious"]);

    const menu = new HSMenu(
        ev.player as ServerPlayer,
        new HSDoubleChest(),
        {
            31: diamond,
        },
        (menu, data) => {
            if (!data.isFromMenu()) return;
            menu.entity.sendMessage("You can't take my precious!");
            menu.close();
        },
    );
    menu.open();
});

License

MIT

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago