Commit Graph
41 Commits
Author SHA1 Message Date
Jason Penilla ee0bafc6a3 Fix default ChatRenderer when no plugins are installed (#5702) 2021-05-21 18:08:18 -07:00
Jason Penilla de5d8a76fe Enhance (Async)ChatEvent with per-viewer rendering API (#5684) 2021-05-21 15:55:54 -07:00
Jason Penilla 1cf0417000 Actually list all missing hard depends (#5701) 2021-05-21 13:31:37 -07:00
Jason Penilla a3b68be22d Add command line option to load extra plugin jars not in the plugins folder
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
2021-05-18 15:17:24 -07:00
Jason Penilla e7d9c31b56 Add ItemStack#displayName to get the formatted display name of an ItemStack (#5628)
The display name includes formatting such as item hover event, display name (in italics if renamed in anvil), and color based on rarity.

This is what vanilla uses for give command feedback, and when an item is shown in a death message.
2021-05-12 23:16:33 -07:00
Jason Penilla 15d0644617 Fix incorrect colors in some log messages (#5609)
CraftChatMessage.fromComponent fails to take into account the style of TranslatableComponent args, causing any styling on args to be completely ignored.

Fixing this is relatively simple, however would cause behavior to deviate from upstream. This commit will fix the coloring in messages logged through MinecraftServer.LOGGER by simply using Adventure's legacy text serializer, which properly serializes TranslatableComponents and their arguments. Note that this doesn't do anything about the underlying issue of CraftChatMessage.fromComponent improperly serializing TranslatableComponents.
2021-05-10 20:47:51 -07:00
Jason Penilla d30a6a4463 Don't annotate type parameters using JetBrains annotations (#5600) 2021-05-08 19:36:53 -07:00
Jason Penilla 7bc482249f Allow for Component suggestion tooltips in AsyncTabCompleteEvent (#5504) 2021-05-07 16:12:03 -07:00
Jason Penilla e57a4cbe72 Use JsonSerializationContext#serialize instead of recursion for AdventureComponents - fixes #5580 and #5371 2021-05-06 03:32:52 -07:00
Jason Penilla 57b254d94f Return after sending empty commands (#5586) 2021-05-06 16:25:29 -07:00
Jason Penilla 1da2f0afbc Implement methods to convert between Component and Brigadier's Message (#5542) 2021-04-24 15:16:41 -07:00
Jason Penilla bf974a611b Expose more Adventure serializers through PaperComponents (#5443) 2021-04-22 05:48:49 -07:00
Jason Penilla 42b4fbf53f Add support for tab completing and highlighting console input from the Brigadier command tree (#5437) 2021-04-16 23:37:51 -07:00
Jason Penilla 6062ab46f1 [CI-SKIP] Drop Allow PlayerEditBookEvent to fire for off hand (#5471)
Upstream fixed this in a different way (using -1 for off hand instead of the real slot id...) so this patch is no longer needed.
2021-04-08 21:54:18 -07:00
Jason Penilla 5c3dff17f2 Fix PlayerEditBookEvent (#5463) 2021-04-05 18:46:31 -07:00
Jason Penilla ed27c9d52c Remove from Map by key 2021-03-29 02:50:01 -07:00
Jason Penilla 8d7a6d9c89 Use PaperAdventure.PLAIN instead of PlainComponentSerializer.plain() for AdventureComponent#getString (#5414) 2021-03-25 17:01:59 -07:00
Jason Penilla a12e69774f Add checkerframework nullness annotations to accepted list for AnnotationTest (#5409)
Also use checkerframework annotations instead of jetbrains ones for Inventory#getContents as jetbrains ones do not allow properly annotating the nullability of an array and it's contents.
2021-03-24 03:02:32 -07:00
Jason Penilla 786afba088 Only set despawnTimer for Wandering Traders spawned by MobSpawnerTrader (#5391)
Upstream recently broke this when they exposed despawnTimer to API.
2021-03-19 16:19:28 -07:00
Jason Penilla 6d452f1f7f Fix VanillaMobGoalTest#testBukkitMap (#5390) 2021-03-19 15:21:54 -07:00
Jason Penilla a724816abb Deprecate ItemStack#setLore(List<String>) and ItemStack#getLore, add Component based alternatives 2021-03-18 22:04:54 -07:00
Jason Penilla 062733b903 Updated Upstream (CraftBukkit/Spigot)
Doesn't compile yet.

CraftBukkit Changes:
90d6905b Repackage NMS
69cf961d Repackage patches

Spigot Changes:
79d53c28 Repackage NMS
2021-03-16 00:19:45 -07:00
Jason Penilla 213b84a2a8 Update scripts for NMS repackaging 2021-03-16 00:19:21 -07:00
Jason Penilla e59776a02e Use Adventure for /version command feedback, add copy to clipboard click event (#5333) 2021-03-09 20:56:13 -08:00
Jason Penilla b0df4d17c8 Fix Material#getTranslationKey for Block Materials (#5294)
* Fix Material#getTranslationKey for Block Materials

* Cache the result of Material#isBlock
2021-03-02 16:27:34 -08:00
Jason Penilla 84af0796d3 Fix a couple of typos in the javadoc for Player (#5235) 2021-02-23 05:46:02 -08:00
Jason Penilla 9cf511130f Replace usages of LegacyComponentSerializer.legacySection() in Paper-Server with PaperAdventure.LEGACY_SECTION_UXRC (#5233) 2021-02-23 05:45:09 -08:00
Jason Penilla 36e0569896 Enable Hex colors on PaperAdventure.LEGACY_SECTION_UXRC, and use it for sending messages to console command sender (#5230)
This fixes messages to console having colors stripped, and also fixes colors being downsampled in PlayerConnection#disconnect(String)
2021-02-22 22:43:49 -08:00
Jason Penilla 79720eaf85 Merchant#getRecipes should return an immutable list (#5183)
This fixes a confusing issue where doing 'merchant.setRecipes(merchant.getRecipes());' would clear the merchants recipes, as the implementation of getRecipes is guavas Lists.transform wrapped in Collections.unmodifiableList, and the implementation of setRecipes clears the backing list before adding the elements of the provided list to the backing list.
The javadoc for the getRecipes method says 'an immutable list of trades', so this patch makes the javadoc correct.
2021-02-10 15:06:34 -08:00
Jason PenillaandSpottedleaf 6a84ae3d30 Do not add passengers of entities that were above save limit (#5073)
Co-authored-by: Spottedleaf <spottedleaf@spottedleaf.dev>
2021-01-16 16:05:33 -08:00
Jason Penilla 9db95fbc63 Improve zombie villager curing exploit fix (#5054)
Instead of completely resetting a Villager's reputation for all players each time they are cured, we now only reset the relevant part of the reputation for only that player. This means the exploit is fixed and players cannot stack multiple cures until prices are down to 1, but doesn't have the same side effects that are commonly complained about with the current exploit fix.
2021-01-15 09:40:10 -08:00
Jason Penilla e1e887ac1e Add a config option to limit the number of entities of each type to load/save in a chunk (#4792) 2021-01-13 16:04:51 -08:00
Jason Penilla c762d416c5 Fix villager boat exploit (#5047) 2021-01-11 13:23:11 -08:00
Jason Penilla c7a5aadb36 JavaDoc fixes
Remove duplicate JavaDocs - At some point upstream decided to fix some of their JD errors/warnings, so now we have duplicate tags, bringing new warnings.
Also add missing `@param` for ItemStack.deserializeBytes
2020-12-19 01:39:37 -08:00
Jason Penilla b9744db06b Add and implement cancellable TargetHitEvent for when Target Blocks are hit by Projectiles 2020-11-26 00:30:08 -08:00
Jason Penilla 9d76d7a887 Add Wandering Trader spawn rate config options 2020-09-23 10:28:11 -07:00
Jason Penilla ca25d24197 Villager resetOffers API 2020-10-03 21:20:10 -07:00
Jason Penilla add661a180 Fix NPE thrown when converting MerchantRecipe from Bukkit to NMS (#4755)
This bug was introduced in https://github.com/PaperMC/Paper/commit/c451989b86432a21509ee91f5067ec81ea8c3c60 (Add ignore discounts API)
2020-11-11 19:35:44 -08:00
Jason Penilla 859ebd5ad4 Fix client lag on advancement loading (#4710)
When new advancements are added via the UnsafeValues#loadAdvancement
API, it triggers a full datapack reload when this is not necessary. The
advancement is already loaded directly into the advancement registry,
and the point of saving the advancement to the Bukkit datapack seems to
be for persistence. By removing the call to reload datapacks when an
advancement is loaded, the client no longer completely freezes up when
adding a new advancement.
To ensure the client still receives the updated advancement data, we
manually reload the advancement data for all players, which
normally takes place as a part of the datapack reloading.
2020-11-11 08:18:36 -08:00
Jason Penilla 79106fd44b Fix CME when adding a passenger during Spawn events (#4616) 2020-10-04 20:46:18 -07:00
Jason Penilla 5532c4b10b fix #4144 (#4170) 2020-08-30 11:24:23 -07:00