From 083991b52995125d42327b35d514a74a320fad33 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Sat, 29 Jun 2019 23:48:24 +0200 Subject: [PATCH 01/23] There's no Sponge 1.13 --- source/plugin/api-versions.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/plugin/api-versions.rst b/source/plugin/api-versions.rst index 09d31bab8cf..d23cc5732a9 100644 --- a/source/plugin/api-versions.rst +++ b/source/plugin/api-versions.rst @@ -7,8 +7,8 @@ This page explains which API versions exist, and to which Minecraft version thei +-------------+--------------+----------------+-------------------------------------------+ | API-Version | Release Date | End of Support | Known Implementations (Minecraft Version) | +=============+==============+================+===========================================+ -| *8.0.0* | TBA | TBA | * *SpongeForge (1.13.x)* | -| | | | * *SpongeVanilla (1.13.x)* | +| *8.0.0* | TBA | TBA | * *SpongeForge* | +| | | | * *SpongeVanilla* | +-------------+--------------+----------------+-------------------------------------------+ | 7.2.0 | TBA | TBA | * SpongeForge (1.12.2) | | | | | * SpongeVanilla (1.12.2) | From 85c39bb3c55ba4cf8cb5f51fc1096632ccd1211e Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Sat, 29 Jun 2019 23:59:52 +0200 Subject: [PATCH 02/23] Nitpick on plugin IDs pattern --- source/plugin/plugin-identifier.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugin/plugin-identifier.rst b/source/plugin/plugin-identifier.rst index dfa9d796708..b44e2807d2d 100644 --- a/source/plugin/plugin-identifier.rst +++ b/source/plugin/plugin-identifier.rst @@ -10,7 +10,7 @@ folders for your plugin. .. note:: The plugin ID must be lowercase and start with an alphabetic character. It may only contain alphanumeric characters, dashes or underscores. The plugin name does **not** have such a limitation and can even contain spaces or - special characters. + special characters. It cannot be longer than 64 characters. Keep in mind your plugin ID will be the main identification of your plugin, used in other plugins as dependencies, for your configuration files, as well as other properties stored for your plugin. That's why it is important you always From a125b8b69705cbb77fc2e5b8df6c5a4df711e361 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Sun, 30 Jun 2019 00:11:14 +0200 Subject: [PATCH 03/23] Change configurate apidocs link to https --- source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/conf.py b/source/conf.py index f60fe0e1bf4..59d408b251e 100644 --- a/source/conf.py +++ b/source/conf.py @@ -91,7 +91,7 @@ javadoc_links = { 'https://jd.spongepowered.org/%s/' % release: ['org.spongepowered.api'], - 'http://configurate.aoeu.xyz/apidocs/': ['ninja.leaping.configurate'], + 'https://configurate.aoeu.xyz/apidocs/': ['ninja.leaping.configurate'], 'https://docs.oracle.com/javase/8/docs/api/': ['java'], 'https://google.github.io/guava/releases/17.0/api/docs/': ['com.google.common'] } From 949a93bcc389b6cac01f0e765b9a2661393a16b5 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Sun, 30 Jun 2019 00:17:10 +0200 Subject: [PATCH 04/23] Fix sponge.print_all_catalog_types description --- source/server/spongineer/properties.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/server/spongineer/properties.rst b/source/server/spongineer/properties.rst index 3fab49da7d6..7612a37ed24 100644 --- a/source/server/spongineer/properties.rst +++ b/source/server/spongineer/properties.rst @@ -52,8 +52,8 @@ Properties Available | | ``.sponge.debug.out`` folder, named after the class they are altering. | | (boolean, default: false) | | +------------------------------------+---------------------------------------------------------------------------------+ -| **sponge.print_all_catalog_types** | Prints out all registered ``CatalogType`` s and their ``String`` id's at the | -| | end of startup, which is useful for finding out what id's are registered from | +| **sponge.print_all_catalog_types** | Prints out all Sponge provided ``CatalogType`` s and their ``String`` id's | +| | before preInit, which is useful for finding out what id's are registered from | | (boolean, default: false) | vanilla, mods, and plugins for all created ``CatalogType`` s. | +------------------------------------+---------------------------------------------------------------------------------+ | | Prints out a very verbose log entry for every block captured that is processed, | From 97ef28ca6cc1e8ec64bdae405a69d0653026f85a Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 14:07:45 +0200 Subject: [PATCH 05/23] Clarify what plugin is --- source/plugin/assets.rst | 2 ++ source/plugin/commands/arguments.rst | 2 ++ source/plugin/commands/childcommands.rst | 2 ++ source/plugin/commands/commandcallable.rst | 1 + source/plugin/commands/creating.rst | 2 ++ source/plugin/event/listeners.rst | 2 ++ source/plugin/scheduler.rst | 8 ++++++++ source/plugin/services.rst | 2 ++ 8 files changed, 21 insertions(+) diff --git a/source/plugin/assets.rst b/source/plugin/assets.rst index bee8de6042a..ad24f5d534c 100644 --- a/source/plugin/assets.rst +++ b/source/plugin/assets.rst @@ -25,6 +25,8 @@ Alternatively, you can retrieve assets through the ``AssetManager`` class: import org.spongepowered.api.Sponge; + PluginContainer plugin = ...; + Asset asset = Sponge.getAssetManager().getAsset(plugin, "myfile.txt").get(); .. tip:: diff --git a/source/plugin/commands/arguments.rst b/source/plugin/commands/arguments.rst index 9cb6d0eaf33..ad5921c0d08 100644 --- a/source/plugin/commands/arguments.rst +++ b/source/plugin/commands/arguments.rst @@ -61,6 +61,8 @@ Example: Building a Command with Multiple Arguments import org.spongepowered.api.command.spec.CommandExecutor; import org.spongepowered.api.command.spec.CommandSpec; + PluginContainer plugin = ...; + CommandSpec myCommandSpec = CommandSpec.builder() .description(Text.of("Send a message to a player")) .permission("myplugin.command.message") diff --git a/source/plugin/commands/childcommands.rst b/source/plugin/commands/childcommands.rst index 419cce5591b..d0ee31e455b 100644 --- a/source/plugin/commands/childcommands.rst +++ b/source/plugin/commands/childcommands.rst @@ -48,6 +48,8 @@ The first alias supplied is the primary one and will appear in the usage message import org.spongepowered.api.Sponge; + PluginContainer plugin = ...; + CommandSpec mailCommandSpec = CommandSpec.builder() .permission("myplugin.mail") .description(Text.of("Send and receive mails")) diff --git a/source/plugin/commands/commandcallable.rst b/source/plugin/commands/commandcallable.rst index 4ec9c118b37..aaf435a1082 100644 --- a/source/plugin/commands/commandcallable.rst +++ b/source/plugin/commands/commandcallable.rst @@ -82,6 +82,7 @@ passing your plugin, an instance of the command, and any needed aliases as param import org.spongepowered.api.command.CommandManager; CommandManager cmdService = Sponge.getCommandManager(); + PluginContainer plugin = ...; cmdService.register(plugin, new MyBroadcastCommand(), "message", "broadcast"); .. note:: diff --git a/source/plugin/commands/creating.rst b/source/plugin/commands/creating.rst index 5051cad9cb7..a0970d22931 100644 --- a/source/plugin/commands/creating.rst +++ b/source/plugin/commands/creating.rst @@ -28,6 +28,8 @@ Example: Building a Simple Command import org.spongepowered.api.text.Text; import org.spongepowered.api.command.spec.CommandSpec; + PluginContainer plugin = ...; + CommandSpec myCommandSpec = CommandSpec.builder() .description(Text.of("Hello World Command")) .permission("myplugin.command.helloworld") diff --git a/source/plugin/event/listeners.rst b/source/plugin/event/listeners.rst index 50cb3a6293a..859484d33cf 100644 --- a/source/plugin/event/listeners.rst +++ b/source/plugin/event/listeners.rst @@ -193,6 +193,8 @@ Example: Firing LightningEvent import org.spongepowered.api.event.action.LightningEvent; import org.spongepowered.api.event.cause.Cause; + PluginContainer plugin = ...; + LightningEvent lightningEvent = SpongeEventFactory.createLightningEventPre(Cause.source(plugin).build()); Sponge.getEventManager().post(lightningEvent); diff --git a/source/plugin/scheduler.rst b/source/plugin/scheduler.rst index fd32db64846..0c16c2701c7 100644 --- a/source/plugin/scheduler.rst +++ b/source/plugin/scheduler.rst @@ -110,6 +110,8 @@ initial delay of 100 milliseconds could be built and submitted using the followi import java.util.concurrent.TimeUnit; + PluginContainer plugin = ...; + Task task = Task.builder().execute(() -> logger.info("Yay! Schedulers!")) .async().delay(100, TimeUnit.MILLISECONDS).interval(5, TimeUnit.MINUTES) .name("ExamplePlugin - Fetch Stats from Database").submit(plugin); @@ -209,6 +211,8 @@ to be thread-safe. .. code-block:: java import org.spongepowered.api.scheduler.SpongeExecutorService; + + PluginContainer plugin = ...; SpongeExecutorService minecraftExecutor = Sponge.getScheduler().createSyncExecutor(plugin); @@ -237,6 +241,8 @@ CompletableFuture_ is a fluent interface which usually has the following three v .. code-block:: java import java.util.concurrent.CompletableFuture; + + PluginContainer plugin = ...; SpongeExecutorService minecraftExecutor = Sponge.getScheduler().createSyncExecutor(plugin); @@ -274,6 +280,8 @@ synchronously using ``Observable#subscribeOn(Scheduler scheduler)``. import rx.Scheduler; import rx.schedulers.Schedulers; + PluginContainer plugin = ...; + SpongeExecutorService executor = Sponge.getScheduler().createSyncExecutor(plugin); Scheduler minecraftScheduler = Schedulers.from(executor); diff --git a/source/plugin/services.rst b/source/plugin/services.rst index 022648df230..12584e0b2f2 100644 --- a/source/plugin/services.rst +++ b/source/plugin/services.rst @@ -94,6 +94,8 @@ the interface) and replace your version. .. code-block:: java + PluginContainer plugin = ...; + Sponge.getServiceManager().setProvider(plugin, WarpService.class, new SimpleWarpService()); Other plugins can now access your service through the service manager: From ecee42b8521bec2a3a256f3140e1ce73fcae31ee Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 14:16:13 +0200 Subject: [PATCH 06/23] Plugin section is deprecated --- source/about/faq.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/about/faq.rst b/source/about/faq.rst index c9a0ff0a25a..d6634c60df3 100644 --- a/source/about/faq.rst +++ b/source/about/faq.rst @@ -52,8 +52,7 @@ There have also been community implementations due to the flexibility of the API Where do I get Plugins for Sponge? ---------------------------------- -You can find plugins on the `SpongeForums `_ as well as our -almost complete, official plugin repository, called `Ore `_. +You can find plugins on our official plugin repository, called `Ore `_. What happened to Bukkit? ------------------------ From 6e18b8cafcd178aebafb182f9dd94f2aa13383db Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 14:19:07 +0200 Subject: [PATCH 07/23] You need SpongeForge --- source/about/faq.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/about/faq.rst b/source/about/faq.rst index d6634c60df3..e60afd2d060 100644 --- a/source/about/faq.rst +++ b/source/about/faq.rst @@ -78,7 +78,7 @@ For Server Owners I'm a Server Owner! How Will Switching to Sponge Affect My Server? ------------------------------------------------------------------ -For an existing Forge server, you will need to download Sponge and place it into the mods folder. The server can then +For an existing Forge server, you will need to download SpongeForge and place it into the mods folder. The server can then be started like any other Forge server. Non-Forge servers may elect to use SpongeVanilla instead, an implementation that does not rely on Forge. There are From 281b5b256b11ad4599a639fa88feef939d0c6131 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 14:22:35 +0200 Subject: [PATCH 08/23] This won't be done, see the future section --- source/about/faq.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/about/faq.rst b/source/about/faq.rst index e60afd2d060..3a1f4223b96 100644 --- a/source/about/faq.rst +++ b/source/about/faq.rst @@ -111,7 +111,7 @@ What can't I do with Sponge? / Limitations of Sponge? ----------------------------------------------------- Sponge can't be used to create new blocks, textures, mobs on the client-side or any other content which would need -client-side modifications. SpongeAPI won't support sending mods or plugins to the client for now due to security +client-side modifications. SpongeAPI won't support sending mods or plugins to the client due to security concerns. However, you can make use of the ForgeAPI for clients and create Sponge plugins for the server-side. It is even possible to use Sponge on the client-side, but for several tasks mods are still required. From ba9e910cd7d73994233e378beda7f68cd0f68bf7 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 15:48:27 +0200 Subject: [PATCH 09/23] Fix implementing sponge provided data manipulator --- .../implementation/datamanipulator.rst | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/source/contributing/implementation/datamanipulator.rst b/source/contributing/implementation/datamanipulator.rst index cd734512097..1e5b22edf4a 100644 --- a/source/contributing/implementation/datamanipulator.rst +++ b/source/contributing/implementation/datamanipulator.rst @@ -52,7 +52,7 @@ The following snippet shows the imports/paths for some classes in SpongeCommon t import org.spongepowered.common.data.manipulator.mutable.common.AbstractData; import org.spongepowered.common.data.manipulator.mutable.entity.SpongeHealthData; import org.spongepowered.common.data.processor.common.AbstractEntityDataProcessor; - import org.spongepowered.common.data.util.DataConstants; + import org.spongepowered.common.util.Constants; import org.spongepowered.common.data.util.NbtDataUtil; import org.spongepowered.common.registry.type.data.KeyRegistryModule; @@ -94,20 +94,18 @@ The second constructor must import static com.google.common.base.Preconditions.checkArgument; - import org.spongepowered.common.data.util.DataConstants; - public class SpongeHealthData extends AbstractData implements HealthData { private double health; private double maxHealth; public SpongeHealthData() { - this(DataConstants.DEFAULT_HEALTH, DataConstants.DEFAULT_HEALTH); + this(20D, 20D); } public SpongeHealthData(double health, double maxHealth) { super(HealthData.class); - checkArgument(maxHealth > DataConstants.MINIMUM_HEALTH); + checkArgument(maxHealth > 0); this.health = health; this.maxHealth = maxHealth; registerGettersAndSetters(); @@ -136,10 +134,10 @@ The interface we implement specifies some methods to access :javadoc:`Value` obj public MutableBoundedValue health() { return SpongeValueFactory.boundedBuilder(Keys.HEALTH) - .minimum(DataConstants.MINIMUM_HEALTH) - .maximum(this.maximumHealth) - .defaultValue(this.maximumHealth) - .actualValue(this.currentHealth) + .minimum(0) + .maximum(this.maxHealth) + .defaultValue(this.maxHealth) + .actualValue(this.health) .build(); } @@ -164,9 +162,9 @@ contains a corresponding ``DataQuery``, just use those by passing the ``Key`` di .. code-block:: java public DataContainer toContainer() { - return DataContainer.createNew() - .set(Keys.HEALTH, this.currentHealth) - .set(Keys.MAX_HEALTH, this.maximumHealth); + return super.toContainer() + .set(Keys.HEALTH, this.health) + .set(Keys.MAX_HEALTH, this.maxHealth); } registerGettersAndSetters() @@ -184,29 +182,30 @@ by ``AbstractData``, but we must tell it which data it can access and how. There .. code-block:: java - private void setCurrentHealthIfValid(double value) { - if (value >= DataConstants.MINIMUM_HEALTH && value <= (double) Float.MAX_VALUE) { - this.currentHealth = value; + private SpongeHealthData setCurrentHealthIfValid(double value) { + if (value >= 0 && value <= (double) Float.MAX_VALUE) { + this.health = value; } else { throw new IllegalArgumentException("Invalid value for current health"); } + return this; } - private void setMaximumHealthIfValid(double value) { - if (value >= DataConstants.MINIMUM_HEALTH && value <= (double) Float.MAX_VALUE) { - this.maximumHealth = value; + private SpongeHealthData setMaximumHealthIfValid(double value) { + if (value >= 0 && value <= (double) Float.MAX_VALUE) { + this.maxHealth = value; } else { throw new IllegalArgumentException("Invalid value for maximum health"); } - + return this; } private void registerGettersAndSetters() { - registerFieldGetter(Keys.HEALTH, () -> this.currentHealth); + registerFieldGetter(Keys.HEALTH, () -> this.health); registerFieldSetter(Keys.HEALTH, this::setCurrentHealthIfValid); registerKeyValue(Keys.HEALTH, this::health); - registerFieldGetter(Keys.MAX_HEALTH, () -> this.maximumHealth); + registerFieldGetter(Keys.MAX_HEALTH, () -> this.maxHealth); registerFieldSetter(Keys.MAX_HEALTH, this::setMaximumHealthIfValid); registerKeyValue(Keys.MAX_HEALTH, this::maxHealth); } @@ -218,7 +217,7 @@ This applies especially for :javadoc:`DataHolder`\s which won't accept negative .. tip:: The validity criteria for those setters are the same as for the respective ``Value`` object, so you might delegate - the validity check to a call of ``this.health().set()`` and just set ``this.currentHealth = value`` if the first + the validity check to a call of ``this.health().set()`` and just set ``this.health = value`` if the first line has not thrown an exception yet. That's it. The ``DataManipulator`` should be done now. @@ -253,13 +252,15 @@ There add a line to register (and create) your used keys. .. code-block:: java - this.register(Key.builder() + import static org.spongepowered.api.data.DataQuery.of; + + this.register("health", Key.builder() .type(TypeTokens.BOUNDED_DOUBLE_VALUE_TOKEN) .id("health") .name("Health") .query(of("Health")) .build()); - this.register(Key.builder() + this.register("max_health", Key.builder() .type(TypeTokens.BOUNDED_DOUBLE_VALUE_TOKEN) .id("max_health") .name("Max Health") @@ -511,9 +512,9 @@ a ``Value`` and its immutable counterpart and three methods to get, set and remo @Override protected MutableBoundedValue constructValue(Double health) { return SpongeValueFactory.boundedBuilder(Keys.HEALTH) - .minimum(DataConstants.MINIMUM_HEALTH) + .minimum(0D) .maximum(((Float) Float.MAX_VALUE).doubleValue()) - .defaultValue(DataConstants.DEFAULT_HEALTH) + .defaultValue(20D) .actualValue(health) .build(); } @@ -539,7 +540,7 @@ Since it is impossible for an ``EntityLivingBase`` to not have health, this meth @Override protected boolean set(EntityLivingBase container, Double value) { - if (value >= DataConstants.MINIMUM_HEALTH && value <= (double) Float.MAX_VALUE) { + if (value >= 0 && value <= (double) Float.MAX_VALUE) { container.setHealth(value.floatValue()); return true; } From 18522893c00c0ef6eed867121873e2813b432bf9 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 16:28:47 +0200 Subject: [PATCH 10/23] Clarify plugin object type and promote using the PluginContainer --- source/plugin/commands/service.rst | 7 ++++--- source/plugin/configuration/loaders.rst | 6 +++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/source/plugin/commands/service.rst b/source/plugin/commands/service.rst index fe3bff68bd9..ae085b2c53b 100644 --- a/source/plugin/commands/service.rst +++ b/source/plugin/commands/service.rst @@ -14,16 +14,17 @@ them to the right command handler. To register your command, use the method :javadoc:`CommandManager#register(Object, CommandCallable, String...)` passing your plugin, an instance of the command, and any needed aliases as parameters. -Usually you want to register your commands when the :javadoc:`GameInitializationEvent` is called. If you are registering -the commands from the main plugin class, use ``this`` as the ``plugin`` parameter. +Usually you want to register your commands when the :javadoc:`GameInitializationEvent` is called. .. code-block:: java import org.spongepowered.api.Sponge; import org.spongepowered.api.command.CommandManager; + PluginContainer plugin = ...; + CommandManager cmdManager = Sponge.getCommandManager(); - cmdManager.register(this, myCommandSpec, "alias1", "alias2", "alias3"); + cmdManager.register(plugin, myCommandSpec, "alias1", "alias2", "alias3"); .. note:: diff --git a/source/plugin/configuration/loaders.rst b/source/plugin/configuration/loaders.rst index 722f75abfb9..9f18b4f1c2a 100644 --- a/source/plugin/configuration/loaders.rst +++ b/source/plugin/configuration/loaders.rst @@ -145,7 +145,9 @@ You can use :doc:`the Asset API <../assets>` to do this, as shown in the example .. code-block:: java - Sponge.getAssetManager().getAsset(myplugin, "default.conf").get().copyToFile(path, false, true); + PluginContainer plugin = ...; + + Sponge.getAssetManager().getAsset(plugin, "default.conf").get().copyToFile(path, false, true); loader = HoconConfigurationLoader.builder().setPath(path).build(); rootNode = loader.load(); @@ -174,6 +176,8 @@ copying to a file as this will automatically place values that were absent while .. code-block:: java + PluginContainer plugin = ...; + node.mergeValuesFrom(HoconConfigurationLoader.builder() .setURL(plugin.getAsset("default.conf").get().getUrl()) .build() From 1ec74fc5aecaf30c4b9fcf5a54633e2df5a76f91 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 16:41:26 +0200 Subject: [PATCH 11/23] Reduce redirect --- source/contributing/implementation/debugging/mixin.rst | 2 +- source/contributing/implementation/debugging/more.rst | 2 +- source/plugin/buildsystem.rst | 4 ++-- source/plugin/configuration/index.rst | 2 +- source/preparing/text.rst | 2 +- source/server/getting-started/configuration/sponge-conf.rst | 4 ++-- source/server/getting-started/implementations/spongeforge.rst | 2 +- source/versions/versioning.rst | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/source/contributing/implementation/debugging/mixin.rst b/source/contributing/implementation/debugging/mixin.rst index e19dae97e95..8156b94baa5 100644 --- a/source/contributing/implementation/debugging/mixin.rst +++ b/source/contributing/implementation/debugging/mixin.rst @@ -59,7 +59,7 @@ There are a several ways to view the class files from the mixin process. Having the fernflower jar on your runtime classpath will cause the class files to be decompiled as they are created. -* `JD-Gui `_ is a standalone graphical utility that displays Java source codes of class files. +* `JD-Gui `_ is a standalone graphical utility that displays Java source codes of class files. Phases And Environments ======================= diff --git a/source/contributing/implementation/debugging/more.rst b/source/contributing/implementation/debugging/more.rst index e7afc0b75d3..fad9173999f 100644 --- a/source/contributing/implementation/debugging/more.rst +++ b/source/contributing/implementation/debugging/more.rst @@ -31,5 +31,5 @@ IntelliJ -------- Learn about `Git Integration `_ and `Project -Structure `_ on JetBrains' +Structure `_ on JetBrains' web site. diff --git a/source/plugin/buildsystem.rst b/source/plugin/buildsystem.rst index 35d12426aee..eeb24e638d8 100644 --- a/source/plugin/buildsystem.rst +++ b/source/plugin/buildsystem.rst @@ -64,8 +64,8 @@ your plugin. Continue at :doc:`plugin-identifier` for choosing an identifier for .. _Gradle: https://gradle.org/ .. _Maven: https://maven.apache.org/ -.. _Groovy: http://www.groovy-lang.org/ -.. _Kotlin: http://kotlinlang.org/ +.. _Groovy: https://www.groovy-lang.org/ +.. _Kotlin: https://kotlinlang.org/ .. _`Gradle User Guide`: https://docs.gradle.org/current/userguide/userguide.html .. _`Gradle Java Quickstart`: https://docs.gradle.org/current/userguide/tutorial_java_projects.html .. _`Project Object Model`: https://maven.apache.org/guides/introduction/introduction-to-the-pom.html diff --git a/source/plugin/configuration/index.rst b/source/plugin/configuration/index.rst index a6cb3944914..1b837dd4d4d 100644 --- a/source/plugin/configuration/index.rst +++ b/source/plugin/configuration/index.rst @@ -113,7 +113,7 @@ specific directory or to ``true`` to get the shared configuration directory. .. note:: - The use of YAML format (http://yaml.org/spec/1.1/) and JSON format (https://www.json.org/) is also supported, but + The use of YAML format (https://yaml.org/spec/1.1/) and JSON format (https://www.json.org/) is also supported, but the preferred config format for Sponge plugins is HOCON. Conversion from YAML (or JSON) to HOCON can be automated by using a :javadoc:`YAMLConfigurationLoader` (or :javadoc:`GsonConfigurationLoader`) to load the old config and then saving it using a :javadoc:`HoconConfigurationLoader`. diff --git a/source/preparing/text.rst b/source/preparing/text.rst index bebe75c2d4c..acdd3558c1a 100644 --- a/source/preparing/text.rst +++ b/source/preparing/text.rst @@ -2,7 +2,7 @@ Installing a Text Editor ======================== -Articles on SpongeDocs are saved as text files in the `reStructuredText `_ markup +Articles on SpongeDocs are saved as text files in the `reStructuredText `_ markup language. Although your operating system's default text editor is likely sufficient for editing these files, installing a different text editor may prove to be useful. diff --git a/source/server/getting-started/configuration/sponge-conf.rst b/source/server/getting-started/configuration/sponge-conf.rst index b7d242394fe..95a68e53044 100644 --- a/source/server/getting-started/configuration/sponge-conf.rst +++ b/source/server/getting-started/configuration/sponge-conf.rst @@ -415,7 +415,7 @@ gameprofile-lookup-batch-size If you are running multiple servers behind the same IP, it is recommended to raise the 'gameprofile-task-interval' setting in order to compensate for the amount requests being sent. Finally, if set to 0 or less, the default batch size will be used. - For more information visit http://wiki.vg/Mojang_API + For more information visit https://wiki.vg/Mojang_API gameprofile-lookup-task-interval The interval, in seconds, used by the GameProfileQueryTask to process queued GameProfile requests. (Default: 4) Note: This setting should be raised if you experience the following error: @@ -915,7 +915,7 @@ This config was generated using SpongeForge build 3442 (with Forge 2705), Sponge # If you are running multiple servers behind the same IP, it is recommended to raise the 'gameprofile-task-interval' setting # in order to compensate for the amount requests being sent. # Finally, if set to 0 or less, the default batch size will be used. - # For more information visit http://wiki.vg/Mojang_API + # For more information visit https://wiki.vg/Mojang_API gameprofile-lookup-batch-size=1 # The interval, in seconds, used by the GameProfileQueryTask to process queued GameProfile requests. (Default: 4) # Note: This setting should be raised if you experience the following error: diff --git a/source/server/getting-started/implementations/spongeforge.rst b/source/server/getting-started/implementations/spongeforge.rst index eb41f7adff4..1c63186c5f9 100644 --- a/source/server/getting-started/implementations/spongeforge.rst +++ b/source/server/getting-started/implementations/spongeforge.rst @@ -2,7 +2,7 @@ Installing SpongeForge ====================== -SpongeForge integrates `Minecraft Forge `__ so you can also run Minecraft Forge mods. +SpongeForge integrates `Minecraft Forge `__ so you can also run Minecraft Forge mods. In fact, it's more like Sponge itself is a Forge mod that then loads Sponge plugins, but this is a technical detail. Users who do not want to use Minecraft Forge can consider :doc:`SpongeVanilla `. diff --git a/source/versions/versioning.rst b/source/versions/versioning.rst index b10ca709c25..a75f5f0a298 100644 --- a/source/versions/versioning.rst +++ b/source/versions/versioning.rst @@ -6,7 +6,7 @@ Versioning .. tip:: Sponge follows a format of the SemVer specification in its projects. You can read about general SemVer usage at - http://semver.org. + https://semver.org/. The SpongeAPI and implementations (SpongeForge/SpongeVanilla) follow two different policies. Understanding our versions is a matter of interpreting the SemVer version string. The SpongeAPI version utilizes the *Major* and *Minor* parts in From 282bc946f4a43119e5ee631be31b59fb3e39b198 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 17:03:21 +0200 Subject: [PATCH 12/23] @Named is dead, @ContextValue is not implemented --- source/plugin/event/filters.rst | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/source/plugin/event/filters.rst b/source/plugin/event/filters.rst index a7e266bd055..75af4e0a9a6 100644 --- a/source/plugin/event/filters.rst +++ b/source/plugin/event/filters.rst @@ -151,20 +151,6 @@ contained no players.** :javadoc:`Cause#root()`. It also performs an additional check that the type of the root object matches the type of your parameter. -**@Named** This parameter source annotation tells the event system to find the object with the name specified by the annotation -parameter (This is equivalent to :javadoc:`Cause#get(String, Class)`). Additionally, the found object must match the -type of the parameter. If no object is found meeting these criteria, then your listener is not called. - -**In this example your listener will only be called if there is a player associated with the name** -``NamedCause.OWNER``\ **. The** ``player`` **parameter will be set to that player.** - -.. code-block:: java - - @Listener - public void onInteract(InteractBlockEvent.Secondary event, @Named(NamedCause.OWNER) Player player) { - // do something - } - **@Getter** This parameter source annotation will fetch a getter on the event with the specified name. If the specified getter returns an ``Optional``, ``@Getter`` will automatically unwrap the ``Optional``. From a7817f9a0a30e5d42df236f78e2c3c029f7a7177 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 17:11:47 +0200 Subject: [PATCH 13/23] Fix javadoc imports --- source/plugin/configuration/loaders.rst | 3 ++- source/plugin/data/custom/datamanipulators.rst | 5 +++-- source/plugin/event/filters.rst | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/plugin/configuration/loaders.rst b/source/plugin/configuration/loaders.rst index 9f18b4f1c2a..1f008d4b445 100644 --- a/source/plugin/configuration/loaders.rst +++ b/source/plugin/configuration/loaders.rst @@ -146,6 +146,7 @@ You can use :doc:`the Asset API <../assets>` to do this, as shown in the example .. code-block:: java PluginContainer plugin = ...; + Path path = ...; Sponge.getAssetManager().getAsset(plugin, "default.conf").get().copyToFile(path, false, true); loader = HoconConfigurationLoader.builder().setPath(path).build(); @@ -154,7 +155,7 @@ You can use :doc:`the Asset API <../assets>` to do this, as shown in the example For this example it is important to note that the :javadoc:`AssetManager#getAsset(String)` method works relative to the plugin's asset folder. So, if in the above example the plugin ID is ``myplugin``, the ``default.conf`` file must not lie in the jar file root, but instead in the directory ``assets/myplugin``. This example also uses -:javadoc:`Asset#copyToFile(String, boolean, boolean)` which allows an the file creation to override existing +:javadoc:`Asset#copyToFile(Path, boolean, boolean)` which allows an the file creation to override existing files only if specified. .. note:: diff --git a/source/plugin/data/custom/datamanipulators.rst b/source/plugin/data/custom/datamanipulators.rst index 09234be0896..db167c209e7 100644 --- a/source/plugin/data/custom/datamanipulators.rst +++ b/source/plugin/data/custom/datamanipulators.rst @@ -12,6 +12,7 @@ Custom DataManipulators org.spongepowered.api.data.key.KeyFactory org.spongepowered.api.data.manipulator.DataManipulator org.spongepowered.api.data.manipulator.ImmutableDataManipulator + org.spongepowered.api.data.manipulator.immutable.common.AbstractImmutableData org.spongepowered.api.data.manipulator.mutable.common.AbstractBoundedComparableData org.spongepowered.api.data.manipulator.mutable.common.AbstractData org.spongepowered.api.data.manipulator.mutable.common.AbstractSingleData @@ -321,8 +322,8 @@ Registering Values ------------------ Next, you'll want to register these so that the :doc:`Keys <../keys>`-based system can reference them. To do this, -implement either :javadoc:`DataManipulator#registerGettersAndSetters()` or -:javadoc:`ImmutableDataManipulator#registerGetters()` depending on whether the data is mutable or not. +implement either :javadoc:`AbstractData#registerGettersAndSetters()` or +:javadoc:`AbstractImmutableData#registerGetters()` depending on whether the data is mutable or not. For each value you must call: diff --git a/source/plugin/event/filters.rst b/source/plugin/event/filters.rst index 75af4e0a9a6..a5b147ffc8c 100644 --- a/source/plugin/event/filters.rst +++ b/source/plugin/event/filters.rst @@ -19,7 +19,6 @@ Event Filters org.spongepowered.api.data.value.mutable.CompositeValueStore org.spongepowered.api.util.Tristate java.lang.Class - java.lang.String Now that you've spent a bit of time working with events you've probably noticed that there are several preconditions that you very commonly check while writing an event listener. Event filters are a group of annotations that assist you by allowing you From 891fb400b149ab190d00ad5ce6acdade12ef6448 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 17:48:34 +0200 Subject: [PATCH 14/23] Fix custom data manipulators registration --- source/plugin/data/custom/datamanipulators.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugin/data/custom/datamanipulators.rst b/source/plugin/data/custom/datamanipulators.rst index db167c209e7..3428c3eaeac 100644 --- a/source/plugin/data/custom/datamanipulators.rst +++ b/source/plugin/data/custom/datamanipulators.rst @@ -186,7 +186,7 @@ To register a ``DataManipulator`` Sponge has the :javadoc:`DataRegistration#buil .builder(new CustomDataBuilder()) .manipulatorId("my-custom") .dataName("My Custom") - .buildAndRegister(myPluginContainer); + .build(); } .. warning:: From 6cab406d2b08e70c3a059e23994c46136ee9bb95 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 17:50:34 +0200 Subject: [PATCH 15/23] Missed plugin containers --- source/plugin/event/listeners.rst | 2 +- source/plugin/permissions.rst | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/plugin/event/listeners.rst b/source/plugin/event/listeners.rst index 859484d33cf..d354933f14e 100644 --- a/source/plugin/event/listeners.rst +++ b/source/plugin/event/listeners.rst @@ -124,7 +124,7 @@ event listeners, including those registered with ``@Listener`` annotations. .. code-block:: java - MyPlugin plugin = ...; + PluginContainer plugin = ...; Sponge.getEventManager().unregisterPluginListeners(plugin); .. _about_listener: diff --git a/source/plugin/permissions.rst b/source/plugin/permissions.rst index 3398f6fcc71..070f2c34efb 100644 --- a/source/plugin/permissions.rst +++ b/source/plugin/permissions.rst @@ -103,7 +103,8 @@ Usage-Example import org.spongepowered.api.service.permission.PermissionService; import org.spongepowered.api.text.Text; - Builder builder = permissionService.newDescriptionBuilder(myplugin); + PluginContainer plugin = ...; + Builder builder = permissionService.newDescriptionBuilder(plugin); builder.id("myplugin.commands.teleport.execute") .description(Text.of("Allows the user to execute the teleport command.")) From 3eea04fe08be26a4d80c9080b21e2976fdb28d6c Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Fri, 5 Jul 2019 17:52:37 +0200 Subject: [PATCH 16/23] Yet another compile issue --- source/plugin/commands/commandcallable.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugin/commands/commandcallable.rst b/source/plugin/commands/commandcallable.rst index aaf435a1082..ff813a4b254 100644 --- a/source/plugin/commands/commandcallable.rst +++ b/source/plugin/commands/commandcallable.rst @@ -60,7 +60,7 @@ The first step is to create a class for the command. The class has to implement return usage; } - public List getSuggestions(CommandSource source, String arguments) throws CommandException { + public List getSuggestions(CommandSource source, String arguments, @Nullable Location targetPosition) throws CommandException { return Collections.emptyList(); } } From d62a22d8511c087f5588c26a631dd58eae4fa563 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Sat, 6 Jul 2019 12:07:25 +0200 Subject: [PATCH 17/23] Add Lantern website --- source/about/faq.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/about/faq.rst b/source/about/faq.rst index 3a1f4223b96..b22603d5764 100644 --- a/source/about/faq.rst +++ b/source/about/faq.rst @@ -46,8 +46,8 @@ There have also been community implementations due to the flexibility of the API (1) **LanternServer**, an open source and compatible Minecraft: Java Edition server that implements SpongeAPI. It does not rely on the vanilla codebase at all, allowing for it be more configurable, open, and performant. While still a work in progress, their project is quite promising and may one day be the choice for servers not - looking to run Forge mods. You can find their project - `on GitHub `_. + looking to run Forge mods. You can find more information `on their website `_ + as well as `on GitHub `_. Where do I get Plugins for Sponge? ---------------------------------- From 3f6d346fee3c6b87ce04e58808ffd5560f770110 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Sat, 6 Jul 2019 12:11:09 +0200 Subject: [PATCH 18/23] No need for WIP prefix, you can use draft PR --- source/contributing/guidelines.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/contributing/guidelines.rst b/source/contributing/guidelines.rst index c15d5a4959c..fd3cd4de979 100644 --- a/source/contributing/guidelines.rst +++ b/source/contributing/guidelines.rst @@ -35,8 +35,8 @@ General steps `Minor Issues on GitHub `_. 4. If the issue requires a bigger change you may want to submit the issues without the necessary changes first, so we - can confirm the issue and know that you're working on fixing it. You should also create a WIP (work in process) pull - request prefixed with ``[WIP]`` early so we can already start reviewing them. + can confirm the issue and know that you're working on fixing it. You should also create a draft pull + request or comment with ``~wip`` so we can already start reviewing them. #. Fork the project, clone it and make your changes in an extra branch. From c0011ccc037b1a50a1f2bddd8c9856c3a447e454 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Sat, 6 Jul 2019 12:19:45 +0200 Subject: [PATCH 19/23] Cause#source was removed a long time ago --- source/plugin/economy/using.rst | 2 +- source/plugin/event/custom.rst | 5 ++++- source/plugin/event/listeners.rst | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/plugin/economy/using.rst b/source/plugin/economy/using.rst index 4b608402e3c..167b133f6ae 100644 --- a/source/plugin/economy/using.rst +++ b/source/plugin/economy/using.rst @@ -80,5 +80,5 @@ Some :javadoc:`Account` methods require variables such as: These are for more advanced uses, but still must be filled in. Below is a list of acceptable default values: * Currency: :javadoc:`EconomyService#getDefaultCurrency()` -* Cause: ``Cause.source(myPlugin).build()`` +* Cause: ``Cause.of(EventContext.builder().add(EventContextKeys.PLUGIN, plugin).build(), plugin)`` * Context: ``new HashSet()`` diff --git a/source/plugin/event/custom.rst b/source/plugin/event/custom.rst index 0605c012ea5..63ee603ca6b 100644 --- a/source/plugin/event/custom.rst +++ b/source/plugin/event/custom.rst @@ -87,8 +87,11 @@ Example: Fire Custom Event import org.spongepowered.api.Sponge; + PluginContainer plugin = ...; + EventContext eventContext = EventContext.builder().add(EventContextKeys.PLUGIN, plugin).build(); + PlayerMutationEvent event = new PlayerMutationEvent(victim, PlayerMutationEvent.Mutation.ROTTED_SOCKS, - Cause.source(flardSource).build()); + Cause.of(eventContext, plugin)); Sponge.getEventManager().post(event); if (!event.isCancelled()) { // Mutation code diff --git a/source/plugin/event/listeners.rst b/source/plugin/event/listeners.rst index d354933f14e..4a6bd3220dd 100644 --- a/source/plugin/event/listeners.rst +++ b/source/plugin/event/listeners.rst @@ -194,8 +194,9 @@ Example: Firing LightningEvent import org.spongepowered.api.event.cause.Cause; PluginContainer plugin = ...; + EventContext eventContext = EventContext.builder().add(EventContextKeys.PLUGIN, plugin).build(); - LightningEvent lightningEvent = SpongeEventFactory.createLightningEventPre(Cause.source(plugin).build()); + LightningEvent lightningEvent = SpongeEventFactory.createLightningEventPre(Cause.of(eventContext, plugin)); Sponge.getEventManager().post(lightningEvent); .. warning:: From 5af68b07533f117e0c8e236fab7e01ad4cdc6559 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Sat, 6 Jul 2019 12:20:48 +0200 Subject: [PATCH 20/23] pluginContainer -> plugin --- source/plugin/economy/practices.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/plugin/economy/practices.rst b/source/plugin/economy/practices.rst index c7aedab90bd..5396d0adbfc 100644 --- a/source/plugin/economy/practices.rst +++ b/source/plugin/economy/practices.rst @@ -32,18 +32,18 @@ This code illustrates what **not** to do: import org.spongepowered.api.service.economy.EconomyService; import org.spongepowered.api.service.economy.account.Account; - PluginContainer pluginContainer = ...; + PluginContainer plugin = ...; EconomyService service = ...; Account account = ...; BigDecimal requiredAmount = BigDecimal.valueOf(20); - EventContext eventContext = EventContext.builder().add(EventContextKeys.PLUGIN, pluginContainer).build(); + EventContext eventContext = EventContext.builder().add(EventContextKeys.PLUGIN, plugin).build(); // BAD: Don't perform this check if (account.getBalance(service.getDefaultCurrency()).compareTo(requiredAmount) < 0) { // You don't have enough money! } else { // The account has enough, let's withdraw some cash! - account.withdraw(service.getDefaultCurrency(), requiredAmount, Cause.of(eventContext, pluginContainer)); + account.withdraw(service.getDefaultCurrency(), requiredAmount, Cause.of(eventContext, plugin)); } @@ -58,14 +58,14 @@ Here's how you **should** withdraw money: import org.spongepowered.api.service.economy.transaction.ResultType; import org.spongepowered.api.service.economy.transaction.TransactionResult; - PluginContainer pluginContainer = ...; + PluginContainer plugin = ...; EconomyService service = ...; Account account = ...; BigDecimal requiredAmount = BigDecimal.valueOf(20); - EventContext eventContext = EventContext.builder().add(EventContextKeys.PLUGIN, pluginContainer).build(); + EventContext eventContext = EventContext.builder().add(EventContextKeys.PLUGIN, plugin).build(); TransactionResult result = account.withdraw(service.getDefaultCurrency(), requiredAmount, - Cause.of(eventContext, pluginContainer)); + Cause.of(eventContext, plugin)); if (result.getResult() == ResultType.SUCCESS) { // Success! } else if (result.getResult() == ResultType.FAILED || result.getResult() == ResultType.ACCOUNT_NO_FUNDS) { From 1cfdba933e01247abc0f1be83b51191912552736 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Sat, 6 Jul 2019 12:29:39 +0200 Subject: [PATCH 21/23] Missing imports --- source/plugin/economy/practices.rst | 5 ++++- source/plugin/event/causes.rst | 1 + source/plugin/event/custom.rst | 3 +++ source/plugin/event/listeners.rst | 4 +++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/source/plugin/economy/practices.rst b/source/plugin/economy/practices.rst index 5396d0adbfc..1ffdfaeba31 100644 --- a/source/plugin/economy/practices.rst +++ b/source/plugin/economy/practices.rst @@ -54,7 +54,10 @@ return :javadoc:`ResultType#ACCOUNT_NO_FUNDS`, or :javadoc:`ResultType#FAILED` i Here's how you **should** withdraw money: .. code-block:: java - + + import org.spongepowered.api.event.cause.Cause; + import org.spongepowered.api.event.cause.EventContext; + import org.spongepowered.api.event.cause.EventContextKeys; import org.spongepowered.api.service.economy.transaction.ResultType; import org.spongepowered.api.service.economy.transaction.TransactionResult; diff --git a/source/plugin/event/causes.rst b/source/plugin/event/causes.rst index 055aa7cd562..afa1106b50b 100644 --- a/source/plugin/event/causes.rst +++ b/source/plugin/event/causes.rst @@ -235,6 +235,7 @@ to the cause would be the root cause. EventContext context = EventContext.builder() .add(EventContextKeys.PLAYER_SIMULATED, playerToSimulate.getProfile()) + .add(EventContextKeys.PLUGIN, plugin) .build(); Cause cause = Cause.builder() diff --git a/source/plugin/event/custom.rst b/source/plugin/event/custom.rst index 63ee603ca6b..45539180807 100644 --- a/source/plugin/event/custom.rst +++ b/source/plugin/event/custom.rst @@ -85,6 +85,9 @@ Example: Fire Custom Event .. code-block:: java + import org.spongepowered.api.event.cause.Cause; + import org.spongepowered.api.event.cause.EventContext; + import org.spongepowered.api.event.cause.EventContextKeys; import org.spongepowered.api.Sponge; PluginContainer plugin = ...; diff --git a/source/plugin/event/listeners.rst b/source/plugin/event/listeners.rst index 4a6bd3220dd..7d5aa4b37dd 100644 --- a/source/plugin/event/listeners.rst +++ b/source/plugin/event/listeners.rst @@ -189,9 +189,11 @@ Example: Firing LightningEvent .. code-block:: java - import org.spongepowered.api.event.SpongeEventFactory; import org.spongepowered.api.event.action.LightningEvent; import org.spongepowered.api.event.cause.Cause; + import org.spongepowered.api.event.cause.EventContext; + import org.spongepowered.api.event.cause.EventContextKeys; + import org.spongepowered.api.event.SpongeEventFactory; PluginContainer plugin = ...; EventContext eventContext = EventContext.builder().add(EventContextKeys.PLUGIN, plugin).build(); From 9d8cb7736b27cbe4d107d3b85e79c5497d417b33 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Sat, 6 Jul 2019 13:09:00 +0200 Subject: [PATCH 22/23] Fix duplicate whitespace --- source/plugin/commands/commandcallable.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugin/commands/commandcallable.rst b/source/plugin/commands/commandcallable.rst index ff813a4b254..c5308be7b6e 100644 --- a/source/plugin/commands/commandcallable.rst +++ b/source/plugin/commands/commandcallable.rst @@ -60,7 +60,7 @@ The first step is to create a class for the command. The class has to implement return usage; } - public List getSuggestions(CommandSource source, String arguments, @Nullable Location targetPosition) throws CommandException { + public List getSuggestions(CommandSource source, String arguments, @Nullable Location targetPosition) throws CommandException { return Collections.emptyList(); } } From 06da3b91e95dc3c92fa235e25dff0b981b0efc20 Mon Sep 17 00:00:00 2001 From: ImMorpheus Date: Mon, 8 Jul 2019 22:40:30 +0200 Subject: [PATCH 23/23] Old typo --- source/plugin/configuration/loaders.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/plugin/configuration/loaders.rst b/source/plugin/configuration/loaders.rst index 1f008d4b445..a5db1c31d1a 100644 --- a/source/plugin/configuration/loaders.rst +++ b/source/plugin/configuration/loaders.rst @@ -155,7 +155,7 @@ You can use :doc:`the Asset API <../assets>` to do this, as shown in the example For this example it is important to note that the :javadoc:`AssetManager#getAsset(String)` method works relative to the plugin's asset folder. So, if in the above example the plugin ID is ``myplugin``, the ``default.conf`` file must not lie in the jar file root, but instead in the directory ``assets/myplugin``. This example also uses -:javadoc:`Asset#copyToFile(Path, boolean, boolean)` which allows an the file creation to override existing +:javadoc:`Asset#copyToFile(Path, boolean, boolean)` which allows the file creation to override existing files only if specified. .. note::