Big list o' Paper Features: Developer Edition


#1

This thread is a work in progress, check back later to see the full version!

Hey guys,

I thought I could use the new forum as a opportunity to create a one stop location for a overview of all the stuff paper adds, for both developers and server admins.
This thread is the developer version and lists all the API additions with links to the patches.
Click here to get to the server admin version: Big list o’ Paper Features: Serveradmin Edition

Heres the list of API additions:

  • The following libs are exposed to plugins:
  • Timingsv2 API: Use https://github.com/aikar/minecraft-timings to access the api for fallback to v1
  • API to toggle if a player should affect mob spawning (Patch)
  • Method to get the TPS of the server (Patch)
  • API to get the origin, the spawn location, of an entity (Patch)
  • API to change the view distance per player (Patch)
  • BeaconEffectEvent, called when a beacon effect is being applied to a player (Patch)
  • PlayerInitialSpawnEvent for modifying a player’s initial spawn location as they join the server (Patch)
  • API to get the command map (to register commands on the fly) (Patch)
  • Moved Bungee Chat API moved to the proper classes (stop using the spigot() subclasses) (Patch)
  • Title API (with builder) and TabListHeader/Footer API (Patch)
  • ServerExceptionEvent that allows fine tuned exception handling (Patch)
  • Modify stuck arrows in entities (Patch)
  • ResourcePack API (Patch)
  • Event.callEvent() API to allow easy calling of events (Patch)
  • Allow to change the replacement item for consumed items (Patch)
  • Access Player items via the equipment slot (Patch)
  • EntityAddToWorld and EntityRemoveFromWorld events (Patch)
  • EntityPathfindEvent (Patch)
  • Add method to clear all metadata from a plugin (Patch)
  • Add PlayerUseUnknownEntityEvent, called when a player interacts with a client sided/fake entity (Patch)
  • Add Handshaking event (Patch)
  • Method to check if EntityRegainHealthEvent used fast-regen (Patch)
  • LootTable API (Patch)
  • EntityZapEvent, fired when lightning strikes an entity (Patch)
  • Allow to get the source entity in PlayerExpChangeEvent (Patch)
  • ProjectileCollideEvent (Patch)
  • String based action bar api (Patch)
  • IllegalPacketEvent to handle how the server responds to illegal packets (Patch)
  • FireworkAPI to get the entity that is being boosted by a firework (Patch)
  • PlayerTeleportEndGatewayEvent (Patch)
  • API get Statistics for a world (stuff like entity, tile entity, chunk, player count) (Patch)
  • ExperienceOrbs API for Reason/Source/Triggering player (Patch)
  • API to check if a location is inside of the worldborder (Patch)
  • Item#setCanMobPickup (Patch)
  • PlayerPickupItemEvent#setFlyAtPlayer (Patch)
  • PlayerAttemptPickupItemEvent for when a player attemps to pick up an item on the ground (Patch)
  • UnknownCommandEvent for when a player executes a command that is not defined (Patch)
  • Player Profile API to change textures of players and skulls (also adds events) (Patch 1, Patch 2,
    Patch 3, Patch 4, Patch 5, Patch 6
    )
  • API to release entities that sit on a players shoulder (like parrots)(Patch)
  • API to check if an entity was spawned from a spawner (Patch)
  • API to force convert an item stack (to a new mc version) (Patch)
  • API to get the translated display name of an itemstack (Patch)
  • ProfileWhitelistVerifyEvent to control how whitelisting works (Patch)
  • API to set the killer of an entity (Patch)
  • Allow to log via slf4j (Patch)
  • PlayerJumpEvent to detect player jumps, faster than PlayerMoveEvent (Patch)
  • API to get the protocol version or the virtual host of a client (Patch)
  • PlayerArmorChangeEvent for when a player changes his armor (Patch)
  • API to get the BlockState without a costly clone operation (Patch) <-- compat is available in paperlib
  • AsyncTabCompleteEvent for async tab completions (Patch)
  • PlayerPickupExperienceEvent for when a player is attempting to pick up an experience orb (Patch)
  • ExperienceOrbMergeEvent for when the server is about to merge 2 experience orbs into one (Patch)
  • Ability to apply mending to XP API (Patch)
  • PreCreatureSpawnEvent to avoid creating too much garbage objects when canceling CreatureSpawnEvent (Patch)
  • PlayerNaturallySpawnCreaturesEvent to allow setting the range in which a player should trigger mob spawns (Patch)
  • PlayerAdvancementCriterionGrantEvent for when a player is granted a criteria in an advancement (Patch)
  • ItemMeta for ArmorStands (Patch)
  • API to just get the UUID of the owner of a tamed mob to improve performance (Patch)
  • PaperServerListPingEvent, better version of ServerListPingEvent (Patch)
  • Playername -> UUID API (Patch)
  • API to open the sign editor for a placed sign (Patch)
  • API to get the current paper version and the version that was used before that (Patch)
  • Ban methods for Player/OfflinePlayer (Patch)
  • EndermanEscapeEvent for when an enderman intends to teleport away from the player (Patch)
  • Enderman.teleportRandomly() (Patch)
  • Additional world.getNearbyEntities API’s (Patch)
  • API for locations to check if the chunk at that location is loaded (Patch)
  • Better particle spawn api (with builder) (Patch)
  • EndermanAttackPlayerEvent to control enderman attack mechanics (Patch)
  • WitchConsumePotionEvent for when a witch consumes the potion in their hand to buff themselves (Patch)
  • WitchThrowPotionEvent for when a witch throws a potion at a player (Patch)
  • Location.toBlockLocation/toCenterLocation() (Patch)
  • PotionEffect clone methods (Patch)
  • WitchReadyPotionEvent, for controlling what potion a witch readies to use (Patch)
  • ItemStack#getMaxItemUseDuration to get the time it takes to use/consume that item (Patch)
  • EntityTeleportEndGatewayEvent for when an entity attempts to teleport in an end gateway (Patch)
  • API to configure shield blocking delay (Patch)
  • Add ability to get what arrow was shot, and control if it should be consumed to EntityShootBowEvent (Patch)
  • “getNearbyXXX” methods for Locations (Patch)
  • PlayerReadyArrowEvent to select which arrow the player should use (Patch)
  • EntityKnockbackByEntityEvent to modify knockback (Patch)
  • More explosion apis for Location and World :bomb: (Patch)
  • ItemStack API additions for quantity/flags/lore (Patch)
  • LivingEntity Hand Raised/Item Use API (charging bow, throwing potion) (Patch)
  • RangedEntity API to make ranged entities attack other entities (Patch)
  • Ability to get the blockface where an arrow hit a block (Patch)
  • API to get Entity via UUID for worlds (Patch)
  • CloseReason for InventoryCloseEvent (Patch)
  • Entity#getChunk (Patch)
  • Vex#getSummoner (Patch)
  • Enderdragon Events (Patch)
  • PlayerLaunchProjectileEvent (Patch)
  • PlayerElytraBoostEvent (Patch)
  • Ability to disable armorstand ticking (Patch)
  • SkeletonHorseTrapEvent (Patch)
  • Convenience methods to manipulate locations (Patch)
  • Armorstand slot API (Patch)
  • AnvilDamageEvent/API (Patch)
  • Add Hand to bucket related events (Patch)
  • TNTPrimeEvent (Patch)
  • Ability to get long representation of chunk coordinates (Patch)
  • Ability to load chunks async (Patch)
  • Ability to get tile entities without snapshot (Patch)
  • Ability to access blocks via long keys (Patch)
  • Slime Events (Patch)
  • isChunkGenerated API (Patch)
  • Extended Creeper API (Patch)
  • PhantompreSpawnEvent (Patch)
  • Source block to BlockPhysicsEvent (Patch)
  • Add force loaded API for chunks (Patch)
  • Inventory#removeItemAnySlot (Patch)
  • Ray-Tracing for Living Entities (Patch 1, Patch 2)
  • Attack Cooldown API (Patch)
  • Imporved entity death event (Patch)
  • Pathfinding API (Patch)
  • CanPlaceOn/CanDestroy API (Patch)
  • API to create recipes that match itemstacks, not just materials (Patch)
  • Furnace Cook Speed API (Patch)
  • PreSpawnerSpawnEvent (Patch)
  • Material Tags (tags for all common materials!) (Patch)
  • API to set the summoner of a vex (Patch)
  • Sun related apis (Patch)
  • Here’s Johnny (no, this isn’t a joke) (Patch)
  • Turtle API (Patch)
  • API to set/get the owner and thrower of an ItemEntitiy (Patch)
  • SpectatorEvents (Patch)
  • Witch API (Patch)



Performance related stuff

  • Use ASM for Events (Patch)
  • Improved (faster) Thread-safety Handling for Metadata (Patch)

for more performance related stuff see the server admin version of this thread.



<todo> stuff to add to server admin list

https://github.com/PaperMC/Paper/blob/master/Spigot-API-Patches/0063-Make-plugins-list-alphabetical.patch
https://github.com/PaperMC/Paper/blob/master/Spigot-API-Patches/0065-Handle-plugin-prefixes-in-implementation-logging-con.patch
https://github.com/PaperMC/Paper/blob/master/Spigot-API-Patches/0091-Add-version-history-to-version-command.patch
https://github.com/PaperMC/Paper/blob/master/Spigot-API-Patches/0121-Add-an-asterisk-to-legacy-API-plugins.patch

  • smth smth permission performance

other todo:

  • sort this
  • figure out highlights

And thats it! Those are all of the awesome things you as a developer can benefit from by using paper!
If you got any questions to individual patches, open a thread or just comment down below.
If you find a broken link, a wrong summery, a missing patch or anything, comment down below, help me keep this beast updated :smiley:


Big list o’ Paper Features: Serveradmin Edition
#2

Thanks for the very nice overview! Found out about some stuff that I didn’t even know existed :grin:


#3

Thank you for listing all the features. So many things I didn’t know!
But are there some docs or do we need to trial and error?


#4

Amazing.


#5

What kind of docs do you mean? I linked to the patch files so you can look at the code and the javadocs for paper are available too.


#6

@MiniDigger I didn’t look over all of it, but did notice it’s not complete when I saw some of my API additions not listed like the Phantom pre spawn event, sun related api, creeper api, turtle api, LivingEntity#getTargetEntity or LivingEntity#getTargetBlock, player attack cooldown, getHand in the Bucket events, elytra boost event, etc etc just to name a few :wink:


#7

^ :joy:


#8

Thats what I get for skimming over :stuck_out_tongue: Ignore me :slight_smile:


#9

That’s awesome! But does those things work from 1.8 to 1.13 or were they added recently?


#10

Well generally, the old the patch, the longer it has been in the project. I was looking at the master branch, so all do this is in 1.13. if you know to know if those are available in legacy versions the easiest way to check is to just look at the javadocs for your version.


#11

added the last missing patches. next step is to organize this and write out highlights so you don’t need to read it all, lol


#12

Really appreciate the work you’ve put in here. Itching to try some of these out. (If only my competency was high enough to use them right away…)

Edit: Just noticed that some of the URL / patch slugs have changed. For example, the Slime Events patch should now be 0139-Slime-Pathfinder-Events