Commit Graph

367 Commits

Author SHA1 Message Date
Jason Penilla
91a7982c46 Warn on strange @EventHandler return types 2022-01-18 11:07:54 -07:00
SirYwell
896a9e601a Rewrite LogEvents to contain the source jars in stack traces 2021-07-10 11:11:43 +02:00
Shane Freeder
2cee31307e Set true custom payload channel size limit
This fixes compatibility with some mods that are sending very long channel names. Also gives developers the ability to send longer channel names.
2019-10-18 17:39:05 +01:00
DoNotSpamPls
ad83a72cf5 Change the reserved channel check to be sensible 2018-10-23 19:32:55 +03:00
Minecrell
c85ea66260 Add workaround for plugins modifying the parent of the plugin logger
Essentials uses a custom logger name ("Essentials") instead of the
plugin logger. Log messages are redirected to the plugin logger by
setting the parent of the "Essentials" logger to the plugin logger.

With our changes, the plugin logger is now also called "Essentials",
resulting in an infinite loop. Make sure plugins can't change the
parent of the plugin logger to avoid this.
2017-09-21 19:41:20 +02:00
Minecrell
31a575f5f7 Handle plugin prefixes in implementation logging configuration
Currently, plugin prefixes are prepended to the log message in
the PluginLogger before passing the message to the underlying
logging framework. This is bad design because they need to be
stripped manually when using custom appenders to log messages
in a different format.

Additionally, it makes integration of alternative logging APIs hard
because all logging must go through the PluginLogger. Avoid using
PluginLogger and create a regular logger using the plugin name.
The implementation should handle plugin prefixes by displaying
logger names when appropriate.
2017-09-21 16:14:13 +02:00
Minecrell
1caeaef01d Allow plugins to use SLF4J for logging
SLF4J is a commonly used abstraction for various logging frameworks
such as java.util.logging (JUL) or Log4j. Currently, plugins are
required to do all their logging using the provided JUL logger.
This is annoying for plugins that target multiple platforms or when
using libraries that log messages using SLF4J.

Expose SLF4J as optional logging API for plugins, so they can use
it without having to shade it in the plugin and going through
several layers of logging abstraction.
2017-09-21 16:33:12 +02:00
Zach Brown
0c37d20354 Fix upstream javadocs 2017-06-10 16:59:40 -05:00
Zach Brown
7c31d0a39b Add exception reporting event 2016-02-29 20:24:35 -06:00
Jason Penilla
e183355647 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 14:42:26 -07:00
Aikar
d4d8262f6e Timings v2
TODO: Add #isStopping to FullServerTickHandler#stopTiming in patch 191
expose isRunning
2016-02-29 18:48:17 -06:00
Owen1212055
23095683d0 Paper Plugins 2022-07-06 23:00:36 -04:00
Techcable
844bc6c46a Use ASM for event executors.
Uses method handles for private or static methods.
2016-03-03 13:20:33 -07: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
Bukkit/Spigot
c2123d2080 Spigot Timings
Adds performance tracking timings all around the Minecraft Server, and improves the usability of the /timings command

Plugins can track their own timings with CustomTimingsHandler

By: Aikar <aikar@aikar.co>
2013-06-02 10:42:57 +10: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
ecf335eebe SPIGOT-7829: Increase maximum outgoing plugin message size to match Vanilla intention
By: md_5 <git@md-5.net>
2024-07-16 19:59:14 +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
d89271b470 SPIGOT-7638: Library loader does not seem to resolve every dependency
By: DerFrZocker <derrieple@gmail.com>
2024-04-27 09:23:19 +10:00
Bukkit/Spigot
afe543345e #991: Add PluginManager#loadPlugins(File[])
By: MikChan <georgeendo0@gmail.com>
2024-04-13 17:01:48 +10:00
Bukkit/Spigot
a1daa7077c Increase clarity of errors when loading malformed plugin main classes
By: md_5 <git@md-5.net>
2023-10-15 10:59:48 +11:00
Bukkit/Spigot
943fb1db3d #914: Make use of ApiStatus.Internal reather than deprecation
By: Doc <nachito94@msn.com>
2023-10-13 20:33:28 +11:00
Bukkit/Spigot
156224dbfa #912: Update Minecraft Wiki URLs
By: Doc <nachito94@msn.com>
2023-09-25 18:53:42 +10:00
Bukkit/Spigot
f16f465a47 SPIGOT-7370: Remove float value conversion in plugin.yml
By: Doc <nachito94@msn.com>
2023-06-27 07:35:56 +10:00
Bukkit/Spigot
dcd02753e8 #279: Minor edits to various Javadocs
By: ShanerX <shanerx@shanerx.org>
2023-04-16 09:54:51 +10:00
Bukkit/Spigot
b76cbe36c5 Update to Minecraft 1.19.4
By: md_5 <git@md-5.net>
2023-03-15 03:30:00 +11:00
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