geforkt von Mirrors/Paper
Add default kick msg component (#6886)
Dieser Commit ist enthalten in:
Ursprung
67275a04a7
Commit
62f8950e86
@ -1749,6 +1749,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ /**
|
+ /**
|
||||||
|
+ * Kicks the player with the default kick message.
|
||||||
|
+ * @see #kick(Component)
|
||||||
|
+ */
|
||||||
|
+ void kick();
|
||||||
|
+ /**
|
||||||
+ * Kicks player with custom kick message.
|
+ * Kicks player with custom kick message.
|
||||||
+ *
|
+ *
|
||||||
+ * @param message kick message
|
+ * @param message kick message
|
||||||
|
@ -354,6 +354,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
|
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void kick(final net.kyori.adventure.text.Component message) {
|
public void kick(final net.kyori.adventure.text.Component message) {
|
||||||
+ kick(message, org.bukkit.event.player.PlayerKickEvent.Cause.PLUGIN);
|
+ kick(message, org.bukkit.event.player.PlayerKickEvent.Cause.PLUGIN);
|
||||||
|
@ -2514,6 +2514,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
+ private static final net.kyori.adventure.text.Component DEFAULT_KICK_COMPONENT = net.kyori.adventure.text.Component.translatable("multiplayer.disconnect.kicked");
|
||||||
|
+ @Override
|
||||||
|
+ public void kick() {
|
||||||
|
+ this.kick(DEFAULT_KICK_COMPONENT);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void kick(final net.kyori.adventure.text.Component message) {
|
+ public void kick(final net.kyori.adventure.text.Component message) {
|
||||||
+ org.spigotmc.AsyncCatcher.catchOp("player kick");
|
+ org.spigotmc.AsyncCatcher.catchOp("player kick");
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren