Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-14 20:10:05 +01:00
Update upstream (Bukkit/CraftBukkit/Spigot) (#10875)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 376e37db SPIGOT-7677: Update which entities are marked as spawnable 06c4add3 SPIGOT-7737: Add separate TreeType.MEGA_PINE 19b7caaa SPIGOT-7731: Spawn eggs cannot have damage e585297e PR-1022: Add force option to Player#spawnParticle d26e0094 PR-1018: Add methods to get players seeing specific chunks 8df1ed18 PR-978: Add Material#isCompostable and Material#getCompostChance 4b9b59c7 SPIGOT-7676: Enforce locale parameter in toLowerCase and toUpperCase method calls and always use root locale 8d1e700a PR-1020: Cast instead of using #typed when getting BlockType and ItemType to better work with testing / mocks fa28607a PR-1016: Fix incorrect assumption of Fireball having constant speed 4c6c8586 PR-1015: Add a tool component to ItemMeta 6f6b2123 PR-1014: Add PotionEffectTypeCategory to distinguish between beneficial and harmful effects f511cfe1 PR-1013, SPIGOT-4288, SPIGOT-6202: Add material rerouting in preparation for the switch to ItemType and BlockType def44cbf SPIGOT-7669: Fix typo in ProjectileHitEvent#getHitBlockFace documentation 53fa4f72 PR-1011: Throw an exception if a RecipeChoice is ever supplied air CraftBukkit Changes: ee95e171a SPIGOT-7737: Add separate TreeType.MEGA_PINE 0dae4c62c Fix spawn egg equality check and copy constructor ab59e847c Fix spawn eggs with no entity creating invalid stacks and disconnect creative clients 3b6093b28 SPIGOT-7736: Creative spawn egg use loses components c6b4d5a87 SPIGOT-7731: Spawn eggs cannot have damage 340ccd57f SPIGOT-7735: Fix serialization of player heads with note block sound fd2f41834 SPIGOT-7734: Can't register a custom advancement using unsafe() 02456e2a5 PR-1413: Add force option to Player#spawnParticle 6a61f38b2 SPIGOT-7680: Per-world weather command 58c41cebb PR-1409: Add methods to get players seeing specific chunks 16c976797 PR-1412: Fix shipwreck loot tables not being set for BlockTransformers 7189ba636 PR-1360: Add Material#isCompostable and Material#getCompostChance 900384556 SPIGOT-7676: Enforce locale parameter in toLowerCase and toUpperCase method calls and always use root locale bdb40c5f1 Increase outdated build delay d6607c7dd SPIGOT-7675: Fix FoodComponent config deserialization b148ed332 PR-1406: Fix incorrect assumption of Fireball having constant speed 3ec31ca75 PR-1405: Add a tool component to ItemMeta 5d7d675b9 PR-1404: Add PotionEffectTypeCategory to distinguish between beneficial and harmful effects 960827981 PR-1403, SPIGOT-4288, SPIGOT-6202: Add material rerouting in preparation for the switch to ItemType and BlockType 94e44ec93 PR-1401: Add a config option to accept old keys in registry get calls a43701920 PR-1402: Fix ChunkSnapshot#isSectionEmpty() is always false 87d0a3368 SPIGOT-7668: Move NONE Registry updater to FieldRename to avoid some class loader issues 2ea1e7ac2 PR-1399: Fix regression preventing positive .setDamage value from causing knockback for 0 damage events ba2d49d21 Increase outdated build delay Spigot Changes: fcd94e21 Rebuild patches 342f4939 SPIGOT-7661: Add experimental unload-frozen-chunks option
Dieser Commit ist enthalten in:
Ursprung
906df69f05
Commit
79e2cb620e
@ -120,6 +120,7 @@ import org.bukkit.entity.ZombieVillager;
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
@ -282,8 +283,8 @@ public class MobGoalNames {
|
||||
name = sb.toString();
|
||||
name = name.replaceFirst("_", "");
|
||||
|
||||
if (flag && !deobfuscationMap.containsKey(name.toLowerCase()) && !ignored.contains(name)) {
|
||||
System.out.println("need to map " + original + " (" + name.toLowerCase() + ")");
|
||||
if (flag && !deobfuscationMap.containsKey(name.toLowerCase(Locale.ROOT)) && !ignored.contains(name)) {
|
||||
System.out.println("need to map " + original + " (" + name.toLowerCase(Locale.ROOT) + ")");
|
||||
}
|
||||
|
||||
// did we rename this key?
|
||||
|
@ -12,7 +12,7 @@ public final class Formatting {
|
||||
private static final Pattern ILLEGAL_FIELD_CHARACTERS = Pattern.compile("[.-/]");
|
||||
|
||||
public static String formatKeyAsField(String path) {
|
||||
return ILLEGAL_FIELD_CHARACTERS.matcher(path.toUpperCase(Locale.ENGLISH)).replaceAll("_");
|
||||
return ILLEGAL_FIELD_CHARACTERS.matcher(path.toUpperCase(Locale.ROOT)).replaceAll("_");
|
||||
}
|
||||
|
||||
public static Comparator<String> ALPHABETIC_KEY_ORDER = alphabeticKeyOrder(path -> path);
|
||||
|
@ -233,10 +233,10 @@ index 89ca06ebecdaadd5dfc7bc74473ca15ad36f6eff..5974ceea58940e1799f3589eac0e39b9
|
||||
|
||||
public static Stream<Arguments> data() {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index 79173d6ed844f1e640e3aa745a9b560ec5e6a2bc..73ec679ac0d1f398b417bd174b47f9af93351e27 100644
|
||||
index 5709d52ed4ac4ce8dd8b0569281279f7305c5fb9..a47ee3ce660ec4467b5ed6a4b41fb2d19179a189 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -61,6 +61,11 @@ public final class TestServer {
|
||||
@@ -72,6 +72,11 @@ public final class TestServer {
|
||||
UnsafeValues unsafeValues = mock(withSettings().stubOnly());
|
||||
when(instance.getUnsafe()).thenReturn(unsafeValues);
|
||||
|
||||
|
@ -1511,10 +1511,10 @@ index ce9bb54a6ef8a7d31804ec63aa1f6cbbd6ae2d54..baf49da3dd46039da2f24a4af8b1b861
|
||||
Material toLegacy(Material material);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Warning.java b/src/main/java/org/bukkit/Warning.java
|
||||
index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb1e09f3f4 100644
|
||||
index 0208fc2bcd5c99c60b37419b92248db76681fc1e..5c1dda6888561a7eba0fbf9ba6ca7d7fe856eb53 100644
|
||||
--- a/src/main/java/org/bukkit/Warning.java
|
||||
+++ b/src/main/java/org/bukkit/Warning.java
|
||||
@@ -67,6 +67,7 @@ public @interface Warning {
|
||||
@@ -68,6 +68,7 @@ public @interface Warning {
|
||||
* </ul>
|
||||
*/
|
||||
public boolean printFor(@Nullable Warning warning) {
|
||||
@ -1523,7 +1523,7 @@ index efb97712cc9dc7c1e12a59f5b94e4f2ad7c6b7d8..3024468af4c073324e536c1cb26beffb
|
||||
return warning == null || warning.value();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 3132e6754ab462eca0b7de1e7ad64c955316296d..a9858c2559f0921613b19710135cc6e060488e96 100644
|
||||
index c0479a8da773b2f8db29f190ddc0e4961fb9f107..9732929b666b0a5e1a2a41c8e8794cc4f2535e41 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -1535,7 +1535,7 @@ index 3132e6754ab462eca0b7de1e7ad64c955316296d..a9858c2559f0921613b19710135cc6e0
|
||||
|
||||
/**
|
||||
* Gets the {@link Block} at the given coordinates
|
||||
@@ -617,6 +617,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -644,6 +644,14 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public List<Player> getPlayers();
|
||||
|
||||
@ -2182,10 +2182,10 @@ index b7d8dd30360a38dbdc7bbce40c8e6ced7261f833..0817f2395c2b18828565435568ce651f
|
||||
public void sendRawMessage(@Nullable UUID sender, @NotNull String message);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index 18983f405b2f6c4159dba5c99674ae7729905cc4..a82d6f469aca02fb28b1b3ad84dc40415f1f1ade 100644
|
||||
index f52cff3abcded891f6002a5fe4d5229ab551fe73..9db24da6836de45b7aff8d89782e6b0e1bc5391b 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -318,6 +318,19 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
@@ -319,6 +319,19 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
* @return True if the enchantment may be applied, otherwise False
|
||||
*/
|
||||
public abstract boolean canEnchantItem(@NotNull ItemStack item);
|
||||
@ -2256,7 +2256,7 @@ index 558fe6e23f562ee873fc84112f930c6ea19a09f4..c78fb359bd28b8dc1ba242642ec612e8
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 712c0a8ae919ed9e7cb84cebd4b6a415ddaa63eb..4e9ba039669c7059180f5776ee2f7188f2dd01b5 100644
|
||||
index 3cec942c2fb46a8fa0b8bc63cbc353ebd23a93ba..c7d3d938534ac11fe420418655dae689c58fbe12 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -56,7 +56,41 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -2892,7 +2892,7 @@ index 712c0a8ae919ed9e7cb84cebd4b6a415ddaa63eb..4e9ba039669c7059180f5776ee2f7188
|
||||
public void sendTitle(@Nullable String title, @Nullable String subtitle, int fadeIn, int stay, int fadeOut);
|
||||
|
||||
/**
|
||||
@@ -2117,6 +2491,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2165,6 +2539,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public int getClientViewDistance();
|
||||
|
||||
@ -2907,7 +2907,7 @@ index 712c0a8ae919ed9e7cb84cebd4b6a415ddaa63eb..4e9ba039669c7059180f5776ee2f7188
|
||||
/**
|
||||
* Gets the player's estimated ping in milliseconds.
|
||||
*
|
||||
@@ -2142,8 +2524,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2190,8 +2572,10 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* they wish.
|
||||
*
|
||||
* @return the player's locale
|
||||
@ -2918,7 +2918,7 @@ index 712c0a8ae919ed9e7cb84cebd4b6a415ddaa63eb..4e9ba039669c7059180f5776ee2f7188
|
||||
public String getLocale();
|
||||
|
||||
/**
|
||||
@@ -2195,6 +2579,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2243,6 +2627,14 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public boolean isAllowingServerListings();
|
||||
|
||||
@ -2933,7 +2933,7 @@ index 712c0a8ae919ed9e7cb84cebd4b6a415ddaa63eb..4e9ba039669c7059180f5776ee2f7188
|
||||
// Spigot start
|
||||
public class Spigot extends Entity.Spigot {
|
||||
|
||||
@@ -2226,11 +2618,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2274,11 +2666,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
@ -2947,7 +2947,7 @@ index 712c0a8ae919ed9e7cb84cebd4b6a415ddaa63eb..4e9ba039669c7059180f5776ee2f7188
|
||||
@Override
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -2241,7 +2635,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2289,7 +2683,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param position the screen position
|
||||
* @param component the components to send
|
||||
@ -2957,7 +2957,7 @@ index 712c0a8ae919ed9e7cb84cebd4b6a415ddaa63eb..4e9ba039669c7059180f5776ee2f7188
|
||||
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.");
|
||||
}
|
||||
@@ -2251,7 +2647,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2299,7 +2695,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*
|
||||
* @param position the screen position
|
||||
* @param components the components to send
|
||||
@ -2967,7 +2967,7 @@ index 712c0a8ae919ed9e7cb84cebd4b6a415ddaa63eb..4e9ba039669c7059180f5776ee2f7188
|
||||
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.");
|
||||
}
|
||||
@@ -2262,7 +2660,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2310,7 +2708,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
|
||||
@ -2977,7 +2977,7 @@ index 712c0a8ae919ed9e7cb84cebd4b6a415ddaa63eb..4e9ba039669c7059180f5776ee2f7188
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent component) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
@@ -2273,7 +2673,9 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2321,7 +2721,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
|
||||
@ -4294,10 +4294,10 @@ index e12996492c1558fed9fab30de9f8018e0ed7fac3..002acfbdce1db10f7ba1b6a013e678f5
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index b8bb11544bdfb5b9272c2c3c33c95a4c1c7fdf12..86fbc3902989a3baca851ab8c3866af445451787 100644
|
||||
index aa7fcae0de70aa5c10a331dfb076efd2f2c64065..d5342258086066d3b9ef404916bad8440f0cf0cd 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -215,4 +215,24 @@ public interface ItemFactory {
|
||||
@@ -200,4 +200,24 @@ public interface ItemFactory {
|
||||
*/
|
||||
@NotNull
|
||||
ItemStack enchantItem(@NotNull final ItemStack item, final int level, final boolean allowTreasures);
|
||||
@ -4323,7 +4323,7 @@ index b8bb11544bdfb5b9272c2c3c33c95a4c1c7fdf12..86fbc3902989a3baca851ab8c3866af4
|
||||
+ // Paper end - Adventure
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 692f67c4e27cf62451130479510d06c89274ad23..22e883c8d737cf9f799c6160ff63d90f99250020 100644
|
||||
index eade62328895133c026e7e678e648e1fc846f5ee..730c42eddd38acec1cdbb19dfc8c675795d1e68d 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -4335,7 +4335,7 @@ index 692f67c4e27cf62451130479510d06c89274ad23..22e883c8d737cf9f799c6160ff63d90f
|
||||
private Material type = Material.AIR;
|
||||
private int amount = 0;
|
||||
private MaterialData data = null;
|
||||
@@ -624,4 +624,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -626,4 +626,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public String getTranslationKey() {
|
||||
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||
}
|
||||
@ -4596,10 +4596,10 @@ index 9bab73c3c2ca759b8e1c7d07d98cc593c961666a..f0c6943da3f783101ca647b75b3230fa
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb79b4431b 100644
|
||||
index 556df980d235e0ce09c227419e1c70fed68313bc..bc065cc78b69d26ac07941b8485fabe256d6286c 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -35,6 +35,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -36,6 +36,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
*/
|
||||
boolean hasDisplayName();
|
||||
|
||||
@ -4624,7 +4624,7 @@ index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb
|
||||
/**
|
||||
* Gets the display name that is set.
|
||||
* <p>
|
||||
@@ -42,7 +60,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -43,7 +61,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* before calling this method.
|
||||
*
|
||||
* @return the display name that is set
|
||||
@ -4634,7 +4634,7 @@ index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb
|
||||
@NotNull
|
||||
String getDisplayName();
|
||||
|
||||
@@ -50,7 +70,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -51,7 +71,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* Sets the display name.
|
||||
*
|
||||
* @param name the name to set
|
||||
@ -4644,7 +4644,7 @@ index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb
|
||||
void setDisplayName(@Nullable String name);
|
||||
|
||||
/**
|
||||
@@ -63,6 +85,32 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -64,6 +86,32 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
*/
|
||||
boolean hasItemName();
|
||||
|
||||
@ -4677,7 +4677,7 @@ index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb
|
||||
/**
|
||||
* Gets the item name that is set.
|
||||
* <br>
|
||||
@@ -73,7 +121,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -74,7 +122,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* calling this method.
|
||||
*
|
||||
* @return the item name that is set
|
||||
@ -4687,7 +4687,7 @@ index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb
|
||||
@NotNull
|
||||
String getItemName();
|
||||
|
||||
@@ -84,7 +134,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -85,7 +135,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* anvil, is not styled with italics, and does not show labels.
|
||||
*
|
||||
* @param name the name to set
|
||||
@ -4697,7 +4697,7 @@ index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb
|
||||
void setItemName(@Nullable String name);
|
||||
|
||||
/**
|
||||
@@ -125,6 +177,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -126,6 +178,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
*/
|
||||
boolean hasLore();
|
||||
|
||||
@ -4722,7 +4722,7 @@ index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb
|
||||
/**
|
||||
* Gets the lore that is set.
|
||||
* <p>
|
||||
@@ -132,7 +202,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -133,7 +203,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* calling this method.
|
||||
*
|
||||
* @return a list of lore that is set
|
||||
@ -4732,7 +4732,7 @@ index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb
|
||||
@Nullable
|
||||
List<String> getLore();
|
||||
|
||||
@@ -141,7 +213,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -142,7 +214,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* Removes lore when given null.
|
||||
*
|
||||
* @param lore the lore that will be set
|
||||
|
@ -1379,10 +1379,10 @@ index 1dbbc244309043b18c1d71707c4fb066c0d0e02d..551c5af6a7bfa2268cbc63be8e70d129
|
||||
this.executor = owner;
|
||||
this.owningPlugin = owner;
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index e195e74c48c69047aa825b75fad95419c505b41f..53f28c9e6843991486a576d41b6641c170589807 100644
|
||||
index fd5a7a55484deb3fdcced7ebd1f4f6c14d5b4f4f..9207ae900cb4cc8ce41dd4e63d7ad8b35b0ac048 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -34,7 +34,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -35,7 +35,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
private void setDefaultCommands() {
|
||||
register("bukkit", new VersionCommand("version"));
|
||||
register("bukkit", new ReloadCommand("reload"));
|
||||
@ -1450,10 +1450,10 @@ index 94f8ceb965cecb5669a84a0ec61c0f706c2a2673..e773db6da357ad210eb24d4c389af2dc
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
index f48bdeb628a82416d93f84a0a10141447482bf83..c0691a849831f99268fdcb7b0f471f80a1a2a70e 100644
|
||||
index 8e44f7eaf960884b09ac8413c4383fe17e54b584..c5465431ce35d264d8510af45e73d058b333c60b 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
@@ -198,7 +198,7 @@ import org.yaml.snakeyaml.representer.Representer;
|
||||
@@ -199,7 +199,7 @@ import org.yaml.snakeyaml.representer.Representer;
|
||||
* inferno.burningdeaths: true
|
||||
*</pre></blockquote>
|
||||
*/
|
||||
@ -1462,7 +1462,7 @@ index f48bdeb628a82416d93f84a0a10141447482bf83..c0691a849831f99268fdcb7b0f471f80
|
||||
private static final Pattern VALID_NAME = Pattern.compile("^[A-Za-z0-9 _.-]+$");
|
||||
private static final ThreadLocal<Yaml> YAML = new ThreadLocal<Yaml>() {
|
||||
@Override
|
||||
@@ -259,6 +259,70 @@ public final class PluginDescriptionFile {
|
||||
@@ -260,6 +260,70 @@ public final class PluginDescriptionFile {
|
||||
private Set<PluginAwareness> awareness = ImmutableSet.of();
|
||||
private String apiVersion = null;
|
||||
private List<String> libraries = ImmutableList.of();
|
||||
@ -1585,10 +1585,10 @@ index ae3e68562c29992fab627428db3ff0006d8216f9..47153dee66782a00b980ecf15e8774ab
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd73ae9d675 100644
|
||||
index 839130f713e9a1862e1026590a76ac027c00cab8..46c7be5fa69f13900860b9944523beea16f2409b 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -43,6 +43,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -44,6 +44,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Handles all plugin management from the Server
|
||||
*/
|
||||
@ -1597,7 +1597,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
public final class SimplePluginManager implements PluginManager {
|
||||
private final Server server;
|
||||
private final Map<Pattern, PluginLoader> fileAssociations = new HashMap<Pattern, PluginLoader>();
|
||||
@@ -51,10 +53,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -52,10 +54,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
private MutableGraph<String> dependencyGraph = GraphBuilder.directed().build();
|
||||
private File updateDirectory;
|
||||
private final SimpleCommandMap commandMap;
|
||||
@ -1615,7 +1615,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
private boolean useTimings = false;
|
||||
|
||||
public SimplePluginManager(@NotNull Server instance, @NotNull SimpleCommandMap commandMap) {
|
||||
@@ -111,6 +116,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -112,6 +117,11 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@NotNull
|
||||
public Plugin[] loadPlugins(@NotNull File directory) {
|
||||
@ -1627,7 +1627,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
Preconditions.checkArgument(directory != null, "Directory cannot be null");
|
||||
Preconditions.checkArgument(directory.isDirectory(), "Directory must be a directory");
|
||||
|
||||
@@ -129,6 +139,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -130,6 +140,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
*/
|
||||
@NotNull
|
||||
public Plugin[] loadPlugins(@NotNull File[] files) {
|
||||
@ -1635,7 +1635,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
Preconditions.checkArgument(files != null, "File list cannot be null");
|
||||
|
||||
List<Plugin> result = new ArrayList<Plugin>();
|
||||
@@ -389,6 +400,15 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -390,6 +401,15 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Nullable
|
||||
public synchronized Plugin loadPlugin(@NotNull File file) throws InvalidPluginException, UnknownDependencyException {
|
||||
Preconditions.checkArgument(file != null, "File cannot be null");
|
||||
@ -1651,7 +1651,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
|
||||
checkUpdate(file);
|
||||
|
||||
@@ -439,12 +459,14 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -440,12 +460,14 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@Nullable
|
||||
public synchronized Plugin getPlugin(@NotNull String name) {
|
||||
@ -1666,7 +1666,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
return plugins.toArray(new Plugin[plugins.size()]);
|
||||
}
|
||||
|
||||
@@ -458,6 +480,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -459,6 +481,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
*/
|
||||
@Override
|
||||
public boolean isPluginEnabled(@NotNull String name) {
|
||||
@ -1674,7 +1674,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
Plugin plugin = getPlugin(name);
|
||||
|
||||
return isPluginEnabled(plugin);
|
||||
@@ -471,6 +494,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -472,6 +495,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
*/
|
||||
@Override
|
||||
public boolean isPluginEnabled(@Nullable Plugin plugin) {
|
||||
@ -1682,7 +1682,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
if ((plugin != null) && (plugins.contains(plugin))) {
|
||||
return plugin.isEnabled();
|
||||
} else {
|
||||
@@ -480,6 +504,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -481,6 +505,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public void enablePlugin(@NotNull final Plugin plugin) {
|
||||
@ -1690,7 +1690,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
if (!plugin.isEnabled()) {
|
||||
List<Command> pluginCommands = PluginCommandYamlParser.parse(plugin);
|
||||
|
||||
@@ -499,6 +524,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -500,6 +525,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public void disablePlugins() {
|
||||
@ -1698,7 +1698,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
Plugin[] plugins = getPlugins();
|
||||
for (int i = plugins.length - 1; i >= 0; i--) {
|
||||
disablePlugin(plugins[i]);
|
||||
@@ -507,6 +533,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -508,6 +534,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public void disablePlugin(@NotNull final Plugin plugin) {
|
||||
@ -1706,7 +1706,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
if (plugin.isEnabled()) {
|
||||
try {
|
||||
plugin.getPluginLoader().disablePlugin(plugin);
|
||||
@@ -551,6 +578,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -552,6 +579,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public void clearPlugins() {
|
||||
@ -1714,7 +1714,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
synchronized (this) {
|
||||
disablePlugins();
|
||||
plugins.clear();
|
||||
@@ -571,6 +599,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -572,6 +600,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
*/
|
||||
@Override
|
||||
public void callEvent(@NotNull Event event) {
|
||||
@ -1722,7 +1722,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
if (event.isAsynchronous()) {
|
||||
if (Thread.holdsLock(this)) {
|
||||
throw new IllegalStateException(event.getEventName() + " cannot be triggered asynchronously from inside synchronized code.");
|
||||
@@ -619,6 +648,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -620,6 +649,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public void registerEvents(@NotNull Listener listener, @NotNull Plugin plugin) {
|
||||
@ -1730,7 +1730,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
if (!plugin.isEnabled()) {
|
||||
throw new IllegalPluginAccessException("Plugin attempted to register " + listener + " while not enabled");
|
||||
}
|
||||
@@ -652,6 +682,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -653,6 +683,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
Preconditions.checkArgument(priority != null, "Priority cannot be null");
|
||||
Preconditions.checkArgument(executor != null, "Executor cannot be null");
|
||||
Preconditions.checkArgument(plugin != null, "Plugin cannot be null");
|
||||
@ -1738,12 +1738,12 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
|
||||
if (!plugin.isEnabled()) {
|
||||
throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled");
|
||||
@@ -699,16 +730,19 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -700,16 +731,19 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@Nullable
|
||||
public Permission getPermission(@NotNull String name) {
|
||||
+ if (true) {return this.paperPluginManager.getPermission(name);} // Paper
|
||||
return permissions.get(name.toLowerCase(java.util.Locale.ENGLISH));
|
||||
return permissions.get(name.toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1755,10 +1755,10 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
@Deprecated
|
||||
public void addPermission(@NotNull Permission perm, boolean dirty) {
|
||||
+ if (true) {this.paperPluginManager.addPermission(perm); return;} // Paper - This just has a performance implication, use the better api to avoid this.
|
||||
String name = perm.getName().toLowerCase(java.util.Locale.ENGLISH);
|
||||
String name = perm.getName().toLowerCase(Locale.ROOT);
|
||||
|
||||
if (permissions.containsKey(name)) {
|
||||
@@ -722,21 +756,25 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -723,21 +757,25 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@NotNull
|
||||
public Set<Permission> getDefaultPermissions(boolean op) {
|
||||
@ -1775,40 +1775,40 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
@Override
|
||||
public void removePermission(@NotNull String name) {
|
||||
+ if (true) {this.paperPluginManager.removePermission(name); return;} // Paper
|
||||
permissions.remove(name.toLowerCase(java.util.Locale.ENGLISH));
|
||||
permissions.remove(name.toLowerCase(Locale.ROOT));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void recalculatePermissionDefaults(@NotNull Permission perm) {
|
||||
+ if (true) {this.paperPluginManager.recalculatePermissionDefaults(perm); return;} // Paper
|
||||
if (perm != null && permissions.containsKey(perm.getName().toLowerCase(java.util.Locale.ENGLISH))) {
|
||||
if (perm != null && permissions.containsKey(perm.getName().toLowerCase(Locale.ROOT))) {
|
||||
defaultPerms.get(true).remove(perm);
|
||||
defaultPerms.get(false).remove(perm);
|
||||
@@ -776,6 +814,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -777,6 +815,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public void subscribeToPermission(@NotNull String permission, @NotNull Permissible permissible) {
|
||||
+ if (true) {this.paperPluginManager.subscribeToPermission(permission, permissible); return;} // Paper
|
||||
String name = permission.toLowerCase(java.util.Locale.ENGLISH);
|
||||
String name = permission.toLowerCase(Locale.ROOT);
|
||||
Map<Permissible, Boolean> map = permSubs.get(name);
|
||||
|
||||
@@ -789,6 +828,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -790,6 +829,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public void unsubscribeFromPermission(@NotNull String permission, @NotNull Permissible permissible) {
|
||||
+ if (true) {this.paperPluginManager.unsubscribeFromPermission(permission, permissible); return;} // Paper
|
||||
String name = permission.toLowerCase(java.util.Locale.ENGLISH);
|
||||
String name = permission.toLowerCase(Locale.ROOT);
|
||||
Map<Permissible, Boolean> map = permSubs.get(name);
|
||||
|
||||
@@ -804,6 +844,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -805,6 +845,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@NotNull
|
||||
public Set<Permissible> getPermissionSubscriptions(@NotNull String permission) {
|
||||
+ if (true) {return this.paperPluginManager.getPermissionSubscriptions(permission);} // Paper
|
||||
String name = permission.toLowerCase(java.util.Locale.ENGLISH);
|
||||
String name = permission.toLowerCase(Locale.ROOT);
|
||||
Map<Permissible, Boolean> map = permSubs.get(name);
|
||||
|
||||
@@ -816,6 +857,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -817,6 +858,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public void subscribeToDefaultPerms(boolean op, @NotNull Permissible permissible) {
|
||||
@ -1816,7 +1816,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
Map<Permissible, Boolean> map = defSubs.get(op);
|
||||
|
||||
if (map == null) {
|
||||
@@ -828,6 +870,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -829,6 +871,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public void unsubscribeFromDefaultPerms(boolean op, @NotNull Permissible permissible) {
|
||||
@ -1824,7 +1824,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
Map<Permissible, Boolean> map = defSubs.get(op);
|
||||
|
||||
if (map != null) {
|
||||
@@ -842,6 +885,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -843,6 +886,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@NotNull
|
||||
public Set<Permissible> getDefaultPermSubscriptions(boolean op) {
|
||||
@ -1832,7 +1832,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
Map<Permissible, Boolean> map = defSubs.get(op);
|
||||
|
||||
if (map == null) {
|
||||
@@ -854,6 +898,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -855,6 +899,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@NotNull
|
||||
public Set<Permission> getPermissions() {
|
||||
@ -1840,7 +1840,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
return new HashSet<Permission>(permissions.values());
|
||||
}
|
||||
|
||||
@@ -877,6 +922,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -878,6 +923,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@Override
|
||||
public boolean useTimings() {
|
||||
@ -1848,7 +1848,7 @@ index 34830d2815d331a1b611f22eca08f53d815ea08a..fb4cb36391e69fd997300b952b64fbd7
|
||||
return useTimings;
|
||||
}
|
||||
|
||||
@@ -888,4 +934,28 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -889,4 +935,28 @@ public final class SimplePluginManager implements PluginManager {
|
||||
public void useTimings(boolean use) {
|
||||
useTimings = use;
|
||||
}
|
||||
@ -1899,10 +1899,10 @@ index a80251eff75430863b37db1c131e22593f3fcd5e..310c4041963a3f1e0a26e39a6da12a9b
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
index ee100b7ad89ce1eccef0c3bc55885cd78aadd1ec..f594913e6b94f77b26a4a758c447a42d8a25b6ff 100644
|
||||
index 7fca39df009308adad55a6e9dc10a4a0dead86f2..2a14522c484febcd880d00197df4359a0020dddd 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
@@ -40,6 +40,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -41,6 +41,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
private Server server = null;
|
||||
private File file = null;
|
||||
private PluginDescriptionFile description = null;
|
||||
@ -1910,7 +1910,7 @@ index ee100b7ad89ce1eccef0c3bc55885cd78aadd1ec..f594913e6b94f77b26a4a758c447a42d
|
||||
private File dataFolder = null;
|
||||
private ClassLoader classLoader = null;
|
||||
private boolean naggable = true;
|
||||
@@ -48,13 +49,16 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -49,13 +50,16 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
private PluginLogger logger = null;
|
||||
|
||||
public JavaPlugin() {
|
||||
@ -1931,7 +1931,7 @@ index ee100b7ad89ce1eccef0c3bc55885cd78aadd1ec..f594913e6b94f77b26a4a758c447a42d
|
||||
protected JavaPlugin(@NotNull final JavaPluginLoader loader, @NotNull final PluginDescriptionFile description, @NotNull final File dataFolder, @NotNull final File file) {
|
||||
final ClassLoader classLoader = this.getClass().getClassLoader();
|
||||
if (classLoader instanceof PluginClassLoader) {
|
||||
@@ -79,9 +83,12 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -80,9 +84,12 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
* Gets the associated PluginLoader responsible for this plugin
|
||||
*
|
||||
* @return PluginLoader that controls this plugin
|
||||
@ -1944,7 +1944,7 @@ index ee100b7ad89ce1eccef0c3bc55885cd78aadd1ec..f594913e6b94f77b26a4a758c447a42d
|
||||
public final PluginLoader getPluginLoader() {
|
||||
return loader;
|
||||
}
|
||||
@@ -122,13 +129,20 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -123,13 +130,20 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
* Returns the plugin.yaml file containing the details for this plugin
|
||||
*
|
||||
* @return Contents of the plugin.yaml file
|
||||
@ -1965,7 +1965,7 @@ index ee100b7ad89ce1eccef0c3bc55885cd78aadd1ec..f594913e6b94f77b26a4a758c447a42d
|
||||
@NotNull
|
||||
@Override
|
||||
public FileConfiguration getConfig() {
|
||||
@@ -258,7 +272,8 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -259,7 +273,8 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
*
|
||||
* @param enabled true if enabled, otherwise false
|
||||
*/
|
||||
@ -1975,7 +1975,7 @@ index ee100b7ad89ce1eccef0c3bc55885cd78aadd1ec..f594913e6b94f77b26a4a758c447a42d
|
||||
if (isEnabled != enabled) {
|
||||
isEnabled = enabled;
|
||||
|
||||
@@ -270,9 +285,18 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -271,9 +286,18 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1997,7 +1997,7 @@ index ee100b7ad89ce1eccef0c3bc55885cd78aadd1ec..f594913e6b94f77b26a4a758c447a42d
|
||||
this.server = server;
|
||||
this.file = file;
|
||||
this.description = description;
|
||||
@@ -280,6 +304,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -281,6 +305,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
this.classLoader = classLoader;
|
||||
this.configFile = new File(dataFolder, "config.yml");
|
||||
this.logger = new PluginLogger(this);
|
||||
@ -2005,7 +2005,7 @@ index ee100b7ad89ce1eccef0c3bc55885cd78aadd1ec..f594913e6b94f77b26a4a758c447a42d
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -396,10 +421,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -397,10 +422,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
throw new IllegalArgumentException(clazz + " does not extend " + JavaPlugin.class);
|
||||
}
|
||||
final ClassLoader cl = clazz.getClassLoader();
|
||||
@ -2019,7 +2019,7 @@ index ee100b7ad89ce1eccef0c3bc55885cd78aadd1ec..f594913e6b94f77b26a4a758c447a42d
|
||||
if (plugin == null) {
|
||||
throw new IllegalStateException("Cannot get plugin for " + clazz + " from a static initializer");
|
||||
}
|
||||
@@ -422,10 +447,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -423,10 +448,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
public static JavaPlugin getProvidingPlugin(@NotNull Class<?> clazz) {
|
||||
Preconditions.checkArgument(clazz != null, "Null class cannot have a plugin");
|
||||
final ClassLoader cl = clazz.getClassLoader();
|
||||
@ -2557,10 +2557,10 @@ index a8be3e23e3e280ad301d9530de50028515612966..43b58e920e739bb949ac0673e9ef73ba
|
||||
@Override
|
||||
public FileConfiguration getConfig() {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index 73ec679ac0d1f398b417bd174b47f9af93351e27..b208150297a23c0b4acb79135416809718f5650e 100644
|
||||
index a47ee3ce660ec4467b5ed6a4b41fb2d19179a189..c79faf4197f9c0a7256cefe2b001182102d2b796 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -25,8 +25,7 @@ public final class TestServer {
|
||||
@@ -26,8 +26,7 @@ public final class TestServer {
|
||||
Thread creatingThread = Thread.currentThread();
|
||||
when(instance.isPrimaryThread()).then(mock -> Thread.currentThread().equals(creatingThread));
|
||||
|
||||
|
@ -717,10 +717,10 @@ index 0000000000000000000000000000000000000000..199789d56d22fcb1b77ebd56805cc28a
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..eb9d58f8852e732a1284beeaf542989301d21b1c
|
||||
index 0000000000000000000000000000000000000000..065991e7a7f6119797ea315a56836ba17dd17d05
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
@@ -0,0 +1,355 @@
|
||||
@@ -0,0 +1,352 @@
|
||||
+/*
|
||||
+ * This file is licensed under the MIT License (MIT).
|
||||
+ *
|
||||
@ -874,18 +874,15 @@ index 0000000000000000000000000000000000000000..eb9d58f8852e732a1284beeaf5429893
|
||||
+ }
|
||||
+ }
|
||||
+ ),
|
||||
+ toObjectMapper(input.tileEntityCounts.entrySet(),
|
||||
+ new Function<Map.Entry<Material, Counter>, JSONPair>() {
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public JSONPair apply(Map.Entry<Material, Counter> entry) {
|
||||
+ toObjectMapper(
|
||||
+ input.tileEntityCounts.entrySet(),
|
||||
+ entry -> {
|
||||
+ tileEntityTypeSet.add(entry.getKey());
|
||||
+ return pair(
|
||||
+ String.valueOf(entry.getKey().ordinal()),
|
||||
+ entry.getValue().count()
|
||||
+ );
|
||||
+ }
|
||||
+ }
|
||||
+ )
|
||||
+ );
|
||||
+ }
|
||||
@ -3143,10 +3140,10 @@ index 0000000000000000000000000000000000000000..9d263ab3afb938c215c0b64d9171345f
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index 53f28c9e6843991486a576d41b6641c170589807..4205649948a9e2a72f64c3f007112245abac6d50 100644
|
||||
index 9207ae900cb4cc8ce41dd4e63d7ad8b35b0ac048..36fc2c35395c72f8b81a2a2f3265fd205384ce26 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -15,7 +15,6 @@ import org.bukkit.command.defaults.BukkitCommand;
|
||||
@@ -16,7 +16,6 @@ import org.bukkit.command.defaults.BukkitCommand;
|
||||
import org.bukkit.command.defaults.HelpCommand;
|
||||
import org.bukkit.command.defaults.PluginsCommand;
|
||||
import org.bukkit.command.defaults.ReloadCommand;
|
||||
@ -3154,7 +3151,7 @@ index 53f28c9e6843991486a576d41b6641c170589807..4205649948a9e2a72f64c3f007112245
|
||||
import org.bukkit.command.defaults.VersionCommand;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.StringUtil;
|
||||
@@ -35,7 +34,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -36,7 +35,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
register("bukkit", new VersionCommand("version"));
|
||||
register("bukkit", new ReloadCommand("reload"));
|
||||
//register("bukkit", new PluginsCommand("plugins")); // Paper
|
||||
@ -3163,15 +3160,15 @@ index 53f28c9e6843991486a576d41b6641c170589807..4205649948a9e2a72f64c3f007112245
|
||||
}
|
||||
|
||||
public void setFallbackCommands() {
|
||||
@@ -67,6 +66,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -68,6 +67,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
*/
|
||||
@Override
|
||||
public boolean register(@NotNull String label, @NotNull String fallbackPrefix, @NotNull Command command) {
|
||||
+ command.timings = co.aikar.timings.TimingsManager.getCommandTiming(fallbackPrefix, command); // Paper
|
||||
label = label.toLowerCase(java.util.Locale.ENGLISH).trim();
|
||||
fallbackPrefix = fallbackPrefix.toLowerCase(java.util.Locale.ENGLISH).trim();
|
||||
label = label.toLowerCase(Locale.ROOT).trim();
|
||||
fallbackPrefix = fallbackPrefix.toLowerCase(Locale.ROOT).trim();
|
||||
boolean registered = register(label, command, false, fallbackPrefix);
|
||||
@@ -143,16 +143,22 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -144,16 +144,22 @@ public class SimpleCommandMap implements CommandMap {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3455,10 +3452,10 @@ index 516d7fc7812aac343782861d0d567f54aa578c2a..00000000000000000000000000000000
|
||||
- // Spigot end
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 4e9ba039669c7059180f5776ee2f7188f2dd01b5..5b526d602057ab70b4a058142e01a0195694c28f 100644
|
||||
index c7d3d938534ac11fe420418655dae689c58fbe12..776a3ce9a6c106fbe96cc6399b9ee2cd81b10c76 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2678,7 +2678,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2726,7 +2726,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Deprecated // Paper
|
||||
public void sendMessage(@NotNull net.md_5.bungee.api.ChatMessageType position, @Nullable java.util.UUID sender, @NotNull net.md_5.bungee.api.chat.BaseComponent... components) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@ -3479,10 +3476,10 @@ index 4e9ba039669c7059180f5776ee2f7188f2dd01b5..5b526d602057ab70b4a058142e01a019
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index fb4cb36391e69fd997300b952b64fbd73ae9d675..3465bd660999caa53582e9d56a4e93ec7701a1de 100644
|
||||
index 46c7be5fa69f13900860b9944523beea16f2409b..6018574cd15b802833613beefa88da15dc2730cb 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -380,7 +380,6 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -381,7 +381,6 @@ public final class SimplePluginManager implements PluginManager {
|
||||
}
|
||||
}
|
||||
|
||||
@ -3490,7 +3487,7 @@ index fb4cb36391e69fd997300b952b64fbd73ae9d675..3465bd660999caa53582e9d56a4e93ec
|
||||
return result.toArray(new Plugin[result.size()]);
|
||||
}
|
||||
|
||||
@@ -428,9 +427,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -429,9 +428,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
if (result != null) {
|
||||
plugins.add(result);
|
||||
@ -3502,7 +3499,7 @@ index fb4cb36391e69fd997300b952b64fbd73ae9d675..3465bd660999caa53582e9d56a4e93ec
|
||||
}
|
||||
}
|
||||
|
||||
@@ -460,7 +459,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -461,7 +460,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Nullable
|
||||
public synchronized Plugin getPlugin(@NotNull String name) {
|
||||
if (true) {return this.paperPluginManager.getPlugin(name);} // Paper
|
||||
@ -3511,7 +3508,7 @@ index fb4cb36391e69fd997300b952b64fbd73ae9d675..3465bd660999caa53582e9d56a4e93ec
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -688,7 +687,8 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -689,7 +688,8 @@ public final class SimplePluginManager implements PluginManager {
|
||||
throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled");
|
||||
}
|
||||
|
||||
@ -3521,7 +3518,7 @@ index fb4cb36391e69fd997300b952b64fbd73ae9d675..3465bd660999caa53582e9d56a4e93ec
|
||||
getEventListeners(event).register(new TimedRegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
|
||||
} else {
|
||||
getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
|
||||
@@ -923,7 +923,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -924,7 +924,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
public boolean useTimings() {
|
||||
if (true) {return this.paperPluginManager.useTimings();} // Paper
|
||||
@ -3530,7 +3527,7 @@ index fb4cb36391e69fd997300b952b64fbd73ae9d675..3465bd660999caa53582e9d56a4e93ec
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -932,7 +932,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -933,7 +933,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
* @param use True if per event timing code should be used
|
||||
*/
|
||||
public void useTimings(boolean use) {
|
||||
|
@ -55,10 +55,10 @@ index 77f8b0889cd7039bf041fc052fba33b60aa77e17..09012ce27344c60730b9c5fcde85712a
|
||||
* Used for all administrative messages, such as an operator using a
|
||||
* command.
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 3465bd660999caa53582e9d56a4e93ec7701a1de..ca539930905531a4ce079529c4d456bcb6fc9e8c 100644
|
||||
index 6018574cd15b802833613beefa88da15dc2730cb..e7b1895d3918487d711afcbe41d76863d85c0a62 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -116,9 +116,22 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -117,9 +117,22 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@Override
|
||||
@NotNull
|
||||
public Plugin[] loadPlugins(@NotNull File directory) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Player affects spawning API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 5b526d602057ab70b4a058142e01a0195694c28f..f868eb1609f7c905fe6ebcf088a0a3030af55e92 100644
|
||||
index 776a3ce9a6c106fbe96cc6399b9ee2cd81b10c76..966a5626eac9305c88b1fe35d12c5fc6e28348d4 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2530,6 +2530,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2578,6 +2578,22 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Deprecated // Paper
|
||||
public String getLocale();
|
||||
|
||||
|
@ -329,10 +329,10 @@ index 9082e67324f810857db26bb89ecea7e9f866f80d..da997507b96908027c49dabc6daf7c78
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..fd5d9881abfd930bb883120f018f76dc78b62b14 100644
|
||||
index 263208d3cba36cb80c9ee4e3022ef702ea113df2..e64bb57f74e6d6f78927be228825b3e0bdf41f48 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
|
||||
@@ -24,8 +24,25 @@ import org.bukkit.plugin.Plugin;
|
||||
@@ -25,8 +25,25 @@ import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.util.StringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -358,7 +358,7 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..fd5d9881abfd930bb883120f018f76dc
|
||||
public VersionCommand(@NotNull String name) {
|
||||
super(name);
|
||||
|
||||
@@ -40,7 +57,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -41,7 +58,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
if (!testPermission(sender)) return true;
|
||||
|
||||
if (args.length == 0) {
|
||||
@ -367,7 +367,7 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..fd5d9881abfd930bb883120f018f76dc
|
||||
sendVersion(sender);
|
||||
} else {
|
||||
StringBuilder name = new StringBuilder();
|
||||
@@ -79,8 +96,17 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -80,8 +97,17 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
private void describeToSender(@NotNull Plugin plugin, @NotNull CommandSender sender) {
|
||||
PluginDescriptionFile desc = plugin.getDescription();
|
||||
@ -387,7 +387,7 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..fd5d9881abfd930bb883120f018f76dc
|
||||
if (desc.getDescription() != null) {
|
||||
sender.sendMessage(desc.getDescription());
|
||||
}
|
||||
@@ -146,14 +172,14 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -147,14 +173,14 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
private final ReentrantLock versionLock = new ReentrantLock();
|
||||
private boolean hasVersion = false;
|
||||
@ -404,7 +404,7 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..fd5d9881abfd930bb883120f018f76dc
|
||||
lastCheck = System.currentTimeMillis();
|
||||
hasVersion = false;
|
||||
} else {
|
||||
@@ -168,7 +194,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -169,7 +195,7 @@ public class VersionCommand extends BukkitCommand {
|
||||
return;
|
||||
}
|
||||
versionWaiters.add(sender);
|
||||
@ -413,7 +413,7 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..fd5d9881abfd930bb883120f018f76dc
|
||||
if (!versionTaskStarted) {
|
||||
versionTaskStarted = true;
|
||||
new Thread(new Runnable() {
|
||||
@@ -186,6 +212,13 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -187,6 +213,13 @@ public class VersionCommand extends BukkitCommand {
|
||||
|
||||
private void obtainVersion() {
|
||||
String version = Bukkit.getVersion();
|
||||
@ -427,7 +427,7 @@ index 04b4fb6859df0221f8f9f92c5a7ac2dda1073355..fd5d9881abfd930bb883120f018f76dc
|
||||
if (version == null) version = "Custom";
|
||||
String[] parts = version.substring(0, version.indexOf(' ')).split("-");
|
||||
if (parts.length == 4) {
|
||||
@@ -215,11 +248,24 @@ public class VersionCommand extends BukkitCommand {
|
||||
@@ -216,11 +249,24 @@ public class VersionCommand extends BukkitCommand {
|
||||
} else {
|
||||
setVersionMessage("Unknown version, custom build?");
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ Add per player no-tick, tick, and send view distances.
|
||||
Also add send/no-tick view distance to World.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index a9858c2559f0921613b19710135cc6e060488e96..890ae536fdaff11055b72b1be0fbf3766a41812c 100644
|
||||
index 9732929b666b0a5e1a2a41c8e8794cc4f2535e41..0a3a66e04f8785874f10a76603bff46469543688 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2941,6 +2941,66 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2968,6 +2968,66 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Set<FeatureFlag> getFeatureFlags();
|
||||
|
||||
@ -79,10 +79,10 @@ index a9858c2559f0921613b19710135cc6e060488e96..890ae536fdaff11055b72b1be0fbf376
|
||||
* Gets all generated structures that intersect the chunk at the given
|
||||
* coordinates. <br>
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index f868eb1609f7c905fe6ebcf088a0a3030af55e92..5d5d37e2ebbbe4d2641177c7d174059ba29bb688 100644
|
||||
index 966a5626eac9305c88b1fe35d12c5fc6e28348d4..b5179b6f8f65d39198c0b80e4be9aca17ca866da 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -2544,6 +2544,82 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -2592,6 +2592,82 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param affects Whether the player can affect mob spawning
|
||||
*/
|
||||
public void setAffectsSpawning(boolean affects);
|
||||
|
@ -465,10 +465,10 @@ index 0000000000000000000000000000000000000000..5582999fe94c7a3dac655044ccc6d078
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index 4205649948a9e2a72f64c3f007112245abac6d50..b3b32ce429edbf1ed040354dbe28ab86f0d24201 100644
|
||||
index 36fc2c35395c72f8b81a2a2f3265fd205384ce26..c7fa1d235cea78bda4656ed66b8d42b119cc50fb 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -155,11 +155,14 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -156,11 +156,14 @@ public class SimpleCommandMap implements CommandMap {
|
||||
target.execute(sender, sentCommandLabel, Arrays.copyOfRange(args, 1, args.length));
|
||||
} // target.timings.stopTiming(); // Spigot // Paper
|
||||
} catch (CommandException ex) {
|
||||
@ -484,7 +484,7 @@ index 4205649948a9e2a72f64c3f007112245abac6d50..b3b32ce429edbf1ed040354dbe28ab86
|
||||
}
|
||||
|
||||
// return true as command was handled
|
||||
@@ -238,7 +241,9 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -239,7 +242,9 @@ public class SimpleCommandMap implements CommandMap {
|
||||
} catch (CommandException ex) {
|
||||
throw ex;
|
||||
} catch (Throwable ex) {
|
||||
@ -496,10 +496,10 @@ index 4205649948a9e2a72f64c3f007112245abac6d50..b3b32ce429edbf1ed040354dbe28ab86
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index ca539930905531a4ce079529c4d456bcb6fc9e8c..07a9c9e254188c251165ca84c8e961fccda01175 100644
|
||||
index e7b1895d3918487d711afcbe41d76863d85c0a62..003bece642b682985625db93cad93026352bfc66 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -527,7 +527,8 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -528,7 +528,8 @@ public final class SimplePluginManager implements PluginManager {
|
||||
try {
|
||||
plugin.getPluginLoader().enablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
@ -509,7 +509,7 @@ index ca539930905531a4ce079529c4d456bcb6fc9e8c..07a9c9e254188c251165ca84c8e961fc
|
||||
}
|
||||
|
||||
HandlerList.bakeAll();
|
||||
@@ -550,32 +551,37 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -551,32 +552,37 @@ public final class SimplePluginManager implements PluginManager {
|
||||
try {
|
||||
plugin.getPluginLoader().disablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
@ -552,7 +552,7 @@ index ca539930905531a4ce079529c4d456bcb6fc9e8c..07a9c9e254188c251165ca84c8e961fc
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -588,6 +594,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -589,6 +595,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
}
|
||||
}
|
||||
|
||||
@ -566,7 +566,7 @@ index ca539930905531a4ce079529c4d456bcb6fc9e8c..07a9c9e254188c251165ca84c8e961fc
|
||||
@Override
|
||||
public void clearPlugins() {
|
||||
if (true) {this.paperPluginManager.clearPlugins(); return;} // Paper
|
||||
@@ -653,7 +666,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@@ -654,7 +667,13 @@ public final class SimplePluginManager implements PluginManager {
|
||||
));
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
|
@ -56,10 +56,10 @@ index bd2c7a6964722412148fae39e1b4951fc0002b9b..864c263bbd4dd6dd7c37a74b39b1a40a
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index b3b32ce429edbf1ed040354dbe28ab86f0d24201..1424060c0a162020d4a680e0a592224561067b16 100644
|
||||
index c7fa1d235cea78bda4656ed66b8d42b119cc50fb..27243a1214bc4d7dbb46f0b9b254c8e3f8128419 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -293,4 +293,11 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -294,4 +294,11 @@ public class SimpleCommandMap implements CommandMap {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -155,10 +155,10 @@ index 1f039a3609a5a1208af408b0565f07664558a23f..b0734f8253ed540916db7bc75cd7dd24
|
||||
* @return an array containing all previous players
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 4dc687f16a8181876fb7b3e56b39a55ea5507408..98e3c12801cc36c868f08b15d1188295ea4364e0 100644
|
||||
index 9885fd1adc1f93a80d650e6d42dfa3a0b084db9f..c4f2f03ec31998d486dad1d45ef83df3f77b5e28 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2739,7 +2739,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2766,7 +2766,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
/**
|
||||
* Find the closest nearby structure of a given {@link StructureType}.
|
||||
* Finding unexplored structures can, and will, block if the world is
|
||||
@ -167,7 +167,7 @@ index 4dc687f16a8181876fb7b3e56b39a55ea5507408..98e3c12801cc36c868f08b15d1188295
|
||||
* temporarily freezing while locating an unexplored structure.
|
||||
* <p>
|
||||
* The {@code radius} is not a rigid square radius. Each structure may alter
|
||||
@@ -2773,7 +2773,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2800,7 +2800,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
/**
|
||||
* Find the closest nearby structure of a given {@link StructureType}.
|
||||
* Finding unexplored structures can, and will, block if the world is
|
||||
@ -176,7 +176,7 @@ index 4dc687f16a8181876fb7b3e56b39a55ea5507408..98e3c12801cc36c868f08b15d1188295
|
||||
* temporarily freezing while locating an unexplored structure.
|
||||
* <p>
|
||||
* The {@code radius} is not a rigid square radius. Each structure may alter
|
||||
@@ -2806,7 +2806,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2833,7 +2833,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
/**
|
||||
* Find the closest nearby structure of a given {@link Structure}. Finding
|
||||
* unexplored structures can, and will, block if the world is looking in
|
||||
@ -459,7 +459,7 @@ index ae9eaaa8e38e1d9dfc459926c7fc51ddb89de84a..b2ec535bb1b0ce0c114ddd7638b90218
|
||||
@Override
|
||||
public int getConversionTime();
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 252390260f62ee945c21267cd8717b7725158a21..cd00d2a064ee4c86b394a7861182fba9cf79cfb3 100644
|
||||
index b520489370bc1bca926f01f807f6a6725679fb8f..7d8075d7b0aeb4d10ba6879f7e1bddcec951ba31 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -478,15 +478,15 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@ -869,10 +869,10 @@ index bc71bc2d3ace0d19d730c09f05f9e0655bcee8f5..24077da8e6a7937f66eafc6779206055
|
||||
public class FurnaceBurnEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java b/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java
|
||||
index 020739697a0b535cad0b15b574f77cdabbdfa3eb..a965b6a78073c5da86ad671752eff4a270029420 100644
|
||||
index 65db4991bd4789991868c0d75fea4034fed487a8..5ffd28fd24b4477a07fc9f6a3f669a6f4da9fa26 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java
|
||||
@@ -7,7 +7,9 @@ import org.bukkit.event.block.BlockExpEvent;
|
||||
@@ -9,7 +9,9 @@ import org.bukkit.material.MaterialData;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
@ -1558,10 +1558,10 @@ index cdbcc8dbab2456cc2bc1f3084cbb1ced1698b7f5..d528b066c2aaa3fb097931914ff2181f
|
||||
void setPower(int power) throws IllegalArgumentException;
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index a23d030d2204098be17d8b18021fd0bb79b4431b..f427334c6e875a13aa53052ac1b5a746186b4ffe 100644
|
||||
index bc065cc78b69d26ac07941b8485fabe256d6286c..fe0f8459a381c35e1e7a312a2f63d6e6eda088d6 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -514,7 +514,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -547,7 +547,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Return an immutable copy of all {@link Attribute}s and their
|
||||
* {@link AttributeModifier}s for a given {@link EquipmentSlot}.<br>
|
||||
|
@ -8,10 +8,10 @@ Currently the server only supports the English language. To override this,
|
||||
You must replace the language file embedded in the server jar.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 86fbc3902989a3baca851ab8c3866af445451787..e08c8b15c126a4051aba0d6ef8a53ddabe69c5c1 100644
|
||||
index d5342258086066d3b9ef404916bad8440f0cf0cd..c92843d0adb438d7a64a5d00ce67b67efd65ca14 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -235,4 +235,20 @@ public interface ItemFactory {
|
||||
@@ -220,4 +220,20 @@ public interface ItemFactory {
|
||||
@NotNull
|
||||
net.kyori.adventure.text.Component displayName(@NotNull ItemStack itemStack);
|
||||
// Paper end - Adventure
|
||||
@ -33,10 +33,10 @@ index 86fbc3902989a3baca851ab8c3866af445451787..e08c8b15c126a4051aba0d6ef8a53dda
|
||||
+ // Paper end - add getI18NDisplayName
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 22e883c8d737cf9f799c6160ff63d90f99250020..551f31fc91b91702b3093bec20113bee9660a3ec 100644
|
||||
index 730c42eddd38acec1cdbb19dfc8c675795d1e68d..da706fd72367b26b919ce08a5e118582020d4fbc 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -640,5 +640,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -642,5 +642,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public net.kyori.adventure.text.@NotNull Component displayName() {
|
||||
return Bukkit.getServer().getItemFactory().displayName(this);
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr
|
||||
to ensure it meets latest minecraft expectations.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index e08c8b15c126a4051aba0d6ef8a53ddabe69c5c1..43376f16d02e7ac26bcb0236e684fee4195dd008 100644
|
||||
index c92843d0adb438d7a64a5d00ce67b67efd65ca14..3d08beee52f2247db6f6e679206ed6a965fbf9a8 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -251,4 +251,18 @@ public interface ItemFactory {
|
||||
@@ -236,4 +236,18 @@ public interface ItemFactory {
|
||||
@Deprecated(since = "1.18.1")
|
||||
String getI18NDisplayName(@Nullable ItemStack item);
|
||||
// Paper end - add getI18NDisplayName
|
||||
@ -30,10 +30,10 @@ index e08c8b15c126a4051aba0d6ef8a53ddabe69c5c1..43376f16d02e7ac26bcb0236e684fee4
|
||||
+ // Paper end - ensure server conversions API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 551f31fc91b91702b3093bec20113bee9660a3ec..76b6c21c68bc55d28b77dd53c988b40c9ae41258 100644
|
||||
index da706fd72367b26b919ce08a5e118582020d4fbc..29bc12cb3095282a31f01f08ac66c15b24f42524 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -559,7 +559,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -566,7 +566,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ index 551f31fc91b91702b3093bec20113bee9660a3ec..76b6c21c68bc55d28b77dd53c988b40c
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -641,6 +641,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -643,6 +643,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return Bukkit.getServer().getItemFactory().displayName(this);
|
||||
}
|
||||
|
||||
|
@ -17,10 +17,10 @@ The implementation should handle plugin prefixes by displaying
|
||||
logger names when appropriate.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
index f594913e6b94f77b26a4a758c447a42d8a25b6ff..7cd9f98c042dc2bb80876af35c755f81bef34651 100644
|
||||
index 2a14522c484febcd880d00197df4359a0020dddd..f81e335a4e533221529355bec2f5d588aa79e60c 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
@@ -46,7 +46,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -47,7 +47,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
private boolean naggable = true;
|
||||
private FileConfiguration newConfig = null;
|
||||
private File configFile = null;
|
||||
@ -29,7 +29,7 @@ index f594913e6b94f77b26a4a758c447a42d8a25b6ff..7cd9f98c042dc2bb80876af35c755f81
|
||||
|
||||
public JavaPlugin() {
|
||||
// Paper start
|
||||
@@ -303,8 +303,8 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -304,8 +304,8 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
this.dataFolder = dataFolder;
|
||||
this.classLoader = classLoader;
|
||||
this.configFile = new File(dataFolder, "config.yml");
|
||||
|
@ -67,10 +67,10 @@ index 0000000000000000000000000000000000000000..087ee57fe5485bc760fadd45a176d4d9
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
index 7cd9f98c042dc2bb80876af35c755f81bef34651..5cd236965de12392d8c7aa81307c0ff1cc8673b1 100644
|
||||
index f81e335a4e533221529355bec2f5d588aa79e60c..d359ea9b02952f981b9cf9d778c56eb995454c60 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
@@ -291,10 +291,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -292,10 +292,10 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
.orElseThrow();
|
||||
}
|
||||
public final void init(@NotNull PluginLoader loader, @NotNull Server server, @NotNull PluginDescriptionFile description, @NotNull File dataFolder, @NotNull File file, @NotNull ClassLoader classLoader) {
|
||||
@ -83,7 +83,7 @@ index 7cd9f98c042dc2bb80876af35c755f81bef34651..5cd236965de12392d8c7aa81307c0ff1
|
||||
// Paper end
|
||||
this.loader = DummyPluginLoaderImplHolder.INSTANCE; // Paper
|
||||
this.server = server;
|
||||
@@ -304,7 +304,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -305,7 +305,7 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
this.classLoader = classLoader;
|
||||
this.configFile = new File(dataFolder, "config.yml");
|
||||
this.pluginMeta = configuration; // Paper
|
||||
|
@ -93,10 +93,10 @@ index aeb5399b1c5e90079b199a591f7986acdf111cba..e7f618a8d7245494e178052c6a63e1b1
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 3dcc0a7ff628711c1b8349c5b98496fccd061787..3173e047fa4c7b295546532cea9e10b016adaf98 100644
|
||||
index 03c1b7331bec5c52afb853477e857f62a10cb4b9..631db41f2b35d3ddc96f0c80979958922be01adf 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3061,6 +3061,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3109,6 +3109,26 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
@ -36,10 +36,10 @@ index c426bdea5ef71a095cf2af9a8a83a162db3c05b7..2308fa3ca898bcb6c0ac2d4853f82a33
|
||||
/**
|
||||
* Make the entity drop the item in their hand.
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 56eed06cd3dbb238330973c1428bffc6d5286019..d68a055ef2b309da6db2de385f27d841adca1f66 100644
|
||||
index 631db41f2b35d3ddc96f0c80979958922be01adf..9152d19adf8869ddac26490929088627c257bd4e 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3022,10 +3022,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3070,10 +3070,12 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
/**
|
||||
* Open a Sign for editing by the Player.
|
||||
*
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's
|
||||
Provides more methods to get nearby entities, and filter by types and predicates
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 98e3c12801cc36c868f08b15d1188295ea4364e0..c489140bffdfdfa1e34e71489d308ed10cf10b21 100644
|
||||
index c4f2f03ec31998d486dad1d45ef83df3f77b5e28..9cf4823ddf1b8291e8c11c39c02c1fed58c18936 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1,6 +1,9 @@
|
||||
@ -19,7 +19,7 @@ index 98e3c12801cc36c868f08b15d1188295ea4364e0..c489140bffdfdfa1e34e71489d308ed1
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -636,6 +639,238 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -663,6 +666,238 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Collection<Entity> getEntitiesByClasses(@NotNull Class<?>... classes);
|
||||
|
||||
|
@ -621,10 +621,10 @@ index 4a06ed9c769acb2eb4c6f4b76c84dc2e63176010..c5e3a8143a166d426d87fa3d0f0b3d4f
|
||||
* Options which can be applied to dust particles - a particle
|
||||
* color and size.
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index c489140bffdfdfa1e34e71489d308ed10cf10b21..b6d08d50c26aa0e69d2479d188fc3c690e8ed357 100644
|
||||
index 9cf4823ddf1b8291e8c11c39c02c1fed58c18936..44a74f15bea60ecd8380520e8faaea41a6c261c5 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2921,7 +2921,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2948,7 +2948,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @param data the data to use for the particle or null,
|
||||
* the type of this depends on {@link Particle#getDataType()}
|
||||
*/
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
Allows you to determine how long it takes to use a usable/consumable item
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 76b6c21c68bc55d28b77dd53c988b40c9ae41258..8cf07089bc3c60262ff1c4c6740310b48aa4169d 100644
|
||||
index 29bc12cb3095282a31f01f08ac66c15b24f42524..a11cc672fa1116addab8b43b7a4360ea182a0584 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -668,5 +668,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -670,5 +670,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public String getI18NDisplayName() {
|
||||
return Bukkit.getServer().getItemFactory().getI18NDisplayName(this);
|
||||
}
|
||||
|
@ -108,10 +108,10 @@ index 3161eae2fa5f03b7d3a5e9945ab659c15cf568c6..af737017ee397f80c44ee02c6cc60cef
|
||||
/**
|
||||
* Returns a list of entities within a bounding box centered around a Location.
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index b6d08d50c26aa0e69d2479d188fc3c690e8ed357..a735dcdb9a0684accf81674b4810928ff20eb7e6 100644
|
||||
index 44a74f15bea60ecd8380520e8faaea41a6c261c5..50c1e4957f66826feb0a2eb04293dbd6b5595700 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1397,6 +1397,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -1424,6 +1424,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*/
|
||||
public boolean createExplosion(@NotNull Location loc, float power, boolean setFire);
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 8cf07089bc3c60262ff1c4c6740310b48aa4169d..bb77d65fd42f9b53ef88537e814bea652bb230de 100644
|
||||
index a11cc672fa1116addab8b43b7a4360ea182a0584..991448ce7d1455b02889cc8da345e8d7200a8215 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -676,5 +676,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -678,5 +678,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
// Requires access to NMS
|
||||
return ensureServerConversions().getMaxItemUseDuration();
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add World.getEntity(UUID) API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index a735dcdb9a0684accf81674b4810928ff20eb7e6..b34eca520c34c70152860f5bad978cf3bed044fa 100644
|
||||
index 50c1e4957f66826feb0a2eb04293dbd6b5595700..fd61be5d75dadb91b5a4bb8dfe246c7ec7aa2f1f 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -905,6 +905,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -932,6 +932,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public Collection<Entity> getNearbyEntities(@NotNull Location location, double x, double y, double z);
|
||||
|
||||
|
@ -7,10 +7,10 @@ Allows you to easily access the chunks X/z as a long, and a method
|
||||
to look up by the long key too.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
|
||||
index a25f112f4d679946ddcb5ec9b4d0a0e2d1795bd3..57976bbe682d2309f7d15d5dcd3ad7f8049429ec 100644
|
||||
index 20ed1c40437cbf8449dd4d7876086ccb6407b470..8764441ec1bae67a029b13c4c98246574ba32ef5 100644
|
||||
--- a/src/main/java/org/bukkit/Chunk.java
|
||||
+++ b/src/main/java/org/bukkit/Chunk.java
|
||||
@@ -35,6 +35,32 @@ public interface Chunk extends PersistentDataHolder {
|
||||
@@ -36,6 +36,32 @@ public interface Chunk extends PersistentDataHolder {
|
||||
*/
|
||||
int getZ();
|
||||
|
||||
@ -44,7 +44,7 @@ index a25f112f4d679946ddcb5ec9b4d0a0e2d1795bd3..57976bbe682d2309f7d15d5dcd3ad7f8
|
||||
* Gets the world containing this chunk
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index b34eca520c34c70152860f5bad978cf3bed044fa..273c50b6e4f26457415779000cf09aeaffd21733 100644
|
||||
index fd61be5d75dadb91b5a4bb8dfe246c7ec7aa2f1f..4ecbfe4d28316527ff00e206941da9c0fc9235d0 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -182,6 +182,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
|
||||
index 57976bbe682d2309f7d15d5dcd3ad7f8049429ec..546888898d9d6827079fe041c7bc6eb4e1e4605c 100644
|
||||
index 8764441ec1bae67a029b13c4c98246574ba32ef5..c2eb2edd87b4087bfcdffd98f0f8904fbfd4e657 100644
|
||||
--- a/src/main/java/org/bukkit/Chunk.java
|
||||
+++ b/src/main/java/org/bukkit/Chunk.java
|
||||
@@ -124,7 +124,30 @@ public interface Chunk extends PersistentDataHolder {
|
||||
@@ -125,7 +125,30 @@ public interface Chunk extends PersistentDataHolder {
|
||||
* @return The tile entities.
|
||||
*/
|
||||
@NotNull
|
||||
|
@ -8,10 +8,10 @@ Adds API's to load or generate chunks asynchronously.
|
||||
Also adds utility methods to Entity to teleport asynchronously.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 94c91385810642dcd120e534b5a20e21fbcd963a..727aa59b9080d53b9e1f6c619d73afcd077b59da 100644
|
||||
index 1cc5bdd63a97a6bb62b1d29aca01658359bd15f1..6242b64416fdea1f3fd6378ba26ed7bb33ab4cc4 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -950,6 +950,472 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -977,6 +977,472 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
}
|
||||
// Paper end - additional getNearbyEntities API
|
||||
|
||||
@ -485,7 +485,7 @@ index 94c91385810642dcd120e534b5a20e21fbcd963a..727aa59b9080d53b9e1f6c619d73afcd
|
||||
* Get a list of all players in this World
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 1e43deadce5a1a0e97521b1f69fee3106f5a0b9e..f1fc42ad24648ee481b9a5d4c4cc58ae8c0a93c1 100644
|
||||
index 48177547ec93fb5a807897a6fb472582a78f3978..99e1f17fddf9cebe7057998d1635804c55f18312 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -168,6 +168,39 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 9dcec906cea7d4eb6da99ef3100a98218a280594..92a83edc03fa8d11f026ac312b989329fa6a7e88 100644
|
||||
index 105c076bdb6396c0b630b341ff306214d5d61567..f5bd443d3ed2b9d822dcd24e648868b9e1f4f6d9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3263,6 +3263,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3311,6 +3311,28 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void setPlayerProfile(com.destroystokyo.paper.profile.@NotNull PlayerProfile profile);
|
||||
// Paper end - Player Profile API
|
||||
|
||||
|
@ -18,12 +18,12 @@ Optimized it to simply be a single get call cutting permission map
|
||||
lookups in half.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/permissions/PermissibleBase.java b/src/main/java/org/bukkit/permissions/PermissibleBase.java
|
||||
index 728fc46daf7a38f13906353bdd7362133853af92..cd3296fea01648592d2af89b3d80135acb6d0958 100644
|
||||
index d0fd41a0ddee550cf880bb212b15dfe79cb4e683..75b77cc4fe189b4b6baa1af3663dc492e992a266 100644
|
||||
--- a/src/main/java/org/bukkit/permissions/PermissibleBase.java
|
||||
+++ b/src/main/java/org/bukkit/permissions/PermissibleBase.java
|
||||
@@ -72,8 +72,11 @@ public class PermissibleBase implements Permissible {
|
||||
@@ -73,8 +73,11 @@ public class PermissibleBase implements Permissible {
|
||||
|
||||
String name = inName.toLowerCase(java.util.Locale.ENGLISH);
|
||||
String name = inName.toLowerCase(Locale.ROOT);
|
||||
|
||||
- if (isPermissionSet(name)) {
|
||||
- return permissions.get(name).getValue();
|
||||
@ -35,9 +35,9 @@ index 728fc46daf7a38f13906353bdd7362133853af92..cd3296fea01648592d2af89b3d80135a
|
||||
} else {
|
||||
Permission perm = Bukkit.getServer().getPluginManager().getPermission(name);
|
||||
|
||||
@@ -93,15 +96,18 @@ public class PermissibleBase implements Permissible {
|
||||
@@ -94,15 +97,18 @@ public class PermissibleBase implements Permissible {
|
||||
|
||||
String name = perm.getName().toLowerCase(java.util.Locale.ENGLISH);
|
||||
String name = perm.getName().toLowerCase(Locale.ROOT);
|
||||
|
||||
- if (isPermissionSet(name)) {
|
||||
- return permissions.get(name).getValue();
|
||||
@ -57,7 +57,7 @@ index 728fc46daf7a38f13906353bdd7362133853af92..cd3296fea01648592d2af89b3d80135a
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("Permission name cannot be null");
|
||||
} else if (plugin == null) {
|
||||
@@ -120,7 +126,7 @@ public class PermissibleBase implements Permissible {
|
||||
@@ -121,7 +127,7 @@ public class PermissibleBase implements Permissible {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
@ -66,7 +66,7 @@ index 728fc46daf7a38f13906353bdd7362133853af92..cd3296fea01648592d2af89b3d80135a
|
||||
if (plugin == null) {
|
||||
throw new IllegalArgumentException("Plugin cannot be null");
|
||||
} else if (!plugin.isEnabled()) {
|
||||
@@ -136,7 +142,7 @@ public class PermissibleBase implements Permissible {
|
||||
@@ -137,7 +143,7 @@ public class PermissibleBase implements Permissible {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -75,7 +75,7 @@ index 728fc46daf7a38f13906353bdd7362133853af92..cd3296fea01648592d2af89b3d80135a
|
||||
if (attachment == null) {
|
||||
throw new IllegalArgumentException("Attachment cannot be null");
|
||||
}
|
||||
@@ -155,7 +161,7 @@ public class PermissibleBase implements Permissible {
|
||||
@@ -156,7 +162,7 @@ public class PermissibleBase implements Permissible {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -84,7 +84,7 @@ index 728fc46daf7a38f13906353bdd7362133853af92..cd3296fea01648592d2af89b3d80135a
|
||||
clearPermissions();
|
||||
Set<Permission> defaults = Bukkit.getServer().getPluginManager().getDefaultPermissions(isOp());
|
||||
Bukkit.getServer().getPluginManager().subscribeToDefaultPerms(isOp(), parent);
|
||||
@@ -204,7 +210,7 @@ public class PermissibleBase implements Permissible {
|
||||
@@ -205,7 +211,7 @@ public class PermissibleBase implements Permissible {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
@ -93,7 +93,7 @@ index 728fc46daf7a38f13906353bdd7362133853af92..cd3296fea01648592d2af89b3d80135a
|
||||
if (name == null) {
|
||||
throw new IllegalArgumentException("Permission name cannot be null");
|
||||
} else if (plugin == null) {
|
||||
@@ -224,7 +230,7 @@ public class PermissibleBase implements Permissible {
|
||||
@@ -225,7 +231,7 @@ public class PermissibleBase implements Permissible {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
@ -102,7 +102,7 @@ index 728fc46daf7a38f13906353bdd7362133853af92..cd3296fea01648592d2af89b3d80135a
|
||||
if (plugin == null) {
|
||||
throw new IllegalArgumentException("Plugin cannot be null");
|
||||
} else if (!plugin.isEnabled()) {
|
||||
@@ -244,7 +250,7 @@ public class PermissibleBase implements Permissible {
|
||||
@@ -245,7 +251,7 @@ public class PermissibleBase implements Permissible {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
|
@ -12,10 +12,10 @@ Co-authored-by: Layla Silbernberg <livsilbernberg@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/MaterialSetTag.java b/src/main/java/com/destroystokyo/paper/MaterialSetTag.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a02a02aa0c87e0f0ed9e509e4dcab01565b3d92a
|
||||
index 0000000000000000000000000000000000000000..28282090c8b3668c11faefa0523f9e4ad9e43c42
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/MaterialSetTag.java
|
||||
@@ -0,0 +1,97 @@
|
||||
@@ -0,0 +1,100 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2018 Daniel Ennis (Aikar) MIT License
|
||||
+ */
|
||||
@ -36,6 +36,7 @@ index 0000000000000000000000000000000000000000..a02a02aa0c87e0f0ed9e509e4dcab015
|
||||
+import java.util.function.Predicate;
|
||||
+import java.util.stream.Collectors;
|
||||
+import java.util.stream.Stream;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
@ -83,12 +84,14 @@ index 0000000000000000000000000000000000000000..a02a02aa0c87e0f0ed9e509e4dcab015
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ @ApiStatus.Internal
|
||||
+ protected Set<Material> getAllPossibleValues() {
|
||||
+ return Stream.of(Material.values()).collect(Collectors.toSet());
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ @NotNull
|
||||
+ @ApiStatus.Internal
|
||||
+ protected String getName(@NotNull Material value) {
|
||||
+ return value.name();
|
||||
+ }
|
||||
@ -838,10 +841,10 @@ index 0000000000000000000000000000000000000000..be212b4fbeabab32a4dab6ae554768c3
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/tag/BaseTag.java b/src/main/java/io/papermc/paper/tag/BaseTag.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..794787912325ae32b3cfc8217bc3fc2159ceabd5
|
||||
index 0000000000000000000000000000000000000000..262b7f7e2c3cf39006392dd5197d4595a0bfb507
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/tag/BaseTag.java
|
||||
@@ -0,0 +1,181 @@
|
||||
@@ -0,0 +1,184 @@
|
||||
+package io.papermc.paper.tag;
|
||||
+
|
||||
+import com.google.common.collect.Lists;
|
||||
@ -849,6 +852,7 @@ index 0000000000000000000000000000000000000000..794787912325ae32b3cfc8217bc3fc21
|
||||
+import org.bukkit.Keyed;
|
||||
+import org.bukkit.NamespacedKey;
|
||||
+import org.bukkit.Tag;
|
||||
+import org.jetbrains.annotations.ApiStatus;
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+import java.util.Collection;
|
||||
@ -1018,9 +1022,11 @@ index 0000000000000000000000000000000000000000..794787912325ae32b3cfc8217bc3fc21
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @ApiStatus.Internal
|
||||
+ protected abstract Set<T> getAllPossibleValues();
|
||||
+
|
||||
+ @NotNull
|
||||
+ @ApiStatus.Internal
|
||||
+ protected abstract String getName(@NotNull T value);
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/tag/EntitySetTag.java b/src/main/java/io/papermc/paper/tag/EntitySetTag.java
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add sun related API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 5efe33cef4d9c153d760fc71606721ff8abafbfc..b6ca63afb74b345e381d35646cc8faf52a2c7cbc 100644
|
||||
index 6242b64416fdea1f3fd6378ba26ed7bb33ab4cc4..fcdc5d83621acff5f9210585455be1ea50abb77c 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1771,6 +1771,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -1798,6 +1798,16 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*/
|
||||
public void setFullTime(long time);
|
||||
|
||||
|
@ -9,10 +9,10 @@ Redirects some of upstream's APIs to these new methods to avoid
|
||||
usage of magic values and the deprecated RecipeChoice#getItemStack
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/RecipeChoice.java b/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
index 6734bc9d7a6eee8ee40419ae3fe245b67eabaca6..db8bcc66bdc4bedfffb4705db6338eda4c0ad29a 100644
|
||||
index a98fc2ffdae1a2f8f3a312bed95268e105f7f791..91bfeffcdbe47208c7d0ddbe013cd0f11fddfa32 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
@@ -146,8 +146,6 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -157,8 +157,6 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
/**
|
||||
* Represents a choice that will be valid only if one of the stacks is
|
||||
* exactly matched (aside from stack size).
|
||||
|
@ -12,10 +12,10 @@ that continues to have use (internally).
|
||||
These do not help plugin developers if they bring moise noise than value.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Art.java b/src/main/java/org/bukkit/Art.java
|
||||
index ac420f0059fc50d3e1294f85df7515c9e17ff78f..24daba85ce4129fb0babe67570059ca8119360c0 100644
|
||||
index 0c20c6bf442de6015d673f5e4e7695ec6d96895e..e6e1606a202a825a45d2f5256441668ced90d7fa 100644
|
||||
--- a/src/main/java/org/bukkit/Art.java
|
||||
+++ b/src/main/java/org/bukkit/Art.java
|
||||
@@ -75,9 +75,9 @@ public enum Art implements Keyed {
|
||||
@@ -76,9 +76,9 @@ public enum Art implements Keyed {
|
||||
* Get the ID of this painting.
|
||||
*
|
||||
* @return The ID of this painting
|
||||
@ -27,7 +27,7 @@ index ac420f0059fc50d3e1294f85df7515c9e17ff78f..24daba85ce4129fb0babe67570059ca8
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -93,9 +93,9 @@ public enum Art implements Keyed {
|
||||
@@ -94,9 +94,9 @@ public enum Art implements Keyed {
|
||||
*
|
||||
* @param id The ID
|
||||
* @return The painting
|
||||
@ -40,7 +40,7 @@ index ac420f0059fc50d3e1294f85df7515c9e17ff78f..24daba85ce4129fb0babe67570059ca8
|
||||
public static Art getById(int id) {
|
||||
return BY_ID.get(id);
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index f1a4e9a4b54757b9b73dd3a66ef6083a7119378d..2f023dcab9fe1ea220ba04e575bb5efe78adbd45 100644
|
||||
index c93b84b4928ea8690602d7904eb9de4418d9e20e..82e973a8d5700c97eac3592981560f134127f6a8 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -879,9 +879,8 @@ public final class Bukkit {
|
||||
@ -269,7 +269,7 @@ index f9c9ae463aacd593e3aa9caf037ea1e23d56c780..f8ae143acbf586d5279b44f7311ca97f
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index 02b4ffa6b918269bd64f7c518fcceef1f6990737..f0878c7539696cc0676e6010e88914d3850acf20 100644
|
||||
index c30600666e7b32b8b4ba1e20ede04fd5ebd5a692..eec6c9cd7da6938351905129bb5a66f49a257d01 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -46,7 +46,7 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
||||
@ -300,7 +300,7 @@ index 02b4ffa6b918269bd64f7c518fcceef1f6990737..f0878c7539696cc0676e6010e88914d3
|
||||
if (this.world == null) {
|
||||
return null;
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index fb6e030af69b085946a029d89347b19b121f6a14..7458278ad620d534b205438062327463caaa9bfc 100644
|
||||
index f01f8a3cfb40ca7e7d6b6714b678b19779bc866c..5ccca18290ffc3d0933e579fbb31bd64c527488d 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4749,20 +4749,20 @@ public enum Material implements Keyed, Translatable {
|
||||
@ -453,10 +453,10 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f
|
||||
return note;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 57dfc408fcf9036808af26bd1255afe104d40286..62a7748b7509907ac8c8c0026f0cc5911f530eb7 100644
|
||||
index e723bafe37b917eff0e0795c3c8c2467fe4bb231..3e0d1026e2581b4a8d23d55b7c98b028a58d22dd 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -219,14 +219,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -220,14 +220,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see TrimMaterial
|
||||
*/
|
||||
@ -471,7 +471,7 @@ index 57dfc408fcf9036808af26bd1255afe104d40286..62a7748b7509907ac8c8c0026f0cc591
|
||||
Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
|
||||
/**
|
||||
* Damage types.
|
||||
@@ -328,8 +326,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -329,8 +327,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @param input non-null input
|
||||
* @return registered object or null if does not exist
|
||||
@ -498,7 +498,7 @@ index 6277451c3c6c551078c237cd767b6d70c4f585ea..10f5cfb1885833a1d2c1027c03974da4
|
||||
CRACKED(0x0),
|
||||
GLYPHED(0x1),
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 82f4359bc93b97304fbcbf2406ae69cfb0d74a0b..6d72b50b12315caf29842b5cf52e67715de8877d 100644
|
||||
index fc2c2941d247a1592194f11fddc1dc547269dcc7..e11398ca751d4d8b043b73f78f56b837229f70af 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -740,9 +740,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@ -592,7 +592,7 @@ index e455eb21abf121dc6ff10ff8a13dd06f67096a8f..bbc01e7c192ae6689c301670047ff114
|
||||
return origin;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index b6ca63afb74b345e381d35646cc8faf52a2c7cbc..a523d1725f175c924ab1a7d544d389ec81b68bcf 100644
|
||||
index fcdc5d83621acff5f9210585455be1ea50abb77c..216995288f6b8b407ef8240411b5ed4713379a7a 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -418,9 +418,8 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@ -606,7 +606,7 @@ index b6ca63afb74b345e381d35646cc8faf52a2c7cbc..a523d1725f175c924ab1a7d544d389ec
|
||||
public boolean refreshChunk(int x, int z);
|
||||
|
||||
/**
|
||||
@@ -3770,6 +3769,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -3797,6 +3796,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);
|
||||
|
||||
// Spigot start
|
||||
@ -614,7 +614,7 @@ index b6ca63afb74b345e381d35646cc8faf52a2c7cbc..a523d1725f175c924ab1a7d544d389ec
|
||||
public class Spigot {
|
||||
|
||||
/**
|
||||
@@ -3803,7 +3803,11 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -3830,7 +3830,11 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
}
|
||||
}
|
||||
|
||||
@ -626,7 +626,7 @@ index b6ca63afb74b345e381d35646cc8faf52a2c7cbc..a523d1725f175c924ab1a7d544d389ec
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
|
||||
@@ -4021,9 +4025,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -4048,9 +4052,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* Gets the dimension ID of this environment
|
||||
*
|
||||
* @return dimension ID
|
||||
@ -638,7 +638,7 @@ index b6ca63afb74b345e381d35646cc8faf52a2c7cbc..a523d1725f175c924ab1a7d544d389ec
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
@@ -4033,9 +4037,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -4060,9 +4064,9 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
*
|
||||
* @param id The ID of the environment
|
||||
* @return The environment
|
||||
@ -651,7 +651,7 @@ index b6ca63afb74b345e381d35646cc8faf52a2c7cbc..a523d1725f175c924ab1a7d544d389ec
|
||||
public static Environment getEnvironment(int id) {
|
||||
return lookup.get(id);
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index a71001677e2b1b0b6225a7be63b8ea5ce4456862..c7ef0386a09a07a2317c56274ed41218dfd7153d 100644
|
||||
index bb3cf2c5e2acbcd7cf53ad8551a5b11fa6104ada..e4393f2bd71308a58305cb870271d6a647ffcd92 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -526,7 +526,7 @@ public interface Block extends Metadatable, Translatable {
|
||||
@ -730,10 +730,10 @@ index b90f5dc345ad2cdd3ae353dc57f42a14c231d18a..a7b915ded9154d53ac8ca599119c1699
|
||||
public static PistonMoveReaction getById(int id) {
|
||||
return byId.get(id);
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index a82d6f469aca02fb28b1b3ad84dc40415f1f1ade..f4ec7891bdcedc73bff6938e3eddb7ee43d23ec1 100644
|
||||
index 9db24da6836de45b7aff8d89782e6b0e1bc5391b..6a89c75d913ee1ef5b368064a4cdc1ec0c96ce2b 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -273,7 +273,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
@@ -274,7 +274,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
* @deprecated enchantment groupings are now managed by tags, not categories
|
||||
*/
|
||||
@NotNull
|
||||
@ -767,10 +767,10 @@ index 3afe2787de576f7190d87c796bea0ab34dc30248..58191017244f3949f6174fb108e3a245
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
index c308f6a9f36ae8d108d583179464e078e09bf051..dd410ff2cad3dc34ef9d2a37d72417c7b213de63 100644
|
||||
index bd6f99128728d2607530802caee438ae1fe0d2a3..afbd43ef062efae32c112ca8299b05a3796ee4fc 100644
|
||||
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
||||
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
@@ -393,9 +393,9 @@ public enum EntityType implements Keyed, Translatable {
|
||||
@@ -394,9 +394,9 @@ public enum EntityType implements Keyed, Translatable {
|
||||
*
|
||||
* @param name the entity type's name
|
||||
* @return the matching entity type or null
|
||||
@ -826,7 +826,7 @@ index bafef53c1d449135f1300c8c8fbb06f482ba67e1..f50aaddf8582be55fd4860ad374d8f22
|
||||
+@Deprecated(forRemoval = true) // Paper
|
||||
public interface LingeringPotion extends ThrownPotion { }
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 8cd525dd8ded0ddbd405c66e9c0fbeb40f788521..2b791a093a1220be80eb6b9d7202f6596fcf2dd6 100644
|
||||
index b5ea7b60b47f056553a1cec766c57e0f75735633..ec35111df4b38fd55cc34f4baedebcf39c7fc92b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -716,7 +716,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@ -874,7 +874,7 @@ index 95c79c5fa0c4e30201f887da6467ce5f81c8a255..7f9c4d4b430a3f0276461346ff2621ba
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 92a83edc03fa8d11f026ac312b989329fa6a7e88..33547e9e3f8f7c906a5d91b75eb62327cc1f2a3a 100644
|
||||
index f5bd443d3ed2b9d822dcd24e648868b9e1f4f6d9..a0ea2ba0995a54fa12037d2a2ebe8ef9e2dd4bd0 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1635,11 +1635,8 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@ -1023,7 +1023,7 @@ index e1123295b9511a2c610a1baf7195638f7f3e64c4..273ae8e5da0a858d3b82d1b0f5992318
|
||||
public void setCancelled(boolean cancel) {
|
||||
this.cancel = cancel;
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
|
||||
index 775e3223aa5054f1883403e50c8f2241d97b1285..5d4817d2a3b709f1a1a1162309a1c923bd09cc1d 100644
|
||||
index 56e6024f1fa64569481543dc076e575bb512eef0..7fccda2a48f7bac7da54862c5cb8f1b484cc9da9 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java
|
||||
@@ -19,22 +19,27 @@ public class ProjectileHitEvent extends EntityEvent implements Cancellable {
|
||||
@ -1399,10 +1399,10 @@ index 002acfbdce1db10f7ba1b6a013e678f504ac6e69..8d14426eb1ebea27058d5f22ea652f22
|
||||
return getPlayer().getItemOnCursor();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index b6b90f2ef735407ac41efa21371cfd6b07c2c66e..4c4e52b2c200408c4e33a141e1eed78126ceaaee 100644
|
||||
index 3d08beee52f2247db6f6e679206ed6a965fbf9a8..1b4f9b93860e58762ac28715adad5a67298b06d7 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -30,7 +30,7 @@ public interface ItemFactory {
|
||||
@@ -29,7 +29,7 @@ public interface ItemFactory {
|
||||
* @return a new ItemMeta that could be applied to an item stack of the
|
||||
* specified material
|
||||
*/
|
||||
@ -1412,7 +1412,7 @@ index b6b90f2ef735407ac41efa21371cfd6b07c2c66e..4c4e52b2c200408c4e33a141e1eed781
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index bb77d65fd42f9b53ef88537e814bea652bb230de..d758cea1d8e88937678dbfd0ac72d49b6c160fe0 100644
|
||||
index 991448ce7d1455b02889cc8da345e8d7200a8215..8fba0996b371276b281c86570dff01d652915247 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -10,6 +10,7 @@ import org.bukkit.Material;
|
||||
@ -1423,7 +1423,7 @@ index bb77d65fd42f9b53ef88537e814bea652bb230de..d758cea1d8e88937678dbfd0ac72d49b
|
||||
import org.bukkit.Utility;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@@ -172,8 +173,10 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -179,8 +180,10 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
* Gets the MaterialData for this stack of items
|
||||
*
|
||||
* @return MaterialData for this item
|
||||
@ -1434,7 +1434,7 @@ index bb77d65fd42f9b53ef88537e814bea652bb230de..d758cea1d8e88937678dbfd0ac72d49b
|
||||
public MaterialData getData() {
|
||||
Material mat = Bukkit.getUnsafe().toLegacy(getType());
|
||||
if (data == null && mat != null && mat.getData() != null) {
|
||||
@@ -187,7 +190,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -194,7 +197,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
* Sets the MaterialData for this stack of items
|
||||
*
|
||||
* @param data New MaterialData for this item
|
||||
@ -1444,7 +1444,7 @@ index bb77d65fd42f9b53ef88537e814bea652bb230de..d758cea1d8e88937678dbfd0ac72d49b
|
||||
public void setData(@Nullable MaterialData data) {
|
||||
if (data == null) {
|
||||
this.data = data;
|
||||
@@ -567,7 +572,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -574,7 +579,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
*
|
||||
* @return a copy of the current ItemStack's ItemData
|
||||
*/
|
||||
@ -1587,10 +1587,10 @@ index 597a18a767b68b47e81454b7d44613c7178c1366..bc3440eb72127824b3961fbdae583bb6
|
||||
public ItemStack getInput() {
|
||||
return this.ingredient.getItemStack();
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index f427334c6e875a13aa53052ac1b5a746186b4ffe..abe5c56c09a29cb3dcd35936045938c1b88c8500 100644
|
||||
index fe0f8459a381c35e1e7a312a2f63d6e6eda088d6..27dfb5704b190f469dbe3d8fccd3cf47999b7133 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -142,6 +142,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -143,6 +143,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Checks for existence of a localized name.
|
||||
*
|
||||
@ -1598,7 +1598,7 @@ index f427334c6e875a13aa53052ac1b5a746186b4ffe..abe5c56c09a29cb3dcd35936045938c1
|
||||
* @return true if this has a localized name
|
||||
* @deprecated meta no longer exists
|
||||
*/
|
||||
@@ -154,6 +155,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -155,6 +156,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
* Plugins should check that hasLocalizedName() returns <code>true</code>
|
||||
* before calling this method.
|
||||
*
|
||||
@ -1606,7 +1606,7 @@ index f427334c6e875a13aa53052ac1b5a746186b4ffe..abe5c56c09a29cb3dcd35936045938c1
|
||||
* @return the localized name that is set
|
||||
* @deprecated meta no longer exists
|
||||
*/
|
||||
@@ -164,6 +166,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -165,6 +167,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
/**
|
||||
* Sets the localized name.
|
||||
*
|
||||
@ -1858,10 +1858,10 @@ index 0ea9c6b2420a0f990bd1fdf50fc015e37a7060d8..e99644eae1c662b117aa19060d2484ac
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
index 7feeb33f8938be968b20c19437723d8c968690fa..e045e6a74821f291938cc6af86e313c1f1c4626c 100644
|
||||
index 6bbfebab2ee2b59b3f3213789ecb59e2e7f2680a..42d893ce75a75fe46a4e52b17dc405f5b609ab86 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
@@ -270,9 +270,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
@@ -279,9 +279,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
* Returns the unique ID of this type.
|
||||
*
|
||||
* @return Unique ID
|
||||
@ -1873,7 +1873,7 @@ index 7feeb33f8938be968b20c19437723d8c968690fa..e045e6a74821f291938cc6af86e313c1
|
||||
public abstract int getId();
|
||||
|
||||
/**
|
||||
@@ -308,9 +308,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
@@ -317,9 +317,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
*
|
||||
* @param id Unique ID to fetch
|
||||
* @return Resulting type, or null if not found.
|
||||
|
@ -20,10 +20,10 @@ index da997507b96908027c49dabc6daf7c787dcad95d..cb7aef53cbffc76dea9fec28445ea8ae
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index d758cea1d8e88937678dbfd0ac72d49b6c160fe0..066f99a1f4cc42cf0e87d495f97a0685817dfa18 100644
|
||||
index 8fba0996b371276b281c86570dff01d652915247..adb6576ba60219c15bcfddae03cd90e24906b01a 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -659,6 +659,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -661,6 +661,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return Bukkit.getServer().getItemFactory().ensureServerConversions(this);
|
||||
}
|
||||
|
||||
|
@ -231,10 +231,10 @@ index 0000000000000000000000000000000000000000..1757055d821d9ec7c728aa6c1b52fa6a
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 33547e9e3f8f7c906a5d91b75eb62327cc1f2a3a..7429666fd1af4f4a924cf93572df5b826782af05 100644
|
||||
index a0ea2ba0995a54fa12037d2a2ebe8ef9e2dd4bd0..9a9d3b9f19ad96704172cc709f49c2a517f117c2 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3282,6 +3282,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3330,6 +3330,13 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void resetCooldown();
|
||||
// Paper end - attack cooldown API
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Support components in ItemMeta
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
index abe5c56c09a29cb3dcd35936045938c1b88c8500..a317111df3b6cda00dc700c68f4c2b789c51885d 100644
|
||||
index 27dfb5704b190f469dbe3d8fccd3cf47999b7133..434535afdbab29a21cd5eea9f454d47887f21a4e 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
|
||||
@@ -5,6 +5,7 @@ import java.util.Collection;
|
||||
@ -16,7 +16,7 @@ index abe5c56c09a29cb3dcd35936045938c1b88c8500..a317111df3b6cda00dc700c68f4c2b78
|
||||
import org.bukkit.attribute.Attribute;
|
||||
import org.bukkit.attribute.AttributeModifier;
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
@@ -66,6 +67,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -67,6 +68,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@NotNull
|
||||
String getDisplayName();
|
||||
|
||||
@ -37,7 +37,7 @@ index abe5c56c09a29cb3dcd35936045938c1b88c8500..a317111df3b6cda00dc700c68f4c2b78
|
||||
/**
|
||||
* Sets the display name.
|
||||
*
|
||||
@@ -75,6 +90,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -76,6 +91,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@Deprecated // Paper
|
||||
void setDisplayName(@Nullable String name);
|
||||
|
||||
@ -54,7 +54,7 @@ index abe5c56c09a29cb3dcd35936045938c1b88c8500..a317111df3b6cda00dc700c68f4c2b78
|
||||
/**
|
||||
* Checks for existence of an item name.
|
||||
* <br>
|
||||
@@ -211,6 +236,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -212,6 +237,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@Nullable
|
||||
List<String> getLore();
|
||||
|
||||
@ -74,7 +74,7 @@ index abe5c56c09a29cb3dcd35936045938c1b88c8500..a317111df3b6cda00dc700c68f4c2b78
|
||||
/**
|
||||
* Sets the lore for this item.
|
||||
* Removes lore when given null.
|
||||
@@ -221,6 +259,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@@ -222,6 +260,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste
|
||||
@Deprecated // Paper
|
||||
void setLore(@Nullable List<String> lore);
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Brand support
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 7429666fd1af4f4a924cf93572df5b826782af05..b0c0fd6687af5676d85094304ced25c1c444bc90 100644
|
||||
index 9a9d3b9f19ad96704172cc709f49c2a517f117c2..fb86055ba15b677b0d8969995713ec7f950cb30a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3395,6 +3395,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3443,6 +3443,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
// Paper end
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ index dc66bd69646ac949d1386ce8f6ff913e9475439d..4482e8f2c617c2f51b2b53762e775d11
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index feebabf946913263461e1d0f13a478cf4bfd0f68..ebf505bbdc1b44d1fcd3c30f4143f6e5b89d09e9 100644
|
||||
index 5ccca18290ffc3d0933e579fbb31bd64c527488d..ab5db87139a887ef26e46812e59998f4ea83f28c 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -129,7 +129,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -286,7 +286,7 @@ index d3087d60378822cdd7cea25fd63d3f496e3cd2fb..5d8fa5b39a5d50cca48ba63af3a84b80
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index bf29d9b733afc7c62725d259f4920c4f211cc6d0..1d3812db989a55b6f31bb30dffe70323eb592a15 100644
|
||||
index 745413357506fa7399f8ba44dfe222d1f0c919f1..25db31b2e9a6d75f0c59f75237842f9ad7d1c350 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -312,7 +312,7 @@ index bf29d9b733afc7c62725d259f4920c4f211cc6d0..1d3812db989a55b6f31bb30dffe70323
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
|
||||
index 95cedd536fed5a195fb2dd76da1c451598250f53..d4e824ad18714b951cf161031a9566e6796ab507 100644
|
||||
index 2fd6f52ad69074f1a060b9a85c1a0f01ae2add2d..56bc4cbc9af40e7fa400293ddc2479c7d2754c55 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockType.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockType.java
|
||||
@@ -125,7 +125,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -324,7 +324,7 @@ index 95cedd536fed5a195fb2dd76da1c451598250f53..d4e824ad18714b951cf161031a9566e6
|
||||
|
||||
/**
|
||||
* Typed represents a subtype of {@link BlockType}s that have a known block
|
||||
@@ -3602,4 +3602,13 @@ public interface BlockType extends Keyed, Translatable {
|
||||
@@ -3603,4 +3603,13 @@ public interface BlockType extends Keyed, Translatable {
|
||||
@Nullable
|
||||
@Deprecated
|
||||
Material asMaterial();
|
||||
@ -339,10 +339,10 @@ index 95cedd536fed5a195fb2dd76da1c451598250f53..d4e824ad18714b951cf161031a9566e6
|
||||
+ // Paper end - add Translatable
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index f4ec7891bdcedc73bff6938e3eddb7ee43d23ec1..4e41980dfbb256356231bc9565f6a90ea66aab76 100644
|
||||
index 6a89c75d913ee1ef5b368064a4cdc1ec0c96ce2b..0d6b06e09f6682d04623d176fcfd350cfa6a702a 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -16,7 +16,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* The various type of enchantments that may be added to armour or weapons
|
||||
*/
|
||||
@ -367,10 +367,10 @@ index c4f86ba1037f3f0e5d697a0962d71d6f8c7c1fbe..ac0371285370594d4de1554871b19bbc
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
index dd410ff2cad3dc34ef9d2a37d72417c7b213de63..b7a454ca11d484209d08d0003d4c19a431456687 100644
|
||||
index afbd43ef062efae32c112ca8299b05a3796ee4fc..54fbfa2bce8d73a66ca165ba7227c574b58f91cb 100644
|
||||
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
||||
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Contract;
|
||||
@@ -26,7 +26,7 @@ import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -379,7 +379,7 @@ index dd410ff2cad3dc34ef9d2a37d72417c7b213de63..b7a454ca11d484209d08d0003d4c19a4
|
||||
|
||||
// These strings MUST match the strings in nms.EntityTypes and are case sensitive.
|
||||
/**
|
||||
@@ -439,10 +439,22 @@ public enum EntityType implements Keyed, Translatable {
|
||||
@@ -440,10 +440,22 @@ public enum EntityType implements Keyed, Translatable {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
@ -509,7 +509,7 @@ index 5bd252c0ae3b09fe141d131360c67bb9bfbf5422..78587d9fabe6371a23a7963917b054db
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 066f99a1f4cc42cf0e87d495f97a0685817dfa18..23686519b8c1338dd6e9f1c5a0e73467c0b59a4f 100644
|
||||
index adb6576ba60219c15bcfddae03cd90e24906b01a..427e0012376effbd1b459da094ac8e4d6324e38e 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -521,7 +521,7 @@ index 066f99a1f4cc42cf0e87d495f97a0685817dfa18..23686519b8c1338dd6e9f1c5a0e73467
|
||||
private Material type = Material.AIR;
|
||||
private int amount = 0;
|
||||
private MaterialData data = null;
|
||||
@@ -626,6 +626,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -628,6 +628,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
@ -529,7 +529,7 @@ index 066f99a1f4cc42cf0e87d495f97a0685817dfa18..23686519b8c1338dd6e9f1c5a0e73467
|
||||
public String getTranslationKey() {
|
||||
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||
}
|
||||
@@ -885,5 +886,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -887,5 +888,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
ItemMeta itemMeta = getItemMeta();
|
||||
return itemMeta != null && itemMeta.hasItemFlag(flag);
|
||||
}
|
||||
@ -547,7 +547,7 @@ index 066f99a1f4cc42cf0e87d495f97a0685817dfa18..23686519b8c1338dd6e9f1c5a0e73467
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
index aa0f66b7187c800cd22905bfa43af3ffb53edb5f..3d30c4957a2950ac8d4635ed7bb9bf39ca8cd158 100644
|
||||
index cf855eaf2859566a7c5763f838ff3fbecb9e3124..006c5e6449ec21b96c9e5af2fa00ae240451eeca 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
@@ -49,7 +49,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -559,7 +559,7 @@ index aa0f66b7187c800cd22905bfa43af3ffb53edb5f..3d30c4957a2950ac8d4635ed7bb9bf39
|
||||
|
||||
/**
|
||||
* Typed represents a subtype of {@link ItemType}s that have a known item meta type
|
||||
@@ -2419,4 +2419,13 @@ public interface ItemType extends Keyed, Translatable {
|
||||
@@ -2445,4 +2445,13 @@ public interface ItemType extends Keyed, Translatable {
|
||||
@Nullable
|
||||
@Deprecated
|
||||
Material asMaterial();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Create HoverEvent from ItemStack Entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index 4c4e52b2c200408c4e33a141e1eed78126ceaaee..53b8934cb829f37971cb3ecd5652c9974dec6ab0 100644
|
||||
index 1b4f9b93860e58762ac28715adad5a67298b06d7..96546712f788e091749a1b4eebc6b1d6c3db7814 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -265,4 +265,65 @@ public interface ItemFactory {
|
||||
@@ -250,4 +250,65 @@ public interface ItemFactory {
|
||||
@NotNull
|
||||
ItemStack ensureServerConversions(@NotNull ItemStack item);
|
||||
// Paper end - ensure server conversions API
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index b0c0fd6687af5676d85094304ced25c1c444bc90..28a811be93b29f105dad1db91a8adccbdf9fcaf7 100644
|
||||
index fb86055ba15b677b0d8969995713ec7f950cb30a..d03c0abada5389311d4d88c69bfb3ce8f981ac8a 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3289,6 +3289,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3337,6 +3337,25 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
<T> @NotNull T getClientOption(com.destroystokyo.paper.@NotNull ClientOption<T> option);
|
||||
// Paper end - client option API
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 28a811be93b29f105dad1db91a8adccbdf9fcaf7..752b2bac47588c0f75a13a7e6ec2be3c2f5a149e 100644
|
||||
index d03c0abada5389311d4d88c69bfb3ce8f981ac8a..0ac6fd7207311d27a650f5811e39de05e8f5fa9b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3308,6 +3308,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3356,6 +3356,19 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
}
|
||||
// Paper end - elytra boost API
|
||||
|
||||
|
@ -190,7 +190,7 @@ index 791813220b2504214b1adecc69093cd600fb0f8c..47fe5b0d5d031110c27210a0a256c260
|
||||
final RegistryKey<T> registryKey = createInternal(key);
|
||||
REGISTRY_KEYS.add(registryKey);
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 3210587c341bc8d80ddc7f387ca4030dbd0074c9..f35e5cd82c04bce3ca24120ca6cb5260a789b2d7 100644
|
||||
index 607fe5038c2a1a579c6eba16a732a6b0c42cc9b7..be1e26f4d41e991d5ffcca95d600558771fc2f26 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2395,8 +2395,11 @@ public final class Bukkit {
|
||||
@ -206,10 +206,10 @@ index 3210587c341bc8d80ddc7f387ca4030dbd0074c9..f35e5cd82c04bce3ca24120ca6cb5260
|
||||
return server.getRegistry(tClass);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6a912079b 100644
|
||||
index 3e0d1026e2581b4a8d23d55b7c98b028a58d22dd..4857262f95e635e17aeaee83052ffcdf5502b736 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -101,7 +101,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -102,7 +102,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @apiNote BlockType is not ready for public usage yet
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
@ -218,7 +218,7 @@ index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6
|
||||
/**
|
||||
* Custom boss bars.
|
||||
*
|
||||
@@ -139,7 +139,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -140,7 +140,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see Enchantment
|
||||
*/
|
||||
@ -227,7 +227,7 @@ index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6
|
||||
/**
|
||||
* Server entity types.
|
||||
*
|
||||
@@ -151,7 +151,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -152,7 +152,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see MusicInstrument
|
||||
*/
|
||||
@ -236,7 +236,7 @@ index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6
|
||||
/**
|
||||
* Server item types.
|
||||
*
|
||||
@@ -159,7 +159,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -160,7 +160,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @apiNote ItemType is not ready for public usage yet
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
@ -245,7 +245,7 @@ index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6
|
||||
/**
|
||||
* Default server loot tables.
|
||||
*
|
||||
@@ -177,7 +177,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -178,7 +178,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see PotionEffectType
|
||||
*/
|
||||
@ -254,7 +254,7 @@ index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6
|
||||
/**
|
||||
* Server particles.
|
||||
*
|
||||
@@ -200,14 +200,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -201,14 +201,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Server structures.
|
||||
*
|
||||
* @see Structure
|
||||
@ -273,7 +273,7 @@ index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6
|
||||
/**
|
||||
* Sound keys.
|
||||
*
|
||||
@@ -218,21 +220,26 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -219,21 +221,26 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Trim materials.
|
||||
*
|
||||
* @see TrimMaterial
|
||||
@ -304,7 +304,7 @@ index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6
|
||||
/**
|
||||
* Villager profession.
|
||||
*
|
||||
@@ -286,8 +293,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -287,8 +294,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Wolf variants.
|
||||
*
|
||||
* @see Wolf.Variant
|
||||
@ -316,7 +316,7 @@ index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6
|
||||
/**
|
||||
* Map cursor types.
|
||||
*
|
||||
@@ -300,7 +309,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -301,7 +310,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see GameEvent
|
||||
*/
|
||||
@ -326,7 +326,7 @@ index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6
|
||||
* Get the object by its key.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index f0c1d16c6bee58826a3cde3c4988e02690207fce..c53268bc4c3ae275ad8765f0848e46e1d6c7372d 100644
|
||||
index faf7b1bba8baa869294b0542fc53fe5ba1f4147a..0035e279eee2a5af44b992ae464bed7661e74657 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -2046,8 +2046,11 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@ -368,20 +368,30 @@ index 0000000000000000000000000000000000000000..f5ece852f97017f71bc129e194cb2129
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index b208150297a23c0b4acb79135416809718f5650e..f11c639f1dc3c5034678d80bde3127a2e81a4a93 100644
|
||||
index c79faf4197f9c0a7256cefe2b001182102d2b796..55f1bc7d01e5184172559c43b8327ac86d58041b 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -36,26 +36,11 @@ public final class TestServer {
|
||||
@@ -37,36 +37,11 @@ public final class TestServer {
|
||||
|
||||
when(instance.getBukkitVersion()).thenReturn("BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion());
|
||||
|
||||
- Map<Class<? extends Keyed>, Registry<?>> registers = new HashMap<>();
|
||||
- when(instance.getRegistry(any())).then(invocationOnMock -> registers.computeIfAbsent(invocationOnMock.getArgument(0), aClass -> new Registry<Keyed>() {
|
||||
- when(instance.getRegistry(any())).then(invocationOnMock -> registers.computeIfAbsent(invocationOnMock.getArgument(0), aClass -> new Registry<>() {
|
||||
- private final Map<NamespacedKey, Keyed> cache = new HashMap<>();
|
||||
-
|
||||
- @Override
|
||||
- public Keyed get(NamespacedKey key) {
|
||||
- return cache.computeIfAbsent(key, key2 -> mock(aClass, withSettings().stubOnly()));
|
||||
- Class<? extends Keyed> theClass;
|
||||
- // Some registries have extra Typed classes such as BlockType and ItemType.
|
||||
- // To avoid class cast exceptions during init mock the Typed class.
|
||||
- // To get the correct class, we just use the field type.
|
||||
- try {
|
||||
- theClass = (Class<? extends Keyed>) aClass.getField(key.getKey().toUpperCase(Locale.ROOT).replace('.', '_')).getType();
|
||||
- } catch (ClassCastException | NoSuchFieldException e) {
|
||||
- throw new RuntimeException(e);
|
||||
- }
|
||||
-
|
||||
- return cache.computeIfAbsent(key, key2 -> mock(theClass, withSettings().stubOnly()));
|
||||
- }
|
||||
-
|
||||
- @NotNull
|
||||
|
@ -513,10 +513,10 @@ index 0000000000000000000000000000000000000000..1e7b53f9bc13dcd5a0a4a40004591e4f
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index e5393d3204f4d04d8e9640a45c6b4ba6a912079b..d573d8e36fbe6b7f5a298fb64910feba9cba0697 100644
|
||||
index 4857262f95e635e17aeaee83052ffcdf5502b736..9a819b179ce3040e842be58a8ddceee2a14ffa59 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -310,6 +310,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -311,6 +311,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see GameEvent
|
||||
*/
|
||||
Registry<GameEvent> GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper
|
||||
|
@ -43,7 +43,7 @@ index 0000000000000000000000000000000000000000..f1cd5a4f37eee8975ac3d0421b524afc
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index ebf505bbdc1b44d1fcd3c30f4143f6e5b89d09e9..04cb8279f2296cc42405355c7c1f120e761202c4 100644
|
||||
index ab5db87139a887ef26e46812e59998f4ea83f28c..c96c927367d22e2651a553a5e6685bde9c8f8873 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4756,6 +4756,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@ -110,10 +110,10 @@ index e7931f73f10fe35ebd5fe4a04b036d53bb117ebd..cbce835ed6d44e5b8c9aaae4e36a77f8
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 23686519b8c1338dd6e9f1c5a0e73467c0b59a4f..f0221815cbd30f3ccaacc87a57403491b55de128 100644
|
||||
index 427e0012376effbd1b459da094ac8e4d6324e38e..decc49d86de34c43daa04316320288fa33f935e5 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -897,5 +897,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -899,5 +899,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public @NotNull String translationKey() {
|
||||
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] More World API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 77314fdbd99a5cc34e7a1df4692ba8a1685ef002..f4d31d9d0f4cbd2621adf97a20b65ae83e5fd064 100644
|
||||
index c1fd76e1b8d0f326f985662a2845f76c1cdf5d40..50d27a6096f0da98db80ce28eab21a004de8a20a 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -3849,6 +3849,122 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -3876,6 +3876,122 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
StructureSearchResult locateNearestStructure(@NotNull Location origin, @NotNull Structure structure, int radius, boolean findUnexplored);
|
||||
|
||||
|
@ -25,10 +25,10 @@ index 8635846c9f672e39f0929eec7bf83b22536ed284..51f1a09164d501de6d2561ed90175f2c
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index f0221815cbd30f3ccaacc87a57403491b55de128..ca2dac7b377ea098158ff3c84fd47f405b636869 100644
|
||||
index decc49d86de34c43daa04316320288fa33f935e5..b2a9cb36d3bd0ba604514457294e337364a67756 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -909,5 +909,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -911,5 +911,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public io.papermc.paper.inventory.ItemRarity getRarity() {
|
||||
return io.papermc.paper.inventory.ItemRarity.valueOf(this.getItemMeta().getRarity().name());
|
||||
}
|
||||
|
@ -41,10 +41,10 @@ index 0000000000000000000000000000000000000000..aec3b41d7c3388e26fa203e3c062f1e6
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index 4e41980dfbb256356231bc9565f6a90ea66aab76..73e367fdf405b926599f4a7d34d61c25bb6c6e81 100644
|
||||
index 0d6b06e09f6682d04623d176fcfd350cfa6a702a..f8d9fba8791303794ba3be6f42542c096222691d 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -292,11 +292,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
@@ -293,11 +293,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
* Cursed enchantments are found the same way treasure enchantments are
|
||||
*
|
||||
* @return true if the enchantment is cursed
|
||||
@ -56,7 +56,7 @@ index 4e41980dfbb256356231bc9565f6a90ea66aab76..73e367fdf405b926599f4a7d34d61c25
|
||||
public abstract boolean isCursed();
|
||||
|
||||
/**
|
||||
@@ -330,6 +326,97 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
@@ -331,6 +327,97 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
* @return the name of the enchantment with {@code level} applied
|
||||
*/
|
||||
public abstract net.kyori.adventure.text.@NotNull Component displayName(int level);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack#editMeta
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index ca2dac7b377ea098158ff3c84fd47f405b636869..5fb8f7c1b79bd256925cb68cccfe0b974fb84043 100644
|
||||
index b2a9cb36d3bd0ba604514457294e337364a67756..95e11895856101013c4ac434546a229eab09586e 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -567,6 +567,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -574,6 +574,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return result.ensureServerConversions(); // Paper
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Improve item default attribute API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 04cb8279f2296cc42405355c7c1f120e761202c4..18862cce7e252e69153f0a5380aa07de26d9d2e7 100644
|
||||
index c96c927367d22e2651a553a5e6685bde9c8f8873..a011123035a96c05921f0a206b92bef15732b443 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4771,6 +4771,23 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@ -72,10 +72,10 @@ index 04cb8279f2296cc42405355c7c1f120e761202c4..18862cce7e252e69153f0a5380aa07de
|
||||
*
|
||||
* @param slot the {@link EquipmentSlot} to check
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
index 3d30c4957a2950ac8d4635ed7bb9bf39ca8cd158..077bd4d4e50169780f27e8502104e9e4b2ecdae6 100644
|
||||
index 006c5e6449ec21b96c9e5af2fa00ae240451eeca..a0cd105daf93fa02f243ef5b708efe9f3718d7bb 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
@@ -2378,6 +2378,21 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
@@ -2404,6 +2404,21 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
// @NotNull
|
||||
// EquipmentSlot getEquipmentSlot();
|
||||
|
||||
|
@ -493,55 +493,34 @@ index c7364a6c266aba9568f491fe0794fa593ada224d..827574b3eff9b912500b092ca081e716
|
||||
* Mark the entity's removal.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Fireball.java b/src/main/java/org/bukkit/entity/Fireball.java
|
||||
index ceaf263bc554a92a232bd3ed18ea67ce4e0b487a..fcb8a7c3e885a89191556bf4ee5edab2e926d4b1 100644
|
||||
index d7ebb33e946d7c5c5ee682f2dc9cf8e4e9f7049f..252e3d35c0478ff4132d33c5caf65aa27911b675 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Fireball.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Fireball.java
|
||||
@@ -12,11 +12,11 @@ public interface Fireball extends Projectile, Explosive {
|
||||
* Sets the direction the fireball should be flying towards.
|
||||
* The direction vector will be normalized and the default speed will be applied.
|
||||
* <br>
|
||||
- * To also change the speed of the fireball, use {@link #setVelocity(Vector)}.
|
||||
+ * To also change the acceleration of the fireball, use {@link #setPower(Vector)}.
|
||||
* <b>Note:</b> that the client may not respect non-default speeds and will therefore
|
||||
* mispredict the location of the fireball, causing visual stutter.
|
||||
* <br>
|
||||
- * <b>Also Note:</b> that this method and {@link #setVelocity(Vector)} will override each other.
|
||||
+ * <b>Also Note:</b> that this method and {@link #setPower(Vector)} will override each other.
|
||||
*
|
||||
* @param direction the direction this fireball should be flying towards
|
||||
* @see #setVelocity(Vector)
|
||||
@@ -32,4 +32,32 @@ public interface Fireball extends Projectile, Explosive {
|
||||
@@ -62,4 +62,25 @@ public interface Fireball extends Projectile, Explosive {
|
||||
*/
|
||||
@NotNull
|
||||
public Vector getDirection();
|
||||
|
||||
+ // Paper start - Expose power on fireball projectiles
|
||||
+ /**
|
||||
+ * {@inheritDoc}
|
||||
+ * <p>
|
||||
+ * Note: For fireball entities, their movement is also controlled by their power.
|
||||
+ *
|
||||
+ * @param velocity New velocity to travel with
|
||||
+ * @see #setPower(Vector)
|
||||
+ */
|
||||
+ @Override
|
||||
+ public void setVelocity(@NotNull Vector velocity);
|
||||
Vector getAcceleration();
|
||||
+
|
||||
+ // Paper start - Expose power on fireball projectiles
|
||||
+ /**
|
||||
+ * Sets the power of a fireball. The power determines the direction and magnitude of its acceleration.
|
||||
+ *
|
||||
+ * @param power the power
|
||||
+ * @deprecated use #setAcceleration(Vector) instead.
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public void setPower(@NotNull Vector power);
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the power of a fireball. The power determines the direction and magnitude of its acceleration.
|
||||
+ *
|
||||
+ * @return the power
|
||||
+ * @deprecated Use #getAcceleration instead.
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ @NotNull
|
||||
+ public Vector getPower();
|
||||
+ // Paper end - Expose power on fireball projectiles
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Fox.java b/src/main/java/org/bukkit/entity/Fox.java
|
||||
index c61a473453f33f9d10c330fc46cfa9d52251fe49..473a7e36ad64f866d1d2e09e2ecb2e9881668faf 100644
|
||||
|
@ -9,10 +9,10 @@ Adjacent spaces sent by players are removed in PlayerConnection, so this change
|
||||
But it does affect the console, command blocks, Bukkit.dispatchCommand, etc.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index 1424060c0a162020d4a680e0a592224561067b16..ac9a28922f8a556944a4c3649d74c32c622f0cb0 100644
|
||||
index 27243a1214bc4d7dbb46f0b9b254c8e3f8128419..b5f9cd2bd191f8b071c6c95706ddbef97d3c244e 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -130,7 +130,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -131,7 +131,7 @@ public class SimpleCommandMap implements CommandMap {
|
||||
*/
|
||||
@Override
|
||||
public boolean dispatch(@NotNull CommandSender sender, @NotNull String commandLine) throws CommandException {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index f4d31d9d0f4cbd2621adf97a20b65ae83e5fd064..6953851a5177e9df3746f7a743f27ef02845e522 100644
|
||||
index 50d27a6096f0da98db80ce28eab21a004de8a20a..d3c524bbfe08d2118b0e093b2340620644d60d19 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -746,6 +746,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -773,6 +773,37 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@NotNull
|
||||
public LightningStrike strikeLightningEffect(@NotNull Location loc);
|
||||
|
||||
|
@ -32,10 +32,10 @@ index 51f1a09164d501de6d2561ed90175f2c24a668c1..cbc63144e5eb35799548209f8fbee70d
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
index b7a454ca11d484209d08d0003d4c19a431456687..1d1315262737d99bf9f5aabc0ae66eee4645cc65 100644
|
||||
index 54fbfa2bce8d73a66ca165ba7227c574b58f91cb..ea33003014adf2e25fd974c8ff5dfc0343b805f4 100644
|
||||
--- a/src/main/java/org/bukkit/entity/EntityType.java
|
||||
+++ b/src/main/java/org/bukkit/entity/EntityType.java
|
||||
@@ -453,6 +453,25 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
|
||||
@@ -454,6 +454,25 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans
|
||||
Preconditions.checkArgument(this != UNKNOWN, "UNKNOWN entities do not have translation keys");
|
||||
return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add hasCollision methods to various places
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 1df815c2e430a308baea08c9a7f3ca43377dc16e..195bd298cfc2d43720550d5bf5a3347c064e9a7a 100644
|
||||
index a011123035a96c05921f0a206b92bef15732b443..889f760e0c8de3f567d86936e6fc317a43993b10 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4788,6 +4788,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@ -31,7 +31,7 @@ index 1df815c2e430a308baea08c9a7f3ca43377dc16e..195bd298cfc2d43720550d5bf5a3347c
|
||||
* Do not use for any reason.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index b5fe76a6353816a2d009dfa5921f8ada92984f34..42cc4f2ee960c0abf9c6688aeee4150754612c32 100644
|
||||
index 6ada8c036f1a112f11a9fbc3baf1f79b3f1bfc8e..02361d58ac723d02d93db80a721b27d37f7dc3c1 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -482,6 +482,13 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||
@ -67,10 +67,10 @@ index fd4a9bdcfb6775dfbdb7492e6c9eb90722d2ecdc..e573e70d9e74e444783a7363e6cdac12
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
|
||||
index d4e824ad18714b951cf161031a9566e6796ab507..61a73e813f7c14c61fac358e96aaaa64c41e560b 100644
|
||||
index 56bc4cbc9af40e7fa400293ddc2479c7d2754c55..8ba422ce7eecdfdfb4edbc0d56f99eeaa3f16e9b 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockType.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockType.java
|
||||
@@ -3611,4 +3611,13 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
|
||||
@@ -3612,4 +3612,13 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
|
||||
@Override
|
||||
@NotNull String getTranslationKey();
|
||||
// Paper end - add Translatable
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index d573d8e36fbe6b7f5a298fb64910feba9cba0697..f301f81817409f0a6799885d4f0972ed9bf3e4df 100644
|
||||
index 9a819b179ce3040e842be58a8ddceee2a14ffa59..132d375de164e6d8df61234def650154c67fc0df 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -318,6 +318,31 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -319,6 +319,31 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*/
|
||||
@Deprecated(forRemoval = true)
|
||||
Registry<io.papermc.paper.world.structure.ConfiguredStructure> CONFIGURED_STRUCTURE = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.world.structure.ConfiguredStructure.class), "No registry present for ConfiguredStructure. This is a bug.");
|
||||
@ -41,10 +41,10 @@ index d573d8e36fbe6b7f5a298fb64910feba9cba0697..f301f81817409f0a6799885d4f0972ed
|
||||
/**
|
||||
* Get the object by its key.
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
index e045e6a74821f291938cc6af86e313c1f1c4626c..e77cf365cefafbeba09123187e70fd5274f10d53 100644
|
||||
index 42d893ce75a75fe46a4e52b17dc405f5b609ab86..10fa51d116b40450b51af9110d5637f3505ebf65 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
@@ -16,7 +16,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* Represents a type of potion and its effect on an entity.
|
||||
*/
|
||||
@ -53,7 +53,7 @@ index e045e6a74821f291938cc6af86e313c1f1c4626c..e77cf365cefafbeba09123187e70fd52
|
||||
private static final BiMap<Integer, PotionEffectType> ID_MAP = HashBiMap.create();
|
||||
|
||||
/**
|
||||
@@ -352,4 +352,57 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
@@ -361,4 +361,57 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
public static PotionEffectType[] values() {
|
||||
return Lists.newArrayList(Registry.EFFECT).toArray(new PotionEffectType[0]);
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ Deprecate upstream's newer and poorly implemented similar
|
||||
API.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
index a9ed193bbb85a5d363fd315e198430809cdbddc5..229dbdcb9094508e02d7a5ea1761d5764e5e4702 100644
|
||||
index 96546712f788e091749a1b4eebc6b1d6c3db7814..bd0e55562f1cabef3078573182e0cf9fbc844585 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFactory.java
|
||||
@@ -185,8 +185,11 @@ public interface ItemFactory {
|
||||
@@ -170,8 +170,11 @@ public interface ItemFactory {
|
||||
* @param level the level to use, which is the level in the enchantment table
|
||||
* @param allowTreasures allows treasure enchants, e.g. mending, if true.
|
||||
* @return a new ItemStack containing the result of the Enchantment
|
||||
@ -22,7 +22,7 @@ index a9ed193bbb85a5d363fd315e198430809cdbddc5..229dbdcb9094508e02d7a5ea1761d576
|
||||
ItemStack enchantItem(@NotNull final Entity entity, @NotNull final ItemStack item, final int level, final boolean allowTreasures);
|
||||
|
||||
/**
|
||||
@@ -199,8 +202,11 @@ public interface ItemFactory {
|
||||
@@ -184,8 +187,11 @@ public interface ItemFactory {
|
||||
* @param level the level to use, which is the level in the enchantment table
|
||||
* @param allowTreasures allow the treasure enchants, e.g. mending, if true.
|
||||
* @return a new ItemStack containing the result of the Enchantment
|
||||
@ -34,7 +34,7 @@ index a9ed193bbb85a5d363fd315e198430809cdbddc5..229dbdcb9094508e02d7a5ea1761d576
|
||||
ItemStack enchantItem(@NotNull final World world, @NotNull final ItemStack item, final int level, final boolean allowTreasures);
|
||||
|
||||
/**
|
||||
@@ -212,8 +218,11 @@ public interface ItemFactory {
|
||||
@@ -197,8 +203,11 @@ public interface ItemFactory {
|
||||
* @param level the level to use, which is the level in the enchantment table
|
||||
* @param allowTreasures allow treasure enchantments, e.g. mending, if true.
|
||||
* @return a new ItemStack containing the result of the Enchantment
|
||||
@ -46,7 +46,7 @@ index a9ed193bbb85a5d363fd315e198430809cdbddc5..229dbdcb9094508e02d7a5ea1761d576
|
||||
ItemStack enchantItem(@NotNull final ItemStack item, final int level, final boolean allowTreasures);
|
||||
|
||||
// Paper start - Adventure
|
||||
@@ -326,4 +335,22 @@ public interface ItemFactory {
|
||||
@@ -311,4 +320,22 @@ public interface ItemFactory {
|
||||
@Deprecated
|
||||
net.md_5.bungee.api.chat.hover.content.Content hoverContentOf(@NotNull org.bukkit.entity.Entity entity, @NotNull net.md_5.bungee.api.chat.BaseComponent[] customName);
|
||||
// Paper end - bungee hover events
|
||||
@ -70,10 +70,10 @@ index a9ed193bbb85a5d363fd315e198430809cdbddc5..229dbdcb9094508e02d7a5ea1761d576
|
||||
+ // Paper end - enchantWithLevels API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 5fb8f7c1b79bd256925cb68cccfe0b974fb84043..105cf1bf6e8b44846cdd3a8881fed36007daaa22 100644
|
||||
index 95e11895856101013c4ac434546a229eab09586e..a46b9b0efcc7becaf86fd885da5b8104d4f12982 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -676,6 +676,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -678,6 +678,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
}
|
||||
|
||||
// Paper start
|
||||
|
@ -10,10 +10,10 @@ Subject: [PATCH] Expand FallingBlock API
|
||||
Co-authored-by: Lukas Planz <lukas.planz@web.de>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 2272c52c28f5f14e1ea8891feec47b18733319d9..6eeb919f478dbe33c9994f2141e77216c7d7e174 100644
|
||||
index 36deaae317cd9ac0455bc1daef22b7f1e1b73c62..406c404adb999acfa0e8f118b23714803e40a4fb 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -2282,8 +2282,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2309,8 +2309,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @return The spawned {@link FallingBlock} instance
|
||||
* @throws IllegalArgumentException if {@link Location} or {@link
|
||||
* MaterialData} are null or {@link Material} of the {@link MaterialData} is not a block
|
||||
@ -24,7 +24,7 @@ index 2272c52c28f5f14e1ea8891feec47b18733319d9..6eeb919f478dbe33c9994f2141e77216
|
||||
public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull MaterialData data) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -2296,8 +2298,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2323,8 +2325,10 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @return The spawned {@link FallingBlock} instance
|
||||
* @throws IllegalArgumentException if {@link Location} or {@link
|
||||
* BlockData} are null
|
||||
@ -35,7 +35,7 @@ index 2272c52c28f5f14e1ea8891feec47b18733319d9..6eeb919f478dbe33c9994f2141e77216
|
||||
public FallingBlock spawnFallingBlock(@NotNull Location location, @NotNull BlockData data) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
@@ -2314,7 +2318,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -2341,7 +2345,7 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
* @return The spawned {@link FallingBlock} instance
|
||||
* @throws IllegalArgumentException if {@link Location} or {@link
|
||||
* Material} are null or {@link Material} is not a block
|
||||
|
@ -120,7 +120,7 @@ index 0000000000000000000000000000000000000000..c8b5b570d44da9524bfc59c7e11b2ae5
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 0cbf946c4f0f47ddfb59b23905968313f25294b1..a2223907c6e6780ca25dae255f321f9add11c912 100644
|
||||
index f51f3f04ba9efe15f68620c5531b502710078b6e..8bada7f7f0200103edc415ad003132d96ae09607 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -126,10 +126,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@ -158,10 +158,10 @@ index 0cbf946c4f0f47ddfb59b23905968313f25294b1..a2223907c6e6780ca25dae255f321f9a
|
||||
* Teleports this entity to the given location. If this entity is riding a
|
||||
* vehicle, it will be dismounted prior to teleportation.
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index cd2d59a8a098227ec7725d121a63cc90e2a139fa..25064aafd5871a7168e8a0ba3e87d6de89e2b083 100644
|
||||
index 2cbb3d14612777422aa01ac45b7cea63e519fbfe..a2d51e8a547c95db235a2e4fa6228c9248cfa88b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3468,6 +3468,45 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3516,6 +3516,45 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
String getClientBrandName();
|
||||
// Paper end
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 25064aafd5871a7168e8a0ba3e87d6de89e2b083..ac9227472443ecb819cc7480a217cd78a98a9b35 100644
|
||||
index a2d51e8a547c95db235a2e4fa6228c9248cfa88b..2cd85236e548c7a9732705d1af78d41f81e9d0d1 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3352,6 +3352,31 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3400,6 +3400,31 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void sendOpLevel(byte level);
|
||||
// Paper end - sendOpLevel API
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index ac9227472443ecb819cc7480a217cd78a98a9b35..ad61c664af66a15e214c5db14a5c9e172f5309ae 100644
|
||||
index 2cd85236e548c7a9732705d1af78d41f81e9d0d1..0c9b6aa22aa0b869f80403fa4bbd8538520168f9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3532,6 +3532,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3580,6 +3580,24 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void lookAt(@NotNull org.bukkit.entity.Entity entity, @NotNull io.papermc.paper.entity.LookAnchor playerAnchor, @NotNull io.papermc.paper.entity.LookAnchor entityAnchor);
|
||||
// Paper end - Teleport API
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Player Warden Warning API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index ad61c664af66a15e214c5db14a5c9e172f5309ae..537ebbad48191741f666aa2a30c8584562dfcb83 100644
|
||||
index 0c9b6aa22aa0b869f80403fa4bbd8538520168f9..f0897d3d689ebca050c80df67581b1e3bc35ed24 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3548,6 +3548,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3596,6 +3596,59 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
* @param silent whether sound should be silenced
|
||||
*/
|
||||
void showElderGuardian(boolean silent);
|
||||
|
@ -8,7 +8,7 @@ to simulate damage done to an itemstack and all
|
||||
the logic associated with damaging them
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 6bfc8a2148f504370df938447f4f6b757f1a516b..208bab1f5a3200f54141c38ee4272629cfc66da5 100644
|
||||
index 8dd993ce32686431e1c759d446a3620cb52f7ec1..0d665a31152c9a667576f2e9d91ffec5304ce944 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1365,4 +1365,53 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@ -66,10 +66,10 @@ index 6bfc8a2148f504370df938447f4f6b757f1a516b..208bab1f5a3200f54141c38ee4272629
|
||||
+ // Paper end - ItemStack damage API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 105cf1bf6e8b44846cdd3a8881fed36007daaa22..ee5d2a30f634ccbe6f2cc2f82f9e56783939f5dd 100644
|
||||
index a46b9b0efcc7becaf86fd885da5b8104d4f12982..19dd25964803ca1cc3c377e69b4ed2d0df58c824 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -993,5 +993,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -995,5 +995,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public boolean canRepair(@NotNull ItemStack toBeRepaired) {
|
||||
return Bukkit.getUnsafe().isValidRepairItemStack(toBeRepaired, this);
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow proper checking of empty item stacks
|
||||
This adds a method to check if an item stack is empty or not. This mirrors vanilla's implementation of the same method.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index ee5d2a30f634ccbe6f2cc2f82f9e56783939f5dd..e4dc17ec23d48591ff5742af5d23aa62bd9bfdbc 100644
|
||||
index 19dd25964803ca1cc3c377e69b4ed2d0df58c824..a2deadbceaa74232a82daa5a3f42a81dc93ba670 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -1007,5 +1007,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -1009,5 +1009,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
public @NotNull ItemStack damage(int amount, @NotNull org.bukkit.entity.LivingEntity livingEntity) {
|
||||
return livingEntity.damageItemStack(this, amount);
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add player idle duration API
|
||||
Implements API for getting and resetting a player's idle duration.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 5753d6d6ae791e2b086c861ddeb6522e46f2571c..9261f06e332f8db94b2ef7bc01f5b0e61422bcb2 100644
|
||||
index ce541b674303695be999018eedcddf554a6ea329..b7df63c31c890b58cf32b02ab3e9d379f30f2065 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3689,6 +3689,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3737,6 +3737,29 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void increaseWardenWarningLevel();
|
||||
// Paper end
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add predicate for blocks when raytracing
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 00fbc02a1751902edda327236e51a6991f5366f8..3abd62dc08e1edaeec6773819c8726671221074a 100644
|
||||
index 406c404adb999acfa0e8f118b23714803e40a4fb..cda78bdc6e6a76dbb5c711ee16dcb470a7b839a6 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -1703,6 +1703,27 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -1730,6 +1730,27 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
public RayTraceResult rayTraceEntities(@NotNull Location start, @NotNull Vector direction, double maxDistance, double raySize, @Nullable Predicate<? super Entity> filter);
|
||||
|
||||
@ -36,7 +36,7 @@ index 00fbc02a1751902edda327236e51a6991f5366f8..3abd62dc08e1edaeec6773819c872667
|
||||
/**
|
||||
* Performs a ray trace that checks for block collisions using the blocks'
|
||||
* precise collision shapes.
|
||||
@@ -1766,6 +1787,34 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -1793,6 +1814,34 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
public RayTraceResult rayTraceBlocks(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks);
|
||||
|
||||
@ -71,7 +71,7 @@ index 00fbc02a1751902edda327236e51a6991f5366f8..3abd62dc08e1edaeec6773819c872667
|
||||
/**
|
||||
* Performs a ray trace that checks for both block and entity collisions.
|
||||
* <p>
|
||||
@@ -1799,6 +1848,42 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -1826,6 +1875,42 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
public RayTraceResult rayTrace(@NotNull Location start, @NotNull Vector direction, double maxDistance, @NotNull FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks, double raySize, @Nullable Predicate<? super Entity> filter);
|
||||
|
||||
|
@ -9,10 +9,10 @@ By removing this check we avoid unnecessarily allocating useless `ItemMeta` obje
|
||||
This is a leftover from when checking for the item's durability was "free" because the durability was stored in the `ItemStack` itself, this [was changed in Minecraft 1.13](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/f8b2086d60942eb2cd7ac25a2a1408cb790c222c#src/main/java/org/bukkit/inventory/ItemStack.java).
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index e4dc17ec23d48591ff5742af5d23aa62bd9bfdbc..8975f6e8004d2ed65e20bb5b71bdbfa45713f78a 100644
|
||||
index a2deadbceaa74232a82daa5a3f42a81dc93ba670..f8573571cd256b9bf68e0e8c6fa523be5b46b83e 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -300,7 +300,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -307,7 +307,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return true;
|
||||
}
|
||||
Material comparisonType = (this.type.isLegacy()) ? Bukkit.getUnsafe().fromLegacy(this.getData(), true) : this.type; // This may be called from legacy item stacks, try to get the right material
|
||||
|
@ -27,7 +27,7 @@ index 6b68c92ec894451d99ded3e3df5965cb31d68ed2..fd5e433f930963c102c9c977523a0036
|
||||
public static final FeatureFlag UPDATE_121 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_21"));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index b9ba0f82814b61e7992526f0b5ce324ca69a0d71..7509b61dfdc0a6675256970cb850b08f9e814580 100644
|
||||
index 889f760e0c8de3f567d86936e6fc317a43993b10..762216a117145676d3df2b74036799b024461fb7 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -151,54 +151,67 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@ -936,10 +936,10 @@ index db7723e2907525850f8dbd2bd7150c1e47ebf1c8..9951cf6780ae47649625b8fe0ed72d87
|
||||
|
||||
private final String identifier;
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index de616cecaeb45018d96685c916532188e369bdd4..48a01a1eb80475adf9b181e9bd81535e9faec233 100644
|
||||
index f8d9fba8791303794ba3be6f42542c096222691d..7145fce635e542d5898576d815921d0b7105fee1 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -198,18 +198,21 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
@@ -199,18 +199,21 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
* Increases fall damage of maces
|
||||
*/
|
||||
@MinecraftExperimental(Requires.UPDATE_1_21)
|
||||
@ -1141,10 +1141,10 @@ index 1afa33ca0d900d9301d52ace3ddb0bd50b5ce4e8..c7100c2bc2be9e294957862d943e629a
|
||||
;
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
index e77cf365cefafbeba09123187e70fd5274f10d53..7a7b98d40a031b09d6bc62df32d2ddeb25a9d41e 100644
|
||||
index 10fa51d116b40450b51af9110d5637f3505ebf65..4716df59a46c2fb1d5108c7c2a11a3235d98db4e 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
@@ -192,31 +192,43 @@ public abstract class PotionEffectType implements Keyed, Translatable, net.kyori
|
||||
@@ -193,31 +193,43 @@ public abstract class PotionEffectType implements Keyed, Translatable, net.kyori
|
||||
/**
|
||||
* Causes trial spawners to become ominous.
|
||||
*/
|
||||
|
@ -31,10 +31,10 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..704dba92f9246ef398ed8d162ebee3cf
|
||||
@Override
|
||||
public @NotNull String translationKey() {
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index f301f81817409f0a6799885d4f0972ed9bf3e4df..88bb3b9ae99fae97ec21972b75ec43cb6b7b22b5 100644
|
||||
index 132d375de164e6d8df61234def650154c67fc0df..73edd472b62441670653eb7e3c90aa9667792df7 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -353,6 +353,49 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -354,6 +354,49 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@Nullable
|
||||
T get(@NotNull NamespacedKey key);
|
||||
|
||||
@ -84,7 +84,7 @@ index f301f81817409f0a6799885d4f0972ed9bf3e4df..88bb3b9ae99fae97ec21972b75ec43cb
|
||||
/**
|
||||
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
||||
*
|
||||
@@ -427,5 +470,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -428,5 +471,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
public Class<T> getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
@ -573,10 +573,10 @@ index 4eb639fbb46a0848be207149ea433455550fae1c..ef431219fd2bce48bad63b6b92c99d54
|
||||
+ // Paper end - lifecycle events
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
index 5cd236965de12392d8c7aa81307c0ff1cc8673b1..34037d3da2c536bac088e0ff629ee8f1daccc65b 100644
|
||||
index d359ea9b02952f981b9cf9d778c56eb995454c60..d5a3c3dce76c4ed0f1184ab5ba21db9c5f1c01ec 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPlugin.java
|
||||
@@ -47,6 +47,11 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -48,6 +48,11 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
private FileConfiguration newConfig = null;
|
||||
private File configFile = null;
|
||||
private Logger logger = null; // Paper - PluginLogger -> Logger
|
||||
@ -588,7 +588,7 @@ index 5cd236965de12392d8c7aa81307c0ff1cc8673b1..34037d3da2c536bac088e0ff629ee8f1
|
||||
|
||||
public JavaPlugin() {
|
||||
// Paper start
|
||||
@@ -278,7 +283,9 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -279,7 +284,9 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
isEnabled = enabled;
|
||||
|
||||
if (isEnabled) {
|
||||
@ -598,7 +598,7 @@ index 5cd236965de12392d8c7aa81307c0ff1cc8673b1..34037d3da2c536bac088e0ff629ee8f1
|
||||
} else {
|
||||
onDisable();
|
||||
}
|
||||
@@ -456,4 +463,11 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
@@ -457,4 +464,11 @@ public abstract class JavaPlugin extends PluginBase {
|
||||
}
|
||||
return plugin;
|
||||
}
|
||||
|
@ -119,10 +119,10 @@ index 3f1b48fd65df954e874e6dc6b9093cb12370e2c5..0e9ccfee7a03d341e7c4d271f53b4ed1
|
||||
+ @NotNull java.util.List<net.kyori.adventure.text.Component> computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 8975f6e8004d2ed65e20bb5b71bdbfa45713f78a..8db71bd075b8ece36c6f0dc0339841df9257038b 100644
|
||||
index f8573571cd256b9bf68e0e8c6fa523be5b46b83e..61de2daa17957079ccc3ae36d40745d6cb516d16 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -1027,4 +1027,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -1029,4 +1029,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
return type.isAir() || amount <= 0;
|
||||
}
|
||||
// Paper end
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add getChunkSnapshot includeLightData parameter
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chunk.java
|
||||
index 546888898d9d6827079fe041c7bc6eb4e1e4605c..d547ae2b20c58bc703de4532b3b591dd34ddb1c6 100644
|
||||
index c2eb2edd87b4087bfcdffd98f0f8904fbfd4e657..bc8b5bc17706250b8535b1b309134843d2ce2bb1 100644
|
||||
--- a/src/main/java/org/bukkit/Chunk.java
|
||||
+++ b/src/main/java/org/bukkit/Chunk.java
|
||||
@@ -102,6 +102,23 @@ public interface Chunk extends PersistentDataHolder {
|
||||
@@ -103,6 +103,23 @@ public interface Chunk extends PersistentDataHolder {
|
||||
@NotNull
|
||||
ChunkSnapshot getChunkSnapshot(boolean includeMaxblocky, boolean includeBiome, boolean includeBiomeTempRain);
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate ItemStack#setType
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 8db71bd075b8ece36c6f0dc0339841df9257038b..4818b4e6583414fa98194bb6f3c5dbd4bd95be3a 100644
|
||||
index 61de2daa17957079ccc3ae36d40745d6cb516d16..e0c5685356e4de53389e9cacad9514b58dceeaf2 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -136,8 +136,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -143,8 +143,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
* {@link Material#isItem()} returns false.</b>
|
||||
*
|
||||
* @param type New type to set the items in this stack to
|
||||
@ -27,7 +27,7 @@ index 8db71bd075b8ece36c6f0dc0339841df9257038b..4818b4e6583414fa98194bb6f3c5dbd4
|
||||
public void setType(@NotNull Material type) {
|
||||
Preconditions.checkArgument(type != null, "Material cannot be null");
|
||||
this.type = type;
|
||||
@@ -150,6 +160,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -157,6 +167,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
this.data = null;
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] API for checking sent chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index f08b1a2ec8815efcaaf1371e20eb1461a5f2d359..8a1e39474af88188f2e1765731b57d349f0ee645 100644
|
||||
index b824be639084e73d5150b35f29506bfed7af4642..c91dd7689e767a93946ec09f39731301d0e163cb 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3751,6 +3751,47 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3799,6 +3799,47 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
void resetIdleDuration();
|
||||
// Paper end
|
||||
|
||||
|
@ -39,10 +39,10 @@ index 983a8c20a06d2b509602b27f49c090598b8ecc42..fa98599e3eee37bf68f0e9813497c718
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index 0e3c7de14be8dc01199fd68b6bf41783c5c43ec3..97f97ea5c6aa513c439f86a9c82821e0f7d9cd1e 100644
|
||||
index c1f1faebc0d33710eb17dd96fddb16c85b7868e5..fdb87adfb8d6eff2bfabe7a41398c53d15d4cd98 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -4215,6 +4215,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -4242,6 +4242,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
public Raid locateNearestRaid(@NotNull Location location, int radius);
|
||||
|
||||
|
@ -9,7 +9,7 @@ this, adding the new flag if the itemstack is old and had the
|
||||
old flag.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemFlag.java b/src/main/java/org/bukkit/inventory/ItemFlag.java
|
||||
index a435f6c8947e4ac50b8c04f37b107055970937dd..92e30c281eab4801298b280bd388a0399212a0c1 100644
|
||||
index 5b8dac777bb1640dc00bbe98feb6460c36eebb98..1af15fd327e0613cd1a179bd7fef1e83cbe31761 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemFlag.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemFlag.java
|
||||
@@ -2,6 +2,8 @@ package org.bukkit.inventory;
|
||||
@ -47,10 +47,10 @@ index a435f6c8947e4ac50b8c04f37b107055970937dd..92e30c281eab4801298b280bd388a039
|
||||
/**
|
||||
* Setting to show/hide item-specific information, including, but not limited to:
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 4818b4e6583414fa98194bb6f3c5dbd4bd95be3a..c64413a6740b604282984dea2a8430a6e7478d68 100644
|
||||
index e0c5685356e4de53389e9cacad9514b58dceeaf2..40cde68c7b73a0a92e2a96667a90138d67ce66ff 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -581,6 +581,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@@ -588,6 +588,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
Object raw = args.get("meta");
|
||||
if (raw instanceof ItemMeta) {
|
||||
((ItemMeta) raw).setVersion(version);
|
||||
|
@ -1900,10 +1900,10 @@ index 9d4f553c04784cca63901a56a7aea62a5cae1d72..abe256e1e45ce28036da4aa1586715bc
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index ac9a28922f8a556944a4c3649d74c32c622f0cb0..c3a9cf65db73ed534bf20996c7f05b5eb0aaebe1 100644
|
||||
index b5f9cd2bd191f8b071c6c95706ddbef97d3c244e..5df19bd701c67506689fc7f49d91f99ebfbc83f0 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -22,10 +22,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -23,10 +23,14 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public class SimpleCommandMap implements CommandMap {
|
||||
@ -1920,7 +1920,7 @@ index ac9a28922f8a556944a4c3649d74c32c622f0cb0..c3a9cf65db73ed534bf20996c7f05b5e
|
||||
this.server = server;
|
||||
setDefaultCommands();
|
||||
}
|
||||
@@ -102,7 +106,10 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -103,7 +107,10 @@ public class SimpleCommandMap implements CommandMap {
|
||||
*/
|
||||
private synchronized boolean register(@NotNull String label, @NotNull Command command, boolean isAlias, @NotNull String fallbackPrefix) {
|
||||
knownCommands.put(fallbackPrefix + ":" + label, command);
|
||||
@ -1932,7 +1932,7 @@ index ac9a28922f8a556944a4c3649d74c32c622f0cb0..c3a9cf65db73ed534bf20996c7f05b5e
|
||||
// Request is for an alias/fallback command and it conflicts with
|
||||
// a existing command or previous alias ignore it
|
||||
// Note: This will mean it gets removed from the commands list of active aliases
|
||||
@@ -114,7 +121,9 @@ public class SimpleCommandMap implements CommandMap {
|
||||
@@ -115,7 +122,9 @@ public class SimpleCommandMap implements CommandMap {
|
||||
// If the command exists but is an alias we overwrite it, otherwise we return
|
||||
Command conflict = knownCommands.get(label);
|
||||
if (conflict != null && conflict.getLabel().equals(label)) {
|
||||
|
@ -126,10 +126,10 @@ index 39f9766a03d420340d79841197f75c8b1dd49f4a..4e59f5176fd6cf92457ad750081c253a
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/RecipeChoice.java b/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..1cd6601c9d2e86ef850011fcb9e59811207b4af7 100644
|
||||
index 91bfeffcdbe47208c7d0ddbe013cd0f11fddfa32..e7796054f3f65f5bea7f93c75320195f6c2f0561 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/RecipeChoice.java
|
||||
@@ -19,6 +19,19 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -22,6 +22,19 @@ import org.jetbrains.annotations.NotNull;
|
||||
*/
|
||||
public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
|
||||
@ -149,7 +149,7 @@ index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..1cd6601c9d2e86ef850011fcb9e59811
|
||||
/**
|
||||
* Gets a single item stack representative of this stack choice.
|
||||
*
|
||||
@@ -35,6 +48,13 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -38,6 +51,13 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@Override
|
||||
boolean test(@NotNull ItemStack itemStack);
|
||||
|
||||
@ -163,7 +163,7 @@ index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..1cd6601c9d2e86ef850011fcb9e59811
|
||||
/**
|
||||
* Represents a choice of multiple matching Materials.
|
||||
*/
|
||||
@@ -141,6 +161,16 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -152,6 +172,16 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
public String toString() {
|
||||
return "MaterialChoice{" + "choices=" + choices + '}';
|
||||
}
|
||||
@ -180,7 +180,7 @@ index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..1cd6601c9d2e86ef850011fcb9e59811
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -185,7 +215,12 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -197,7 +227,12 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
public ExactChoice clone() {
|
||||
try {
|
||||
ExactChoice clone = (ExactChoice) super.clone();
|
||||
@ -194,7 +194,7 @@ index db8bcc66bdc4bedfffb4705db6338eda4c0ad29a..1cd6601c9d2e86ef850011fcb9e59811
|
||||
return clone;
|
||||
} catch (CloneNotSupportedException ex) {
|
||||
throw new AssertionError(ex);
|
||||
@@ -232,5 +267,15 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
@@ -244,5 +279,15 @@ public interface RecipeChoice extends Predicate<ItemStack>, Cloneable {
|
||||
public String toString() {
|
||||
return "ExactChoice{" + "choices=" + choices + '}';
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix equipment slot and group API
|
||||
was missing the 'body' slot group
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/attribute/AttributeModifier.java b/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
index 8ba00f743b61cd33dd41ae7f1c272ee2b0c8546d..7cc1fd241e1f62a9fe9b5849110c0a3d05d08034 100644
|
||||
index 9b47cbb93399a22301ec643e4be8f173314c455e..097396166b94ec7c9581a7b2f4ef644f95708671 100644
|
||||
--- a/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
+++ b/src/main/java/org/bukkit/attribute/AttributeModifier.java
|
||||
@@ -95,6 +95,7 @@ public class AttributeModifier implements ConfigurationSerializable {
|
||||
@@ -96,6 +96,7 @@ public class AttributeModifier implements ConfigurationSerializable {
|
||||
*/
|
||||
@Nullable
|
||||
@Deprecated
|
||||
@ -48,10 +48,10 @@ index 1b34286fb6cbedb3841c84c499eb626f61885126..0829418cc4b586ea9c800617f7184b1e
|
||||
@NotNull
|
||||
public ItemStack getItem(@NotNull EquipmentSlot slot);
|
||||
diff --git a/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java b/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java
|
||||
index 82416a078f697f627916c578e6c2dbc003519acf..f72aa9cfd2d1472cf26600ac0f2380660069407d 100644
|
||||
index 0019c8d91eefbfb44e76b9f929b25cd189295b79..5ce9da41ac4967f036e376fa270d4065b3d2e5d5 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/EquipmentSlotGroup.java
|
||||
@@ -25,6 +25,7 @@ public final class EquipmentSlotGroup implements Predicate<EquipmentSlot> {
|
||||
@@ -26,6 +26,7 @@ public final class EquipmentSlotGroup implements Predicate<EquipmentSlot> {
|
||||
public static final EquipmentSlotGroup CHEST = get("chest", EquipmentSlot.CHEST);
|
||||
public static final EquipmentSlotGroup HEAD = get("head", EquipmentSlot.HEAD);
|
||||
public static final EquipmentSlotGroup ARMOR = get("armor", (test) -> test == EquipmentSlot.FEET || test == EquipmentSlot.LEGS || test == EquipmentSlot.CHEST || test == EquipmentSlot.HEAD, EquipmentSlot.CHEST);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow Bukkit plugin to use Paper PluginLoader API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
index c0691a849831f99268fdcb7b0f471f80a1a2a70e..8f45caade7357bc55c6a90cfe0c3a2feb2d877ff 100644
|
||||
index c5465431ce35d264d8510af45e73d058b333c60b..a857e46fa6f0c212db93193e1fdd8b0ea9c33c38 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
|
||||
@@ -259,6 +259,13 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
|
||||
@@ -260,6 +260,13 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
|
||||
private Set<PluginAwareness> awareness = ImmutableSet.of();
|
||||
private String apiVersion = null;
|
||||
private List<String> libraries = ImmutableList.of();
|
||||
@ -22,7 +22,7 @@ index c0691a849831f99268fdcb7b0f471f80a1a2a70e..8f45caade7357bc55c6a90cfe0c3a2fe
|
||||
// Paper start - oh my goddddd
|
||||
/**
|
||||
* Don't use this.
|
||||
@@ -1232,6 +1239,23 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
|
||||
@@ -1233,6 +1240,23 @@ public final class PluginDescriptionFile implements io.papermc.paper.plugin.conf
|
||||
} else {
|
||||
libraries = ImmutableList.<String>of();
|
||||
}
|
||||
|
@ -172,10 +172,10 @@ index 5818bfa69a8573a2a8f350066f829d587cbc546b..8e421a1bee0c526e3024eab9ba4cc0b3
|
||||
|
||||
assertNotNull(bukkit, "Bukkit gene null for " + gene);
|
||||
diff --git a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
index f3de891458ea190e1d608511b5984ca25b06b74c..1b1e55f70b3c9f922bd1cc63209816f50d7d29d1 100644
|
||||
index 6c84f1289c84d0aca1935c473ffa63dae1b52598..ebcb65cb74acdb9d1bcf2b4b3551a2dc6d809bc9 100644
|
||||
--- a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
+++ b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
@@ -28,17 +28,17 @@ public class RegistryConstantsTest extends AbstractTestingBase {
|
||||
@@ -29,17 +29,17 @@ public class RegistryConstantsTest extends AbstractTestingBase {
|
||||
|
||||
@Test
|
||||
public void testTrimMaterial() {
|
||||
@ -197,7 +197,7 @@ index f3de891458ea190e1d608511b5984ca25b06b74c..1b1e55f70b3c9f922bd1cc63209816f5
|
||||
|
||||
for (Field field : clazz.getFields()) {
|
||||
diff --git a/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java b/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
|
||||
index 7d332ecf7905f71de106fe0e5fb4cc3e16bd6035..d7ef3a9a545d5278832b864bca683796b1fd0d42 100644
|
||||
index 31062b6d9ad685ea3750c6b5ddc6b295bb263e0a..5842cb5a6f3da42b8c40e6cbd5c5366572bf7684 100644
|
||||
--- a/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
|
||||
+++ b/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
|
||||
@@ -24,7 +24,7 @@ public class RegistryLoadOrderTest extends AbstractTestingBase {
|
||||
|
@ -131,7 +131,7 @@ index a5e8713bc0fefae455b666ebf13c9529e7ba94e6..1a528e1aa7b12f8b8cffce6c7bc4b5d5
|
||||
|
||||
public static PackRepository createPackRepository(Path dataPacksPath, DirectoryValidator symlinkFinder) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 5595eb892fa868508c45448942da65d7c11d49fd..4b8602b168f9dd386aa72b4e5d189c441c93542e 100644
|
||||
index 029783f07da0a8d91c2e443f76359b89869bc4cc..bebc3bcffa6dc12d4caf613f05b1e2a28a26f316 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -210,7 +210,7 @@ public class Main {
|
||||
@ -142,7 +142,7 @@ index 5595eb892fa868508c45448942da65d7c11d49fd..4b8602b168f9dd386aa72b4e5d189c44
|
||||
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
|
||||
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
|
@ -338,10 +338,10 @@ index 0000000000000000000000000000000000000000..6cbf11c898439834cffb99ef84e5df14
|
||||
+ String[] value() default {};
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
index 1b1e55f70b3c9f922bd1cc63209816f50d7d29d1..c75cfdfc3dc07b922d8943b67a59cfffbbb9a214 100644
|
||||
index ebcb65cb74acdb9d1bcf2b4b3551a2dc6d809bc9..7d9dbed7281099b78d7f898885b37cdcfe8b099f 100644
|
||||
--- a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
+++ b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
@@ -23,7 +23,7 @@ public class RegistryConstantsTest extends AbstractTestingBase {
|
||||
@@ -24,7 +24,7 @@ public class RegistryConstantsTest extends AbstractTestingBase {
|
||||
@Test
|
||||
public void testDamageType() {
|
||||
this.testExcessConstants(DamageType.class, Registry.DAMAGE_TYPE);
|
||||
@ -351,7 +351,7 @@ index 1b1e55f70b3c9f922bd1cc63209816f50d7d29d1..c75cfdfc3dc07b922d8943b67a59cfff
|
||||
|
||||
@Test
|
||||
diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
index ee0cff84379bc0539b2c611a4904aff9f5843814..02a8e6b45bf304b6e0f88043a25188aa16b3d6bf 100644
|
||||
index 4153866f3e630e54a23dc085aaac5e804344aa43..b8fe92fc75c611ee1efb82a8ab7089f28bf338ea 100644
|
||||
--- a/src/test/java/org/bukkit/support/DummyServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
@@ -50,6 +50,15 @@ public final class DummyServer {
|
||||
|
@ -3641,7 +3641,7 @@ index 0000000000000000000000000000000000000000..6cdc40cb4a5f94654c874f9dbdb106fa
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/transformation/world/LegacyPaperWorldConfig.java b/src/main/java/io/papermc/paper/configuration/transformation/world/LegacyPaperWorldConfig.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..edaa6ef28c1f9a2239439698708897008fea2f7e
|
||||
index 0000000000000000000000000000000000000000..f7520ba86c1a650d3bd9b902d2a59ec8eb6cde5d
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/transformation/world/LegacyPaperWorldConfig.java
|
||||
@@ -0,0 +1,322 @@
|
||||
@ -3752,7 +3752,7 @@ index 0000000000000000000000000000000000000000..edaa6ef28c1f9a223943969870889700
|
||||
+ )
|
||||
+ .addVersion(26, ConfigurationTransformation.builder().addAction(path("alt-item-despawn-rate", "items", ConfigurationTransformation.WILDCARD_OBJECT), (path, value) -> {
|
||||
+ String itemName = path.get(path.size() - 1).toString();
|
||||
+ final Optional<Holder.Reference<Item>> item = BuiltInRegistries.ITEM.getHolder(ResourceKey.create(Registries.ITEM, new ResourceLocation(itemName.toLowerCase(Locale.ENGLISH))));
|
||||
+ final Optional<Holder.Reference<Item>> item = BuiltInRegistries.ITEM.getHolder(ResourceKey.create(Registries.ITEM, new ResourceLocation(itemName.toLowerCase(Locale.ROOT))));
|
||||
+ if (item.isEmpty()) {
|
||||
+ itemName = Material.valueOf(itemName).getKey().getKey();
|
||||
+ }
|
||||
@ -3784,7 +3784,7 @@ index 0000000000000000000000000000000000000000..edaa6ef28c1f9a223943969870889700
|
||||
+ Map<String, Integer> rebuild = new HashMap<>();
|
||||
+ value.childrenMap().forEach((key, node) -> {
|
||||
+ String itemName = key.toString();
|
||||
+ final Optional<Holder.Reference<Item>> itemHolder = BuiltInRegistries.ITEM.getHolder(ResourceKey.create(Registries.ITEM, new ResourceLocation(itemName.toLowerCase(Locale.ENGLISH))));
|
||||
+ final Optional<Holder.Reference<Item>> itemHolder = BuiltInRegistries.ITEM.getHolder(ResourceKey.create(Registries.ITEM, new ResourceLocation(itemName.toLowerCase(Locale.ROOT))));
|
||||
+ final @Nullable String item;
|
||||
+ if (itemHolder.isEmpty()) {
|
||||
+ final @Nullable Material bukkitMat = Material.matchMaterial(itemName);
|
||||
@ -4116,7 +4116,7 @@ index 0000000000000000000000000000000000000000..d872b1948df52759fed9c3d892aed6ab
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/type/BooleanOrDefault.java b/src/main/java/io/papermc/paper/configuration/type/BooleanOrDefault.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5f03dcdff99bcd33bf789b0dd5521e39afbe09bf
|
||||
index 0000000000000000000000000000000000000000..a3eaa47cfcfc4fd2a607f9b375230fada35620d3
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/type/BooleanOrDefault.java
|
||||
@@ -0,0 +1,53 @@
|
||||
@ -4152,7 +4152,7 @@ index 0000000000000000000000000000000000000000..5f03dcdff99bcd33bf789b0dd5521e39
|
||||
+ return USE_DEFAULT;
|
||||
+ }
|
||||
+ try {
|
||||
+ return new BooleanOrDefault(BooleanUtils.toBoolean(string.toLowerCase(Locale.ENGLISH), "true", "false"));
|
||||
+ return new BooleanOrDefault(BooleanUtils.toBoolean(string.toLowerCase(Locale.ROOT), "true", "false"));
|
||||
+ } catch (IllegalArgumentException ex) {
|
||||
+ throw new SerializationException(BooleanOrDefault.class, obj + "(" + type + ") is not a boolean or '" + DEFAULT_VALUE + "'", ex);
|
||||
+ }
|
||||
@ -4911,7 +4911,7 @@ index b334265d4015fec13d7fedbffba2b6c22f4c8bc8..5b4ac7b4fd0077e900e9f788963f1613
|
||||
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
|
||||
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a6d495371a35195d6f841124329188107af1736f..1d241972e6f93a88c31f1276e15bae0912db5c9e 100644
|
||||
index 4506669b1e970daa78974d22349e5dc38cf31c5e..c2c20eb7fedbadc56b1f8ee8bf4b03092e62a26b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -302,6 +302,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -5039,10 +5039,10 @@ index ecbb926986bbc0ad6fe108b782cdc17ee8a9f035..b06ffa8d5953c8f0a47daf056495cd42
|
||||
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3d80f58524861ad808caa35964676f0561b25547..e51e40910c51ab5cdc599e614d2b3fa813691f10 100644
|
||||
index 5b40c1198f4bbe84c5e1b45b32cce5c451fc28aa..4a4f7af9c7377e79a20398310ef7cf719d3cc0b5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -928,6 +928,7 @@ public final class CraftServer implements Server {
|
||||
@@ -951,6 +951,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||
@ -5051,7 +5051,7 @@ index 3d80f58524861ad808caa35964676f0561b25547..e51e40910c51ab5cdc599e614d2b3fa8
|
||||
world.serverLevelData.setDifficulty(config.difficulty);
|
||||
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 4b8602b168f9dd386aa72b4e5d189c441c93542e..1e3ca7ca98abfd5be233a7eeb6dad201776d2d6a 100644
|
||||
index bebc3bcffa6dc12d4caf613f05b1e2a28a26f316..bbc880e136c8fba9634fd4fee9e3e6838ef3f377 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -142,6 +142,19 @@ public class Main {
|
||||
@ -5088,7 +5088,7 @@ index 9658f2961d9b5632ad1abdba26a2443642624f69..38219af7d0ba2d871711102b6a29139a
|
||||
for ( Method method : clazz.getDeclaredMethods() )
|
||||
{
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 974e679ff20193f85fccb6e779a7ba791d0c5db4..8491ff48051224204b58d273c4971d16ab8867c1 100644
|
||||
index a6d2ce801b236b046b94913bccf7eccfc561f35a..b244b65799d9c082b8b1639bad15727442e63168 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -58,8 +58,14 @@ public class SpigotWorldConfig
|
||||
|
@ -68,10 +68,10 @@ index 9b90649f71849b3830ca9b6a3c5a722c66b02f1f..209c6b64e79c29ea3bb84ddbe89a8bff
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e51e40910c51ab5cdc599e614d2b3fa813691f10..ca10f5f6fa70b2e3f4f09a132c91df331a1de559 100644
|
||||
index 4a4f7af9c7377e79a20398310ef7cf719d3cc0b5..10549f2f4d6ae01c080cdba16c71656b764314c3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2483,7 +2483,13 @@ public final class CraftServer implements Server {
|
||||
@@ -2506,7 +2506,13 @@ public final class CraftServer implements Server {
|
||||
Preconditions.checkArgument(key != null, "NamespacedKey key cannot be null");
|
||||
|
||||
ReloadableServerRegistries.Holder registry = this.getServer().reloadableRegistries();
|
||||
@ -87,7 +87,7 @@ index e51e40910c51ab5cdc599e614d2b3fa813691f10..ca10f5f6fa70b2e3f4f09a132c91df33
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 1e3ca7ca98abfd5be233a7eeb6dad201776d2d6a..9ec50bbb262b25fea157ae48e8395f5cd38f8906 100644
|
||||
index bbc880e136c8fba9634fd4fee9e3e6838ef3f377..e5f070de12b63487b71c54d8020a895e5eda862c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -123,6 +123,7 @@ public class Main {
|
||||
@ -119,10 +119,10 @@ index 905adf97c0d1f0d1c774a6835a5dffcfea884e58..c017ce2ca1bc535795c958a2e509af2a
|
||||
public class CraftScheduler implements BukkitScheduler {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 2166c420c47778caadf8f3140bbe3aebe06e130f..3b010825028f142c58fad40802c40df62486e903 100644
|
||||
index 8021fa01542a5dd203a834e88e286903093690cd..3879f1f69e13f4e90bd66c533bf76b257f041394 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -243,7 +243,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -244,7 +244,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
try {
|
||||
nmsStack.applyComponents(new ItemParser(Commands.createValidationContext(MinecraftServer.getDefaultRegistryAccess())).parse(new StringReader(arguments)).components());
|
||||
} catch (CommandSyntaxException ex) {
|
||||
|
@ -6074,7 +6074,7 @@ index 3e5a85a7ad6149b04622c254fbc2e174896a4128..3f662692ed4846e026a9d48595e7b3b2
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9efd8dc1c35dc0a13f5ff3f097386e6e768b3bc0..977275f767c374a1be9055e4aa9e124025d55828 100644
|
||||
index 925c2c83191bdb70b0d14a6177183e4d9a190a97..da3cc749b3b1f3738e7e7cd77fb0b0fd6eea0b0b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -303,6 +303,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -6673,7 +6673,7 @@ index 7a604df2cec802f7da78935647990fe8b575307b..e8640bcbc1d4e2965049974385585f50
|
||||
|
||||
while (objectiterator.hasNext()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 8661ed9962d07fb40390faf7f186b9cd8ce6bc62..23c39b78486b018e222af489c8edbf4e749abff6 100644
|
||||
index 87e76f3c9f5185ee15a80eed37f72b0f376b00e5..712670230b6b881101b4128c1d275f2559fa705a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -47,6 +47,7 @@ import net.minecraft.world.level.storage.LevelStorageSource;
|
||||
@ -7061,7 +7061,7 @@ index b64ec67ebd3b30d29cca36086a7aa70a6dd1fac3..cc3304e2ea7f58b4649da09b68ac3749
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index d5c3ebe351803c3dd24f0667aa87e13c6b420080..d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f 100644
|
||||
index 20ad73994af8e4a25a60662a7ccb549d5704fab3..a3ebdbb231fb7bc6ed24747105ef02bb0ea9770e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -270,6 +270,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@ -7073,7 +7073,7 @@ index d5c3ebe351803c3dd24f0667aa87e13c6b420080..d2f75ced3ad4ccb9d1d44307bfc98e69
|
||||
@Override
|
||||
public float getBukkitYaw() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 04d9e3aced11c54b8f464ae7faba1b4aaf81e093..39e71ff8528622f640950d1a9b33483a7eb68957 100644
|
||||
index 1e599ab9c9576a42b32533abbd021f32223e53a2..d615649c67b54cfd1cb083e3ddb9719255e90bc7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -287,6 +287,8 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
|
||||
@ -7111,7 +7111,7 @@ index f73604d762efbac400d40f536ec1782fca584efa..4701bf9ee203f2f15b0b68e84bbfa2c4
|
||||
super(type, world);
|
||||
this.xpReward = 5;
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 7442e2b880f6410d3ca57a563f3ad77158a4c8ba..bf19e8e8aa96d646f057b8727f2f01ad2e2497cd 100644
|
||||
index 12516ac7c18a90d12e0d9ec90448ebb64a468766..d7f427bf5c84d1bb405e4aaf16e3a8f1fed5ad79 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -952,6 +952,25 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@ -7751,10 +7751,10 @@ index 34933c5324126f9afdc5cba9dea997ace8f01806..219062cff8a05c765b092f1525043d9d
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ca10f5f6fa70b2e3f4f09a132c91df331a1de559..4cc75d39dd1104805e96c1d442400f2c18a7af2a 100644
|
||||
index 10549f2f4d6ae01c080cdba16c71656b764314c3..69d27337f13ca85ba74d611a0ca635c8af1d694e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2562,4 +2562,9 @@ public final class CraftServer implements Server {
|
||||
@@ -2585,4 +2585,9 @@ public final class CraftServer implements Server {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -7765,7 +7765,7 @@ index ca10f5f6fa70b2e3f4f09a132c91df331a1de559..4cc75d39dd1104805e96c1d442400f2c
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index fb8243b6202374b5a1b5197a6b7984e1cfb60500..6ce2b09c4bb7153c960a7eed865296a9c93dd1cb 100644
|
||||
index 25787af664c6bb0c28a53265e308e3bf7a78ec8d..bd32f4e6ab8c41404ebcc8ef3b448c71db7b0650 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -252,8 +252,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -7788,7 +7788,7 @@ index fb8243b6202374b5a1b5197a6b7984e1cfb60500..6ce2b09c4bb7153c960a7eed865296a9
|
||||
if (playerChunk == null) return false;
|
||||
|
||||
playerChunk.getTickingChunkFuture().thenAccept(either -> {
|
||||
@@ -2075,4 +2075,55 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2100,4 +2100,55 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -7845,10 +7845,10 @@ index fb8243b6202374b5a1b5197a6b7984e1cfb60500..6ce2b09c4bb7153c960a7eed865296a9
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index b6072ff647cf9d823924afb02759ab39f37b3e4f..654d4994bb2e65c5ca6b7190c15d2113eede9e5b 100644
|
||||
index 99a16850b1cb0d66092524e04727874524b7ec03..1c0b19a8d7ce31802436bd5f0910f4fba8a391b7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2397,4 +2397,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2406,4 +2406,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -7884,7 +7884,7 @@ index b6072ff647cf9d823924afb02759ab39f37b3e4f..654d4994bb2e65c5ca6b7190c15d2113
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 39803e02ff5fcca8c9ce07aae890ab7095656370..b6521462d193bff83ace1dc694c6d957a7173969 100644
|
||||
index 93dc507732395332adc462cb133f2ba5053edf8f..f44502a51c9fb393746e866e1a93ae9cedc2b656 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -22,6 +22,20 @@ import org.bukkit.material.MaterialData;
|
||||
@ -8131,10 +8131,10 @@ index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 2166c420c47778caadf8f3140bbe3aebe06e130f..8a13d8ae4325854acb3be7083d022c08ba094df1 100644
|
||||
index 3879f1f69e13f4e90bd66c533bf76b257f041394..8a5d5d3bccc974feea09119eb90732934c8ae6a1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -109,8 +109,17 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -110,8 +110,17 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
private static final Map<Item, Material> ITEM_MATERIAL = new HashMap<>();
|
||||
private static final Map<Material, Item> MATERIAL_ITEM = new HashMap<>();
|
||||
private static final Map<Material, Block> MATERIAL_BLOCK = new HashMap<>();
|
||||
@ -8152,7 +8152,7 @@ index 2166c420c47778caadf8f3140bbe3aebe06e130f..8a13d8ae4325854acb3be7083d022c08
|
||||
for (Block block : BuiltInRegistries.BLOCK) {
|
||||
BLOCK_MATERIAL.put(block, Material.getMaterial(BuiltInRegistries.BLOCK.getKey(block).getPath().toUpperCase(Locale.ROOT)));
|
||||
}
|
||||
@@ -161,6 +170,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -162,6 +171,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
public static ResourceLocation key(Material mat) {
|
||||
return CraftNamespacedKey.toMinecraft(mat.getKey());
|
||||
}
|
||||
|
@ -2596,7 +2596,7 @@ index bb97fdb9aa6167083442a928276ebe4225a586ef..5d1758086ed4fce5b36a5b31df44ccea
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 977275f767c374a1be9055e4aa9e124025d55828..953e28f0cf60412a4ec9e311daa98f9d3cadea85 100644
|
||||
index da3cc749b3b1f3738e7e7cd77fb0b0fd6eea0b0b..84ad6aae39b5fe4c4ad5ec08890d4383829cbe50 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -195,6 +195,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
@ -3249,7 +3249,7 @@ index ed54c81a3269360acce674aa4e1d54ccb2461841..c9c849534c3998cfcab7ddcb12a71ccb
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index bf19e8e8aa96d646f057b8727f2f01ad2e2497cd..d6b02a946bd18ea71278a5026468ec49fabd3a3b 100644
|
||||
index d7f427bf5c84d1bb405e4aaf16e3a8f1fed5ad79..e65a5abfaac1f68bbefe0b7f3877823a548d56cc 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -186,7 +186,15 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@ -3322,10 +3322,10 @@ index 3db3c6858d98d2eaf7c9bd8d395b83b22c447bb9..d42d39dff5aeb91c5b1e6a7fb967ce70
|
||||
}
|
||||
collection = icons;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4cc75d39dd1104805e96c1d442400f2c18a7af2a..a5c420721cd1905bb0d00f9e1e40e4fbdf98cce6 100644
|
||||
index 69d27337f13ca85ba74d611a0ca635c8af1d694e..beff0bfe2502a17fd297524c51f96b33f889db93 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -611,8 +611,10 @@ public final class CraftServer implements Server {
|
||||
@@ -633,8 +633,10 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -3336,7 +3336,7 @@ index 4cc75d39dd1104805e96c1d442400f2c18a7af2a..a5c420721cd1905bb0d00f9e1e40e4fb
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1587,7 +1589,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1610,7 +1612,15 @@ public final class CraftServer implements Server {
|
||||
return this.configuration.getInt("settings.spawn-radius", -1);
|
||||
}
|
||||
|
||||
@ -3352,7 +3352,7 @@ index 4cc75d39dd1104805e96c1d442400f2c18a7af2a..a5c420721cd1905bb0d00f9e1e40e4fb
|
||||
public String getShutdownMessage() {
|
||||
return this.configuration.getString("settings.shutdown-message");
|
||||
}
|
||||
@@ -1761,7 +1771,20 @@ public final class CraftServer implements Server {
|
||||
@@ -1784,7 +1794,20 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -3373,7 +3373,7 @@ index 4cc75d39dd1104805e96c1d442400f2c18a7af2a..a5c420721cd1905bb0d00f9e1e40e4fb
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
||||
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
|
||||
@@ -1769,14 +1792,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1792,14 +1815,14 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
|
||||
@ -3390,7 +3390,7 @@ index 4cc75d39dd1104805e96c1d442400f2c18a7af2a..a5c420721cd1905bb0d00f9e1e40e4fb
|
||||
|
||||
for (CommandSender recipient : recipients) {
|
||||
recipient.sendMessage(message);
|
||||
@@ -2038,6 +2061,14 @@ public final class CraftServer implements Server {
|
||||
@@ -2061,6 +2084,14 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
|
||||
}
|
||||
|
||||
@ -3405,7 +3405,7 @@ index 4cc75d39dd1104805e96c1d442400f2c18a7af2a..a5c420721cd1905bb0d00f9e1e40e4fb
|
||||
@Override
|
||||
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
|
||||
Preconditions.checkArgument(type != null, "InventoryType cannot be null");
|
||||
@@ -2052,13 +2083,28 @@ public final class CraftServer implements Server {
|
||||
@@ -2075,13 +2106,28 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
||||
}
|
||||
|
||||
@ -3434,7 +3434,7 @@ index 4cc75d39dd1104805e96c1d442400f2c18a7af2a..a5c420721cd1905bb0d00f9e1e40e4fb
|
||||
public Merchant createMerchant(String title) {
|
||||
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
|
||||
}
|
||||
@@ -2123,6 +2169,17 @@ public final class CraftServer implements Server {
|
||||
@@ -2146,6 +2192,17 @@ public final class CraftServer implements Server {
|
||||
return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
|
||||
}
|
||||
|
||||
@ -3452,7 +3452,7 @@ index 4cc75d39dd1104805e96c1d442400f2c18a7af2a..a5c420721cd1905bb0d00f9e1e40e4fb
|
||||
@Override
|
||||
public String getMotd() {
|
||||
return this.console.getMotd();
|
||||
@@ -2567,4 +2624,57 @@ public final class CraftServer implements Server {
|
||||
@@ -2590,4 +2647,57 @@ public final class CraftServer implements Server {
|
||||
public double[] getTPS() {
|
||||
return new double[]{0, 0, 0}; // TODO
|
||||
}
|
||||
@ -3511,7 +3511,7 @@ index 4cc75d39dd1104805e96c1d442400f2c18a7af2a..a5c420721cd1905bb0d00f9e1e40e4fb
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 6ce2b09c4bb7153c960a7eed865296a9c93dd1cb..5bbbb9ee266879291e4ff56ad2ee39aa6151bfff 100644
|
||||
index bd32f4e6ab8c41404ebcc8ef3b448c71db7b0650..ee5b61c476abc1f9a2babf350ac9dfa45b2c3253 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -162,6 +162,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -3522,7 +3522,7 @@ index 6ce2b09c4bb7153c960a7eed865296a9c93dd1cb..5bbbb9ee266879291e4ff56ad2ee39aa
|
||||
|
||||
private static final Random rand = new Random();
|
||||
|
||||
@@ -1684,6 +1685,42 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -1709,6 +1710,42 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
entityTracker.broadcastAndSend(packet);
|
||||
}
|
||||
}
|
||||
@ -3565,7 +3565,7 @@ index 6ce2b09c4bb7153c960a7eed865296a9c93dd1cb..5bbbb9ee266879291e4ff56ad2ee39aa
|
||||
|
||||
private static Map<String, GameRules.Key<?>> gamerules;
|
||||
public static synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() {
|
||||
@@ -2125,5 +2162,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -2150,5 +2187,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
public void setSendViewDistance(final int viewDistance) {
|
||||
throw new UnsupportedOperationException("Not implemented yet");
|
||||
}
|
||||
@ -3585,7 +3585,7 @@ index 6ce2b09c4bb7153c960a7eed865296a9c93dd1cb..5bbbb9ee266879291e4ff56ad2ee39aa
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 9ec50bbb262b25fea157ae48e8395f5cd38f8906..985b77911d03bc60a0210b796e901f31e2676268 100644
|
||||
index e5f070de12b63487b71c54d8020a895e5eda862c..73c44f94aac069fa3ea9e82be6b95e77a2421c63 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -20,6 +20,12 @@ public class Main {
|
||||
@ -4105,7 +4105,7 @@ index 55945b83a5426b352bad9507cc9e94afb1278032..9ea1537408ff2d790747b6e5a681d917
|
||||
public boolean isOp() {
|
||||
return true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 654d4994bb2e65c5ca6b7190c15d2113eede9e5b..4d1e8a9211462444543b4a16cefe369245e71b2f 100644
|
||||
index 1c0b19a8d7ce31802436bd5f0910f4fba8a391b7..e59f2ae85126061ee35812eaa02a35ddb4a9eb66 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -386,14 +386,40 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -4349,7 +4349,7 @@ index 654d4994bb2e65c5ca6b7190c15d2113eede9e5b..4d1e8a9211462444543b4a16cefe3692
|
||||
@Override
|
||||
public void removeResourcePack(UUID id) {
|
||||
Preconditions.checkArgument(id != null, "Resource pack id cannot be null");
|
||||
@@ -2265,6 +2386,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2274,6 +2395,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return (this.getHandle().requestedViewDistance() == 0) ? Bukkit.getViewDistance() : this.getHandle().requestedViewDistance();
|
||||
}
|
||||
|
||||
@ -4362,7 +4362,7 @@ index 654d4994bb2e65c5ca6b7190c15d2113eede9e5b..4d1e8a9211462444543b4a16cefe3692
|
||||
@Override
|
||||
public int getPing() {
|
||||
return this.getHandle().connection.latency();
|
||||
@@ -2315,6 +2442,248 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2324,6 +2451,248 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this.getHandle().allowsListing();
|
||||
}
|
||||
|
||||
@ -4778,10 +4778,10 @@ index 4dd9a80af9901287ab6740b072f2b89678c3d0cb..b2586684295b295a3196a2a9cf724cec
|
||||
public String getTitle() {
|
||||
return this.title;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
index 01963ef944da9251c038208c20012939afc77830..319ad3342740657175ad78a1c1cc383046fe2fb5 100644
|
||||
index efbef9a72e1ee7c4928ffc9e3a818dbbca6aa002..e8dd4ba93c09c514f3594f0d4b5f1167b719a17d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||
@@ -501,4 +501,21 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
@@ -499,4 +499,21 @@ public final class CraftItemFactory implements ItemFactory {
|
||||
CraftItemStack craft = (CraftItemStack) itemStack;
|
||||
return CraftItemStack.asCraftMirror(EnchantmentHelper.enchantItem(MinecraftServer.getServer().getWorldData().enabledFeatures(), source, craft.handle, level, allowTreasures));
|
||||
}
|
||||
@ -5135,11 +5135,11 @@ index 2e6f0a0f4bbe4ae3c7c85e679f6187e89d1298ff..c7360e2b2d6e50abc371c21b09cdadd6
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 78653e2b669bee1f46fc9e8c4485ae4936244db7..8be2184fc6d04a722fd9fb27549ec8df906a12ee 100644
|
||||
index c33161090f6f746c04a87ca5b71f4df80f4fd246..41ba64593bd548131d1cdbecc79b2f38406aa78b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -862,6 +862,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
|
||||
@@ -883,6 +883,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
@ -5157,7 +5157,7 @@ index 78653e2b669bee1f46fc9e8c4485ae4936244db7..8be2184fc6d04a722fd9fb27549ec8df
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return CraftChatMessage.fromComponent(this.displayName);
|
||||
@@ -892,6 +904,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -913,6 +925,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return this.itemName != null;
|
||||
}
|
||||
|
||||
@ -5176,7 +5176,7 @@ index 78653e2b669bee1f46fc9e8c4485ae4936244db7..8be2184fc6d04a722fd9fb27549ec8df
|
||||
@Override
|
||||
public String getLocalizedName() {
|
||||
return this.getDisplayName();
|
||||
@@ -911,6 +935,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -932,6 +956,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return this.lore != null && !this.lore.isEmpty();
|
||||
}
|
||||
|
||||
@ -5547,10 +5547,10 @@ index 4d586e1375ed8782939c9d480479e0dd981f8cbc..7900adb0b158bc17dd792dd082c33854
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
index 64191fb2f238c6dacf894d88a703ced6e75a6054..cb6cc3896e862291a058d21fa9704dd1519ff5e1 100644
|
||||
index 28038c3a531680201dcc8f2716b8f46f3886e769..5a9ddf71dc186c537a23083ac59434fb446a2140 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
|
||||
@@ -307,6 +307,7 @@ public final class CraftChatMessage {
|
||||
@@ -308,6 +308,7 @@ public final class CraftChatMessage {
|
||||
|
||||
public static String fromComponent(Component component) {
|
||||
if (component == null) return "";
|
||||
@ -5559,10 +5559,10 @@ index 64191fb2f238c6dacf894d88a703ced6e75a6054..cb6cc3896e862291a058d21fa9704dd1
|
||||
|
||||
boolean hadFormat = false;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 951f76eff07e53af20105b29a4e3c81b78ef8b65..cac2bfc711daba11a640e4e776b10c86041b0670 100644
|
||||
index 8a5d5d3bccc974feea09119eb90732934c8ae6a1..8727d09566cba3b7223e4c72f960e568a9d8bb62 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -80,6 +80,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -81,6 +81,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
private CraftMagicNumbers() {}
|
||||
|
||||
|
@ -216,7 +216,7 @@ index 0000000000000000000000000000000000000000..8f07539a82f449ad217e316a7513a170
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
index fc6e13e4f2408ccbfa645eae2d7ebf4dcfc21908..badd85a92f38caae257181f67a322fc79599d1ce 100644
|
||||
index 7397918cf747bc2352bf5bb112a71e7f6844e0e0..0f9b744a977ec7ab8f138989b2336117b3de1412 100644
|
||||
--- a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
|
||||
@@ -31,6 +31,7 @@ import net.kyori.adventure.text.flattener.ComponentFlattener;
|
||||
@ -260,7 +260,7 @@ index 8323f135d6bf2e1f12525e05094ffa3f2420e7e1..a143ea1e58464a3122fbd8ccafe417bd
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 953e28f0cf60412a4ec9e311daa98f9d3cadea85..c25d80a1d5aa0f3cc2cbf1e9b94154c759aab36e 100644
|
||||
index 84ad6aae39b5fe4c4ad5ec08890d4383829cbe50..8dfa0fae4d5129688b7e2897da1fc51683aed6c3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -148,7 +148,7 @@ import org.slf4j.Logger;
|
||||
@ -396,10 +396,10 @@ index 0ff094a90bf471ce57a3054c7701dc3d67742d9d..50f4b77c83854932050cc543c7c2deea
|
||||
|
||||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a5c420721cd1905bb0d00f9e1e40e4fbdf98cce6..7d850ef45093ab5ca0dd29b29ed36f663f3fa2e2 100644
|
||||
index beff0bfe2502a17fd297524c51f96b33f889db93..749a4f1e8e46e0b072832056186d709a93df4b58 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -42,7 +42,7 @@ import java.util.logging.Level;
|
||||
@@ -43,7 +43,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.imageio.ImageIO;
|
||||
@ -408,7 +408,7 @@ index a5c420721cd1905bb0d00f9e1e40e4fbdf98cce6..7d850ef45093ab5ca0dd29b29ed36f66
|
||||
import net.minecraft.advancements.AdvancementHolder;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
@@ -1320,9 +1320,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1343,9 +1343,13 @@ public final class CraftServer implements Server {
|
||||
return this.logger;
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ index a5c420721cd1905bb0d00f9e1e40e4fbdf98cce6..7d850ef45093ab5ca0dd29b29ed36f66
|
||||
@Override
|
||||
public PluginCommand getPluginCommand(String name) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 985b77911d03bc60a0210b796e901f31e2676268..9de87edb75947382fda114df883fb4b31c1a7141 100644
|
||||
index 73c44f94aac069fa3ea9e82be6b95e77a2421c63..2ef6386ea4b95211e26c8759cae849cbe68e3f40 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
||||
|
@ -123,7 +123,7 @@ index 0000000000000000000000000000000000000000..953c30500892e5f0c55b8597bc708ea8
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..8ccc59473bac983ced6b9e4a57e0ec4ebd2b0f32
|
||||
index 0000000000000000000000000000000000000000..95d3320c865d24609252063be07cddfd07d0d6d8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
@@ -0,0 +1,143 @@
|
||||
@ -253,7 +253,7 @@ index 0000000000000000000000000000000000000000..8ccc59473bac983ced6b9e4a57e0ec4e
|
||||
+ }
|
||||
+
|
||||
+ private static @Nullable Pair<String, PaperSubcommand> resolveCommand(String label) {
|
||||
+ label = label.toLowerCase(Locale.ENGLISH);
|
||||
+ label = label.toLowerCase(Locale.ROOT);
|
||||
+ @Nullable PaperSubcommand subCommand = SUBCOMMANDS.get(label);
|
||||
+ if (subCommand == null) {
|
||||
+ final @Nullable String command = ALIASES.get(label);
|
||||
@ -332,7 +332,7 @@ index 0000000000000000000000000000000000000000..7e9e0ff8639be135bf8575e375cbada5
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java b/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8
|
||||
index 0000000000000000000000000000000000000000..67fcba634f8183bb33834ac3b2c3dcfb8d87129e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/command/subcommands/EntityCommand.java
|
||||
@@ -0,0 +1,158 @@
|
||||
@ -396,15 +396,15 @@ index 0000000000000000000000000000000000000000..ff99336e0b8131ae161cfa5c4fc83c69
|
||||
+ */
|
||||
+ private void listEntities(final CommandSender sender, final String[] args) {
|
||||
+ // help
|
||||
+ if (args.length < 1 || !args[0].toLowerCase(Locale.ENGLISH).equals("list")) {
|
||||
+ if (args.length < 1 || !args[0].toLowerCase(Locale.ROOT).equals("list")) {
|
||||
+ sender.sendMessage(text("Use /paper entity [list] help for more information on a specific command", RED));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if ("list".equals(args[0].toLowerCase(Locale.ENGLISH))) {
|
||||
+ if ("list".equals(args[0].toLowerCase(Locale.ROOT))) {
|
||||
+ String filter = "*";
|
||||
+ if (args.length > 1) {
|
||||
+ if (args[1].toLowerCase(Locale.ENGLISH).equals("help")) {
|
||||
+ if (args[1].toLowerCase(Locale.ROOT).equals("help")) {
|
||||
+ sender.sendMessage(text("Use /paper entity list [filter] [worldName] to get entity info that matches the optional filter.", RED));
|
||||
+ return;
|
||||
+ }
|
||||
@ -617,10 +617,10 @@ index 21b8f1913ff54d2b1553826269355da8bdb7f702..b9c22f725f5aeaee469fe5b7d8c3a57d
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7d850ef45093ab5ca0dd29b29ed36f663f3fa2e2..4c177faf5eda2cb5a34f84586a4bf45be942e0d6 100644
|
||||
index 749a4f1e8e46e0b072832056186d709a93df4b58..af1bca27eb2445218f7daeab3912e561085c9c00 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -952,6 +952,7 @@ public final class CraftServer implements Server {
|
||||
@@ -975,6 +975,7 @@ public final class CraftServer implements Server {
|
||||
this.commandMap.clearCommands();
|
||||
this.reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
@ -628,7 +628,7 @@ index 7d850ef45093ab5ca0dd29b29ed36f663f3fa2e2..4c177faf5eda2cb5a34f84586a4bf45b
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2672,6 +2673,34 @@ public final class CraftServer implements Server {
|
||||
@@ -2695,6 +2696,34 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
|
||||
// Paper start
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Paper Plugins
|
||||
Co-authored-by: Micah Rao <micah.s.rao@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
index 8ccc59473bac983ced6b9e4a57e0ec4ebd2b0f32..6d06b772ffb9d47d6a717462a4b2b494544e80ae 100644
|
||||
index 95d3320c865d24609252063be07cddfd07d0d6d8..5b070d158760789bbcaa984426a55d20767abe4a 100644
|
||||
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
|
||||
@@ -37,6 +37,7 @@ public final class PaperCommand extends Command {
|
||||
@ -3567,7 +3567,7 @@ index 0000000000000000000000000000000000000000..7ce9ebba8ce304d1f3f21d4f15ee5f35
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperPermissionManager.java b/src/main/java/io/papermc/paper/plugin/manager/PaperPermissionManager.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..92a69677f21b2c1c035119d8e5a6af63fa19b801
|
||||
index 0000000000000000000000000000000000000000..afe793c35f05a80058e80bcaee76ac45a40b04a2
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperPermissionManager.java
|
||||
@@ -0,0 +1,201 @@
|
||||
@ -3654,7 +3654,7 @@ index 0000000000000000000000000000000000000000..92a69677f21b2c1c035119d8e5a6af63
|
||||
+ @Override
|
||||
+ public void recalculatePermissionDefaults(@NotNull Permission perm) {
|
||||
+ // we need a null check here because some plugins for some unknown reason pass null into this?
|
||||
+ if (perm != null && this.permissions().containsKey(perm.getName().toLowerCase(Locale.ENGLISH))) {
|
||||
+ if (perm != null && this.permissions().containsKey(perm.getName().toLowerCase(Locale.ROOT))) {
|
||||
+ this.defaultPerms().get(true).remove(perm);
|
||||
+ this.defaultPerms().get(false).remove(perm);
|
||||
+
|
||||
@ -7248,10 +7248,10 @@ index 5b4ac7b4fd0077e900e9f788963f1613bbc9a5d0..6afede80c10503a261d0f735c351d943
|
||||
Bootstrap.validate();
|
||||
Util.startTimerHackThread();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4c177faf5eda2cb5a34f84586a4bf45be942e0d6..5f0638e2dd945371b311f8364294adc80bde3186 100644
|
||||
index af1bca27eb2445218f7daeab3912e561085c9c00..709712a9e5cadca181ef74302ca9e90703d74ca8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -275,7 +275,8 @@ public final class CraftServer implements Server {
|
||||
@@ -276,7 +276,8 @@ public final class CraftServer implements Server {
|
||||
private final CraftCommandMap commandMap = new CraftCommandMap(this);
|
||||
private final SimpleHelpMap helpMap = new SimpleHelpMap(this);
|
||||
private final StandardMessenger messenger = new StandardMessenger();
|
||||
@ -7261,7 +7261,7 @@ index 4c177faf5eda2cb5a34f84586a4bf45be942e0d6..5f0638e2dd945371b311f8364294adc8
|
||||
private final StructureManager structureManager;
|
||||
protected final DedicatedServer console;
|
||||
protected final DedicatedPlayerList playerList;
|
||||
@@ -421,24 +422,7 @@ public final class CraftServer implements Server {
|
||||
@@ -443,24 +444,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
public void loadPlugins() {
|
||||
@ -7287,7 +7287,7 @@ index 4c177faf5eda2cb5a34f84586a4bf45be942e0d6..5f0638e2dd945371b311f8364294adc8
|
||||
}
|
||||
|
||||
public void enablePlugins(PluginLoadOrder type) {
|
||||
@@ -527,15 +511,17 @@ public final class CraftServer implements Server {
|
||||
@@ -549,15 +533,17 @@ public final class CraftServer implements Server {
|
||||
private void enablePlugin(Plugin plugin) {
|
||||
try {
|
||||
List<Permission> perms = plugin.getDescription().getPermissions();
|
||||
@ -7311,7 +7311,7 @@ index 4c177faf5eda2cb5a34f84586a4bf45be942e0d6..5f0638e2dd945371b311f8364294adc8
|
||||
|
||||
this.pluginManager.enablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
@@ -976,6 +962,7 @@ public final class CraftServer implements Server {
|
||||
@@ -999,6 +985,7 @@ public final class CraftServer implements Server {
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
||||
}
|
||||
@ -7337,10 +7337,10 @@ index 909b2c98e7a9117d2f737245e4661792ffafb744..d96399e9bf1a58db5a4a22e58abb99e7
|
||||
@Override
|
||||
public FileConfiguration getConfig() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index cac2bfc711daba11a640e4e776b10c86041b0670..e62b93ce958633a1b6c55a8768332d61289d6556 100644
|
||||
index 8727d09566cba3b7223e4c72f960e568a9d8bb62..66c75a4baa35970254027d42e017fa62b791590b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -425,6 +425,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -426,6 +426,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
|
||||
return nmsItemStack.getItem().getDescriptionId(nmsItemStack);
|
||||
}
|
||||
|
@ -1317,7 +1317,7 @@ index 0000000000000000000000000000000000000000..944250d2b8e1969f221b2f24cce7b101
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/util/Hashing.java b/src/main/java/io/papermc/paper/util/Hashing.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..49e235e0035d7f063c8544ec10bd8f9ef4e613c3
|
||||
index 0000000000000000000000000000000000000000..54c1324faa190a06bfa2b3b8f86928b4c51a57f8
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/util/Hashing.java
|
||||
@@ -0,0 +1,50 @@
|
||||
@ -1346,7 +1346,7 @@ index 0000000000000000000000000000000000000000..49e235e0035d7f063c8544ec10bd8f9e
|
||||
+ */
|
||||
+ public static String sha256(final InputStream stream) {
|
||||
+ try (stream) {
|
||||
+ return com.google.common.hash.Hashing.sha256().hashBytes(IOUtils.toByteArray(stream)).toString().toUpperCase(Locale.ENGLISH);
|
||||
+ return com.google.common.hash.Hashing.sha256().hashBytes(IOUtils.toByteArray(stream)).toString().toUpperCase(Locale.ROOT);
|
||||
+ } catch (final IOException ex) {
|
||||
+ throw new RuntimeException("Failed to take hash of InputStream", ex);
|
||||
+ }
|
||||
@ -1368,7 +1368,7 @@ index 0000000000000000000000000000000000000000..49e235e0035d7f063c8544ec10bd8f9e
|
||||
+ } catch (final IOException ex) {
|
||||
+ throw new RuntimeException("Failed to take hash of file '" + file + "'", ex);
|
||||
+ }
|
||||
+ return hash.toString().toUpperCase(Locale.ENGLISH);
|
||||
+ return hash.toString().toUpperCase(Locale.ROOT);
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/util/MappingEnvironment.java b/src/main/java/io/papermc/paper/util/MappingEnvironment.java
|
||||
@ -1553,7 +1553,7 @@ index 0000000000000000000000000000000000000000..badff5d6ae6dd8d209c82bc7e8afe370
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c25d80a1d5aa0f3cc2cbf1e9b94154c759aab36e..cbbd9aaeb0d87aae72edc7fb5aa10920834de8bf 100644
|
||||
index 8dfa0fae4d5129688b7e2897da1fc51683aed6c3..5c0d2cb215e334b32332e322e931d72c46027190 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -636,6 +636,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -1904,10 +1904,10 @@ index 0000000000000000000000000000000000000000..73b20a92f330311e3fef8f03b51a0985
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5f0638e2dd945371b311f8364294adc80bde3186..950ad0a46cadc11554b9cde84e633df7cc447dcd 100644
|
||||
index 709712a9e5cadca181ef74302ca9e90703d74ca8..a348ddb7ca863da0b2d5eea1bb30bb356a6a751f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -966,6 +966,7 @@ public final class CraftServer implements Server {
|
||||
@@ -989,6 +989,7 @@ public final class CraftServer implements Server {
|
||||
this.loadPlugins();
|
||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
|
@ -8,18 +8,18 @@ our own relocation. Also lets us rewrite NMS calls for when we're
|
||||
debugging in an IDE pre-relocate.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 6f89eebc326c0dec6d18b0ca4ced3a1bb70ada55..3d3d77d66588aaf709a9f7688400ee661e181b4b 100644
|
||||
index beccd928d151164db8c29f5b7addefbe9a195311..dedcdac1c6b2ba056761d5bd02212c1fb76348c4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -7,6 +7,7 @@ import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
@@ -8,6 +8,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
+import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -16,6 +17,7 @@ import java.util.jar.JarEntry;
|
||||
@@ -17,6 +18,7 @@ import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.JarOutputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
@ -27,9 +27,9 @@ index 6f89eebc326c0dec6d18b0ca4ced3a1bb70ada55..3d3d77d66588aaf709a9f7688400ee66
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
@@ -73,6 +75,40 @@ public class Commodore {
|
||||
public static final List<Map<String, RerouteMethodData>> REROUTES = new ArrayList<>(); // Only used for testing
|
||||
@@ -77,6 +79,40 @@ public class Commodore {
|
||||
private static final Map<String, RerouteMethodData> FIELD_RENAME_METHOD_REROUTE = Commodore.createReroutes(FieldRename.class);
|
||||
private static final Map<String, RerouteMethodData> MATERIAL_METHOD_REROUTE = Commodore.createReroutes(MaterialRerouting.class);
|
||||
|
||||
+ // Paper start - Plugin rewrites
|
||||
+ private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
|
||||
@ -68,7 +68,7 @@ index 6f89eebc326c0dec6d18b0ca4ced3a1bb70ada55..3d3d77d66588aaf709a9f7688400ee66
|
||||
public static void main(String[] args) {
|
||||
OptionParser parser = new OptionParser();
|
||||
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
|
||||
@@ -199,9 +235,49 @@ public class Commodore {
|
||||
@@ -203,9 +239,49 @@ public class Commodore {
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
|
||||
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
|
||||
@ -118,7 +118,7 @@ index 6f89eebc326c0dec6d18b0ca4ced3a1bb70ada55..3d3d77d66588aaf709a9f7688400ee66
|
||||
name = FieldRename.rename(pluginVersion, owner, name);
|
||||
|
||||
if (modern) {
|
||||
@@ -297,6 +373,13 @@ public class Commodore {
|
||||
@@ -301,6 +377,13 @@ public class Commodore {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ index 6f89eebc326c0dec6d18b0ca4ced3a1bb70ada55..3d3d77d66588aaf709a9f7688400ee66
|
||||
if (modern) {
|
||||
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
|
||||
switch (name) {
|
||||
@@ -400,6 +483,13 @@ public class Commodore {
|
||||
@@ -397,6 +480,13 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public void visitLdcInsn(Object value) {
|
||||
@ -146,7 +146,7 @@ index 6f89eebc326c0dec6d18b0ca4ced3a1bb70ada55..3d3d77d66588aaf709a9f7688400ee66
|
||||
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
|
||||
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
|
||||
return;
|
||||
@@ -410,6 +500,14 @@ public class Commodore {
|
||||
@@ -407,6 +497,14 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
|
||||
@ -161,7 +161,7 @@ index 6f89eebc326c0dec6d18b0ca4ced3a1bb70ada55..3d3d77d66588aaf709a9f7688400ee66
|
||||
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
|
||||
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
|
||||
Type samMethodType = (Type) bootstrapMethodArguments[0];
|
||||
@@ -426,7 +524,7 @@ public class Commodore {
|
||||
@@ -423,7 +521,7 @@ public class Commodore {
|
||||
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
|
||||
methodArgs.add(newInstantiated);
|
||||
|
||||
@ -170,7 +170,7 @@ index 6f89eebc326c0dec6d18b0ca4ced3a1bb70ada55..3d3d77d66588aaf709a9f7688400ee66
|
||||
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
|
||||
return;
|
||||
}
|
||||
@@ -477,6 +575,12 @@ public class Commodore {
|
||||
@@ -474,6 +572,12 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {
|
||||
|
@ -645,11 +645,11 @@ index 242811578a786e3807a1a7019d472d5a68f87116..0b65fdf53124f3dd042b2363b1b8df8e
|
||||
return traceElements;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 3d3d77d66588aaf709a9f7688400ee661e181b4b..c6956b9241634e455a520f4fd3bd8c4b5a58eb9d 100644
|
||||
index dedcdac1c6b2ba056761d5bd02212c1fb76348c4..f45498bf9841c31338b83270c1badc6d7a792d25 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -76,36 +76,26 @@ public class Commodore {
|
||||
private static final Map<String, RerouteMethodData> FIELD_RENAME_METHOD_REROUTE = Commodore.createReroutes(FieldRename.class);
|
||||
@@ -80,36 +80,26 @@ public class Commodore {
|
||||
private static final Map<String, RerouteMethodData> MATERIAL_METHOD_REROUTE = Commodore.createReroutes(MaterialRerouting.class);
|
||||
|
||||
// Paper start - Plugin rewrites
|
||||
- private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
|
||||
@ -696,7 +696,7 @@ index 3d3d77d66588aaf709a9f7688400ee661e181b4b..c6956b9241634e455a520f4fd3bd8c4b
|
||||
}
|
||||
// Paper end - Plugin rewrites
|
||||
|
||||
@@ -176,7 +166,7 @@ public class Commodore {
|
||||
@@ -180,7 +170,7 @@ public class Commodore {
|
||||
ClassReader cr = new ClassReader(b);
|
||||
ClassWriter cw = new ClassWriter(cr, 0);
|
||||
|
||||
@ -706,10 +706,10 @@ index 3d3d77d66588aaf709a9f7688400ee661e181b4b..c6956b9241634e455a520f4fd3bd8c4b
|
||||
String className;
|
||||
boolean isInterface;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 81a11402fda54ff40039fa23c53abb3572dccadf..73616ac642c67d4591775fdef08e720c1ab612a4 100644
|
||||
index 66c75a4baa35970254027d42e017fa62b791590b..2de7ee6afa7eb404d7aeaa5ef7c7190d8287de1d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -360,7 +360,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -361,7 +361,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
throw new InvalidPluginException("Plugin API version " + pdf.getAPIVersion() + " is lower than the minimum allowed version. Please update or replace it.");
|
||||
}
|
||||
|
||||
@ -718,11 +718,11 @@ index 81a11402fda54ff40039fa23c53abb3572dccadf..73616ac642c67d4591775fdef08e720c
|
||||
CraftLegacy.init();
|
||||
}
|
||||
|
||||
@@ -375,6 +375,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -376,6 +376,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
@Override
|
||||
public byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz) {
|
||||
+ if (io.papermc.paper.util.MappingEnvironment.DISABLE_PLUGIN_REWRITING) return clazz; // Paper
|
||||
try {
|
||||
clazz = Commodore.convert(clazz, pdf.getName(), ApiVersion.getOrCreateVersion(pdf.getAPIVersion()));
|
||||
clazz = Commodore.convert(clazz, pdf.getName(), ApiVersion.getOrCreateVersion(pdf.getAPIVersion()), ((CraftServer) Bukkit.getServer()).activeCompatibilities);
|
||||
} catch (Exception ex) {
|
||||
|
@ -714,7 +714,7 @@ index 73e7bb59596600df1b1953175f6da17bee54a65c..e161ad0f53a21a68e8c78575ba5d3cdb
|
||||
} catch (Exception exception) {
|
||||
if (exception instanceof ReportedException) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c836204a04ca050988057dcc92c7a1fbcc02ef34..c91eb69bbab3ca563d77de7165d5ef39f0a6b532 100644
|
||||
index 5c0d2cb215e334b32332e322e931d72c46027190..e419ccaf2378d4736b8162092e537006aa3e1288 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -190,7 +190,7 @@ import org.bukkit.craftbukkit.Main;
|
||||
@ -893,7 +893,7 @@ index c836204a04ca050988057dcc92c7a1fbcc02ef34..c91eb69bbab3ca563d77de7165d5ef39
|
||||
this.profiler.popPush("send chunks");
|
||||
iterator = this.playerList.getPlayers().iterator();
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 98cba55466d6798e5de33d8dcbf03e205e5199d8..bbe2fabc9251838f232480a04f0a2cf2b49f2812 100644
|
||||
index 98cba55466d6798e5de33d8dcbf03e205e5199d8..8dcfcce4ccf0320b5d5b9eda2d1b5ebe04e26a13 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -63,10 +63,11 @@ import org.apache.logging.log4j.Level;
|
||||
@ -943,7 +943,7 @@ index 98cba55466d6798e5de33d8dcbf03e205e5199d8..bbe2fabc9251838f232480a04f0a2cf2
|
||||
}
|
||||
+ // Paper start
|
||||
+ command.set(event.getCommand());
|
||||
+ if (event.getCommand().toLowerCase().startsWith("timings") && event.getCommand().toLowerCase().matches("timings (report|paste|get|merged|seperate)")) {
|
||||
+ if (event.getCommand().toLowerCase(java.util.Locale.ROOT).startsWith("timings") && event.getCommand().toLowerCase(java.util.Locale.ROOT).matches("timings (report|paste|get|merged|seperate)")) {
|
||||
+ org.bukkit.command.BufferedCommandSender sender = new org.bukkit.command.BufferedCommandSender();
|
||||
+ Waitable<String> waitable = new Waitable<>() {
|
||||
+ @Override
|
||||
@ -1019,7 +1019,7 @@ index e53b68f91183c8abcc9a0f7d97adfc212aec02c6..15c9f4822d1d11d05de6c2d6797ee3e8
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 23c39b78486b018e222af489c8edbf4e749abff6..3f60a3289ec58d5eb3c0c5634ca62ef2fa287ce7 100644
|
||||
index 712670230b6b881101b4128c1d275f2559fa705a..c4c85ba56c52a00e10e61fe0954d7fb8de471bdd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -268,13 +268,15 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@ -1379,7 +1379,7 @@ index 1099a85ab7e98d8652cdd1c318f269ca31f4d783..606dbc398745b689f957e62ebd9eaa56
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f..856fb1a15279efc1e24a93fa289ca1ca8effd43e 100644
|
||||
index a3ebdbb231fb7bc6ed24747105ef02bb0ea9770e..ddf4a7bc19ba358364ea4517ce941e63ec4d26a0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -149,7 +149,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
@ -1391,7 +1391,7 @@ index d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f..856fb1a15279efc1e24a93fa289ca1ca
|
||||
|
||||
public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
@@ -2951,7 +2951,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2945,7 +2945,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
@ -1399,7 +1399,7 @@ index d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f..856fb1a15279efc1e24a93fa289ca1ca
|
||||
super.tick();
|
||||
this.updatingUsingItem();
|
||||
this.updateSwimAmount();
|
||||
@@ -2993,9 +2992,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2987,9 +2986,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
if (!this.isRemoved()) {
|
||||
@ -1409,7 +1409,7 @@ index d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f..856fb1a15279efc1e24a93fa289ca1ca
|
||||
}
|
||||
|
||||
double d0 = this.getX() - this.xo;
|
||||
@@ -3086,7 +3083,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3080,7 +3077,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.refreshDimensions();
|
||||
}
|
||||
|
||||
@ -1417,7 +1417,7 @@ index d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f..856fb1a15279efc1e24a93fa289ca1ca
|
||||
}
|
||||
|
||||
public void detectEquipmentUpdatesPublic() { // CraftBukkit
|
||||
@@ -3285,7 +3281,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3279,7 +3275,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
this.setDeltaMovement(d0, d1, d2);
|
||||
this.level().getProfiler().push("ai");
|
||||
@ -1425,7 +1425,7 @@ index d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f..856fb1a15279efc1e24a93fa289ca1ca
|
||||
if (this.isImmobile()) {
|
||||
this.jumping = false;
|
||||
this.xxa = 0.0F;
|
||||
@@ -3295,7 +3290,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3289,7 +3284,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.serverAiStep();
|
||||
this.level().getProfiler().pop();
|
||||
}
|
||||
@ -1433,7 +1433,7 @@ index d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f..856fb1a15279efc1e24a93fa289ca1ca
|
||||
|
||||
this.level().getProfiler().pop();
|
||||
this.level().getProfiler().push("jump");
|
||||
@@ -3335,7 +3329,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3329,7 +3323,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.resetFallDistance();
|
||||
}
|
||||
|
||||
@ -1441,7 +1441,7 @@ index d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f..856fb1a15279efc1e24a93fa289ca1ca
|
||||
label104:
|
||||
{
|
||||
LivingEntity entityliving = this.getControllingPassenger();
|
||||
@@ -3349,7 +3342,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3343,7 +3336,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
this.travel(vec3d1);
|
||||
}
|
||||
@ -1449,7 +1449,7 @@ index d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f..856fb1a15279efc1e24a93fa289ca1ca
|
||||
|
||||
this.level().getProfiler().pop();
|
||||
this.level().getProfiler().push("freezing");
|
||||
@@ -3376,9 +3368,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3370,9 +3362,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
|
||||
}
|
||||
|
||||
@ -1527,7 +1527,7 @@ index 991ebf07bc0608df0a12f1f26e581cc93255ae01..946001c57c326f2d2f0677bca954e855
|
||||
private String descriptionId;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index f0b4b9828ec237e93d5a6bdf5cbea8b469ebff02..7fa49fcf5469276e25c40af4cd27943f665d8721 100644
|
||||
index e6c586eb85c6c477a3c130e1e1a37b41f17c30c8..6e35709f2a7c32050908e7e5af5529c9f342b787 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -34,10 +34,12 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
@ -1591,10 +1591,10 @@ index 8199fd0a50e0f7d2e1f2a14ac525bc6bd9feeac4..b0518725a2e145d29bd5bc0aa7e6998a
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b34b3008b4330103b3ed835e962d7c05cbe5b688..b1605bcb0379f4b274db4c7aac50e1dae5bdc831 100644
|
||||
index a348ddb7ca863da0b2d5eea1bb30bb356a6a751f..f42af8073569b4153858c2762d1553e89fe85a16 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -371,7 +371,7 @@ public final class CraftServer implements Server {
|
||||
@@ -373,7 +373,7 @@ public final class CraftServer implements Server {
|
||||
this.saveCommandsConfig();
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
@ -1603,7 +1603,7 @@ index b34b3008b4330103b3ed835e962d7c05cbe5b688..b1605bcb0379f4b274db4c7aac50e1da
|
||||
this.overrideSpawnLimits();
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
@@ -2581,12 +2581,31 @@ public final class CraftServer implements Server {
|
||||
@@ -2604,12 +2604,31 @@ public final class CraftServer implements Server {
|
||||
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
||||
{
|
||||
|
||||
@ -1805,10 +1805,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
|
||||
- }
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 1c1f1db8cb8beff850103d998561d333823fe611..34fe109e3ab1e72b278218fad93c2de6b809020c 100644
|
||||
index e59f2ae85126061ee35812eaa02a35ddb4a9eb66..b64cabaee5adc3fc9e2b704c2959a7a4b3051ed2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2759,6 +2759,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2768,6 +2768,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR));
|
||||
}
|
||||
@ -2005,10 +2005,10 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222
|
||||
+ } // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 73616ac642c67d4591775fdef08e720c1ab612a4..e7b98cefde1e0ecfbd151ef968062a774a6ebf55 100644
|
||||
index 2de7ee6afa7eb404d7aeaa5ef7c7190d8287de1d..233abe27ff9b11eb88c073d8d6bc7211a10ba5df 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -216,6 +216,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -217,6 +217,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
}
|
||||
// Paper end
|
||||
// ========================================================================
|
||||
@ -2021,7 +2021,7 @@ index 73616ac642c67d4591775fdef08e720c1ab612a4..e7b98cefde1e0ecfbd151ef968062a77
|
||||
|
||||
public static byte toLegacyData(BlockState data) {
|
||||
return CraftLegacy.toLegacyData(data);
|
||||
@@ -466,6 +472,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -467,6 +473,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) {
|
||||
return new CraftDamageSourceBuilder(damageType);
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
|
||||
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c91eb69bbab3ca563d77de7165d5ef39f0a6b532..8ead44e27598c01249f710e10a765dd1796ed249 100644
|
||||
index e419ccaf2378d4736b8162092e537006aa3e1288..93c7648106b18ef2982f476c3200839bb5e2ea0c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -289,7 +289,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -146,10 +146,10 @@ index c91eb69bbab3ca563d77de7165d5ef39f0a6b532..8ead44e27598c01249f710e10a765dd1
|
||||
this.startMetricsRecordingTick();
|
||||
this.profiler.push("tick");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b1605bcb0379f4b274db4c7aac50e1dae5bdc831..85e2293efd3f02234372f4ad3a07ffdf774bd13c 100644
|
||||
index f42af8073569b4153858c2762d1553e89fe85a16..c9767da51134fc5576f4d9f994f8b9fc05c57b9e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2634,7 +2634,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2657,7 +2657,11 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public double[] getTPS() {
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
||||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 85e2293efd3f02234372f4ad3a07ffdf774bd13c..035c541290e5ff67d0db65fc0d68c612bba19840 100644
|
||||
index c9767da51134fc5576f4d9f994f8b9fc05c57b9e..0030794a3e125f2493a84ddac86430db625c626e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -425,6 +425,35 @@ public final class CraftServer implements Server {
|
||||
@@ -447,6 +447,35 @@ public final class CraftServer implements Server {
|
||||
io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.INSTANCE.enter(io.papermc.paper.plugin.entrypoint.Entrypoint.PLUGIN); // Paper - replace implementation
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index 85e2293efd3f02234372f4ad3a07ffdf774bd13c..035c541290e5ff67d0db65fc0d68c612
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 9de87edb75947382fda114df883fb4b31c1a7141..bc664b090e16ed27ba795c204dc5639679e6eee8 100644
|
||||
index 2ef6386ea4b95211e26c8759cae849cbe68e3f40..efedc5c8474c548781c943ddfdf2de121c7c09b7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -160,6 +160,12 @@ public class Main {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 8be2184fc6d04a722fd9fb27549ec8df906a12ee..9e23cdef8bd166937093452009f50b86e683cc57 100644
|
||||
index 41ba64593bd548131d1cdbecc79b2f38406aa78b..c7eed6b642c69fb08bc6e50d4890ea61666cde01 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -879,11 +879,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -900,11 +900,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return CraftChatMessage.fromComponent(this.displayName);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ index 8be2184fc6d04a722fd9fb27549ec8df906a12ee..9e23cdef8bd166937093452009f50b86
|
||||
@Override
|
||||
public boolean hasDisplayName() {
|
||||
return this.displayName != null;
|
||||
@@ -1057,6 +1069,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1078,6 +1090,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromComponent));
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index 8be2184fc6d04a722fd9fb27549ec8df906a12ee..9e23cdef8bd166937093452009f50b86
|
||||
@Override
|
||||
public void setLore(List<String> lore) {
|
||||
if (lore == null || lore.isEmpty()) {
|
||||
@@ -1071,6 +1091,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1092,6 +1112,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ index 8be2184fc6d04a722fd9fb27549ec8df906a12ee..9e23cdef8bd166937093452009f50b86
|
||||
@Override
|
||||
public boolean hasCustomModelData() {
|
||||
return this.customModelData != null;
|
||||
@@ -1722,6 +1757,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1763,6 +1798,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
}
|
||||
|
||||
for (Object object : addFrom) {
|
||||
|
@ -472,7 +472,7 @@ index 0000000000000000000000000000000000000000..790bad0494454ca12ee152e3de6da3da
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index dee319882d7d51a0e03e0f5f31ab6312048e189d..80a20dce63658842a0fa04004b8eaa8af7685fb4 100644
|
||||
index 93c7648106b18ef2982f476c3200839bb5e2ea0c..8b5a630a67b058f014478b033e6b1299f99afccc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -43,7 +43,6 @@ import java.util.Set;
|
||||
@ -529,10 +529,10 @@ index f077b8ff0bf0d96628db3569132696b68fd79921..5f11f5b16766f9d1d5640ae037e259be
|
||||
value.append("\n Plugins: {");
|
||||
for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b32ae5b9c232e5d9b3bd89303db3d2cc6258ea29..4d31fb8bc8bf285720a9d5828325d7124cf41c6e 100644
|
||||
index 0030794a3e125f2493a84ddac86430db625c626e..c052ec6b028613fb27c0cfead8da5a1793ecadd3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -10,8 +10,6 @@ import com.google.common.collect.MapMaker;
|
||||
@@ -11,8 +11,6 @@ import com.google.common.collect.MapMaker;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.brigadier.StringReader;
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
@ -541,7 +541,7 @@ index b32ae5b9c232e5d9b3bd89303db3d2cc6258ea29..4d31fb8bc8bf285720a9d5828325d712
|
||||
import com.mojang.serialization.Dynamic;
|
||||
import com.mojang.serialization.Lifecycle;
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||
@@ -26,7 +24,6 @@ import java.net.InetAddress;
|
||||
@@ -27,7 +25,6 @@ import java.net.InetAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
@ -549,7 +549,7 @@ index b32ae5b9c232e5d9b3bd89303db3d2cc6258ea29..4d31fb8bc8bf285720a9d5828325d712
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -153,7 +150,6 @@ import org.bukkit.craftbukkit.ban.CraftProfileBanList;
|
||||
@@ -154,7 +151,6 @@ import org.bukkit.craftbukkit.ban.CraftProfileBanList;
|
||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||
import org.bukkit.craftbukkit.boss.CraftBossBar;
|
||||
import org.bukkit.craftbukkit.boss.CraftKeyedBossbar;
|
||||
@ -557,7 +557,7 @@ index b32ae5b9c232e5d9b3bd89303db3d2cc6258ea29..4d31fb8bc8bf285720a9d5828325d712
|
||||
import org.bukkit.craftbukkit.command.CraftCommandMap;
|
||||
import org.bukkit.craftbukkit.command.VanillaCommandWrapper;
|
||||
import org.bukkit.craftbukkit.entity.CraftEntityFactory;
|
||||
@@ -249,7 +245,6 @@ import org.bukkit.plugin.PluginManager;
|
||||
@@ -250,7 +246,6 @@ import org.bukkit.plugin.PluginManager;
|
||||
import org.bukkit.plugin.ServicesManager;
|
||||
import org.bukkit.plugin.SimplePluginManager;
|
||||
import org.bukkit.plugin.SimpleServicesManager;
|
||||
@ -565,7 +565,7 @@ index b32ae5b9c232e5d9b3bd89303db3d2cc6258ea29..4d31fb8bc8bf285720a9d5828325d712
|
||||
import org.bukkit.plugin.messaging.Messenger;
|
||||
import org.bukkit.plugin.messaging.StandardMessenger;
|
||||
import org.bukkit.profile.PlayerProfile;
|
||||
@@ -266,7 +261,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@@ -267,7 +262,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
@ -574,7 +574,7 @@ index b32ae5b9c232e5d9b3bd89303db3d2cc6258ea29..4d31fb8bc8bf285720a9d5828325d712
|
||||
private final String serverVersion;
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
@@ -320,7 +315,7 @@ public final class CraftServer implements Server {
|
||||
@@ -322,7 +317,7 @@ public final class CraftServer implements Server {
|
||||
return player.getBukkitEntity();
|
||||
}
|
||||
}));
|
||||
@ -583,7 +583,7 @@ index b32ae5b9c232e5d9b3bd89303db3d2cc6258ea29..4d31fb8bc8bf285720a9d5828325d712
|
||||
this.structureManager = new CraftStructureManager(console.getStructureManager(), console.registryAccess());
|
||||
this.dataPackManager = new CraftDataPackManager(this.getServer().getPackRepository());
|
||||
this.serverTickManager = new CraftServerTickManager(console.tickRateManager());
|
||||
@@ -573,6 +568,13 @@ public final class CraftServer implements Server {
|
||||
@@ -595,6 +590,13 @@ public final class CraftServer implements Server {
|
||||
return this.bukkitVersion;
|
||||
}
|
||||
|
||||
@ -598,7 +598,7 @@ index b32ae5b9c232e5d9b3bd89303db3d2cc6258ea29..4d31fb8bc8bf285720a9d5828325d712
|
||||
public List<CraftPlayer> getOnlinePlayers() {
|
||||
return this.playerView;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index bc664b090e16ed27ba795c204dc5639679e6eee8..9dc72b01092783c436bc1fa8ce29ff7cdaa39b19 100644
|
||||
index efedc5c8474c548781c943ddfdf2de121c7c09b7..ce4671b24c7471efb3f6a1ae87d96c67881642f6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -15,6 +15,7 @@ import joptsimple.OptionSet;
|
||||
@ -610,7 +610,7 @@ index bc664b090e16ed27ba795c204dc5639679e6eee8..9dc72b01092783c436bc1fa8ce29ff7c
|
||||
public static boolean useConsole = true;
|
||||
|
||||
@@ -252,13 +253,26 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
||||
@ -638,10 +638,10 @@ index bc664b090e16ed27ba795c204dc5639679e6eee8..9dc72b01092783c436bc1fa8ce29ff7c
|
||||
net.minecraft.server.Main.main(options);
|
||||
} catch (Throwable t) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 983660c1cc4df5ec6f08ab7363a1bb5d47af9f19..f541ca7cb3328a9366e08a9933b24ed5c76059c0 100644
|
||||
index 233abe27ff9b11eb88c073d8d6bc7211a10ba5df..9730a3fe6b1e2734d897936dc8bff7c06edb3687 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -477,6 +477,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -478,6 +478,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
public String getTimingsServerName() {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ index 3126e8cab3c40e3af47f4c8925e1c6a9523309ba..3207166061bf9c4d7bf3f38e5a9f7aff
|
||||
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
|
||||
double d4 = max * max;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index c8ff4b01186f924473b9ffde948d7f0573e8d56f..426fa1798087ab1fb4198bd036f498606dce7c3f 100644
|
||||
index 577e7504064b97fa1115210f209bb40a3d94a60f..d4559aea807e3ee76f9dd1ecde72f77644636923 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -907,7 +907,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
|
||||
@ -135,10 +135,10 @@ index f38f62e777d88a783e1e3b7e1a48da921cc67cf4..77ae7882a08441d9a80b50492be5e484
|
||||
for (Player player : this.players()) {
|
||||
if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 34fe109e3ab1e72b278218fad93c2de6b809020c..a078655ad4d51075953c0f0f46ee41d1d76ba1d3 100644
|
||||
index b64cabaee5adc3fc9e2b704c2959a7a4b3051ed2..7cdd44a936c0a2ada4f0c5013ee2b05c5758c751 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2402,6 +2402,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2411,6 +2411,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return this.getHandle().language;
|
||||
}
|
||||
|
||||
|
@ -39,10 +39,10 @@ index 5b33cc5c54ab38b32f232dae00684d8b1e276acf..29020296e4f3bbddc0faabb1eeaa07a9
|
||||
// CraftBukkit end
|
||||
this.language = clientOptions.language();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 8c98655a4d888e8511d094074e3e35bbba078b26..d76a6d003cdcc1d7489ee359a09e93db96061515 100644
|
||||
index de712c7b3711d2d36d5702b323946541f105e674..6d3171e90f3ab83df3a0888eff3a1abadd4bde8a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2400,7 +2400,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2409,7 +2409,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public String getLocale() {
|
||||
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren