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:
@@ -332,18 +332,21 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Deprecated // Paper
|
||||
public void kickPlayer(@Nullable String message);
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Kicks the player with the default kick message.
|
||||
*
|
||||
* @see #kick(net.kyori.adventure.text.Component)
|
||||
*/
|
||||
void kick();
|
||||
|
||||
/**
|
||||
* Kicks player with custom kick message.
|
||||
*
|
||||
* @param message kick message
|
||||
*/
|
||||
void kick(final net.kyori.adventure.text.@Nullable Component message);
|
||||
default void kick(final net.kyori.adventure.text.@Nullable Component message) {
|
||||
this.kick(message, org.bukkit.event.player.PlayerKickEvent.Cause.PLUGIN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Kicks player with custom kick message and cause.
|
||||
@@ -352,7 +355,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param cause kick cause
|
||||
*/
|
||||
void kick(final net.kyori.adventure.text.@Nullable Component message, org.bukkit.event.player.PlayerKickEvent.Cause cause);
|
||||
// Paper end
|
||||
|
||||
/**
|
||||
* Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
|
||||
@@ -543,31 +545,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public boolean isSleepingIgnored();
|
||||
|
||||
/**
|
||||
* Gets the Location where the player will spawn at their bed, null if
|
||||
* they have not slept in one or their current bed spawn is invalid.
|
||||
*
|
||||
* @return Bed Spawn Location if bed exists, otherwise null.
|
||||
*
|
||||
* @see #getRespawnLocation()
|
||||
* @deprecated Misleading name. This method also returns the location of
|
||||
* respawn anchors.
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
@Deprecated(since = "1.20.4")
|
||||
public Location getBedSpawnLocation();
|
||||
|
||||
/**
|
||||
* Gets the Location where the player will spawn at, null if they
|
||||
* don't have a valid respawn point.
|
||||
*
|
||||
* @return respawn location if exists, otherwise null.
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Location getRespawnLocation();
|
||||
|
||||
/**
|
||||
* Sets the Location where the player will spawn at their bed.
|
||||
*
|
||||
@@ -973,7 +950,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* than 1.19.4
|
||||
*/
|
||||
@Deprecated(since = "1.20")
|
||||
public void sendBlockChanges(Collection<BlockState> blocks, boolean suppressLightUpdates);
|
||||
default void sendBlockChanges(Collection<BlockState> blocks, boolean suppressLightUpdates) {
|
||||
this.sendBlockChanges(blocks);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send block damage. This fakes block break progress at a certain location
|
||||
@@ -1294,7 +1273,6 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void sendMap(MapView map);
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Shows the player the win screen that normally is only displayed after one kills the ender dragon
|
||||
* and exits the end for the first time.
|
||||
@@ -1333,9 +1311,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @see <a href="https://minecraft.wiki/wiki/End_Poem">https://minecraft.wiki/wiki/End_Poem</a>
|
||||
*/
|
||||
public void setHasSeenWinScreen(boolean hasSeenWinScreen);
|
||||
// Paper end
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Permanently Bans the Profile and IP address currently used by the player.
|
||||
*
|
||||
@@ -1346,7 +1322,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
// For reference, Bukkit defines this as nullable, while they impl isn't, we'll follow API.
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerFull(@Nullable String reason) {
|
||||
return banPlayerFull(reason, null, null);
|
||||
return this.banPlayerFull(reason, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1359,7 +1335,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerFull(@Nullable String reason, @Nullable String source) {
|
||||
return banPlayerFull(reason, null, source);
|
||||
return this.banPlayerFull(reason, null, source);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1372,7 +1348,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerFull(@Nullable String reason, java.util.@Nullable Date expires) {
|
||||
return banPlayerFull(reason, expires, null);
|
||||
return this.banPlayerFull(reason, expires, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1386,8 +1362,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerFull(@Nullable String reason, java.util.@Nullable Date expires, @Nullable String source) {
|
||||
banPlayer(reason, expires, source);
|
||||
return banPlayerIP(reason, expires, source, true);
|
||||
this.banPlayer(reason, expires, source);
|
||||
return this.banPlayerIP(reason, expires, source, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1401,7 +1377,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerIP(@Nullable String reason, boolean kickPlayer) {
|
||||
return banPlayerIP(reason, null, null, kickPlayer);
|
||||
return this.banPlayerIP(reason, null, null, kickPlayer);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1415,7 +1391,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerIP(@Nullable String reason, @Nullable String source, boolean kickPlayer) {
|
||||
return banPlayerIP(reason, null, source, kickPlayer);
|
||||
return this.banPlayerIP(reason, null, source, kickPlayer);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1429,7 +1405,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerIP(@Nullable String reason, java.util.@Nullable Date expires, boolean kickPlayer) {
|
||||
return banPlayerIP(reason, expires, null, kickPlayer);
|
||||
return this.banPlayerIP(reason, expires, null, kickPlayer);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1442,7 +1418,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerIP(@Nullable String reason) {
|
||||
return banPlayerIP(reason, null, null);
|
||||
return this.banPlayerIP(reason, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1455,7 +1431,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerIP(@Nullable String reason, @Nullable String source) {
|
||||
return banPlayerIP(reason, null, source);
|
||||
return this.banPlayerIP(reason, null, source);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1468,7 +1444,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerIP(@Nullable String reason, java.util.@Nullable Date expires) {
|
||||
return banPlayerIP(reason, expires, null);
|
||||
return this.banPlayerIP(reason, expires, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1482,7 +1458,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated(since = "1.20.4")
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerIP(@Nullable String reason, java.util.@Nullable Date expires, @Nullable String source) {
|
||||
return banPlayerIP(reason, expires, source, true);
|
||||
return this.banPlayerIP(reason, expires, source, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1499,7 +1475,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
public default org.bukkit.@Nullable BanEntry banPlayerIP(@Nullable String reason, java.util.@Nullable Date expires, @Nullable String source, boolean kickPlayer) {
|
||||
org.bukkit.BanEntry banEntry = org.bukkit.Bukkit.getServer().getBanList(org.bukkit.BanList.Type.IP).addBan(getAddress().getAddress().getHostAddress(), reason, expires, source);
|
||||
if (kickPlayer && isOnline()) {
|
||||
getPlayer().kickPlayer(reason);
|
||||
this.getPlayer().kickPlayer(reason);
|
||||
}
|
||||
|
||||
return banEntry;
|
||||
@@ -1546,7 +1522,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Override
|
||||
@Deprecated
|
||||
public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
spigot().sendMessage(component);
|
||||
this.spigot().sendMessage(component);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1558,7 +1534,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Override
|
||||
@Deprecated
|
||||
public default void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
spigot().sendMessage(components);
|
||||
this.spigot().sendMessage(components);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1570,7 +1546,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
@Deprecated
|
||||
public default void sendMessage(net.md_5.bungee.api.ChatMessageType position, net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
spigot().sendMessage(position, components);
|
||||
this.spigot().sendMessage(position, components);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user