Update to Minecraft 1.20.5

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2024-04-24 01:15:00 +10:00
parent 899f2acb84
commit f3502f6dac
54 changed files with 1814 additions and 741 deletions

View File

@@ -112,7 +112,9 @@ public class EntityShootBowEvent extends EntityEvent implements Cancellable {
* consumed).
*
* @param consumeItem whether or not to consume the item
* @deprecated not currently functional
*/
@Deprecated
public void setConsumeItem(boolean consumeItem) {
this.consumeItem = consumeItem;
}

View File

@@ -18,19 +18,26 @@ public class AsyncPlayerPreLoginEvent extends Event {
private final String name;
private final InetAddress ipAddress;
private final UUID uniqueId;
private final boolean transferred;
@Deprecated
public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress) {
this(name, ipAddress, null);
}
@Deprecated
public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final UUID uniqueId) {
this(name, ipAddress, uniqueId, false);
}
public AsyncPlayerPreLoginEvent(@NotNull final String name, @NotNull final InetAddress ipAddress, @NotNull final UUID uniqueId, boolean transferred) {
super(true);
this.result = Result.ALLOWED;
this.message = "";
this.name = name;
this.ipAddress = ipAddress;
this.uniqueId = uniqueId;
this.transferred = transferred;
}
/**
@@ -163,6 +170,15 @@ public class AsyncPlayerPreLoginEvent extends Event {
return uniqueId;
}
/**
* Gets if this connection has been transferred from another server.
*
* @return true if the connection has been transferred
*/
public boolean isTransferred() {
return transferred;
}
@NotNull
@Override
public HandlerList getHandlers() {