Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import lombok.Getter;
import net.william278.husksync.BukkitHuskSync;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.event.Cancellable;
Expand Down Expand Up @@ -60,6 +61,10 @@ public void onEnable() {
public void onProjectileLaunch(@NotNull ProjectileLaunchEvent event) {
final Projectile projectile = event.getEntity();
if (projectile.getShooter() instanceof Player player) {
if (event.getEntity().getType() == EntityType.ENDER_PEARL && plugin.getSettings().getSynchronization().isAllowPearlSpawningWhileLocked()) {
// Allow ender pearls to spawn while locked (stasis chambers fix post 1.21.1)
return;
}
cancelPlayerEvent(player.getUniqueId(), event);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ public enum DeathItemsMode {
@Comment("Commands which should be blocked before a player has finished syncing (Use * to block all commands)")
private List<String> blacklistedCommandsWhileLocked = new ArrayList<>(List.of("*"));

@Comment("Prevent ender pearl launch events from being blocked while the user is being locked (fixes stasis chambers on 1.21.1+)")
private boolean allowPearlSpawningWhileLocked = false;

@Comment("Configuration for how to sync attributes")
private AttributeSettings attributes = new AttributeSettings();

Expand Down