Skip to content

Releases: JetbyMC/Libb

1.2.3

Choose a tag to compare

@MrJetby MrJetby released this 18 Jul 01:56
  • Fixed the head in the basehead menu.
  • If you are using the Paper core, you can set the amount up to a maximum of 99.
  • slot and slots are now interchangeable, meaning you can specify multiple slots directly within slot.

1.2.2

Choose a tag to compare

@MrJetby MrJetby released this 27 Jun 20:10
  • If display_name is not specified, the item's name will be shown instead of nothing.
  • Automatic downloading of required libraries: libraries are no longer bundled within the plugin itself but are downloaded if not found on your server.
  • Examples: Hikari and Adventure (this enables the use of MiniMessage on Spigot and also reduces the plugin's JAR size).
  • Added the LibbApi.getDependentPlugins() method, which returns a list of plugins that use Libb.
  • Upgraded from Java 17 to Java 21. ||Checked the stats and zero servers were running Java 17—I'm so proud of you all 🥹—you're finally starting to switch to newer versions.||
  • Added the [close] action, which closes the player's open GUI.

Libb 1.2.1

Choose a tag to compare

@MrJetby MrJetby released this 25 May 23:35
2b1cdfa
  • Spigot support

1.2

1.2

Choose a tag to compare

@MrJetby MrJetby released this 16 May 03:14

Serializers

  • Reintroducing support for legacy colorization—and more!
# Available serializers:
# LEGACY_AMPERSAND  - "&c&lExample &c&9Text"
# LEGACY_SECTION    - "§c§lExample §c§9Text"
# MINI_MESSAGE      - "<bold><red>Example</red> <blue>Text</blue></bold>"
# GSON              - "[{"text":"Example","bold":true,"color":"red"},{"text":" Text","color":"blue"}]"
# PLAIN             - "Example Text"
# MINIMAL           - &l#RGBExample <#RGB>Text</#RGB>
# UNIFIED - Include all, except GSON
serializer:
type: UNIFIED
cache:
enabled: true
max-size: 500
  • Usage: Serializer.TYPE.deserialize(String) → Component
  • Cache: When cache: true, duplicate strings are not re-serialized—the component is retrieved from an LRU cache (default size: 500 entries).
  • Cache Preloading (Warm-up):
List<String> messages = config.getStringList("messages");
Serializer.UNIFIED.cacheAll(messages);
  • Dynamically obtaining a serializer (based on the type specified in the config):
SerializerType type = SerializerType.valueOf(config.getString("serializer.type"));
HashedSerializer serializer = Serializer.get(type);

Component component = serializer.deserialize(input);
  • GUIs now include built-in support for these serializers.

Download | Source Code

1.1

1.1

Choose a tag to compare

@MrJetby MrJetby released this 06 Apr 13:14
  • Added lockEmptySlots method to AdvancedGui which allows cancelling clicks on unregistered slots.
  • Added updateItem(ItemWrapper) method to AdvancedGui which allows updating an item in the GUI.
  • Fixed [actionbar] action.
  • Added replacements in actions, usage example:
ActionExecute.run(ActionContext.of(player)
  .replace("{player}", "MrJetby"), "[message] Hello {player}");

Commands:

  • Full documentation here: wiki.jetby.space
  • Convenient registration of any command as well as easy sub-command creation.

Usage example:

public class TestCommand extends AdvancedCommand {
    public TestCommand(JavaPlugin plugin) {
        super("test_command", plugin);
    }
    @Override
    public boolean onExecute(CommandSender sender, Command command, String label, String[] args) {
        sender.sendMessage("Success");
        return true;
    }
    @Override
    public List<String> onTab(CommandSender sender, Command command, String label, String[] args) {
        return List.of("help");
    }
    @SubCommand("test")
    @PlayerOnly
    public void test(Player player) {
        player.sendMessage("Test argument successfully works");
    }
}

Usage example (sub-command):

    @SubCommand("reload")
    @Permission("libb.command.reload")
    public void reload(CommandSender sender) {
        try {
            long start = System.currentTimeMillis();
            plugin.guisConfiguration.unregisterGuiCommands();
            plugin.guisConfiguration.load();
            for (Player p : Bukkit.getOnlinePlayers()) {
                Inventory topInventory = p.getOpenInventory().getTopInventory();
                if (!(topInventory instanceof AdvancedGui)) continue;
                p.closeInventory();
            }
            sender.sendMessage(Libb.MINI_MESSAGE.deserialize("<green>Libb reloaded in "+(System.currentTimeMillis()-start)+" ms."));
        } catch (Exception e) {
            sender.sendMessage(Libb.MINI_MESSAGE.deserialize("<red>Reload error, check the console."));
            e.printStackTrace();
        }
    }

Command registration (example):

new LibbCommand(this).register();

More information: wiki.jetby.space

1.0

1.0

Choose a tag to compare

@MrJetby MrJetby released this 17 Mar 22:03
initial commit