Add default kick msg component (#6886)
This commit is contained in:
parent
3f7111d4e1
commit
78e6431008
51 changed files with 182 additions and 169 deletions
|
@ -1586,7 +1586,7 @@ index 922d33ff4fa9d901d3c5c0a9f8399ad8aef62c37..cd287978c34873c7122794e4f3e76291
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840ce98aed8b 100644
|
||||
index e0f9ba3da29261823d48042b74a33acb9f48d597..fcab7ff11d06ae712d56d1eead5dca33bde29296 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -37,7 +37,28 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
@ -1738,7 +1738,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
public void setPlayerListHeaderFooter(@Nullable String header, @Nullable String footer);
|
||||
|
||||
/**
|
||||
@@ -153,9 +223,20 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -153,9 +223,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* Kicks player with custom kick message.
|
||||
*
|
||||
* @param message kick message
|
||||
|
@ -1749,6 +1749,11 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
|
||||
+ // Paper start
|
||||
+ /**
|
||||
+ * Kicks the player with the default kick message.
|
||||
+ * @see #kick(Component)
|
||||
+ */
|
||||
+ void kick();
|
||||
+ /**
|
||||
+ * Kicks player with custom kick message.
|
||||
+ *
|
||||
+ * @param message kick message
|
||||
|
@ -1759,7 +1764,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
/**
|
||||
* Says a message (or runs a command).
|
||||
*
|
||||
@@ -500,6 +581,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -500,6 +586,90 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull EquipmentSlot slot, @NotNull ItemStack item);
|
||||
|
||||
|
@ -1850,7 +1855,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
/**
|
||||
* Send a sign change. This fakes a sign change packet for a user at
|
||||
* a certain location. This will not actually change the world in any way.
|
||||
@@ -514,7 +679,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -514,7 +684,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param lines the new text on the sign or null to clear it
|
||||
* @throws IllegalArgumentException if location is null
|
||||
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
|
||||
|
@ -1860,7 +1865,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -533,7 +700,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -533,7 +705,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException if location is null
|
||||
* @throws IllegalArgumentException if dyeColor is null
|
||||
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
|
||||
|
@ -1870,7 +1875,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -553,7 +722,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -553,7 +727,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException if location is null
|
||||
* @throws IllegalArgumentException if dyeColor is null
|
||||
* @throws IllegalArgumentException if lines is non-null and has a length less than 4
|
||||
|
@ -1880,7 +1885,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
public void sendSignChange(@NotNull Location loc, @Nullable String[] lines, @NotNull DyeColor dyeColor, boolean hasGlowingText) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -1028,6 +1199,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1028,6 +1204,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
|
@ -1888,7 +1893,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
@@ -1041,8 +1213,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1041,8 +1218,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
|
@ -1946,7 +1951,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
/**
|
||||
* Request that the player's client download and switch resource packs.
|
||||
* <p>
|
||||
@@ -1117,6 +1338,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1117,6 +1343,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* pack correctly.
|
||||
* </ul>
|
||||
*
|
||||
|
@ -1954,7 +1959,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
* @param url The URL from which the client will download the resource
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
@@ -1132,8 +1354,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1132,8 +1359,57 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @throws IllegalArgumentException Thrown if the hash is not 20 bytes
|
||||
* long.
|
||||
*/
|
||||
|
@ -2012,7 +2017,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
/**
|
||||
* Gets the Scoreboard displayed to this player
|
||||
*
|
||||
@@ -1249,7 +1520,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1249,7 +1525,7 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param title Title text
|
||||
* @param subtitle Subtitle text
|
||||
|
@ -2021,7 +2026,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
*/
|
||||
@Deprecated
|
||||
public void sendTitle(@Nullable String title, @Nullable String subtitle);
|
||||
@@ -1268,7 +1539,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1268,7 +1544,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param fadeIn time in ticks for titles to fade in. Defaults to 10.
|
||||
* @param stay time in ticks for titles to stay. Defaults to 70.
|
||||
* @param fadeOut time in ticks for titles to fade out. Defaults to 20.
|
||||
|
@ -2031,7 +2036,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
|
||||
|
||||
/**
|
||||
@@ -1495,6 +1768,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1495,6 +1773,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public int getClientViewDistance();
|
||||
|
||||
|
@ -2046,7 +2051,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
/**
|
||||
* Gets the player's estimated ping in milliseconds.
|
||||
*
|
||||
@@ -1520,8 +1801,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1520,8 +1806,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* they wish.
|
||||
*
|
||||
* @return the player's locale
|
||||
|
@ -2057,7 +2062,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
public String getLocale();
|
||||
|
||||
/**
|
||||
@@ -1563,6 +1846,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1563,6 +1851,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public boolean isAllowingServerListings();
|
||||
|
||||
|
@ -2072,7 +2077,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
// Spigot start
|
||||
public class Spigot extends Entity.Spigot {
|
||||
|
||||
@@ -1617,11 +1908,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1617,11 +1913,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
|
@ -2086,7 +2091,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
@Override
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -1632,7 +1925,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1632,7 +1930,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param position the screen position
|
||||
* @param component the components to send
|
||||
|
@ -2096,7 +2101,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1642,7 +1937,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1642,7 +1942,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param position the screen position
|
||||
* @param components the components to send
|
||||
|
@ -2106,7 +2111,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1653,7 +1950,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1653,7 +1955,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param position the screen position
|
||||
* @param sender the sender of the message
|
||||
* @param component the components to send
|
||||
|
@ -2116,7 +2121,7 @@ index e0f9ba3da29261823d48042b74a33acb9f48d597..dc7e32a6f3be974a1d9c367d6b0f840c
|
|||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -1664,7 +1963,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -1664,7 +1968,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param position the screen position
|
||||
* @param sender the sender of the message
|
||||
* @param components the components to send
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue