Commit graph

8600 commits

Author SHA1 Message Date
Shane Freeder
e33fdd8189 Do not access world state to see if we can see a Player
Thrown into the adventure patch because I don't see the justification of a patch existing
for something like this.
2024-02-22 16:23:15 +00:00
Nassim Jahnke
bc49d1fd6c Add more ResourceLocation checks, some cleanup 2024-02-18 12:53:27 +01:00
Jason Penilla
14253bdf2c Run round-trip adventure codec tests with JSON, NBT, and Java ops. Use JavaOps for conversions. (#10031) 2024-02-17 14:58:56 -07:00
viciscat
c4731d1330 FluidState API (#9951)
* Add new FluidState API functionality
---------

Co-authored-by: Bjarne Koll <git@lynxplay.dev>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2024-02-17 21:44:03 +01:00
David Mayr
2d6b2baf34 Scoreboard objective number format api (#10036)
* feat: number format api

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: make each individual score customizable

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: fix incorrect descriptions

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use access transformers

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use adventure codecs

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* test: test for matching styles

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: convert number formats to interfaces

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: add style conversion to adventure patch

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use paper adventure method in PaperScoreboardFormat

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: rename methods to avoid a method in records

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* fix: check if objective is still registered

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: improve style conversion

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: modify how the getter behaves in score

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: use fluent naming

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: add spaces before the paper comments

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: styling changes

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* chore: make constant final

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* feat: add methods for styled format instead of constants

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* fix: remove incorrect getTrackedPlayers check

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: add . at the end of sentences

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: explain null behaviour

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* docs: mention score creation

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>

* rebase and fix javadoc comments

* remove server implementation defaults

* fix format for PaperScoreboardFormat

---------

Signed-off-by: David Mayr <davidliebtkekse@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-02-17 21:22:00 +01:00
Emilia Kond
c113eea77d [ci skip] Fix javadoc mistake in PluginMeta (#10258)
"Schematic versioning" is not a real thing. The intended versioning
scheme is "semantic versioning". Introduced in #8108.
2024-02-17 21:37:55 +02:00
leguan
060fd2cde7 [ci skip] Fix JavaDoc mistake in BlockPistonRetractEvent (#10250) 2024-02-17 20:15:15 +01:00
Jake Potrebic
1f16b25f9e Fire entity knockback event for ownerless tnt (#7171) 2024-02-16 15:44:43 -08:00
Shane Freeder
72004ecb99 Updated Upstream (Bukkit) (#10255)
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:
58ce1b0f Improve compatibility of new DamageSource API
2024-02-16 22:44:38 +00:00
Pedro
d884bac087 Fix BlockState being set to null for damage events (#10252) 2024-02-15 06:05:50 -03:00
Nassim Jahnke
41dcfd64b1 Updated Upstream (Bukkit/CraftBukkit) (#10242)
* Updated Upstream (Bukkit/CraftBukkit)

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:
a6a9d2a4 Remove some old ApiStatus.Experimental annotations
be72314c SPIGOT-7300, PR-829: Add new DamageSource API providing enhanced information about entity damage
b252cf05 SPIGOT-7576, PR-970: Add methods in MushroomCow to change stew effects
b1c689bd PR-902: Add Server#isLoggingIPs to get log-ips configuration
08f86d1c PR-971: Add Player methods for client-side potion effects
2e3024a9 PR-963: Add API for in-world structures
a23292a7 SPIGOT-7530, PR-948: Improve Resource Pack API with new 1.20.3 functionality
1851857b SPIGOT-3071, PR-969: Add entity spawn method with spawn reason
cde4c52a SPIGOT-5553, PR-964: Add EntityKnockbackEvent

CraftBukkit Changes:
38fd4bd50 Fix accidentally renamed internal damage method
80f0ce4be SPIGOT-7300, PR-1180: Add new DamageSource API providing enhanced information about entity damage
7e43f3b16 SPIGOT-7581: Fix typo in BlockMushroom
ea14b7d90 SPIGOT-7576, PR-1347: Add methods in MushroomCow to change stew effects
4c687f243 PR-1259: Add Server#isLoggingIPs to get log-ips configuration
22a541a29 Improve support for per-world game rules
cb7dccce2 PR-1348: Add Player methods for client-side potion effects
b8d6109f0 PR-1335: Add API for in-world structures
4398a1b5b SPIGOT-7577: Make CraftWindCharge#explode discard the entity
e74107678 Fix Crafter maximum stack size
0bb0f4f6a SPIGOT-7530, PR-1314: Improve Resource Pack API with new 1.20.3 functionality
4949f556d SPIGOT-3071, PR-1345: Add entity spawn method with spawn reason
20ac73ca2 PR-1353: Fix Structure#place not working as documented with 0 palette
3c1b77871 SPIGOT-6911, PR-1349: Change max book length in CraftMetaBook
333701839 SPIGOT-7572: Bee nests generated without bees
f48f4174c SPIGOT-5553, PR-1336: Add EntityKnockbackEvent
2024-02-11 22:28:00 +01:00
Warrior
0ec98e642c Add getChunkSnapshot includeLightData parameter (#10234) 2024-02-10 22:28:56 +01:00
Emilia Kond
1ba0d87cba Fire BlockPreDispenseEvent for droppers (#10226) 2024-02-10 23:19:22 +02:00
Jake Potrebic
e8e83aefff Properly track the changed item from dispense events (#8658) 2024-02-10 13:17:24 -08:00
Jake Potrebic
d767c37a54 Fix possible StackOverflowError for some dispenser iteractions (#8524) 2024-02-10 12:17:40 -08:00
Lulu13022002
9665ac3903 Fix WaterBottleSplashEvent not forwarding hit result (#10203) 2024-02-10 20:27:29 +01:00
Warrior
a863590fd5 Propagate failed to bind to port error (#10235) 2024-02-10 20:23:50 +01:00
Yannick Lamprecht
8129e8b3d5 itemstack expose tooltip lines (#10185)
* Itemstack Tooltip API

* re-order methods so advanced is first

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2024-02-10 02:12:50 +01:00
Lulu13022002
bda56c82ff Fix fox drops on death (#8862) 2024-02-10 01:07:10 +01:00
Tamion
8b0207ac93 Add Conduit API (#10195) 2024-02-09 23:03:27 +01:00
Micah Rao
dec84759dc Check for server JARs in plugin directory (#10228) 2024-02-09 16:05:13 -05:00
Tamion
03d5d38a6a Add Arrow/Stinger Removal Time API (#10193) 2024-02-09 21:56:13 +01:00
Moulberry
6591c39509 Fix NotNull locales (#10216)
Two methods returning locales are annotated @NotNull, despite being able
to return null
2024-02-10 04:30:50 +08:00
Jake Potrebic
4f9f09bb9b Lifecycle Event System (#9629)
* registering stuff event system

* simply by removing a ton of unneeded generics

* separate RegistryEvent and RegistrarEvent

* add logic for removing hooks when a plugin is disabled

* cleanup more

* swap around the way things are registered

* block further hook registrations for JavaPlugin

* Slightly more extensible to support registry mod API

* rename some types

* more moving/renaming

* remove 'hook' name

* Rename to 'lifecycle'

* move more impls for the server

* add priorities

* added lock for bootstrap event registration

* slight refactor to allow 'register anywhere' event types

* Move event type list to server impl

* use builder pattern to create event handler configurations

* add some more javadocs

* fix some issues, slight refactors

* call predicate and method renames

* add owner aware events

* rebased and refactored owner aware events

* add single helper method for registering simple handler

* compile fixes

* check owner and fix generics on register helper

* javadoc fixes and a few type renames

* more javadoc fixes

* move service loader file to correct location

* rename to Monitorable and Prioritizable

* add invalidation system for events after running them

* block reloading plugins in certain situations

* update test plugin

* remove dummy events

* rebase
2024-02-09 12:12:01 -08:00
Nassim Jahnke
679f34297e Improve tag parser handling, move hunks out of chunk system patch 2024-02-05 12:31:51 +01:00
Nassim Jahnke
f2da18d62e More provider source fixup 2024-02-02 12:44:09 +01:00
Nassim Jahnke
6fba18bac1 Add missing catch 2024-02-01 11:41:29 +01:00
Nassim Jahnke
e07a036b9f Fix sleeping pos desync 2024-02-01 10:53:15 +01:00
Nassim Jahnke
1cdeef88c5 Small refactor of Paper plugin context preparation 2024-02-01 10:51:29 +01:00
Lulu13022002
f7e469eb2e [ci skip] Cleanup events (#10202) 2024-02-01 10:15:57 +01:00
Rowan
d676979ea0 [ci skip] Fix incorrect documentation for BlockDropItemEvent (#10175)
Co-authored-by: Bjarne Koll <git@lynxplay.dev>
2024-01-27 20:42:46 +01:00
Jake Potrebic
cc0082f248 Properly check if a loot table exists (#10190) 2024-01-27 11:21:18 -08:00
Warrior
adf45d523a Disable memory reserve allocating (#10180) 2024-01-27 20:06:03 +01:00
Luis
dd9c9c8f6c Make spawn egg colours visible (#10158)
Co-authored-by: Yannick Lamprecht <1420893+yannicklamprecht@users.noreply.github.com>
2024-01-27 18:32:05 +00:00
Chase Henderson
c4aa25cd95 Shulker duplicate event (#10135) 2024-01-27 13:13:12 -05:00
Jake Potrebic
a86380bc18 [ci skip] clarify javadocs for Block#getDrops (#10153) 2024-01-27 09:35:09 -08:00
Tamion
7ed69f968c [ci skip] Remove IRC link from the README (#10194) 2024-01-27 13:11:43 +01:00
Nassim Jahnke
b63a0c5a8f Fix javadoc errors, remove unused classes 2024-01-26 21:34:40 +01:00
Nassim Jahnke
ad30e27e98 Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
1d522878 PR-966: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
cc01b745 PR-965: Add DragonBattle#setPreviouslyKilled
28e3702f SPIGOT-6921, PR-957: Add methods to remove all enchantments on an ItemStack
8872404e PR-961: Add BlockData#copyTo
4054cc7b PR-956: Add method to get an offline player's location

CraftBukkit Changes:
292ec79e0 SPIGOT-7568: Call EntityChangeBlockEvent for DecoratedPot
b44bf5aa8 SPIGOT-7575: SuspiciousStewMeta creates invalid PotionEffect data
161784713 PR-1340: Centralize the conversion from and to Minecraft / Bukkit registry items even more and add a test case for them
b93c5a30d PR-1338: Introduce getRespawnLocation as a replacement for getBedSpawnLocation
fb973486c SPIGOT-7570: PrepareItemCraftEvent#isRepair() always returns false
c9c24535e PR-1337: Add DragonBattle#setPreviouslyKilled
c8b4da803 SPIGOT-6921, PR-1330: Add methods to remove all enchantments on an ItemStack
95bc1c4f5 PR-1333: Add BlockData#copyTo
36e2f9ce1 PR-1329: Add method to get an offline player's location

Spigot Changes:
c198da22 SPIGOT-7563: Update to latest release of bungeecord-chat
2024-01-26 20:17:06 +01:00
Nassim Jahnke
98775ea8e5 [ci skip] Fixup a few bad comments 2024-01-26 19:41:41 +01:00
Nassim Jahnke
d71804b7f8 Finish moving patches back and improving compilable state 2024-01-25 10:54:46 +01:00
Nassim Jahnke
52438f04a0 [ci skip] Move chunk system patch back 2024-01-24 22:13:08 +01:00
Shane Freeder
49feea0525 Convert average tick value in the GUI to the correct granularity 2024-01-24 16:27:32 +00:00
Nassim Jahnke
8dae5500dd [ci skip] Move chunk system patch a bit back 2024-01-24 15:57:53 +01:00
Nassim Jahnke
2a60c836aa [ci skip] Fixup last commit 2024-01-24 14:05:59 +01:00
Nassim Jahnke
fae4fc60c9 [ci skip] Move chunk system patch back a bit 2024-01-24 13:07:40 +01:00
Nassim Jahnke
bafdfefb83 [ci skip] Remove removed patches 2024-01-24 11:55:36 +01:00
Nassim Jahnke
24e3f94688 [ci skip] (Mostly) finish adding identifying patch comments 2024-01-24 11:45:17 +01:00
FireInstall
15288309a2 Expose LootTable of DecoratedPot (#10023) 2024-01-23 21:57:17 +01:00
Jake Potrebic
b9b956adb8 Add BlockStateMeta#clearBlockState (#10160) 2024-01-23 12:41:47 -08:00