CloudAPI Update: New Player Features!
We are excited to announce that CloudAPI has been updated with a range of new features designed to enhance player interaction and customization. These additions provide you with more powerful tools to manage player data and interactions within your Minecraft server. Check out the new features below:
Player Data Management
- Save Player Data
You can now easily store and retrieve custom data associated with players. This feature allows you to persist player-specific information between sessions, enabling more personalized experiences and advanced functionalities.
Usage: PlayerDataUtil.savePlayerData(Player player, String key, Object value)
- Get Player Data
Retrieve previously saved data for any player. This feature is perfect for implementing features that depend on player-specific data or for creating a more customized gameplay experience.
Usage: PlayerDataUtil.getPlayerData(Player player, String key)
Player Statistics
- Increment Player Stat
Increment player statistics in your plugin to track progress, achievements, or other metrics. This feature allows for dynamic gameplay adjustments based on player performance.
Usage: PlayerStatsUtil.incrementStat(Player player, String statName, int amount)
- Get Player Stat
Retrieve the current value of a specific player statistic. This is useful for displaying stats or making decisions based on player progress.
Usage: PlayerStatsUtil.getStat(Player player, String statName)
Permission Management
- Add Permission to Player
Easily manage player permissions by adding specific permissions to individual players. This feature allows you to grant special abilities or access within your plugin.
Usage: PermissionUtil.addPermission(Player player, String permission)
- Check Player Permission
Check whether a player has a specific permission. This is useful for conditional logic based on player capabilities.
Usage: PermissionUtil.checkPermission(Player player, String permission)
️ Teleportation Features
- Teleport Player to Location
Teleport players to specific locations in the world. This feature is handy for guiding players to special areas or for managing in-game events.
Usage: TeleportUtil.teleport(Player player, Location location)
- Teleport to Another Player
Instantly teleport to another player's location. This feature is useful for administrative tasks or for quickly joining other players.
Usage: TeleportUtil.teleportToPlayer(Player player, String playerName)
Inventory and Effects
- Create and Open Custom Inventory
Create and display custom inventories to players, allowing for unique in-game interfaces and interactions.
Usage: InventoryUtil.createInventory(Player player, String title, List<ItemStack> items)
- Add Potion Effect to Player
Apply potion effects to players to enhance or modify their abilities. This feature adds depth to gameplay and can be used for temporary power-ups or debuffs.
Usage: PotionUtil.addPotionEffect(Player player, PotionEffectType type, int duration, int amplifier)
- Remove Potion Effect from Player
Remove potion effects from players to revert their status or remove debuffs.
Usage: PotionUtil.removePotionEffect(Player player, PotionEffectType type)
- Set Player Health
Directly set a player's health to a specified value, useful for game mechanics or healing effects.
Usage: PlayerHealthUtil.setHealth(Player player, double health)
- Set Player Hunger Level
Adjust the player's hunger level to manage their food status within the game.
Usage: PlayerHungerUtil.setHunger(Player player, int hunger)
- Set Player Respawn Location
Set a custom respawn location for players, allowing for personalized spawn points or game mechanics.
Usage: PlayerRespawnUtil.setRespawnLocation(Player player, Location location)
- Set Player Attribute
Modify player attributes to customize gameplay further or implement special mechanics.
Usage: PlayerAttributeUtil.setAttribute(Player player, Attribute attribute, double value)
Social Features
- Add a Player as a Friend
Manage friendships within your server by adding players to your friend list.
Usage: FriendManager.addFriend(Player player, String friendName)
- Remove a Player from Friends
Remove players from your friend list, allowing for dynamic social interactions.
Usage: FriendManager.removeFriend(Player player, String friendName)
- Get List of Friends
Retrieve a list of friends for any player to display or manage social connections.
Usage: FriendManager.getFriends(Player player)
We hope these new features enhance your plugin development and bring more exciting possibilities to your Minecraft server. As always, we welcome your feedback and are here to support you as you explore these new tools.
Stay tuned for more updates and features coming soon!
Happy developing!