Commit Graph

2567 Commits

Author SHA1 Message Date
Jake Potrebic
de620b8480
Clone mutable types in events when changes are discarded (#10333) 2024-03-20 21:42:29 +01:00
maxcom1
05fe15e0fc
Fire EntityChangeBlockEvent on beehive nectar deposit (#10306)
* Add BeehiveNectarDepositEvent

* Fire EntityChangeBlockEvent instead of a separate event
2024-03-20 12:35:10 -07:00
Nassim Jahnke
55ffcb1111
Fix tripwire disarming not working as intended 2024-03-19 20:09:02 +01:00
viciscat
99a641690a
Expand Hopper BlockState API (#10328) 2024-03-16 20:28:50 +01:00
Jake Potrebic
d361a7f609
Fix DamageSource API (#10307)
Uses the correct entity in the EntityDamageByEntity event
Returns the correct entity for API's DamageSource#getCausingEntity
2024-03-16 11:51:22 -07:00
leguan
e6034867ba
Add onboarding message for initial server start (#10312) 2024-03-16 19:10:26 +01:00
Suppergerrie2
ab1afb0ed8
Fix missing profiler.pop() in PathFinder::findPath (#10320) 2024-03-15 11:09:47 +00:00
Bjarne Koll
62b220a87f
Allow passenger retaining teleport via end gateway (#10283)
Previously paper disabled the abilities for entities to teleport via end
gateways if they were being used as a vehicle.

While the behaviour generally worked fine for entities riding other
entities, players would quickly end up in an invalid state, not seeing
their passenger anymore.

This commit removes the paper introduced limitation by now properly
updating the passengers location of a player when they are teleporting
through an end gateway.
2024-03-10 01:08:44 +01:00
Jake Potrebic
80e1a45959
Add param to overrides to the correct method is called (#10308) 2024-03-09 18:16:27 -05:00
Jake Potrebic
a0931f4864
Updated Upstream (Bukkit/CraftBukkit) (#10301)
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:
7ca2b46c SPIGOT-7594: Fix typo and include missing MinecraftExperimental annotation in Loot Table enum

CraftBukkit Changes:
176c0ad39 Fix copying BlockStates with fields (eg, Banner)
ee685bd2a Fix Camel not standing up when hurt
619936d4b Increase outdated build delay
2024-03-08 15:52:00 -08:00
Jake Potrebic
6ad63fba30
Per world ticks per spawn settings (#6891) 2024-03-03 17:53:58 -05:00
Owen
89d51d5f29
Allow enabling sand duping (#10191)
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable.

It should be noted that this decision does not promise all future exploits will be configurable.
2024-03-03 17:05:34 -05:00
Yannick Lamprecht
b21eb4d9a4
add overloads to use suspicious effect entry to mushroom cow and suspicious stew meta (#10245)
The existing method with PotionEffect suggests that all attributes are used. In fact, only the PotionEffectType and the duration are used.



---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
2024-03-03 16:40:18 -05:00
Shane Freeder
60218cd207
Don't tick empty worlds (#9025) 2024-03-03 16:10:45 -05:00
Jake Potrebic
880fef77ab
Deprecate extra ban methods with raw BanEntry (#9580) 2024-03-03 12:54:52 -08:00
Gero
ce5c8dd379
Configurable max block/fluid ticks (#10266) 2024-03-03 15:43:00 -05:00
Yannick Lamprecht
bbc03d8116
improve BanList types (#10239) 2024-03-03 12:36:17 -08:00
Rodney
8870d22bc7
Fire EntityDamageByEntityEvent for unowned wither skulls patch (#10244) 2024-03-03 14:35:50 -05:00
Yannick Lamprecht
9c4bb0df0e
add rich message component support to configuration (#10225) 2024-03-03 10:59:22 -08:00
granny
54a23403da
check if itemstack is stackable first (#10285) 2024-03-03 10:37:00 -08:00
Nassim Jahnke
681bbff110
Fix spawnreason saving 2024-02-23 23:15:11 +01:00
Bjarne Koll
d0ebfbbd15
Fix corrupted plugin.yml breaking plugin loading (#10279)
Fix corrupted plugin.yml file in one plugin not loading any plugins by
the server.

Co-authored-by: Aleksander Jagiello <themolkapl@gmail.com>
2024-02-23 18:54:44 +01:00
Shane Freeder
e3bc4c4107
Make debug mode print current configuration phase 2024-02-23 13:54:52 +00:00
Nassim Jahnke
71c84c8132
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277)
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:
9a80d38c SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-722: Add EntityRemoveEvent
258086d9 SPIGOT-7417, PR-967: Add Sign#getTargetSide and Sign#getAllowedEditor
ffaba051 SPIGOT-7584: Add missing Tag.ITEMS_NON_FLAMMABLE_WOOD

CraftBukkit Changes:
98b6c1ac7 SPIGOT-7589 Fix NullPointerException when bans expire
a2736ddb0 SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-1008: Add EntityRemoveEvent
5bf12cb89 SPIGOT-7565: Throw a more descriptive error message when a developer tries to spawn an entity from a CraftBukkit class
76d95fe7e SPIGOT-7417, PR-1343: Add Sign#getTargetSide and Sign#getAllowedEditor

Spigot Changes:
e9ec5485 Rebuild patches
f1b62e0c Rebuild patches
2024-02-23 14:37:33 +01:00
Shane Freeder
3ea95efdeb
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
4939f87118
Add more ResourceLocation checks, some cleanup 2024-02-18 13:52:12 +01:00
Jason Penilla
351923d17e
Run round-trip adventure codec tests with JSON, NBT, and Java ops. Use JavaOps for conversions. (#10031) 2024-02-17 16:58:56 -05:00
viciscat
d95341e44a
FluidState API (#9951)
* Add new FluidState API functionality
---------

Co-authored-by: Bjarne Koll <lynxplay101@gmail.com>
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2024-02-17 15:44:03 -05:00
David Mayr
1964b22439
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 12:22:00 -08:00
Emilia Kond
9a66f2b2e1
[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 11:37:55 -08:00
leguan
a07d526698
[ci skip] Fix JavaDoc mistake in BlockPistonRetractEvent (#10250) 2024-02-17 11:15:15 -08:00
Jake Potrebic
7ccefdcd6c
Fire entity knockback event for ownerless tnt (#7171) 2024-02-16 15:44:43 -08:00
Shane Freeder
7f85940143
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 23:44:38 +01:00
Pedro
37df12143c
Fix BlockState being set to null for damage events (#10252) 2024-02-15 10:05:50 +01:00
Nassim Jahnke
31699ae9a8
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
cde5587e58
Add getChunkSnapshot includeLightData parameter (#10234) 2024-02-10 22:28:56 +01:00
Emilia Kond
4b58a85158
Fire BlockPreDispenseEvent for droppers (#10226) 2024-02-10 22:19:22 +01:00
Jake Potrebic
e6a521514e
Properly track the changed item from dispense events (#8658) 2024-02-10 22:17:24 +01:00
Jake Potrebic
2fa2d32ceb
Fix possible StackOverflowError for some dispenser iteractions (#8524) 2024-02-10 21:17:40 +01:00
Lulu13022002
bf6e803c6c
Fix WaterBottleSplashEvent not forwarding hit result (#10203) 2024-02-10 20:27:29 +01:00
Warrior
99bae594c8
Propagate failed to bind to port error (#10235) 2024-02-10 20:23:50 +01:00
Yannick Lamprecht
581fb30a4c
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-09 17:12:50 -08:00
Lulu13022002
97c01206bc
Fix fox drops on death (#8862) 2024-02-09 16:07:10 -08:00
Tamion
cbe62d91fb
Add Conduit API (#10195) 2024-02-09 23:03:27 +01:00
Micah Rao
69b52b4d8e
Check for server JARs in plugin directory (#10228) 2024-02-09 22:05:13 +01:00
Tamion
9c04729de1
Add Arrow/Stinger Removal Time API (#10193) 2024-02-09 21:56:13 +01:00
Moulberry
534659e97e
Fix NotNull locales (#10216)
Two methods returning locales are annotated @NotNull, despite being able
to return null
2024-02-09 20:30:50 +00:00
Jake Potrebic
934cd77da8
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
9e171ef8ff
Improve tag parser handling, move hunks out of chunk system patch 2024-02-05 12:31:51 +01:00
Nassim Jahnke
c5d168cef9
More provider source fixup 2024-02-02 12:44:09 +01:00