Commit Graph

341 Commits

Author SHA1 Message Date
Bukkit/Spigot
8c38fbb68a #771: Throw IllegalAccessException with non-static getHandlerList
Also add specifier for which event causes the issue

By: Martoph <sager1018@gmail.com>
2022-07-12 21:32:00 +10:00
Bukkit/Spigot
ec575f5252 Update to Minecraft 1.19
By: md_5 <git@md-5.net>
2022-06-08 02:00:00 +10:00
Bukkit/Spigot
8b26bf228f SPIGOT-6914: Remove confusing loadbefore message for dependency issues
By: md_5 <git@md-5.net>
2022-01-29 11:50:51 +11:00
Bukkit/Spigot
62f79aa905 SPIGOT-6822: Ensure library loader has same parent as plugin loader
This behaviour may need to be revisted in future to achieve greater isolation of plugins/libraries

By: md_5 <git@md-5.net>
2021-12-01 10:29:25 +11:00
Bukkit/Spigot
5814757cc7 SPIGOT-6749: Library Loader does not correctly isolate dependencies
By: md_5 <git@md-5.net>
2021-10-13 08:12:16 +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
581806d851 SPIGOT-6642: Throw better message if plugin.yml is empty
By: md_5 <git@md-5.net>
2021-07-17 11:25:17 +10:00
Bukkit/Spigot
f034b5f0c2 Fix bad merge of SPIGOT-6502 fix
By: blablubbabc <lukas@wirsindwir.de>
2021-06-11 21:49:32 +10:00
Bukkit/Spigot
2e1a3720cf SPIGOT-6502: Loading a class from a library of another plugin resulted in a ClassCastException.
By: blablubbabc <lukas@wirsindwir.de>
2021-06-11 14:00:18 +10:00
Bukkit/Spigot
24bab712b3 #615: Calculate the reachable nodes only once per transitive dependency check.
By: blablubbabc <lukas@wirsindwir.de>
2021-06-05 08:09:50 +10:00
Bukkit/Spigot
66af0a3e3c SPIGOT-5345: Add automatic library support
Example plugin.yml usage:
```
    libraries:
      - com.squareup.okhttp3:okhttp:4.9.0
```

Libraries will only be accessible to plugins and their transitive depends, allowing for multiple versions of the same library to be used by different plugins.

This feature is modeled on the parallel BungeeCord feature and intends to offer the same behaviour.
Although this is a preview feature, major changes to behaviour are not expected at this point.

With the exception of the issues described in SPIGOT-6419 it is not expected that this feature alters classloading behaviour, although some changes may be unavoidable.

By: md_5 <git@md-5.net>
2021-05-15 09:04:53 +10:00
Bukkit/Spigot
19b6eb1dda #587: Fix various javadoc typos
By: Matthew Sanders <msanders5984@gmail.com>
2021-02-22 19:36:26 +11:00
Bukkit/Spigot
4e44fa11b3 #525: Add contributors plugin.yml field.
Unlike "authors", names listed under the "contributors" field will not be named when AuthorNagExceptions are thrown. This makes a clear distinction between authorship and contributors as most contributions do not warrant the status of "author".

By: Parker Hawke <hawkeboyz2@hotmail.com>
2020-07-22 18:17:07 +10:00
Bukkit/Spigot
09c7575189 SPIGOT-5783: Add helpful info to UnknownDependencyException
By: md_5 <git@md-5.net>
2020-06-17 18:50:45 +10:00
Bukkit/Spigot
ee3885052d SPIGOT-5681: Increase max plugin channel size
By: md_5 <git@md-5.net>
2020-04-22 11:52:43 +10:00
Bukkit/Spigot
aec6ad036b #474: Add ability to set other plugin names as provided API so others can still depend on it
By: Phoenix616 <mail@moep.tv>
2020-03-15 18:59:32 +11:00
Bukkit/Spigot
e18807dc04 No longer necessary to synchronize sync events
By: md_5 <git@md-5.net>
2020-01-29 09:23:40 +11:00
Bukkit/Spigot
d962970177 Improve dependency tracker
By: md_5 <git@md-5.net>
2020-01-28 13:36:39 +11:00
Bukkit/Spigot
99378a8c91 Add support for transitive depends in load access warning
By: md_5 <git@md-5.net>
2020-01-28 12:43:25 +11:00
Bukkit/Spigot
109958b9e6 SPIGOT-5548: Show error that hints towards plugins misusing reflection
By: md_5 <git@md-5.net>
2020-01-28 08:46:14 +11:00
Bukkit/Spigot
ffa5a5dba7 SPIGOT-5546: Fix bad depend access using wrong provider in message
Also limit to once per plugin/provider pair

By: md_5 <git@md-5.net>
2020-01-27 16:46:29 +11:00
Bukkit/Spigot
0fc1ae9b1c Fix buggy classloader warning triggering for all classes
By: md_5 <git@md-5.net>
2020-01-27 10:58:39 +11:00
Bukkit/Spigot
fe8b567ad1 Print warning when loading classes from depends that have not been specified
By: md_5 <git@md-5.net>
2020-01-26 12:40:56 +11:00
Bukkit/Spigot
750cc90cb7 Fix bug where disablePlugin could remove ConfigurationSerializable classes from other plugins
By: md_5 <git@md-5.net>
2020-01-26 12:42:25 +11:00
Bukkit/Spigot
0c53c95293 Add additional checkstyle checks
By: md_5 <git@md-5.net>
2020-01-24 17:37:30 +11:00
Bukkit/Spigot
eb28d87c9f SPIGOT-5525: saveResource saves files from server jars
By: md_5 <git@md-5.net>
2020-01-20 16:16:46 +11:00
Bukkit/Spigot
d16413b877 Javadoc improvements per checkstyle
By: md_5 <git@md-5.net>
2019-12-22 09:56:28 +11:00
Bukkit/Spigot
7bfc0554c2 Add Plugin Chunk Ticket API
Allows plugins to force certain chunks to be kept loaded for as long as they are enabled.

By: Spottedleaf <Spottedleaf@users.noreply.github.com>
2019-07-08 12:14:29 +10:00
Bukkit/Spigot
82854b7bd7 Add Override annotations where appropriate
By: md_5 <git@md-5.net>
2019-04-28 11:37:52 +10:00
Bukkit/Spigot
e9ae9842f0 Apply and enforce import ordering rules
By: md_5 <git@md-5.net>
2019-04-23 14:33:57 +10:00
Bukkit/Spigot
c240b58f66 Begin implementation of CheckStyle style checking
By: md_5 <git@md-5.net>
2019-04-23 14:00:20 +10:00
Bukkit/Spigot
30a442aef7 Update to Minecraft 1.14-pre5
By: md_5 <git@md-5.net>
2019-04-23 12:00:00 +10:00
Bukkit/Spigot
416c865476 SPIGOT-2540: Add nullability annotations to entire Bukkit API
By: Darkyenus <darkyenus@gmail.com>
2019-03-13 17:42:57 +11:00
Bukkit/Spigot
90b6068b6b Apply default permissions by registration order.
When permissibles recalculate their permissions they set the default permission values in the order as the default permissions are provided by the plugin manager.

This order is currently arbitrary and can even change depending on the number of buckets of the underlying hashset which stores those default permissions.

When a plugin defines default permissions inside its plugin.yml (eg. permission 'A' with default value 'true') and a server admin defines different default values for these permissions inside the permissions.yml (eg. permission 'myDefaultPerms' with default value 'true' and with child 'A' set to 'false'), then the outcome will depend on the order in which those default permissions (and their childs) get evaluated inside PermissableBase#recalculatePermissions().
The permission which gets processed last will overwrite the permission value of 'A' according to its definition. Since this order is arbitrary and inconsistent, the server admin will experience weird behavior with his defined default permissions sometimes working and sometimes not.

By: blablubbabc <lukas@wirsindwir.de>
2019-02-17 17:06:31 +01:00
Bukkit/Spigot
2f1a805931 Ease ClassLoader Deadlocks Where Possible
With Java 7 we can register the classloader as parallel capable to prevent deadlocks caused by certain scenarios. Due to the nature of PluginClassLoader this isn't completely safe, but we can make it safer by switching to concurrency focused collections. Either way this is far better than crashing the server.

By: md_5 <git@md-5.net>
2018-12-26 08:00:00 +11:00
Bukkit/Spigot
66cea125d6 Minor cosmetic cleanups to imports etc
Please see https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/pull-requests/389/overview

By: Parker Hawke <hawkeboyz2@hotmail.com>
2018-10-27 14:55:52 -04:00
Bukkit/Spigot
017a3c55d7 SPIGOT-4439: Allow minecraft:brand channel for use by plugins.
By: md_5 <git@md-5.net>
2018-10-25 20:38:53 +11:00
Bukkit/Spigot
88399f1f47 Include the plugin channel name in the exception message
By: Phoenix616 <mail@moep.tv>
2018-09-13 21:24:09 +01:00
Bukkit/Spigot
a5e572dd9e Let JavaPlugins use their own Logger implementation by overriding getLogger
By: Senmori <thesenmori@gmail.com>
2018-08-28 22:22:21 -04:00
Bukkit/Spigot
f3f25a351f Include class path in legacy conversion errors.
By: md_5 <git@md-5.net>
2018-07-30 09:18:55 +10:00
Bukkit/Spigot
246fed61ca Throw CNFE if we have an error processing plugin classes
By: md_5 <git@md-5.net>
2018-07-29 22:05:16 +10:00
Bukkit/Spigot
335202751d Remove redundant try/catch loading api-version
By: md_5 <git@md-5.net>
2018-07-15 22:38:15 +10:00
Bukkit/Spigot
767e4f6ccf Update to Minecraft 1.13-pre7
By: md_5 <git@md-5.net>
2018-07-15 10:00:00 +10:00
Bukkit/Spigot
0bea165ff0 SPIGOT-3988: Error on manually constructed PluginDescriptionFile
By: md_5 <git@md-5.net>
2018-07-07 09:21:17 +10:00
Bukkit/Spigot
70727107ce Fix some additional documentation typos
Thanks mrfloris

By: md_5 <git@md-5.net>
2018-01-15 12:53:01 +11:00
Bukkit/Spigot
a598aa855b Be more resilient to asynchronous package loads like URLClassLoader
By: md_5 <git@md-5.net>
2018-01-03 15:43:47 +11:00
Bukkit/Spigot
020876f38e SPIGOT-3723: Delegate PluginClassLoader back to parent
By: md_5 <git@md-5.net>
2017-12-30 07:00:16 +11:00
Bukkit/Spigot
6c92a5d111 Throw ClassNotFoundException without delegation
By: md_5 <git@md-5.net>
2017-12-29 14:06:56 +11:00
Bukkit/Spigot
a36a08cdd0 SPIGOT-3721: Plugins without manifests no longer load
By: md_5 <git@md-5.net>
2017-12-28 20:29:58 +11:00
Bukkit/Spigot
1e918108e3 Backport some PluginClassLoader changes for soak testing.
By: md_5 <git@md-5.net>
2017-12-28 14:49:21 +11:00