added CoordinateDisplay with settings preferences, directional updates, and time display

This commit is contained in:
2025-10-03 17:06:20 +02:00
parent 040cae6cd1
commit 5ca4c70a41
8 changed files with 250 additions and 1 deletions

View File

@@ -0,0 +1,16 @@
package eu.mhsl.craftattack.spawn.craftattack.appliances.tweaks.endermanBlockGriefReducer;
import eu.mhsl.craftattack.spawn.core.appliance.ApplianceListener;
import org.bukkit.entity.Enderman;
import org.bukkit.event.EventHandler;
import org.bukkit.event.entity.EntityChangeBlockEvent;
import java.util.concurrent.ThreadLocalRandom;
class EndermanBlockChangeListener extends ApplianceListener<EndermanBlockGriefReducer> {
@EventHandler
public void onBlockPickup(EntityChangeBlockEvent event) {
if(!(event.getEntity() instanceof Enderman)) return;
if(ThreadLocalRandom.current().nextDouble() > 0.7) event.setCancelled(true);
}
}

View File

@@ -0,0 +1,16 @@
package eu.mhsl.craftattack.spawn.craftattack.appliances.tweaks.endermanBlockGriefReducer;
import eu.mhsl.craftattack.spawn.core.appliance.Appliance;
import org.bukkit.event.Listener;
import org.jetbrains.annotations.NotNull;
import java.util.List;
public class EndermanBlockGriefReducer extends Appliance {
@Override
protected @NotNull List<Listener> listeners() {
return List.of(
new EndermanBlockChangeListener()
);
}
}