Skip to content

A collection of utilities that integrate the APIs of Adventure into Spigot

License

Notifications You must be signed in to change notification settings

Revxrsal/adventure4spigot

Repository files navigation

adventure4spigot

Adventure4Spigot is a small utility that aims to integrate Adventure's component API throughout Bukkit, the same way Paper does.

This library is a WIP. Due to the large use of Adventure in Paper, it may be impossible to provide abstractions for every method out there, so only the most important ones may be implemented.

To-do:

  • ItemMeta's display name and lore
  • Inventory titles
  • Scoreboard teams
  • Scoreboard objectives
  • Signs
  • Permission messages
  • Entity display names
  • Reasons (kicks and bans)
  • Events
  • Books
  • Maps
  • Avoid using reflections when Paper is present
  • Better documentation on API methods

Examples

Create an inventory

Inventory inv = SpigotAdventure.createInventory(null, 9, Component.text()
        .content("Hello!")
        .color(NamedTextColor.AQUA)
        .build()
);
event.getPlayer().openInventory(inv);

Set item's display name

ItemStack item = new ItemStack(Material.DIAMOND);
ItemMeta meta = item.getItemMeta();
SpigotAdventure.setDisplayName(meta, Component.text("Hello!"));
item.setItemMeta(meta);

About

A collection of utilities that integrate the APIs of Adventure into Spigot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages