animations/*.yml

You can create as many animation configurations as you like, resulting in possibility to hot-swap them or create animation per forced host.


Example file

type: STATIC
settings:
  interval: 100
  delay: 0
  duration: 1000
favicon:
  animation: "animation.gif"
  loop: true
  style: optimized
  intervals-per-frame: 1
motd:
  first:
    intervals-per-frame: 2
    text:
    - '<scroller spacing="20" width="50" value="&3New updates: &eParkour, Factions, Survival">'
    - '<scroller spacing="20" width="50" direction="right" value="&4Visit our website: &cmacizun.me">'
  second:
    intervals-per-frame: 1
    text:
    - '<typewriter pause="20" delimiter="&r&l\>\>" frequency="4" value="&6Nothing is impossible!">'
    - '<typewriter pause="20" delimiter="&r&l\>\>" frequency="4" value="&7New gamemodes: &8Survival, Hunger Games">'
    - '<typewriter pause="20" delimiter="&r&l\>\>" frequency="4" value="&eNew packages in store! &6Check it out!">'
status-bar:
  enabled: true
  intervals-per-frame: 1
  text:
  - 'Players: &7<server value="onlineplayers">&6/&7<server value="maxplayers">'
player-data:
  enabled: true
  '1':
    intervals-per-frame: 4
    text:
    - '&7Animated MOTD'
    - '&cAnimated MOTD'
  '2':
    intervals-per-frame: 4
    text:
    - '&cCreated by:'
    - '&4Created by:'
  '3':
    intervals-per-frame: 4
    text:
    - '&3maciekmm <maciekmm.net>'
    - '&amaciekmm <maciekmm.net>'
  '4':
    intervals-per-frame: 4
    text:
    - '&3samczsun <samczsun.com>'
    - '&asamczsun <samczsun.com>'
  '5':
    intervals-per-frame: 4
    text:
    - '&7Ping: <server value="ping">ms'
    - '&7Ping: <server value="ping">ms'
  '6':
    intervals-per-frame: 4
    text:
    - '<scroller spacing="5" width="20" value="This is some &ascrolling &rtext">'

type

type: STATIC

There are two types of animation:

  • STATIC - Does not support player-based variables, is mostly used for players for which player data has not been collected yet. You can use STATIC animation in dynamic as stated in config.yml
  • DYNAMIC- Does support player-based variables, but is limited to players that have already been on server (counting from plugin installation). You cannot use DYNAMIC in static field as stated in config.yml

settings

settings:
  interval: 100
  delay: 0
  duration: 1000
interval

Warning

Lowering interval might cause performance issues

Interval is represented in milliseconds (1 second = 1000 milliseconds), value 100 means that motd will be updated 10 times a second.

delay
Delay after animation will start.
duration
Amount of intervals after which animation stops.

favicon

favicon:
  animation: "animation.gif"
  loop: true
  style: optimized
  intervals-per-frame: 1
animation
Favicon files used in animation. Using .gif will result in animated icon, .png will result in static one. Files have to be placed in main plugin folder.
loop
Whether animation should loop or only be played once
style
There are two styles normal and optimized, you have to choose one that corresponds to process how your .gif was built. If your icon does not animate properly switch to other mode.
intervals-per-frame
Defines how fast gif will update, as we can’t rely on .gif frames properties you have to specify fixed framerate here, setting it to 1 with interval in settings set to 100 results in 10fps.

section

status-bar:
  enabled: true
  intervals-per-frame: 1
  text:

Every animation part has a section where you can specify how animation looks like.

intervals-per-frame
Defines how fast text line will update, setting it to 2 will result in update every second interval.
text
Defines what text will show, you can use placeholders, animation tags and own text here, you are only limited by your imagination.
enabled

Note

Enabled option does not work in motd lines.

Specify whether or not change default value at all.

motd

  intervals-per-frame: 1
motd:
  first:
    intervals-per-frame: 2
    text:
    - '<scroller spacing="20" width="50" value="&3New updates: &eParkour, Factions, Survival">'
    - '<scroller spacing="20" width="50" direction="right" value="&4Visit our website: &cmacizun.me">'
  second:
    intervals-per-frame: 1
    text:
    - '<typewriter pause="20" delimiter="&r&l\>\>" frequency="4" value="&6Nothing is impossible!">'
    - '<typewriter pause="20" delimiter="&r&l\>\>" frequency="4" value="&7New gamemodes: &8Survival, Hunger Games">'

Motd divides in two similar sections first and second corresponding to lines. See section.

status-bar

    - '<typewriter pause="20" delimiter="&r&l\>\>" frequency="4" value="&eNew packages in store! &6Check it out!">'
status-bar:
  enabled: true
  intervals-per-frame: 1
  text:

Status bar is the place where normally player count is shown, you can put whatever you want there! See section.

player-data:

  - 'Players: &7<server value="onlineplayers">&6/&7<server value="maxplayers">'
player-data:
  enabled: true
  '1':
    intervals-per-frame: 4
    text:
    - '&7Animated MOTD'
    - '&cAnimated MOTD'
  '2':
    intervals-per-frame: 4
    text:
    - '&cCreated by:'
    - '&4Created by:'
  '3':
    intervals-per-frame: 4
    text:
    - '&3maciekmm <maciekmm.net>'
    - '&amaciekmm <maciekmm.net>'
  '4':
    intervals-per-frame: 4
    text:
    - '&3samczsun <samczsun.com>'

Player data divides into sections enumerated by line number, See section.