promotional bannermobile promotional banner

PlayerSpeedAPI

PlayerSpeedAPI is system for managing players speed across plugins.

PlayerSpeedAPI

PlayerSpeedAPI is system for managing players speed across plugins. Makes possibility to accept plugin's request to change player speed only once by average of those speeds requested by plugins with some smoothing. I think you may like it because changing of speed is better by one plugin so other plugins can work together without much "flickering".

I plan to make it configurable so you can choose between some types speed merge (average, the lowest one, the highest one, some other complex ways,...).

Permissions

PermissionDefaultDescription
playerspeedapi.playertrueGrants right to plugin to change this player's speed
playerspeedapi.adminopWill be required for admin commands

Commands

CommandPermissionDescriptionOptionals
/psapi defaultplayerspeedapi.adminChange speed to default(Disable API)[on/off]
/psapi info [player name]playerspeedapi.adminShow info about player
/psapi unregplayerspeedapi.adminForce to unregister all plugins from API(Clears speed data)[player]

For devs

  • Main class is PlayerSpeedAPI with method getAPI()
  • API contains 3 usable methods
    • String[] registerMeForPlayer(Player player, int id) - used for registering speed for this player. You must register before setting speed!
    • String[] unregisterMeFromPlayer(Player player, int id) - if you want to remove your value from player, use this.
    • String[] putSpeed(Player player, int id, float speed) - base method for setting player speed. Uses standard MC speed (-1;1) def: 0.2.
  • What is ID: ID should be unique for every plugin or part of plugin so they could not interfere. Ex: My RealWeather plugin uses ID:1. :-D. If you try to register already registered ID for same player, you will get return code "01" what means "Already registered!", but NOT exception, so you should take care of it. List of used IDs HERE.
  • Return variances of String[]: Contains always 2 strings. First is return code and second is message for code.
CodeMessageDescription
"00""Success"Doesn't need description
"01""Already registered"/"Not registered"Message depends on method you call
"02""User does not exist"Means that user is not registered in API

Current work status: alpha stage - version 1.7.2alpha1

Your ideas here

Do you think you have something to share? Write it down right here.

The PlayerSpeedAPI Team

profile avatar
  • 4
    Projects
  • 38.4K
    Downloads

More from _ForgeUser8894095

  • WomOres project image

    WomOres

    • 4.1K
    • Bukkit Plugins

    Respawns ores like in WoW.

    • 4.1K
    • June 3, 2014
    • Bukkit Plugins
  • RealWeather project image

    RealWeather

    • 33.1K
    • Bukkit Plugins

    Makes biomes more realistic.

    • 33.1K
    • May 22, 2014
    • Bukkit Plugins
    • +1
  • BagWeight project image

    BagWeight

    • 509
    • Bukkit Plugins

    BagWeight simulates weight of items in your backpack.

    • 509
    • November 19, 2013
    • Bukkit Plugins
  • WomOres project image

    WomOres

    • 4.1K
    • Bukkit Plugins

    Respawns ores like in WoW.

    • 4.1K
    • June 3, 2014
    • Bukkit Plugins
  • RealWeather project image

    RealWeather

    • 33.1K
    • Bukkit Plugins

    Makes biomes more realistic.

    • 33.1K
    • May 22, 2014
    • Bukkit Plugins
    • +1
  • BagWeight project image

    BagWeight

    • 509
    • Bukkit Plugins

    BagWeight simulates weight of items in your backpack.

    • 509
    • November 19, 2013
    • Bukkit Plugins