273 Commits

Author SHA1 Message Date
Phoenix616
b7e3ce0233
#890: Include yaw in player's spawn location 2021-07-15 20:29:38 +10:00
md_5
dd4bec5f13
Add additional validation to Player#breakBlock 2021-06-13 08:27:57 +10:00
Parker Hawke
6fdecf208d
#853: Implement Player#breakBlock() 2021-06-12 08:30:49 +10:00
md_5
e2f5ea34e9
Update to Minecraft 1.17 2021-06-11 15:00:00 +10:00
retrooper
8d3051c568
#833: Add Player#getPing to access the player's ping 2021-05-09 17:20:53 +10:00
md_5
90d6905b15
Repackage NMS 2021-03-16 09:00:00 +11:00
Martoph
a021e334aa
#795: Add methods to modify the rate of regeneration and starvation 2021-03-04 08:28:07 +11:00
Parker Hawke
ea050e6e98
#807: Add Player#sendBlockDamage() 2021-02-24 20:21:39 +11:00
md_5
aeb95e3a30
Add more checkstyle checks 2021-01-31 10:08:41 +11:00
Martoph
424598d294
#752: Add the ability to retrieve hit, step, fall, and other sounds from blocks. 2020-11-26 09:36:57 +11:00
Phoenix616
167ff59173
#770: Send messages without sender with SYSTEM type again
This was the behaviour before the 1.16 update and made it so that any
 message sent by a plugin was treated as a system message allowing the
 player to disable chat messages while keeping access to commands.

After 1.16 disabling the chat also disabled any plugin output, this
 restores the original behaviour.
2020-11-19 10:16:26 +11:00
Mariell Hoversholm
04639f5a2f
#759: Allow sending messages from specific UUIDs 2020-10-17 17:46:14 +11:00
md_5
1f4693a8c3
SPIGOT-6168: Fix error with Player.getBedSpawnLocation when world is unloaded while server running 2020-10-06 18:36:43 +11:00
Parker Hawke
8b52a7666e
SPIGOT-6092: Player#setBedSpawnLocation - NullPointerException 2020-08-22 17:42:15 +10:00
md_5
5a66916c08
Cleanup sendBlockChange 2020-08-16 17:55:55 +10:00
md_5
9c9fb593f5
Update to Minecraft 1.16.2 2020-08-12 07:00:00 +10:00
md_5
dc7c3c61fa
SPIGOT-5921: Improve setNoDamageTicks for Players 2020-07-02 11:18:03 +10:00
Parker Hawke
8297676c20
#682: Add hasDiscoveredRecipe() and getDiscoveredRecipes() 2020-07-02 09:27:18 +10:00
md_5
3b9cf0f803
Improve code formatting 2020-07-01 14:17:48 +10:00
md_5
4ff609e60c
SPIGOT-5836: PotionEffect HEALTH_BOOST never expires 2020-06-26 19:14:15 +10:00
md_5
baadbf3f76
SPIGOT-5833: Player#setWalkSpeed not working 2020-06-26 17:56:49 +10:00
md_5
7ea3c040bc
Update to Minecraft 1.16.1 2020-06-25 10:00:00 +10:00
Aikar
1b2830a3b3 SPIGOT-4441: Fix serializing Components to and from Legacy
While cfeef75cd97 might of semi helped being able to save black text
lore, it actually took a fundamental problem with the legacy serialization
code and expanded it to break even more aspects of the server when dealing
with Component to Legacy conversion.

This is causing data loss in Spigot with cases such as setting an item name
to white gets stripped resulting in it being italic.

Additionally, things such as book pages have been returning black formatting
codes for the end of the line even when the user doesn't have colors in the book.

The root issue is that the "Default Color" system is fundamentally wrong.

Components do not and should not care about what element of the game they
are being used by, and that's what the default color system did.

It results in components that if obtained from 1 source such as a Book
where the default / rendered color is black, is then copied to another
source such as an Entity name, the black is carried forward and shown
in the Entity name, when in reality it should have been white.

This commit reverts cfeef75cd97 and fixes the underlying serialization
issues when it comes to Legacy to and From conversions.

There was quite a number of issues with this code overall, in how
it handles inserting color codes, new line parsing and such.

Books was using mojangs own "getLegacyString" which doesn't match behavior.
We also do not want to use Mojangs method as there is no guarantee they don't
remove that in future.
Plus, everything about books uses the CB implementation anyways, and it should
be consistent (this was mandatory to avoid serialization format changes on old vs new)

These changes as is results in Item Stacks already serialized will not
change contents when they go to component and back, so this won't impact
any existing data.

Newly created books though for example will change behavior in that they
will no longer insert black color codes in the serialized data and will
only represent intentional color changes by the creator of the book.
This will result in cleaner data on them, and books are the only thing
I'm aware of that has a behavioral shift due to the likelyhood of the
default color system kicking in on other parts of the string.

A unit test has been added to verify integrity of serialization to
ensure that any legacy string that is converted into Components will
always re-encode back in the same way when going back to Legacy.
2020-06-01 19:19:42 +10:00
md_5
ce66f6937b Misc checkstyle fixes 2020-04-14 12:34:43 +10:00
SydMontague
aa3a2f2767 #645: Allow statistics to be accessed for offline players 2020-04-05 15:58:43 +10:00
anhcraft
b91ce1192a #601: Implement Player#sendExperienceChange 2020-01-21 10:32:16 +11:00
md_5
d208733e70 SPIGOT-5509: Sleeping player does not eject bed when teleported 2020-01-11 14:14:23 +11:00
md_5
de42aa13f3 Update to Minecraft 1.15 2019-12-11 09:00:00 +11:00
md_5
e73aabd666 Update to Minecraft 1.14.4 2019-07-20 09:00:00 +10:00
Yannick Lamprecht
8a3d3f4980 SPIGOT-5098: Add a method to allow colored sign changes 2019-06-23 11:00:08 +10:00
simpleauthority
649921e5ba Add Player#openBook(ItemStack) method
This PR adds the openBook(ItemStack) method to Player that allows opening a
Material.WRITTEN_BOOK for a player on demand.
2019-06-08 19:51:29 +10:00
md_5
8ad02cd9c7 SPIGOT-4900: Rearchitect multiworld support for better compat with new villager AI 2019-05-12 11:15:48 +10:00
md_5
e3df3d5cda Add Override annotations where appropriate 2019-04-28 11:38:01 +10:00
md_5
5fea790398 Apply import ordering rules to CraftBukkit classes 2019-04-23 14:56:58 +10:00
md_5
a2d787f6eb Update to Minecraft 1.14-pre5 2019-04-23 12:00:00 +10:00
blablubbabc
0e1cea5a4a Added Entity#setRotation.
Unlike Entity#teleport this can also be used while the entity is inside a vehicle.
2019-04-03 19:46:27 +11:00
Yannick Lamprecht
39a287b7da Don't ignore newlines in PlayerListHeader/Footer 2019-03-10 11:04:15 +11:00
md_5
b021230837 Cap Channel Registrations 2019-01-05 16:21:07 +11:00
md_5
8e65d8df6c SPIGOT-4560: Add HumanEntity.sleep and related APIs 2019-01-02 14:43:12 +11:00
md_5
79ded7a8ca SPIGOT-1811: Death message not shown on respawn screen 2018-12-27 11:37:19 +11:00
md_5
96c461b3a5 API to get client side view distance. 2018-11-02 21:24:14 +11:00
md_5
ce1af0c348 Update to Minecraft 1.13.1 2018-08-26 12:00:00 +10:00
md_5
15da706706 SPIGOT-4258: Add Player.updateCommands method 2018-08-12 09:41:00 +10:00
md_5
3b8f5be77b SPIGOT-1714: Draft API for player list header / footer 2018-07-29 21:30:31 +10:00
md_5
4e2f571337 Fix Player.playNote 2018-07-22 14:40:48 +10:00
md_5
421c1728c8 Update to Minecraft 1.13-pre7 2018-07-15 10:00:00 +10:00
md_5
ca6d2cf9dc Add validation checks to CraftPlayer.teleport 2018-07-11 09:06:48 +10:00
md_5
8bb4f6ccc1 SPIGOT-3813: Player.setHealth not reliable in conjunction with attribute API 2018-02-12 08:59:32 +11:00
md_5
9ab298de7b SPIGOT-3807: Improve getEyeHeight 2018-02-10 12:17:00 +11:00
md_5
e1fb9cb640 Send title timings before sending titles 2017-12-30 13:39:54 +11:00