Features - devblook/akropolis GitHub Wiki

Actions

What are actions?

Actions are small pieces of text between brackets (like [THIS]) that allow you to execute, like the name says, certain actions when something happens. There are different type of actions, some receive arguments and some don't. Here is the list of the current available actions:

# [MESSAGE] <message> - Send a message to the player
# [BROADCAST] <message> - Broadcast a message to everyone
# [TITLE] <title;subtitle>[;fade-in][;stay][;fade-out] - Send the player a title message
# [ACTIONBAR] <message> - Send an action bar message
# [SOUND] <sound> - Send the player a sound
# [COMMAND] <command> - Execute a command as the player
# [CONSOLE] <command> - Execute a command as console
# [GAMEMODE] <gamemode> - Change a players' gamemode
# [SERVER] <server> - Send a player to a server
# [EFFECT] <effect;level>- Give a potion effect
# [MENU] <menu> - Open a menu from (plugins/Akropolis/menus)
# [CLOSE] - Close an open inventory

Examples

Rick roll everyone with a message!

actions:
  - "[BROADCAST] <hover:show_text:'<red>Never gonna give you up!'><rainbow>Hello world!</hover>"

Send someone to a server called "survival1"

actions:
  - "[SERVER] survival1"

Play a bat sound

actions:
  - "[SOUND] ENTITY_BAT_TAKEOFF"

Open a custom menu called "serverselector"

actions:
  - "[MENU] serverselector"`akropolis.command.lockchat` - Lock the chat

Custom menus

What are custom menus?

Custom menus are just chest inventories that you can customize through a file and the open it with the /akropolis open <menu> or with the [MENU] <menu> action. Custom menus are located in the Akropolis/menus/ directory.

How to build items

Inside the menus there are two kinds of items: filler item and custom items. You can use the filler item as a way to decorate certain parts of your menu or just to make it feel less empty if there aren't a lot of things in your menu. It is possible to set the filler item to only fill certain slots or to fill every slot of the inventory that is currently empty:

items:
  filler:
    material: GRAY_STAINED_GLASS_PANE
    slot: -1 # Fills every slot that is empty in the inventory
    slots: [0, 1, 2] # Fills only slots 0, 1 and 2

Custom items can be created according to your needs as they provide many attributes that can be used as you like. Below is shown an item with all of the attributes that can be used applied:

items:
  survival:
    material: NETHERITE_SWORD
    slot: 15 # The slot of the inventory in which this item will appear
    amount: 1
    glow: false
    unbreakable: true
    display_name: "<green><b>Survival"
    lore:
      - "<dark_gray>» <gray>Never gonna give you up!"
    tooltip_style: minecraft:rainbow
    custom_model_data:
      - test
    enchantments:
      - "sharpness:5" # enchantment:level
    item_flags:
      - "HIDE_UNBREAKABLE"
      - "HIDE_ATTRIBUTES"
      - "HIDE_ENCHANTS"
    actions:
      - "[CLOSE]"
      - "[MESSAGE] <dark_gray>| <gray>Sending you to<dark_gray>: <green><b>Survival"
      - "[SERVER] survival"

All these attributes, except the "[CLOSE]" action and slot attribute, can also be used in hotbar items. You can also use heads as a special type of custom item, where you can set them to be a texture (Base64), a player's head or a HeadDatabase head:

Base64

You can find some in minecraft-heads.com.

material: PLAYER_HEAD
base64: <base64 id>

Username

The player must have logged into the server at least once.

material: PLAYER_HEAD
username: <name>

HeadDatabase

The HeadDatabase plugin is REQUIRED for this to work.

material: PLAYER_HEAD
hdb: <hdb id>

Examples

The best example you can see about this feature, is the serverselector.yml custom menu that comes by default with the plugin.

Song player

What is the song player?

The song player plays songs located in your music/ folder inside of Akropolis' directory. These songs must be in .nbs format, as we use the NoteBlockAPI to implement this feature (the plugin MUST be installed if you are going to use this feature).

Setup

First you need to install the NoteBlockAPI plugin, then you need some songs to play. You can find songs in .nbs format across the internet or you can make them in your own (there are some videos in YouTube, I can't recommend any as I haven't tried), when I was testing the plugin I found Note Block World and the songs there worked great.

At this point everything already works if you are using the RADIO song player. If you are using the POSITION song player, there are still a couple steps you must follow.

The POSITION song player uses the location set through the command /akro sp setpos, which takes the location where the user stands when the command is executed. Once the position is set, songs are played in a radius of 16 blocks, which can be changed in the distance option of the song player section of the config.yml file.

⚠️ **GitHub.com Fallback** ⚠️