|
|
|
@ -29,7 +29,6 @@ import org.bukkit.event.EventHandler;
|
|
|
|
|
import org.bukkit.event.EventPriority;
|
|
|
|
|
import org.bukkit.event.Listener;
|
|
|
|
|
import org.bukkit.event.entity.PlayerDeathEvent;
|
|
|
|
|
import org.bukkit.event.player.PlayerAdvancementDoneEvent;
|
|
|
|
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
|
|
|
|
import org.bukkit.event.server.MapInitializeEvent;
|
|
|
|
|
import org.bukkit.event.world.WorldSaveEvent;
|
|
|
|
@ -103,10 +102,6 @@ public class BukkitEventListener extends EventListener implements BukkitJoinEven
|
|
|
|
|
super.saveOnPlayerDeath(user, BukkitData.Items.ItemArray.adapt(event.getDrops()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Handle advancement grant events (empty on Spigot due to missing message API)
|
|
|
|
|
protected void handleLockedAdvancementGrant(@NotNull @SuppressWarnings("unused") PlayerAdvancementDoneEvent event) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@EventHandler(ignoreCancelled = true)
|
|
|
|
|
public void onWorldSave(@NotNull WorldSaveEvent event) {
|
|
|
|
|
if (!plugin.getSettings().getSynchronization().isSaveOnWorldSave()) {
|
|
|
|
@ -126,13 +121,6 @@ public class BukkitEventListener extends EventListener implements BukkitJoinEven
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
|
|
|
|
|
public void onPlayerAdvancementDone(@NotNull PlayerAdvancementDoneEvent event) {
|
|
|
|
|
if (lockedHandler.cancelPlayerEvent(event.getPlayer().getUniqueId())) {
|
|
|
|
|
handleLockedAdvancementGrant(event);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// We handle commands here to allow specific command handling on ProtocolLib servers
|
|
|
|
|
@EventHandler(priority = EventPriority.LOW, ignoreCancelled = true)
|
|
|
|
|
public void onCommandProcessed(@NotNull PlayerCommandPreprocessEvent event) {
|
|
|
|
|