gen multiplayer api

Access generation bonus multiplier information.


Package

bg.pikz.shards.api.interfaces.GenMultiplayerAPI

Accessing GenMultiplayerAPI

import bg.pikz.shards.api.ShardsAPIProvider;
import bg.pikz.shards.api.interfaces.GenMultiplayerAPI;

ShardsAPI api = ShardsAPIProvider.getAPI();
GenMultiplayerAPI genMultiplier = api.getGenMultiplier();

Methods

getGenMultiplayer()

Gets the generation multiplier permissions and their corresponding shard values.

HashMap<String, Long> getGenMultiplayer()

Returns: A map of permission node names to shard bonus amounts

Example:


hasGenMultiplayerPerm(Player player)

Checks if a player has any generation multiplier permissions.

Parameters:

  • player - The player to check

Returns: true if the player has at least one gen multiplier permission

Example:


getGenShards(Player player)

Gets the highest generation shard bonus for a player based on their permissions.

Parameters:

  • player - The player to check

Returns: The highest shard bonus amount, or 0 if no permissions match

Example:


Complete Example


Rank Display Example