Commit graph

161 commits

Author SHA1 Message Date
Jake Potrebic
345305859e fix Instruments
Add missing instrument enums
fix some wrong javadocs
2022-12-09 01:34:03 -08:00
Kieran Wallbanks
19743ae5dc Add Tick TemporalUnit 2021-04-02 17:28:58 +01:00
Ivan Pekov
80b653d06f Add missing effects
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
2021-01-05 10:19:11 +02:00
Jake Potrebic
25c065b4b2 Add RegistryAccess for managing registries 2022-03-02 13:36:21 -08:00
Aikar
2825ece820 Fix Spigot annotation mistakes
while some of these may of been true, they are extreme cases and cause
a ton of noise to plugin developers.

Use ApiStatus.Internal instead of Deprecated for actual internal API
that continues to have use (internally).

These do not help plugin developers if they bring moise noise than value.
2019-03-24 18:39:01 -04:00
DoNotSpamPls
ad83a72cf5 Change the reserved channel check to be sensible 2018-10-23 19:32:55 +03:00
Aikar
6512e0749b Add Material Tags
This adds a bunch of useful and missing Tags to be able to identify items that
are related to each other by a trait.

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Lena Kolb <lenakolb2204@gmail.com>
Co-authored-by: Layla Silbernberg <livsilbernberg@gmail.com>
Co-authored-by: Newwind <newwindserver@gmail.com>
2018-07-17 01:27:15 -04:00
Jason Penilla
7132df4810 AsyncTabCompleteEvent
Let plugins be able to control tab completion of commands and chat async.

This will be useful for frameworks like ACF so we can define async safe completion handlers,
and avoid going to main for tab completions.

Especially useful if you need to query a database in order to obtain the results for tab
completion, such as offline players.

Also Enforces mutability of the existing TabCompleteEvent.

Co-authored-by: Aikar <aikar@aikar.co>
2017-11-26 13:17:09 -05:00
Zach Brown
05ec73f817 Expose server build information
Co-authored-by: Professor Bloodstone <git@bloodstone.dev>
Co-authored-by: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Co-authored-by: masmc05 <masmc05@gmail.com>
Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
2019-05-27 01:10:06 -05:00
Owen1212055
23095683d0 Paper Plugins 2022-07-06 23:00:36 -04:00
Riley Park
15081a5912 Adventure
Co-authored-by: zml <zml@stellardrift.ca>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
2021-01-29 17:21:55 +01:00
Shane Freeder
b42af839f3 Test changes
- Allow use of TYPE_USE annotations
- Ignore package-private methods for nullability annotations
- Add excludes for classes which don't pass
- Disable stupid BukkitMirrorTest
- configure mockito agent to address changes in newer java versions see https://openjdk.org/jeps/451

Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
2019-03-17 23:04:30 +00:00
Bukkit/Spigot
0023e5549a #1082: Add "since" to Deprecation annotations
By: DerFrZocker <derrieple@gmail.com>
2024-11-25 07:52:33 +11:00
Bukkit/Spigot
5b6f5c4a3a Fix InstrumentTest
By: md_5 <git@md-5.net>
2024-11-02 11:23:43 +11:00
Bukkit/Spigot
42504c5ab7 #1075: Make Art an interface
By: DerFrZocker <derrieple@gmail.com>
2024-11-02 11:00:10 +11:00
Bukkit/Spigot
5f8dbb00f6 Improve Registry#getOrThrow messages
By: md_5 <git@md-5.net>
2024-09-27 08:21:26 +10:00
Bukkit/Spigot
42cd6c82ff #1058: Add tests for Minecraft registry <-> Bukkit fields
By: DerFrZocker <derrieple@gmail.com>
2024-09-27 08:15:05 +10:00
Bukkit/Spigot
a3fb15bc23 SPIGOT-7676: Enforce locale parameter in toLowerCase and toUpperCase method calls and always use root locale
By: DerFrZocker <derrieple@gmail.com>
2024-06-03 07:18:14 +10:00
Bukkit/Spigot
b0df4fc813 #1020: Cast instead of using #typed when getting BlockType and ItemType to better work with testing / mocks
By: DerFrZocker <derrieple@gmail.com>
2024-06-03 07:15:10 +10:00
Bukkit/Spigot
fc9e5af885 #919: Add internal ItemType and BlockType, delegate Material methods to them
By: Jishuna <joshl5324@gmail.com>
Also-by: Bjarne Koll <lynxplay101@gmail.com>
Also-by: DerFrZocker <derrieple@gmail.com>
Also-by: md_5 <git@md-5.net>
2024-05-05 10:08:51 +10:00
Bukkit/Spigot
bd69020044 Define surefire plugin version
By: md_5 <git@md-5.net>
2023-09-24 06:23:39 +10:00
Bukkit/Spigot
3577147e0c Define ordering for MetadataStoreTest
By: md_5 <git@md-5.net>
2023-09-24 06:17:44 +10:00
Bukkit/Spigot
2a6d2d27d7 #909: Update tests to JUnit 5
By: DerFrZocker <derrieple@gmail.com>
2023-09-24 06:09:10 +10:00
Bukkit/Spigot
e589401ea7 #990: Use Mockito instead of InvocationHandler for test mocking
By: DerFrZocker <derrieple@gmail.com>
2023-09-11 18:20:41 +10:00
Bukkit/Spigot
085e8f6d9f #893: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
By: DerFrZocker <derrieple@gmail.com>
2023-09-06 20:56:22 +10:00
Bukkit/Spigot
7c9037dfee SPIGOT-6885: Add test and easier to debug code for reference in yaml configuration comments
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2023-04-16 10:26:10 +10:00
Bukkit/Spigot
d68d5105ce SPIGOT-5916: getLastColors does not work with the rgb colors
By: DerFrZocker <derrieple@gmail.com>
2023-03-17 07:38:07 +11:00
Bukkit/Spigot
f328857bac SPIGOT-7292: Support for alpha channel in Color and a few improvements
By: Doc <nachito94@msn.com>
2023-03-16 19:27:53 +11:00
Bukkit/Spigot
d6d7c1a64f #809: Throw a more clear error for BlockIterators with zero direction, add Vector#isZero()
By: Parker Hawke <hawkeboyz2@hotmail.com>
2023-02-11 09:44:56 +11:00
Bukkit/Spigot
9048c2fc06 #800: Add support for NoteBlock sounds in Skulls
By: Doc <nachito94@msn.com>
2022-12-23 12:26:04 +11:00
Bukkit/Spigot
3455cde270 Improve annotation test on parameters
By: md_5 <git@md-5.net>
2022-09-24 09:31:44 +10:00
Bukkit/Spigot
9802bd131d SPIGOT-2450: Improve scoreboard criteria API, add missing DisplaySlots
By: Parker Hawke <hawkeboyz2@hotmail.com>
2022-08-08 21:48:35 +10:00
Bukkit/Spigot
24ea881685 SPIGOT-7011, SPIGOT-7065: Overhaul of structures
By: DerFrZocker <derrieple@gmail.com>
2022-07-01 20:41:02 +10:00
Bukkit/Spigot
0854352e80 SPIGOT-6949: Configuration sections that are nested within Maps or Lists are not properly serialized.
This broke with the configuration changes in
ed8a152b3a.

This commit reverts one of the changes of this other commit so that
nested configuration sections are serialized as Maps again.

Although the types of these nested configuration sections are not
preserved when reloading a configuration (they turn into Maps), their
contents should at least be preserved, as it has been the case in
earlier Bukkit versions.

By: blablubbabc <lukas@wirsindwir.de>
2022-04-22 19:38:45 +10:00
Bukkit/Spigot
9003a55038 SPIGOT-6886: Restore previous behaviour of loading unusual config keys
By: blablubbabc <lukas@wirsindwir.de>
2022-01-09 10:04:49 +11:00
Bukkit/Spigot
215952d23f Fix saving configs which are only a header
By: md_5 <git@md-5.net>
2022-01-08 09:39:38 +11:00
Bukkit/Spigot
7aec97546b Add workaround for SnakeYAML 100 comment limit
By: md_5 <git@md-5.net>
2022-01-04 09:25:20 +11:00
Bukkit/Spigot
4fd0026eb5 #703: Fix/test yaml anchors and merge
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2022-01-02 21:08:01 +01:00
Bukkit/Spigot
0503e4faed SPIGOT-6866: Fixed spaces a between comment indicator and actual comment
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-23 23:07:00 +01:00
Bukkit/Spigot
ed8a152b3a SPIGOT-3247: Comment support for YAML files
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-21 08:35:19 +11:00
Bukkit/Spigot
ab0429fddc #686: Fix contains for default section generating real sections
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-04 22:05:54 +01:00
Bukkit/Spigot
3ddde21487 SPIGOT-6830: Fix addDefaults with Configuration overrides child Sections in the defaults
By: Wolf2323 <gabrielpatrikurban@gmail.com>
2021-12-04 21:38:45 +01:00
Bukkit/Spigot
e887c31580 SPIGOT-6762: ChatPaginator.wordWrap only transfers one modifier
By: md_5 <git@md-5.net>
2021-10-29 18:45:29 +11:00
Bukkit/Spigot
c255eb3333 SPIGOT-5880, SPIGOT-5567: New ChunkGenerator API
## **Current API**
The current world generation API is very old and limited when you want to make more complex world generation. Resulting in some hard to fix bugs such as that you cannot modify blocks outside the chunk in the BlockPopulator (which should and was per the docs possible), or strange behavior such as SPIGOT-5880.

## **New API**
With the new API, the generation is more separate in multiple methods and is more in line with Vanilla chunk generation. The new API is designed to as future proof as possible. If for example a new generation step is added it can easily also be added as a step in API by simply creating the method for it. On the other side if a generation step gets removed, the method can easily be called after another, which is the case with surface and bedrock. The new API and changes are also fully backwards compatible with old chunk generators.

### **Changes in the new api**
**Extra generation steps:**
Noise, surface, bedrock and caves are added as steps. With those generation steps three extra methods for Vanilla generation are also added. Those new methods provide the ChunkData instead of returning one. The reason for this is, that the ChunkData is now backed by a ChunkAccess. With this, each step has the information of the step before and the Vanilla information (if chosen by setting a 'should' method to true). The old method is deprecated.

**New class BiomeProvider**
The BiomeProvider acts as Biome source and wrapper for the NMS class WorldChunkManager. With this the underlying Vanilla ChunkGeneration knows which Biome to use for the structure and decoration generation. (Fixes: SPIGOT-5880). Although the List of Biomes which is required in BiomeProvider, is currently not much in use in Vanilla, I decided to add it to future proof the API when it may be required in later versions of Minecraft.
The BiomeProvider is also separated from the ChunkGenerator for plugins which only want to change the biome map, such as single Biome worlds or if some biomes should be more present than others.

**Deprecated isParallelCapable**
Mojang has and is pushing to a more multi threaded chunk generation. This should also be the case for custom chunk generators. This is why the new API only supports multi threaded generation. This does not affect the old API, which is still checking this.

**Base height method added**
This method was added to also bring the Minecraft generator and Bukkit generator more in line. With this it is possible to return the max height of a location (before decorations). This is useful to let most structures know were to place them. This fixes SPIGOT-5567. (This fixes not all structures placement, desert pyramids for example are still way up at y-level 64, This however is more a vanilla bug and should be fixed at Mojangs end).

**WorldInfo Class**
The World object was swapped for a WorldInfo object. This is because many methods of the World object won't work during world generation and would mostly likely result in a deadlock. It contains any information a plugin should need to identify the world.

**BlockPopulator Changes**
Instead of directly manipulating a chunk, changes are now made to a new class LimitedRegion, this class provides methods to populated the chunk and its surrounding area. The wrapping is done so that the population can be moved into the place where Minecraft generates decorations. Where there is no chunk to access yet. By moving it into this place the generation is now async and the surrounding area of the chunk can also be used.

For common methods between the World and LimitedRegion a RegionAccessor was added.

By: DerFrZocker <derrieple@gmail.com>
2021-08-15 08:08:11 +10:00
Bukkit/Spigot
6924afb662 #510: Add NamespacedKey#fromString() to fetch from user input
By: Parker Hawke <hawkeboyz2@hotmail.com>
2021-02-16 18:52:16 +11:00
Bukkit/Spigot
d34f1cd453 SPIGOT-6274: Reloading configuration does not clear previous values
By: blablubbabc <lukas@wirsindwir.de>
2021-01-13 08:35:37 +11:00
Bukkit/Spigot
c73564ed4b SPIGOT-6313: Revert "SPIGOT-6274: Reloading configuration does not clear previous values"
This reverts commit 885c2247d1.

By: md_5 <git@md-5.net>
2021-01-12 11:34:31 +11:00
Bukkit/Spigot
885c2247d1 SPIGOT-6274: Reloading configuration does not clear previous values
By: md_5 <git@md-5.net>
2021-01-12 09:37:26 +11:00
Bukkit/Spigot
139ca6a269 SPIGOT-6234: enum classes don't serialize properly when implementing ConfigurationSerializable
By: md_5 <git@md-5.net>
2020-11-17 12:56:36 +11:00
Bukkit/Spigot
f341d8d29a #556: Allow sending messages from specific UUIDs
By: Mariell Hoversholm <proximyst@proximyst.com>
2020-10-17 17:42:40 +11:00