Commit graph

867 commits

Author SHA1 Message Date
Jake Potrebic
93a75a9588 Add OBSTRUCTED result to BedEnterResult enum 2020-12-24 12:44:34 -08:00
Automated
0c40a013dd [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2020-12-28 07:11:59 -05:00
Jake Potrebic
43a4ab7b04 added PlayerTradeEvent 2020-07-02 16:14:36 -07:00
Mariell
04d4054c16 [CI-SKIP] Deprecate the view distance APIs on Player (#4945) 2020-12-27 12:37:37 +01:00
Matthew Miller
cfd2fcf443 Add API to get Tile Entities in a Chunk by Predicate 2020-12-18 21:24:21 +10:00
Mark Vainomaa
ec665f60d2 Expose LivingEntity hurt direction 2020-12-22 22:32:15 +01:00
Shane Freeder
49458cc927 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:
6f9fe1d9 #562: Add API to set equipment silently
bcddb754 SPIGOT-6256: Add method to check if the entity is in water

CraftBukkit Changes:
878b4375 #772: Add API to set equipment silently
22d7fcc9 SPIGOT-6256: Add method to check if the entity is in water
2020-12-21 07:56:22 +00:00
MiniDigger | Martin
57c5f5e566 Remove Paper's UnsafeUtils (#4913) 2020-12-19 21:14:37 +01:00
Automated
dc04ee87f8 [CI-SKIP] [Auto] Rebuild Patches
A recent commit has been made that caused patches to be out of order, rebuilding
2020-12-16 15:26:55 -05:00
Fruxz
459947e6bf Maded Title-Objects directy sendable to targets 2020-10-13 18:49:30 +02:00
ysl3000
11a4045767 Player Chunk Load/Unload Events
Co-authored-by: Mariell <proximyst@proximyst.com>
2020-10-31 23:06:21 +01:00
Jake Potrebic
8c473e7fcd deprecate IllegalPacketEvent (#4867) 2020-12-07 23:51:55 -08:00
William Blake Galbreath
d6057372b4 Add #getEligibleHumans to SkeletonHorseTrapEvent 2020-08-23 21:57:55 +02:00
Kyle Wood
08835cda45 Enable Multi-Release plugin jar support
Fixes #4841
2020-12-04 15:57:46 -08:00
Josh Roy
209f04eab2 Add PlayerShearBlockEvent 2020-08-27 15:39:24 -04:00
Nassim Jahnke
7c3f274871 Add more lightning API 2020-07-26 14:46:14 +02:00
Nassim Jahnke
744cdf7512 Add PlayerItemCooldownEvent 2020-08-25 14:01:03 +02:00
Anrza
89bdd85933 Add LivingEntity#clearActiveItem 2020-07-15 12:11:31 +02:00
Max Lee
33f101b760 Fix plugin provides not being listed behind name in /plugins (#4825) 2020-12-01 15:06:14 +01:00
Ineusia
14189f531d Add getDestroySpeed to Block API
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
2020-07-18 19:29:40 -05:00
HexedHero
2220d44459 Add Material Tags for Coral, Coral Fangs and Coral Blocks 2020-11-27 15:26:52 +00:00
Jason Penilla
ca25d24197 Villager resetOffers API 2020-10-03 21:20:10 -07:00
Jake Potrebic
da67283b6b Location#getHighestLocation should support Upstream API (#4770) 2020-11-16 06:44:14 -08:00
A248
5fa8189596 Add exception handlers for getChunkAtAsync convenience methods 2020-11-15 19:26:25 -05:00
Mariell Hoversholm
5d66ba7613 Add API for quit reason
The following has been tested:
- Disconnect from menu -> DISCONNECTED
- EssentialsX kick -> KICKED
- Suspend server JVM -> DISCONNECTED
- Suspend client JVM -> TIMED_OUT
- Call #exceptionCaught -> ERRONEOUS_STATE

Suspension was done through `kill -STOP` and subsequently `kill -CONT`
after the player has (been) disconnected.

Closes #254.
2020-11-14 16:23:10 +01:00
Zach Brown
4ca833b607 Fix minor issue with JavaDoc breaking doc deploys 2020-11-11 21:19:46 -06:00
Mariell Hoversholm
c451989b86 Add ignore discounts API 2020-11-09 20:45:38 +01:00
Jake Potrebic
21e0ef27f1 Add custom ranges to beacons
Adds 3 methods to the Beacon block state to set a custom range for the beacon.
One to set the range, one to get the range, and one to reset the range
(aka go back to using the default range-by-beacon-tier system).
2020-06-28 01:20:49 -06:00
Alfie Smith
867d1d5de7 Item no age & no player pickup 2020-11-07 01:23:06 +00:00
Shane Freeder
c208709558 Updated Upstream (Bukkit/Spigot)
Upstream has released updates that appears 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:
eda400d3 SPIGOT-6213: MinecraftFont.getWidth(" ") returns 2 when it should be 3

Spigot Changes:
aa477927 #100: Allow sending messages from specific UUIDs
2020-11-03 09:14:21 +00:00
Daniel Ennis
6f4fbe1c89 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#4728)
Upstream has released updates that appears 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:
30885166 Update to Minecraft 1.16.4

CraftBukkit Changes:
3af81c71 Update to Minecraft 1.16.4

Spigot Changes:
f011ca24 Update to Minecraft 1.16.4

Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
2020-11-02 21:22:15 -05:00
oxygencraft
0e476e7c68 Add getOfflinePlayerIfCached(String) 2020-10-25 18:42:35 +11:00
Mariell
7811aecad6 Updated Upstream (Bukkit/CraftBukkit) (#4688)
Upstream has released updates that appears 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:
4abf9e96 #557: Add TNTPrimed#setSource method

CraftBukkit Changes:
dea41389 Remove outdated build delay.
9da3b5bf #762: Add TNTPrimed#setSource method
2020-10-26 16:02:55 +01:00
Shane Freeder
4d21a2e77a Add support for RanagedEntity API for newer mobs (Fixes #4678) 2020-10-22 13:01:44 +01:00
Trigary
7995c5cfeb Add player elytra boost API 2020-04-14 12:11:25 +02:00
Mariell
db28a6b208 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#4659)
Upstream has released updates that appears 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:
01e22e09 Misc maven build updates
746f5324 #556: Allow sending messages from specific UUIDs
92b99cde #501: Add PersistentDataHolder to Chunk

CraftBukkit Changes:
4ef13f94 Misc maven build updates
04639f5a #759: Allow sending messages from specific UUIDs
77c894a2 #672: Add PersistentDataHolder to Chunk

Spigot Changes:
57bbdd8e Rebuild patches

Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
2020-10-17 12:39:45 +02:00
Shane Freeder
7391a61447 Revert "Updated Upstream (Bukkit/CraftBukkit/Spigot)"
This reverts commit d833a4aeef.
2020-10-17 10:48:00 +01:00
Shane Freeder
d833a4aeef Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
01e22e09 Misc maven build updates
746f5324 #556: Allow sending messages from specific UUIDs
92b99cde #501: Add PersistentDataHolder to Chunk

CraftBukkit Changes:
4ef13f94 Misc maven build updates
04639f5a #759: Allow sending messages from specific UUIDs
77c894a2 #672: Add PersistentDataHolder to Chunk

Spigot Changes:
57bbdd8e Rebuild patches
2020-10-17 09:18:39 +01:00
Mariell Hoversholm
478597ea05 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
e461dcfe #555: Item - add getters/setters for owner/thrower

CraftBukkit Changes:
055870c4 #758: Item - add getters/setters for owner/thrower
2020-10-14 16:00:43 +02:00
Aurora
89e42fccc4 Clarify the JavaDocs for Entity.getEntitySpawnReason() in response to #4361 2020-10-03 16:31:23 +02:00
Aurora
7e9b1e620c Remove unnecessary space for provided plugins, fixes #4608 2020-10-03 21:27:35 +02:00
BillyGalbreath
331d1ed71c Entity#isTicking (#4612) 2020-10-03 22:05:33 -05:00
MeFisto94
28be3aae37 Expose the Entity Counter to allow plugins to use valid and non-conflicting Entity Ids 2020-08-28 01:44:21 +02:00
Shane Freeder
9c1e6eab19 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
ccb9614e #548: LivingEntity - add methods for getting/setting invisibility

CraftBukkit Changes:
f8d4da08 #743: LivingEntity - add methods for getting/setting invisibility

Spigot Changes:
17d78dbd Rebuild patches
2020-09-19 12:29:53 +01:00
Aikar
9f446a771f (FIRST 1.16.3): Update Paper to 1.16.3
This is a pretty tiny update with very little changed. Recommended to update
from 1.16.2 ASAP as 1.16.2 is now no longer supported.

Plugins should mostly remain working as the NMS revision did not change.
2020-09-10 19:47:58 -04:00
Josh Roy
e7375f54fe Add additional open container api to HumanEntity 2020-08-26 02:30:08 -04:00
MiniDigger | Martin
e72b49b652 Fix javadoc (#4276) 2020-09-02 14:20:10 +02:00
Aikar
e6f2cd150f Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
565a5727 #533: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent

CraftBukkit Changes:
927200a9 #718: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent
2020-08-31 08:30:51 -04:00
ysl3000
8684dcd76e Create HoverEvent from ItemStack Entity
add myself to MIT list

Co-authored-by: Mariell <proximyst@proximyst.com>
Co-authored-by: MiniDigger | Martin <admin@minidigger.dev>
2020-07-06 22:19:08 +02:00
MeFisto94
21b927ed55 Add a way to get translation keys for blocks, entities and materials 2020-08-11 21:20:44 +02:00
BillyGalbreath
030eda8908 Add more Evoker API 2020-08-23 15:29:02 +02:00
Aikar
d417f6d48b Fix build conflicts 2020-08-30 14:38:49 -04:00
Eearslya Sleiarion
7324cdbd10 Add BellRingEvent for village bells (#2230) 2020-08-30 11:26:15 -07:00
Jason Penilla
5532c4b10b fix #4144 (#4170) 2020-08-30 11:24:23 -07:00
Aurora
7b6f125863 Update Armor items in PlayerArmorChangeEvent (#4243) 2020-08-29 20:26:49 +02:00
Shane Freeder
5591eeb4c2 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
323d6ca3 #535: Add EntityCategory API to LivingEntity
7d3323d8 #526: Add Block#applyBoneMeal()

CraftBukkit Changes:
bf451617 SPIGOT-6109: Improve loot handling
bfea4559 SPIGOT-6111: NPE in CraftHumanEntity#openWorkbench & CraftHumanEntity#openEnchanting
ee7116b4 Add note to CONTRIBUTING.md to suggest keeping commit messages / titles the same
eae15943 #721: Add EntityCategory API to LivingEntity
8c611560 #702: Add Block#applyBoneMeal()
8408de02 #716: Fix barrel open API playing sound twice
74b6982b #711: Add Full RGB support to the console
2020-08-27 14:37:37 +01:00
William Blake Galbreath
240e86489b Add playPickupItemAnimation to LivingEntity 2020-08-23 19:41:34 +02:00
Daniel Ennis
69ee95fa42 1.16.2 Release (#4123)
PaperMC believes that 1.16.2 is now ready for general release as we fixed the main issue plagueing the 1.16.x release, the MapLike data conversion issues.

Until now, it was not safe for a server to convert a world to 1.16.2 without data conversion issues around villages and potentially other things. If you did, those MapLike errors meant something went wrong.

This is now resolved.

Big thanks to all those that helped, notably @BillyGalbreath and @Proximyst who did large parts of the update process with me.

Please as always, backup your worlds and test before updating to 1.16.2!

If you update to 1.16.2, there is no going back to an older build than this.

---------------------------------

Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com>
Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com>
Co-authored-by: krolik-exe <69214078+krolik-exe@users.noreply.github.com>
Co-authored-by: BillyGalbreath <BillyGalbreath@users.noreply.github.com>
Co-authored-by: stonar96 <minecraft.stonar96@gmail.com>
Co-authored-by: Shane Freeder <theboyetronic@gmail.com>
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com>
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
Co-authored-by: commandblockguy <commandblockguy1@gmail.com>
Co-authored-by: DigitalRegent <misterwener@gmail.com>
Co-authored-by: ishland <ishlandmc@yeah.net>
2020-08-24 22:22:08 -04:00
DigitalRegent
773a850390 Brand support 2020-08-23 05:09:19 -07:00
Mariell Hoversholm
9b4ddafa60 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
eeb1042f #491: Add support to change block's lid state

CraftBukkit Changes:
8fb65851 #660: Add support to change block's lid state
2020-07-29 21:50:16 +02:00
Aikar
4364ae3263 Fix MaterialTags tests to actually pass 2020-07-27 23:15:22 -04:00
Ineusia
a5913be266 Expand MaterialTags v2 (#4009) 2020-07-27 22:05:54 -05:00
Max Lee
cc38a3d0c2 Fix sound/particles not showing when listening on BlockDestroyEvent (#3998) 2020-07-25 22:22:53 +01:00
Prof-Bloodstone
7673fda496 Updated Upstream (Bukkit/CraftBukkit) (#3980)
Upstream has released updates that appears 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:
09f10fd9 SPIGOT-5950: Add PrepareSmithingEvent event

CraftBukkit Changes:
7c03d257 SPIGOT-6011: End Gateways do not work on Non-Main End Worlds
d492e363 SPIGOT-6015: Small Armor Stand doesn't drop items
5db13eea SPIGOT-5950: Add PrepareSmithingEvent event
2020-07-23 01:35:44 +02:00
Nassim Jahnke
7db19cb346 Use title packet for actionbar methods (#3959) 2020-07-22 10:01:35 +02:00
Ineusia
15fe280169 Expand MaterialTags (#3964) 2020-07-22 01:20:57 -05:00
Gerrygames
1a755193a4 Support hex colors in getLastColors (#3922) 2020-07-17 19:05:52 +02:00
Bartosz Stefańczyk
c058eec373 Fix Explosion location - Fixes #3574 (#3826) 2020-07-06 21:27:19 +02:00
Aikar
198b0b96f3 Fix suggest-player-names-when-null-tab-completions - Fixes #3803
Seems changes upstream broke original implementation

moved check into method that actually does the injection
2020-07-05 03:11:54 -04:00
BillyGalbreath
3aa6d3b3c0 Implements #3761 - Add entity liquid API (#3762) 2020-07-05 02:00:09 -05:00
MiniDigger | Martin
4cb36133b6 Allow delegation to vanilla chunk gen 2020-04-29 02:12:51 +02:00
BillyGalbreath
b7c653f532 Add PrepareResultEvent (#3776)
Adds a new event for all crafting stations that generate a result slot item

Anvil and Grindstone now extend this event
2020-07-04 22:36:46 -05:00
Jake Potrebic
bbf35c13bb add EntityTargetLivingEntityEvent for new 1.16 mobs (#3782) 2020-07-04 19:30:13 -06:00
BillyGalbreath
3cf7163de4 Fix /plugins list not alphabetical to players (#3790) 2020-07-04 20:04:35 -05:00
MiniDigger | Martin
cbc2d143d7 Support components in ItemMeta (#3513) 2020-07-02 17:53:21 +02:00
chickeneer
eaeac03650 Add more material tags for 1.16 (#3750) 2020-07-01 22:02:07 -05:00
Automated
20bdc049da [Auto] Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
1cb03826 SPIGOT-5900: Re-order Material enum entries to match Minecraft's order
fdd705db #507: Add hasDiscoveredRecipe() and getDiscoveredRecipes()

CraftBukkit Changes:
551e770f5 SPIGOT-5900: Add test for the order of Material enum entries
8297676c2 #682: Add hasDiscoveredRecipe() and getDiscoveredRecipes()
2020-07-01 19:41:58 -04:00
MiniDigger | Martin
5000be556c [1.16] Fix MobGoals#getAllGoals not actually returning all goals (#3670) 2020-06-28 21:57:31 +02:00
Aikar
e1088e833c Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
f009c3dd SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround
e677c370 Update ECJ version
5058a35d SPIGOT-5860: Item.setItemStack should be NotNull

CraftBukkit Changes:
d77f4d9b SPIGOT-5810, SPIGOT-5835: 'Better' handling of Player.isOnGround
53c95627 SPIGOT-5865: Piglin does not trigger EntityPickupItemEvent
2ab04d24 Update ECJ version
7884e079 SPIGOT-5868: Blocks do not tick in custom nether / end
2a848286 SPIGOT-5863: Don't check colour in scoreboard length validation
f2cbce30 SPIGOT-5866: Beehive unknown TargetReason

Spigot Changes:
ad703da0 SPIGOT-5870: /plugins "website" field shows "version"
1a27cfd8 #98: Improve output of /plugins command using text components
732d5bab Disable checkstyle in Spigot blocks
0199a9a6 #97: Add Memory Usage to Ticks Per Second Command.
33ea98fc SPIGOT-5858: NPE: Joining the server with an invalid dimension
2020-06-27 21:54:05 -04:00
MiniDigger | Martin
67522d46ae [1.16] Make it run (#3626)
* She compiles!

Also readded the armorstand ticking patch, thanks cat

* Update mob goal api

* Misc fixes to make it run

drop per playing mob spawns for now
2020-06-26 14:04:38 +02:00
Aikar
1a45fc25f5 API update 2020-06-24 22:33:35 -04:00
Aikar
e212d4bb19 1.16.1 prep 2020-06-24 21:10:30 -04:00
Aikar
872f10bf7b Initial prep for 1.16
Remove patcehs we know need to go
add comment on one im not sure should be dropped

go ahead and fix patched repos to turn off gpg signing, as this
helps rebase/apply --continue commands not suck.

Go ahead and prep the pom file change
2020-06-24 04:38:17 -04:00
Jan Tuck
3d69f1846a Add PrepareGrindstoneEvent 2020-06-22 01:16:21 +02:00
Aikar
03240a3fdd Fix Player skulls for offline mode servers
Always use online mode for them in Profile API calls

Adds new API to profile API to let you control online mode yourself

Fixes #3594
2020-06-23 04:53:02 -04:00
Aikar
6260d7ba7f Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
b2f1908c SPIGOT-5783: Add helpful info to UnknownDependencyException
e4f46260 SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
529a9a69 SPIGOT-5751: Clarify behaviour of block drop-related API methods

CraftBukkit Changes:
8ea9b138 Remove outdated build delay.
ffc2b251 Revert "#675: Fix redirected CommandNodes sometimes not being properly redirected"
cb701f6b #675: Fix redirected CommandNodes sometimes not being properly redirected
c9d7c16b SPIGOT-2623: Add EntityEquipment methods to get/set ItemStacks by slot.
fad2494a #673: Fix Craftworld#isChunkLoaded
8637ec00 SPIGOT-5751: Made breakNaturally and getDrops returns the correct item if no argument is given

Spigot Changes:
a99063f7 Rebuild patches

Fixes #3602
2020-06-23 04:30:45 -04:00
Josh Roy
ce5e21f683 Add and implement PlayerRecipeBookClickEvent (#3351)
Co-authored-by: LordKorea <lk97798@posteo.net>
2020-06-23 00:33:08 -04:00
Nesaak
f0a807b3bd Expose getItemStack in Arrows 2020-05-22 13:56:24 -04:00
Mariell Hoversholm
0de2f11f56 Add clear reputation API 2020-05-26 21:49:02 +02:00
Max Lee
d18935ed70 Add Inventory getHolder methods without creating new block snapshots (#3535) 2020-06-20 20:34:56 +01:00
Aikar
3028a91f26 Show Plugins Event Listeners under Combined Total in Timings 2020-06-09 21:48:35 -04:00
oxygencraft
0045a21519 Change name and id to get from profile in AsyncPlayerPreLoginEvent (#3511)
Co-authored-by: Daniel Ennis <aikar@aikar.co>
2020-06-08 04:36:13 +10:00
Aikar
5201efc608 Add more information to Timing Reports
Still needs front end changes to see it yet though.

1) Adds Game Rules per world
2) Adds View distances per world
3) Removes extra garbage on lambda task names
4) Adds more memory information such as native load
5) Adds load average for non crap operating systems.
6) Fixes online mode showing false when privacy=true
7) Adds Data packs loaded
2020-06-02 23:26:29 -04:00
Shane Freeder
7ae7528cfb Provide a useful PluginClassLoader#toString
There are several cases where the plugin classloader may be dumped to the logs,
however, this provides no indication of the owner of the classloader, making
these messages effectively useless, this patch rectifies this
2020-05-31 15:28:35 +01:00
Aikar
8833b1ba15 Preload important classes such as Logger and JLine
This is for 2 reasons:
1) Ensuring our log4j is mostly loaded at OUR version.
   I've seen stack traces with line numbers that do not match our version. This means that some
   plugin has shaded in log4j and their loaded version is mixing with ours....
   So by at least trying to load a bunch of log4j classes before we load plugins, we can be
   more sure mixed versions are not loading.

2) If the jar file is replaced while the server is runnimg class not found errors galore
   This will preloaod a bunch of classes commonly seen to error during shutdown due to this.

   The goal here is to help let the server shutdown gracefully as possible. Some plugins will
   still blow up here if they access a class that hadn't been loaded yet, but goal is to at least
   stop freezing the shutdown process as it does with JLine and Log4j errors requiring an external kill.

   Ideally you should not replace jars while the server is running, but it is something that happens in
   development for testing.

Updated test server to do a copy though to avoid this happening in Paper development.
2020-05-24 13:09:02 -04:00
Aikar
690f01f604 Protect the visible chunk map from plugins touching it, trim Timing Errors
Blow up if a plugin tries to mutate visibleChunks directly and prevent them
from doing so.

Also provide a safe get call if any plugins directly call get on it so
that it uses the special logic to check pending.

Also restores ABI for the visibleChunks field back to what it was too.

Additionally, remove the stack trace from Timings Stack Corruption for any
error thrown on Minecraft Timings, and tell them to get the error ABOVE this
instead, so people stop giving us useless error reports.

Also fixes a memory leak when the source map down sizes but dest map didn't,
which resulted in lingering references to old chunk holders.

Fixes #3414
2020-05-20 22:22:47 -04:00
Aikar
7f4b4fb32b Fix race condition reintroduced in Prioritize class loader patch 2020-05-18 01:18:44 -04:00
Mariell Hoversholm
96bb9740fa Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format.
2020-04-30 16:59:24 +02:00
Mariell Hoversholm
969db3e0c5 Prioritise own classes where possible
This adds the server property `Paper.DisableClassPrioritization` to disable
prioritization of own classes for plugins' classloaders.

This value is by default not present, and this will therefore break any
plugins which abuse behaviour related to not using their own classes
while still loading their own. This is often an issue with failing to
relocate or shade properly, such as when shading plugin APIs like Vault.

A plugin's classloader will first look in the same jar as it is loading
in for a requested class, then load it. It does not re-use other
plugins' classes if it has the chance to avoid doing so.

If a class is not found in the same jar as it is loading for and it does
find it elsewhere, it will still choose the class elsewhere. This is
intended behaviour, as it will only prioritise classes it has in its own
jar, no other plugins' classes will be prioritised in any other order
than the one they were registered in.

The patch in general terms just loads the class in the plugin's jar
before it starts looking elsewhere for it.
2020-04-27 18:32:30 +02:00
Max Lee
acbe459f57 Add missing mob goals for API (#3367) 2020-05-17 04:19:24 +01:00
MiniDigger | Martin
792993faca Expand Pathfinding API with more options 2020-05-16 15:15:11 +02:00
Josh Roy
6df55d9c05 Potential bed api (#3339) 2020-05-11 00:19:04 -04:00
Aikar
56d8694bd9 Add Urgent API for Async Chunks API and use it for Async Teleport
This also cleans up the implementation of Async Chunks to get rid of most
Consumer callbacks and instead return futures.

This lets us propogate errors correctly up the future chain
(barring one isn't lost even deeper in the chain...)

So exceptions can now bubble to plugins using getChunkAtAsync
2020-05-09 22:30:28 -04:00
Aikar
2a0201d137 Add Spawn Entity SpawnReason API
So you can specify why an entity is spawning, ie NATURAL
2020-05-09 13:11:43 -04:00
Aikar
d2a300598c Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
da9ef3c5 #496: Add methods to get/set ItemStacks in EquipmentSlots
3abebc9f #492: Let Tameable extend Animals rather than Entity
941111a0 #495: Expose ItemStack and hand used in PlayerShearEntityEvent
4fe19cae #494: InventoryView - Add missing Brewing FUEL_TIME

CraftBukkit Changes:
933e9094 #664: Add methods to get/set ItemStacks in EquipmentSlots
18722312 #662: Expose ItemStack and hand used in PlayerShearEntityEvent
2020-05-06 06:05:22 -04:00
Aikar
1127deb87d Rebuild all patches using the new rebuild pattern 2020-05-06 05:48:49 -04:00
Mariell Hoversholm
45dc9552b1 Add villager reputation API 2020-04-22 23:46:57 +02:00
Spottedleaf
584c2fbe18 No-Tick view distance implementation - Closes #3196
Implements world view distance getters/setters

Per-Player is absent due to difficulty of maintaining
the diff required to make it happen.
2020-05-06 03:49:52 -04:00
Nassim Jahnke
2baf3d7f5b Add item slot helper methods for various inventories (#3221) 2020-05-06 01:49:16 +02:00
MiniDigger | Martin
d17856519c Mob Goal API 2020-04-30 17:18:45 +02:00
Aikar
bce99d4a94 Fix being kicked in survival for block picking - Fixes #3277 2020-05-02 13:32:03 -04:00
MiniDigger | Martin
4564d6b566 Expose game version (#3274) 2020-05-02 10:56:08 +02:00
Aikar
6daf4a783f Special case Keep Alive packets from Anti Xray
If a server enables Anti Xray, packet sending can be delayed until the
chunk has been obfuscated, blocking the entire queue from going out.

On a busy server, considering Anti Xray can only operate on a single
thread, it is quite possible the obfuscation backlog can get quite behind
resulting in a delay of sending packets.

And logging in is a clear area where lots of chunks are going to be queued
for obfuscation....

We should probably special case a few more than this (such as chat),
but this will hopefully help the keep alive issues some people run into.
2020-05-02 00:53:57 -04:00
Aikar
b06cb423cb Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
b999860d SPIGOT-2304: Add LootGenerateEvent

CraftBukkit Changes:
77fd87e4 SPIGOT-2304: Implement LootGenerateEvent
a1a705ee SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent
41712edd SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
2020-05-01 18:03:47 -04:00
Shane Freeder
964408d7d9 Bump API ASM version to follow server 2020-04-30 22:00:55 +01:00
Aikar
f42b510b51 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
220bc594 #486: Add method to get player's attack cooldown
21853d39 SPIGOT-5681: Increase max plugin channel size
5b972adc Improve build process
b55e58d9 Note which custom generator is missing required method

CraftBukkit Changes:
893ad93b #650: Add method to get player's attack cooldown
ef706b06 #655: Added support for the VM tag jansi.passthrough when processing messages sent to a ColouredConsoleSender.
e0cfb347 SPIGOT-5689: Fireball.setDirection increases velocity too much
94cb030f SPIGOT-5673: swingHand API does not show to self
b331a055 SPIGOT-5680: isChunkGenerated creates empty region files
e1335932 Improve build process
a8ec1d60 Add a couple of method null checks to CraftWorld
ce66f693 Misc checkstyle fixes
8bd0e9ab SPIGOT-5669: Fix Beehive.isSedated

Spigot Changes:
2040c4c4 SPIGOT-5677, MC-114796: Fix portals generating outside world border
ab8f6b5a Rebuild patches
e7dc2f53 Rebuild patches
2020-04-27 03:34:45 -04:00
nick
6f8867b6ae Add getter and setter for villager's numberOfRestocksToday (#3231) 2020-04-27 02:13:41 -04:00
Aikar
0c2014644b Implement Brigadier Mojang API
This is the start of a new module for Paper to add support for API's
that interface Mojang API's directly.

This allows us to version properly by MC version incase Mojang makes any major breaking changes.

It also lets us separate Mojang API's from Paper-API so our downstream friends at Glowstone
will not have to worry about Mojang code.

Adds AsyncPlayerSendCommandsEvent
  - Allows modifying on a per command basis what command data they see.

Adds CommandRegisteredEvent
  - Allows manipulating the CommandNode to add more children/metadata for the client
2020-04-27 01:37:37 -04:00
Wesley Smith
085a331e9d Fix Potion#toItemStack swapping the extended and upgraded constructor values (#3216) 2020-04-24 19:01:45 -04:00
nossr50
cfacd0543e Add PlayerAttackEntityCooldownResetEvent
This event is called when processing a player's attack on an entity
right before their attack strength cd is reset, there are no existing
events that fire within this period of time so it was impossible to
capture the players attack strength via API prior to this commit.

The event is cancellable, which will just skip over the normal reset of
attack strength cd
2020-03-26 20:04:19 -07:00
Aikar
fd9350e9ba Clean up duplicate PlayerInitialSpawnEvent
Confused on this one, as commit history says Spigots version is older
than our version, so i'm not sure how we ended up duplicating this when
the 2 events are 100% identical.

Subclass spigots event and rely on the inheritance system, and clean up
the duplicate event fires.

Fix Spigots setPosition to use setPositionRaw to avoid chunk load prematurely.
2020-04-19 03:11:02 -04:00
MiniDigger | Martin
d97ce19f49 Add Player Client Options API (#2883) 2020-04-17 06:10:38 +02:00
Aikar
902942d9e4 Fix Optional null issue - Fixes #3155
Also check class loader cache before locking to speed up cached hits to avoid the lock

wasn't gonna make a unique build just for that but can lump it in here.
2020-04-16 03:57:02 -04:00
Gergely Sarkozi
26d02ff3c1 Make JavaClassLoader thread-safe (Fixes #3137) (#3144)
* Make PluginClassLoader thread-safe (fixes #3137)

* Clean up implementation of MT safe class loader

Co-authored-by: Aikar <aikar@aikar.co>
2020-04-15 09:39:39 +02:00
Aikar
845a0abb0b Disable Sync Events firing Async errors during shutdown
This is how it use to behave on Paper, and this is totally destroying
the ability to try to shut the server down gracefully during the
shutdown process as events firing on the watchdog thread are throwing
errors.

This isn't an issue on Spigot

This has caused me so many rollbacks on watchdog already :(
2020-04-11 21:50:32 -04:00
Aikar
98218db96f Use dedicated thread for main thread blocking chunk loads
In most cases, this change won't benefit much. However, there
exists the possibility that your Chunk Task threads are all busy
doing super slow work such as converting chunks.

If this occurs, the main thread blocking tasks, even at highest priority,
has to wait for some thread to become available.

This change gives us a waiting thread used only for main thread blocking
tasks, as well as an increased thread priority level, so that the OS
will give priority to this thread over the other threads.

This is more about guarantees, and won't be any real performanc boost
to anyone who has low or fast activity on their chunk tasks anyways.

But not all of us force upgrade our worlds, and this can be a life saver.

also reordered some patches because multiple PR's were merged.
2020-04-11 04:40:00 -04:00
BillyGalbreath
c8367bb129 Add tick times API and /mspt command (#3102) 2020-04-11 00:52:17 -05:00
Josh Roy
4042fd2067 Add API MinecraftServer#isStopping (#3129) 2020-04-11 01:51:35 -04:00
Aikar
f481e800ee Drowned is a RangedEntity (fixes API for Drowned to support Ranged) 2020-04-09 21:30:38 -04:00
Aikar
b7de98fcb0 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
7361a62e SPIGOT-5641: Add Block.getDrops(ItemStack, Entity)
1dc91b15 Add specific notes about what is not API
2b05ef88 #484: Allow statistics to be accessed for offline players

CraftBukkit Changes:
f7d6ad53 SPIGOT-5603: Use LootContext#lootingModifier in CraftLootTable
5838285d SPIGOT-5657: BlockPlaceEvent not cancelling for tripwire hooks
f325b9be SPIGOT-5641: Add Block.getDrops(ItemStack, Entity)
e25a2272 Fix some formatting in CraftHumanEntity
498540e0 Add Merchant slot delegate
b2de47d5 SPIGOT-5621: Add missing container types for opening InventoryView
aa3a2f27 #645: Allow statistics to be accessed for offline players
2122c0b1 #649: CraftBell should implement Bell
2020-04-08 03:49:15 -04:00
Aikar
a25f99d254 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
122289ff Add FaceAttachable interface to handle Grindstone facing in common with Switches
a6db750e SPIGOT-5647: ZombieVillager entity should have getVillagerType()

CraftBukkit Changes:
bbe3d58e SPIGOT-5650: Lectern.setPage(int) causes a NullPointerException
3075579f Add FaceAttachable interface to handle Grindstone facing in common with Switches
95bd4238 SPIGOT-5647: ZombieVillager entity should have getVillagerType()
4d975ac3 SPIGOT-5617: setBlockData does not work when NotPlayEvent is called by redstone current
2020-04-02 17:07:06 -04:00
Shane Freeder
ed80c4e6a5 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
564ed152 #482: Add a DragonBattle API to manipulate respawn phases etc
9f2fd967 #474: Add ability to set other plugin names as provided API so others can still depend on it

CraftBukkit Changes:
fc318cc1 #642: Add a DragonBattle API to manipulate respawn phases etc
796eb15a #644: Fix ChunkMapDistance#removeAllTicketsFor not propagating ticket level updates
a6f80937 SPIGOT-5606: call BlockRedstoneEvent for fence gates

Spigot Changes:
a03b1fdb Rebuild patches
2020-03-26 02:37:20 +00:00
Shane Freeder
564195d1bd Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
6148fca7 SPIGOT-5484: Add more spawn tick settings

CraftBukkit Changes:
fc249340 SPIGOT-5484: Add more spawn tick settings

Spigot Changes:
6de3d4be Rebuild patches
2020-03-10 11:01:15 +00:00
Shane Freeder
9079e78a20 Prevent teleporting dead entities (#2803) 2020-03-03 05:28:35 +00:00
Gergely Sarkozi
8087b810b4 Add hand to BlockMultiPlaceEvent (fixes #2997) (#2998) 2020-03-02 21:55:31 +01:00
Shane Freeder
4e2b034069 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
fd28180e #479: Add LivingEntity#attack, LivingEntity#swingMainHand, LivingEntity#swingOffHand
ae72ba3a SPIGOT-5591: Allow concurrent potion effects

CraftBukkit Changes:
3d61a853 Fix formatting in CraftLivingEntity
f7ab3055 #633: Add LivingEntity#attack, LivingEntity#swingMainHand, LivingEntity#swingOffHand
d5ef2eab SPIGOT-5591: Allow concurrent potion effects
25a9a9ff SPIGOT-5592: Custom ChunkGenerator can cause bugged dirt
3f6d0de9 Make it clear in error messages that api-version above 1.13 is also supported
2020-02-25 18:57:15 +00:00
Shane Freeder
0bc0116a01 Fix nullability annotation for Tameable#getOwnerUniqueId (Fixes #2968) 2020-02-22 15:30:42 +00:00
Shane Freeder
69d714b0c7 Don't NPE on exporting config with null values (Fixes #2973) 2020-02-22 15:22:06 +00:00
Shane Freeder
d78fc1d234 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
f52c70ab Fix incorrect nullability in MultipleFacing
6af4c0b2 SPIGOT-5311: Add API to get/set item associated with throwable projectiles
97aeae56 Add set/isAware to disable Vanilla AI components of a Mob

CraftBukkit Changes:
fba9f487 Improve legacy conversion of some materials that changed post flattening
b1ba8749 Move Bukkit.Aware loading/saving to correct location
f7cdb53c SPIGOT-5311: Add API to get/set item associated with throwable projectiles
689f429c #634: Cross platform patch scripts
ab85433d Add set/isAware to disable Vanilla AI components of a Mob

Spigot Changes:
8faa8b45 Rebuild patches
2020-02-21 17:52:20 +00:00
BillyGalbreath
b8d82b73ea Entity Jump API (#1587) 2020-02-10 22:28:39 -06:00
Zach Brown
51b5681830 Clean up imports on ThrownEggHatchEvent 2020-02-09 01:04:26 -06:00
BillyGalbreath
de672475b1 Add ThrownEggHatchEvent (#1982)
Add a new event similar to PlayerEggThrowEvent but without the Player
requirement (dispensers can throw eggs to hatch as well).
2020-02-09 00:32:29 -06:00
Zach Brown
c98952aa60 Update upstream B/CB
--- work/Bukkit
Submodule work/Bukkit 6a4242cb..337955e3:
  > SPIGOT-5468: Improve Beehive TileEntity API
  > #473: Add an API for passing the heightmap to getHighestBlockAt* method

--- work/CraftBukkit
Submodule work/CraftBukkit 807a677e..708be695:
  > SPIGOT-5468: Improve Beehive TileEntity API
  > #624: Add an API for passing the heightmap to getHighestBlockAt* method
  > MC-135989, SPIGOT-5564: Don't kick players for flight while riptiding

This deprecates the Paper getHighestBlockAt HeightMap APIs now that
Bukkit has added their own. These methods will stick around long enough
for people to migrate. Their API is pretty much the same as ours,
migration should be quick and easy.
2020-02-08 18:32:48 -06:00
Shane Freeder
e349de0c78 Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
6a4242cb #468: Allow delegation of certain elements to Vanilla when using a custom ChunkGenerator
c6697f90 SPIGOT-5559: Add EntityPotionEffectEvent causes for PATROL_CAPTAIN and WITHER_ROSE
9c1fa040 #467: Add method to remove a recipe by its key
3961d1aa Add nb-configuration.xml to .gitignore

CraftBukkit Changes:
d70084e5 Remove unused seed in CustomChunkGenerator
8a66d4c7 #619: Allow delegation of certain elements to Vanilla when using a custom ChunkGenerator
c2dc19d3 Craftbukkit -> CraftBukkit
ae45e092 SPIGOT-5559: Add EntityPotionEffectEvent causes for bee, raiders and wither rose
00980376 #618: Add method to remove a recipe by its key

Spigot Changes:
c574e08b Rebuild patches
13c24cc4 Rebuild patches
2020-02-02 11:53:48 +00:00
Shane Freeder
1eb775c6dc Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
d0800d0c Update checkstyle
e4e4bf70 Remove package-info from tests, breaks some IDEs
d6651bb0 No longer necessary to synchronize sync events

CraftBukkit Changes:
e82b5477 SPIGOT-5556: Some biome methods use incorrect positions
544ccdc5 Update checkstyle
512ff7a5 Print legacy load reason in debug mode
df371c1b SPIGOT-5554: Clear error message when BossBar is used for not fully joined players
18168500 Update scriptus
6bbb4e73 Clean up CraftBlockData.toString
b1e96bd5 SPIGOT-5551: BlockState.setData fails when used by legacy plugin

Spigot Changes:
b9baf717 Add space before ocean seed output
13394884 Rebuild patches
2020-02-01 15:20:54 +00:00
Shane Freeder
29fe2d1e2f Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appears 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:
93e39ce1 Clarify documentation regarding getMaterial with legacyName = true
c3aeaea0 Improve dependency tracker
14c9d275 Add support for transitive depends in load access warning
c8afe560 SPIGOT-5526: Add EntityEnterBlockEvent
6bb6f07d SPIGOT-5548: Show error that hints towards plugins misusing reflection
ed75537d SPIGOT-5546: Fix bad depend access using wrong provider in message
4e4c0ee9 Fix buggy classloader warning triggering for all classes
89586a4c Print warning when loading classes from depends that have not been specified
d4fe9680 Fix bug where disablePlugin could remove ConfigurationSerializable classes from other plugins
85e683b7 Add additional checkstyle checks
612fd8e1 Correct max page count in BookMeta docs
fa8a9781 Correct max title length in BookMeta docs

CraftBukkit Changes:
ab13a117 SPIGOT-5550: Cancelled ProjectileLaunchEvent still plays sound for eggs
44016b1d SPIGOT-5538: Using javaw to run GUI prints input error
e653ae76 SPIGOT-5526: Call EntityEnterBlockEvent for bees trying to enter hives
6515ea49 SPIGOT-5537: Bee nests generated by growing trees near flower have no bees
d82b3149 Remove unused CraftWorld.getId method
10763a88 Change some block == AIR checks to isAir to catch CAVE_AIR

Spigot Changes:
f2c1cd15 Rebuild patches
bcd458ad Reformat patches
2020-01-28 19:43:57 +00:00
Shane Freeder
cec72293a2 Updated Upstream (Bukkit)
Upstream has released updates that appears 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:
af40a289 Deprecate ArmorStand equipment methods in favour of the standard and more complete EntityEquipment methods
2020-01-22 18:19:54 +00:00
Zach Brown
1b14d02fe2 Update upstream B/CB
--- work/Bukkit
Submodule work/Bukkit 538ceaff..d6b23768:
  > SPIGOT-5534: ItemStack copy constructor can cause legacy layer to load

--- work/CraftBukkit
Submodule work/CraftBukkit efd6cf55..a81f6ed3:
  > SPIGOT-5532: Material.values() yields an exception
2020-01-21 21:06:28 -06:00
Spottedleaf
9774f1ff47 1.15.2 update (#2887)
Functional GUI fix added by billygalbreath
2020-01-21 18:02:07 -08:00
Shane Freeder
5141569293 Updated Upstream (Bukkit/CraftBukkit)
Upstream has released updates that appears 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:
58d299a5 Clarify that TotalExperience (XpTotal) is not displayed anywhere
3342ab1e #460: Add Player#sendExperienceChange
acc05b40 SPIGOT-5525: saveResource saves files from server jars

CraftBukkit Changes:
5c6b0dc6 SPIGOT-5526: Call EntityChangeBlockEvent for bees triggering crop growth
b91ce119 #601: Implement Player#sendExperienceChange
661bebc6 Remove outdated build delay.
2020-01-21 15:12:47 +00:00