1.21.5
Co-authored-by: Bjarne Koll <git@lynxplay.dev> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Co-authored-by: MiniDigger | Martin <admin@minidigger.dev> Co-authored-by: Nassim Jahnke <nassim@njahnke.dev> Co-authored-by: Noah van der Aa <ndvdaa@gmail.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com> Co-authored-by: Tamion <70228790+notTamion@users.noreply.github.com> Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com>
This commit is contained in:
@@ -32,10 +32,10 @@ public final class NamespacedTag implements com.destroystokyo.paper.Namespaced {
|
||||
* compatibility measures.
|
||||
*/
|
||||
public static final String BUKKIT = "bukkit";
|
||||
//
|
||||
|
||||
private static final Pattern VALID_NAMESPACE = Pattern.compile("[a-z0-9._-]+");
|
||||
private static final Pattern VALID_KEY = Pattern.compile("[a-z0-9/._-]+");
|
||||
//
|
||||
|
||||
private final String namespace;
|
||||
private final String key;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.destroystokyo.paper.entity.ai;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import java.util.Objects;
|
||||
import java.util.StringJoiner;
|
||||
import org.bukkit.NamespacedKey;
|
||||
import org.bukkit.entity.Mob;
|
||||
@@ -36,13 +36,13 @@ public final class GoalKey<T extends Mob> {
|
||||
if (this == o) return true;
|
||||
if (o == null || this.getClass() != o.getClass()) return false;
|
||||
GoalKey<?> goalKey = (GoalKey<?>) o;
|
||||
return Objects.equal(this.entityClass, goalKey.entityClass) &&
|
||||
Objects.equal(this.namespacedKey, goalKey.namespacedKey);
|
||||
return Objects.equals(this.entityClass, goalKey.entityClass) &&
|
||||
Objects.equals(this.namespacedKey, goalKey.namespacedKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(this.entityClass, this.namespacedKey);
|
||||
return Objects.hash(this.entityClass, this.namespacedKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,8 +24,8 @@ public class BeaconEffectEvent extends BlockEvent implements Cancellable {
|
||||
private boolean cancelled;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public BeaconEffectEvent(final Block block, final PotionEffect effect, final Player player, final boolean primary) {
|
||||
super(block);
|
||||
public BeaconEffectEvent(final Block beacon, final PotionEffect effect, final Player player, final boolean primary) {
|
||||
super(beacon);
|
||||
this.effect = effect;
|
||||
this.player = player;
|
||||
this.primary = primary;
|
||||
|
||||
@@ -11,7 +11,7 @@ import org.jspecify.annotations.NullMarked;
|
||||
/**
|
||||
* Fired anytime the server intends to 'destroy' a block through some triggering reason.
|
||||
* This does not fire anytime a block is set to air, but only with more direct triggers such
|
||||
* as physics updates, pistons, Entities changing blocks, commands set to "Destroy".
|
||||
* as physics updates, pistons, entities changing blocks, commands set to "Destroy".
|
||||
* <p>
|
||||
* This event is associated with the game playing a sound effect at the block in question, when
|
||||
* something can be described as "intend to destroy what is there",
|
||||
@@ -39,7 +39,7 @@ public class BlockDestroyEvent extends BlockExpEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the effect that will be played when the block is broken.
|
||||
* Gets the effect that will be played when the block is broken.
|
||||
*
|
||||
* @return block break effect
|
||||
*/
|
||||
|
||||
@@ -33,8 +33,8 @@ public class TNTPrimeEvent extends BlockEvent implements Cancellable {
|
||||
private boolean cancelled;
|
||||
|
||||
@ApiStatus.Internal
|
||||
public TNTPrimeEvent(@NotNull Block theBlock, @NotNull PrimeReason reason, @Nullable Entity primerEntity) {
|
||||
super(theBlock);
|
||||
public TNTPrimeEvent(@NotNull Block block, @NotNull PrimeReason reason, @Nullable Entity primerEntity) {
|
||||
super(block);
|
||||
this.reason = reason;
|
||||
this.primerEntity = primerEntity;
|
||||
}
|
||||
|
||||
@@ -50,32 +50,6 @@ public class PlayerHandshakeEvent extends Event implements Cancellable {
|
||||
this.cancelled = cancelled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if this event is cancelled.
|
||||
* <p>
|
||||
* When this event is cancelled, custom handshake logic will not
|
||||
* be processed.
|
||||
*
|
||||
* @return {@code true} if this event is cancelled, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return this.cancelled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets if this event is cancelled.
|
||||
* <p>
|
||||
* When this event is cancelled, custom handshake logic will not
|
||||
* be processed.
|
||||
*
|
||||
* @param cancel {@code true} if this event is cancelled, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public void setCancelled(final boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the original handshake string.
|
||||
*
|
||||
@@ -246,6 +220,32 @@ public class PlayerHandshakeEvent extends Event implements Cancellable {
|
||||
this.failMessage(LegacyComponentSerializer.legacySection().deserialize(failMessage));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if this event is cancelled.
|
||||
* <p>
|
||||
* When this event is cancelled, custom handshake logic will not
|
||||
* be processed.
|
||||
*
|
||||
* @return {@code true} if this event is cancelled, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public boolean isCancelled() {
|
||||
return this.cancelled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets if this event is cancelled.
|
||||
* <p>
|
||||
* When this event is cancelled, custom handshake logic will not
|
||||
* be processed.
|
||||
*
|
||||
* @param cancel {@code true} if this event is cancelled, {@code false} otherwise
|
||||
*/
|
||||
@Override
|
||||
public void setCancelled(final boolean cancel) {
|
||||
this.cancelled = cancel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return HANDLER_LIST;
|
||||
|
||||
@@ -37,7 +37,7 @@ public class PlayerJumpEvent extends PlayerEvent implements Cancellable {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* If a jump event is cancelled, the player will be moved or
|
||||
* If this event is cancelled, the player will be moved or
|
||||
* teleported back to the Location as defined by {@link #getFrom()}. This will not
|
||||
* fire an event
|
||||
*
|
||||
@@ -51,7 +51,7 @@ public class PlayerJumpEvent extends PlayerEvent implements Cancellable {
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* <p>
|
||||
* If a jump event is cancelled, the player will be moved or
|
||||
* If this event is cancelled, the player will be moved or
|
||||
* teleported back to the Location as defined by {@link #getFrom()}. This will not
|
||||
* fire an event
|
||||
*
|
||||
|
||||
@@ -109,7 +109,7 @@ public class PlayerSetSpawnEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the notification message that will be sent to the player
|
||||
* if {@link #willNotifyPlayer()} returns true.
|
||||
* if {@link #willNotifyPlayer()} returns {@code true}.
|
||||
*
|
||||
* @return {@code null} if no notification
|
||||
*/
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface NetworkClient {
|
||||
* Returns the protocol version of the client.
|
||||
*
|
||||
* @return The client's protocol version, or {@code -1} if unknown
|
||||
* @see <a href="http://wiki.vg/Protocol_version_numbers">List of protocol
|
||||
* @see <a href="https://minecraft.wiki/w/Minecraft_Wiki:Projects/wiki.vg_merge/Protocol_version_numbers">List of protocol
|
||||
* version numbers</a>
|
||||
*/
|
||||
int getProtocolVersion();
|
||||
|
||||
Reference in New Issue
Block a user