Get registered block update radius.
Code (Text):
import me.geekles.blockglitchfix.api;
[...]
System.out.println("Radius: " + BlockGlitchFixAPI.API.getRadius());
Getting a list of players that are receiving block updates.
Code (Text):
for(Player player : BlockGlitchFixAPI.API.getPlayers()){
player.sendMessage("Your blocks are being updated!");
}
Manually update nearby blocks for the player.
Code (Text):
BlockGlitchFixAPI.API.updateNearbyBlocks(myPlayer, 6 /*radius*/);
BlockGlitchFixAPI.API.updateNearbyBlocks(myPlayer, 6 /*radius*/, true /*enable stack trace message if updating nearby blocks fails*/);
You can also easily listen for when a player receives a block update!
Code (Text):
@EventHandler
public void onBlockUpdates(BlockUpdateEvent e) {
Player player = e.getPlayer();
Bukkit.broadcastMessage(player.getName() + " had their blocks updated!");
}
Keep in mind those are only a few of the many things you can do with the new API, feel free to explore all the methods. I've documented their uses so it should be relatively simple to understand. Join my discord channel if you need any further assistance!
https://discord.gg/PctzSp9