Finish tests & bad calls
This commit is contained in:
@ -146,13 +146,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
public void disconnect(final Component reason) {
|
public void disconnect(final Component reason) {
|
||||||
- this.disconnect(PaperAdventure.asAdventure(reason));
|
- this.disconnect(PaperAdventure.asAdventure(reason));
|
||||||
+ this.disconnect(PaperAdventure.asAdventure(reason), org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN);
|
+ this.disconnect(PaperAdventure.asAdventure(reason), org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public void disconnect(final Component reason, PlayerKickEvent.Cause cause) {
|
||||||
|
+ this.disconnect(PaperAdventure.asAdventure(reason), cause);
|
||||||
}
|
}
|
||||||
|
|
||||||
- public void disconnect(net.kyori.adventure.text.Component reason) {
|
- public void disconnect(net.kyori.adventure.text.Component reason) {
|
||||||
+ public void disconnect(final Component reason, PlayerKickEvent.Cause cause) {
|
|
||||||
+ this.disconnect(PaperAdventure.asAdventure(reason), cause);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public void disconnect(net.kyori.adventure.text.Component reason, org.bukkit.event.player.PlayerKickEvent.Cause cause) {
|
+ public void disconnect(net.kyori.adventure.text.Component reason, org.bukkit.event.player.PlayerKickEvent.Cause cause) {
|
||||||
// Paper end
|
// Paper end
|
||||||
// CraftBukkit start - fire PlayerKickEvent
|
// CraftBukkit start - fire PlayerKickEvent
|
||||||
@ -202,6 +202,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper start
|
// Paper start
|
||||||
|
String str = packet.getCommand(); int index = -1;
|
||||||
|
if (str.length() > 64 && ((index = str.indexOf(' ')) == -1 || index >= 64)) {
|
||||||
|
- server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]))); // Paper
|
||||||
|
+ server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Paper end
|
||||||
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
// Paper start - validate pick item position
|
// Paper start - validate pick item position
|
||||||
if (!(packet.getSlot() >= 0 && packet.getSlot() < this.player.getInventory().items.size())) {
|
if (!(packet.getSlot() >= 0 && packet.getSlot() < this.player.getInventory().items.size())) {
|
||||||
|
|||||||
@ -76,6 +76,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "whitelist", "Allows the user to manage the server whitelist", PermissionDefault.OP, commands);
|
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "whitelist", "Allows the user to manage the server whitelist", PermissionDefault.OP, commands);
|
||||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "worldborder", "Allows the user to manage the world border", PermissionDefault.OP, commands);
|
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "worldborder", "Allows the user to manage the world border", PermissionDefault.OP, commands);
|
||||||
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "place", "Allows the user to place features and structures", PermissionDefault.OP, commands);
|
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "place", "Allows the user to place features and structures", PermissionDefault.OP, commands);
|
||||||
|
+ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "return", "Allows the user to use the /return command", PermissionDefault.OP, commands);
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
DefaultPermissions.registerPermission("minecraft.admin.command_feedback", "Receive command broadcasts when sendCommandFeedback is true", PermissionDefault.OP, commands);
|
DefaultPermissions.registerPermission("minecraft.admin.command_feedback", "Receive command broadcasts when sendCommandFeedback is true", PermissionDefault.OP, commands);
|
||||||
|
|||||||
Reference in New Issue
Block a user