Sueta

DynamicSlots

1.0

Set the slots of your server based on mysql, file or web queries or by adding to your player count!

·Plugin

Made in Germany with love (and beer)

Did you ever want an over engineered plugin just to change a single number? Then this is what you were looking for!

DynamicSlots lets you dynamically set the max player count of your BungeeCord's or Bukkit's Minecraft server list entry!

You can define multiple dynamic sources from where the plugin will get your slot/max player count from or just make it add additional slots above your player count. Everything is fully configurable and you can even manually set the slot count via a command.

For example with the MySQL query of the default config it will set the slot count to the amount of players that your server had in the last 24 hours using LogBlock's player table.

Commands

Aliases: /dynamicslots, /dynamicslot, /ds
Permission: dynamicslots.command

/ds info - dynamicslots.command.info - Shows some information about your current setup
/ds reload - dynamicslots.command.reload - Reload the config
/ds set <count> - dynamicslots.command.set - Manually set the slot count and overwrite any configured amount
/ds reset - dynamicslots.command.reset - Reset a manually set count back to the configured one

Config

# How long to cache the results of the source's query for
cache-duration: 300
# Slot count used when static source is used or no dynamic slot count was found
# Setting slots to -1 will cause it to display the real slot count in that case
static-slots: 100
# Max amount of slots that should be displayed
max-slots: 10000
# Amount of slots to add when the online count is the same or above the count that would be displayed
# Use 0 to disable this feature completely
# Negative values will subtract from the real playercount
# (Why you would ever do that is beyond me but you can if you want!)
add-when-full: 1
# The source where we want to get the slots from
source:
  # Possible types include mysql, file, static and url
  type: static
  # The mysql query, file path or web url
  query: 'select COUNT(*) as count from `lb-players` WHERE lastlogin > DATE_ADD(NOW(), INTERVAL -1 DAY) AND onlinetime > 60'
  # The regex pattern to try to get the count from when the query returns a string
  regex: ''
  # Additional settings for the mysql source
  username: username
  password: password1
  database: mydatabase
  host: localhost
  port: 3306

Links

Source: https://github.com/Phoenix616/DynamicSlots (Licensed under MPLv2)
Bug reports/feature requests: https://github.com/Phoenix616/DynamicSlots/issues
Dev builds: https://ci.minebench.de/job/DynamicSlots/

Donations

Programming is time intensive and I would really appreciate your support!
So if you can afford it or make commercially use of this plugin feel free to buy me a beer.

Patreon with rewards: Patreon
Paypal: https://s.moep.tv/donate
Ðoge: D7G4Svo7GTNHpuhjwUBj2k7qANnZHwYD4p
BTC: 1EXMFRknc7kLwCmM1zf5LXNnPD4ihVCEhQ

Other Resources


This resource is distributed under the terms of the MPLv2.

Similar projects

Plugin →