DontLoseYourSphere (NoPlayerHeads)

A simple plugin to prevent players from losing their sphere's effects by placing it on the ground.

22

Quick challenge

How far can you run before the mobs catch you?

DontLoseYourSphere (NoPlayerHeads)

DontLoseYourSphere (also NoPlayerHeads)

A simple plugin to prevent players from losing their sphere by placing it on the ground.

Plugin preview

How does it work?

Because all players equip the sphere in their offhand, they have a change of accidentaly placing it down and losing all the effects of the sphere and the money they spent on the sphere itself. This plugin prevents all of that by cancelling the place event: ``` @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onPlayerHeadPlace(BlockPlaceEvent event) { Material type = event.getBlockPlaced().getType();

if (type == Material.PLAYER_HEAD || type == Material.PLAYER_WALL_HEAD || (type.name().startsWith("PLAYER_") && type.name().endsWith("HEAD"))) {

event.setCancelled(true);

... } } } ```

ADS