PixelmonOverlay - Gives plugin access to the pixelmon overlay, and provides some useful features like broadcasts and such

This is a discussion topic for the Ore project, PixelmonOverlay. View the full project on Ore for downloads and more information.


PixelmonOverlay

This plugin lets you send preconfigurated announcements through the Pixelmon’s Notice Overlay (topbar).

PlaceholderAPI is supported but optional. However, you won’t be able to retrieve any information without it, not even the player’s name.

Usage

  1. Launch the server with the plugin.
  2. Modify the messages in /config/pixeloverlaybroadcaster.conf according to the these values.
  3. ???
  4. Profit.

Config

broadcastInterval (defaults to 300 seconds) sets the interval after which the announcement will change.

silenceInterval (defaults to 300 seconds) sets the time to wait between two announcements. Set to 0 to disable.

announcements contains the ordered list of all the (guess what?) announcements. They will be shown according to their position in the list.

Node Values Meaning
layout LEFT_AND_RIGHT, LEFT or RIGHT. Specifies the position of the sprite.
lines List of strings. Sets the lines to be shown to the player. Formatting codes and placeholders are supported.
duration Decimal number. Example 20 How long this announcement will last for. If not present, broadcastInterval will be used instead.
type PokemonSprite, Pokemon3D, ItemStack Specifies the type of the sprite, read below for more info.
spec Pokémon’s spec. Example: pikachu s Required by PokemonSprite and Pokemon3D, specifies the pokémon’s info.
itemStack The ItemStack. Required by ItemStack, specifies the itemstack.

Restrictions

I fixed a lot of stuff, but also implemented new bugs😅. There are some problems with the colors of the window, I’ll fix them for Pixelmon 7.0.4.
However, you can now use any kind of item and pokémon, as long as the client knows how to render them, and scale has been removed, you can change their size through the growth’s pokémon spec, like gr:giant to make them bigger, and gr:microscopic to make them smaller.

You can use the character & to style your lines with colors and formattings, while to use the character & normally you have to escape it by placing \\ before. For example, &1Pikachu \\& Solgaleo will print a blue (&1) string saying Pikachu & Solgaleo.

API

I split the plugin to api and implementation, and now other plugins can use the Pixelmon Notice Overlay to show off messages and custom announcements.

Example:

OverlayService service = Sponge.getServiceManager().provideUnchecked(OverlayService.class);

Overlay overlay = service.create([...]);
service.show(overlay);

This might seem confusing, I’ll update the thread with the link to the docs as soon as I finish writing them.

.

.

Thanks to GT86 for sponsoring this plugin.

1 Like

are we able to use clickable links in the overlay?

No, an overlay is not a normal gui, there’s no mouse

1 Like

Add command to make announcements on the fly please?

Read the github. its already planned.

1 Like

Great plugin!
How should I go about configuring legendary/shiny spawn messages? Can you give me an example?

A new version has been released for PixelmonOverlay, it is available for download here.


PixelmonOverlay v1.1.1 for Reforged 8.0.2

Some classes where refactor in Reforged’s newest update, this release aims to fix those incompatibilities.

There’s also a WIP feature. You’re able to use /pixelbroadcast <id> and show everybody the desired broadcast from the config.

<id> is the numerical id. The first announcement in the config is going to be the number 1, for example.

This is part of a bigger feature to make announcements on the fly. It’s pretty much already done but it requires some minor refinements, so I decided to delay that to let everyone else update asap.