From 20c3835fc1b08d224fbc7998589d8313683e5f75 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 13 Sep 2020 12:26:12 +0200 Subject: [PATCH 01/10] [CI skip] Updated README and CONTRIBUTING files --- .github/CONTRIBUTING.md | 18 +++++++++++++++- README.md | 46 ++++------------------------------------- 2 files changed, 21 insertions(+), 43 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 37ad73101..5d729a0ed 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -15,6 +15,22 @@ If you encounter an issue which has already been reported, please don't open a n It would be awesome though if you could post a comment on the existing issue which explains how you were able to reproduce this yourself. The more context and information we get, the easier we can fix it. +## :toolbox: How to compile Slimefun4 +Slimefun is written in Java and uses [Maven](https://maven.apache.org/) for compilation.
+To compile Slimefun yourself, follow these steps: + +1. Clone the project via git
+`$ git clone https://github.com/Slimefun/Slimefun4/` +2. Compile the project using Maven
+`$ mvn clean package` +3. Extract the compiled `Slimefun-v4.X-UNOFFICIAL.jar` from your `/target/` directory. + +If you are already using an IDE, make sure to import the project via git and set it up as a *Maven project*. +Then you should be able build it via Maven using the goals `clean package`. + +If you have any further questions, then please join our [Discord Support Server](#discord) and ask your questions in the `#programming-help` channel. +**Note that we will not accept any bug reports from custom-compiled versions of Slimefun**. + ## :hammer_and_wrench: 2. Pull Requests: Bug Fixes Bugs that have been reported need to be fixed of course.
Any open Issue on our [Issues Tracker](https://github.com/Slimefun/Slimefun4/issues) is waiting to be fixed. @@ -23,7 +39,7 @@ This is an Open-Source project and we love Pull Requests. So if you have an idea on how to approach a known issue, feel free to make a [Pull Request](https://github.com/Slimefun/Slimefun4/pulls) which fixes this bug. You can also comment on the existing Issue, proposing your idea or communicating that you wanna work on this. -## :toolbox: 3. Pull Requests: Additions/Changes +## :wrench: 3. Pull Requests: Additions/Changes Slimefun is an Open-Source project and anyone is allowed to make changes or add content to this plugin! Please visit our [Discord Server](https://github.com/Slimefun/Slimefun4#discord) and share your ideas first, we hate to reject changes because the community disagrees.
diff --git a/README.md b/README.md index bb9b92267..4e1a17550 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Check out our [Addons](https://github.com/Slimefun/Slimefun4/wiki/Addons), you m * **[Bug Tracker](https://github.com/Slimefun/Slimefun4/issues)** * **[Wiki](https://github.com/Slimefun/Slimefun4/wiki)** * **[FAQ](https://github.com/Slimefun/Slimefun4/wiki/FAQ)** +* **[How to contribute](https://github.com/Slimefun/Slimefun4/blob/master/.github/CONTRIBUTING.md)** ## Download Slimefun 4 (See also: [How to install Slimefun](https://github.com/Slimefun/Slimefun4/wiki/Installing-Slimefun)) @@ -66,7 +67,7 @@ Well, we asked some users on our [Discord server](#discord) to send us some scre | *Screenshot provided by GalaxyKat11#3816* | *Screenshot provided by TamThan#7987* | *Screenshot provided by Kilaruna#4981* | ## Discord -You can find Slimefun's community on Discord and connect with **over 2000** users of this plugin from all over the world.
+You can find Slimefun's community on Discord and connect with **over 2500** users of this plugin from all over the world.
Click the badge down below to join the server for suggestions/questions or other discussions about this plugin.
We are also hosting a community event every so often, join us to find out more.
**Important**: We do **not** accept bug reports on discord, please use our [Issue Tracker](https://github.com/Slimefun/Slimefun4/issues) to submit bug reports! @@ -102,49 +103,10 @@ The wiki is entirely community-run, so if you find an article missing, feel free ## Contributing to this project Slimefun 4 is an Open-Source project and licensed under [GNU GPLv3](https://github.com/Slimefun/Slimefun4/blob/master/LICENSE).
-Over 100 people have already contributed to this amazing project. You guys are awesome.
+Over 150+ people have already contributed to this amazing project. You guys are awesome.
Please consider helping us maintain this project too, your engagement keeps the project alive <3. -### Translations -Slimefun4 has recently added support for translations, note that translations are still _work in progress_.
-So not everything may be available for translation yet.
-[Read more...](https://github.com/Slimefun/Slimefun4/wiki/Translating-Slimefun) - -### Pull requests -This is an open-source community project, so **your contributions keep this plugin alive!**
-Pull Requests can be fixes, changes or even additions, but please keep in mind that if you add too much content to Slimefun 4, you should maybe consider making an Addon for it instead ([Developer Guide](https://github.com/Slimefun/Slimefun4/wiki/Developer-Guide)). - -#### Compiling -Slimefun is written in Java and uses [Maven](https://maven.apache.org/) for compilation.
-To compile Slimefun yourself, follow these steps: - -1. Clone the project via git
-`$ git clone https://github.com/Slimefun/Slimefun4/` -2. Compile the project using Maven
-`$ mvn clean package` - -If you are already using an IDE, make sure to import the project via git and set it as a *Maven project*. Then you should be able build it via Maven using the goals `clean package`. - -If you have any further questions, then please join our [Discord Support Server](#discord) and ask your questions in the `#programming-help` channel. Note that we will not accept any bug reports from custom-compiled versions of Slimefun. - -### Code Quality -Slimefun uses [Sonarcloud.io](https://sonarcloud.io/dashboard?id=TheBusyBiscuit_Slimefun4) to monitor Code Quality. - -| [Overall Maintainability](https://sonarcloud.io/documentation/user-guide/metric-definitions/#maintainability) | "Code Smells" | "Technical Debt" | Test Coverage | -| ---- | ---- | ---- | ---- | -| [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=TheBusyBiscuit_Slimefun4&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=TheBusyBiscuit_Slimefun4) | [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=TheBusyBiscuit_Slimefun4&metric=code_smells)](https://sonarcloud.io/dashboard?id=TheBusyBiscuit_Slimefun4) | [![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=TheBusyBiscuit_Slimefun4&metric=sqale_index)](https://sonarcloud.io/dashboard?id=TheBusyBiscuit_Slimefun4) | [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=TheBusyBiscuit_Slimefun4&metric=coverage)](https://sonarcloud.io/dashboard?id=TheBusyBiscuit_Slimefun4) | - -##### "Code Smells" -Code Smells are portions of the source code that are confusing, lack documentation or are just done very badly in general. These code smells should be held to a bare minimum. - -_Please contact us on [Discord](#discord) before working on any code smells. Some design patterns may not be changed abruptly because an addon might depend on them._ - -##### "Technical Debt" -Technical Debt is basically an estimate for how long it would take to fix all issues and code smells. - -##### Test Coverage -Slimefun now also uses Automated Tests to determine whether an update could break something. The coverage shows how much these tests cover. Higher coverage means less breaking changes and as a result also better and more reliable builds. -Due to this being a very huge project though, getting to `100% coverage` is probably close to impossible. But increasing that number even slightly still helps. So feel free to write Unit Tests for Slimefun and place them in the [/src/test/java/](https://github.com/Slimefun/Slimefun4/tree/master/src/test/java) folder. +You can find more info on how to contribute to this project in our [CONTRIBUTING.md](https://github.com/Slimefun/Slimefun4/blob/master/.github/CONTRIBUTING.md). ## Disclaimers Slimefun4 uses various systems that collect usage information or download automatic updates as well as the latest information about the project. From 1e408665a759fc8504177aa00953eb2524b11580 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 13 Sep 2020 12:32:30 +0200 Subject: [PATCH 02/10] [Ci skip] Removed deprecated method --- .../listeners/BlockListener.java | 7 ------- .../Objects/SlimefunBlockHandler.java | 19 ------------------- 2 files changed, 26 deletions(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java index f01d2a22b..2089e28b2 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/BlockListener.java @@ -83,13 +83,6 @@ public class BlockListener implements Listener { } BlockStorage.addBlockInfo(e.getBlock(), "id", sfItem.getID(), true); - - SlimefunBlockHandler blockHandler = SlimefunPlugin.getRegistry().getBlockHandlers().get(sfItem.getID()); - - if (blockHandler != null) { - blockHandler.onPlace(e.getPlayer(), e.getBlock(), sfItem); - } - sfItem.callItemHandler(BlockPlaceHandler.class, handler -> handler.onPlayerPlace(e)); } } diff --git a/src/main/java/me/mrCookieSlime/Slimefun/Objects/SlimefunBlockHandler.java b/src/main/java/me/mrCookieSlime/Slimefun/Objects/SlimefunBlockHandler.java index d69c6eb65..2fcce02eb 100644 --- a/src/main/java/me/mrCookieSlime/Slimefun/Objects/SlimefunBlockHandler.java +++ b/src/main/java/me/mrCookieSlime/Slimefun/Objects/SlimefunBlockHandler.java @@ -4,7 +4,6 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.Event; -import io.github.thebusybiscuit.slimefun4.core.handlers.BlockPlaceHandler; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.SlimefunItem; import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.UnregisterReason; @@ -22,24 +21,6 @@ import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.UnregisterReason; @FunctionalInterface public interface SlimefunBlockHandler { - /** - * This method gets called when the {@link Block} is placed. - * Use this method to initialize block data. - * - * @deprecated Use a {@link BlockPlaceHandler} instead - * - * @param p - * The {@link Player} who placed it - * @param b - * The {@link Block} that was placed - * @param item - * The {@link SlimefunItem} that will be stored inside the {@link Block} - */ - @Deprecated - default void onPlace(Player p, Block b, SlimefunItem item) { - // This has been deprecated - } - /** * This method gets called when the {@link Block} is broken. * The {@link Player} will be null if the {@link Block} exploded From 04105b1b47f06b27ed387aad4be9eade0c2e5b39 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 13 Sep 2020 12:37:01 +0200 Subject: [PATCH 03/10] [CI skip] Added a line-break --- .github/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 5d729a0ed..b95b5d7cc 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -28,7 +28,7 @@ To compile Slimefun yourself, follow these steps: If you are already using an IDE, make sure to import the project via git and set it up as a *Maven project*. Then you should be able build it via Maven using the goals `clean package`. -If you have any further questions, then please join our [Discord Support Server](#discord) and ask your questions in the `#programming-help` channel. +If you have any further questions, then please join our [Discord Support Server](#discord) and ask your questions in the `#programming-help` channel.
**Note that we will not accept any bug reports from custom-compiled versions of Slimefun**. ## :hammer_and_wrench: 2. Pull Requests: Bug Fixes From 817ec43153283eba0fc89ec19b86723fda085406 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 13 Sep 2020 12:38:13 +0200 Subject: [PATCH 04/10] [CI skip] Updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc9637aa0..dcbaef565 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,8 @@ #### Fixes * Fixed #2300 * Fixed #2296 +* Fixed colors of Cheat Sheet Slimefun Guide +* Fixed Cheat Sheet Slimefun Guide being unable to open the settings menu via shift + right click ## Release Candidate 16 (07 Sep 2020) https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#16 From fe0395991e12b8e8236cac5915f2ddeeffd6a536 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 13 Sep 2020 12:41:32 +0200 Subject: [PATCH 05/10] [CI skip] Updated contributing guidelines --- .github/CONTRIBUTING.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index b95b5d7cc..748538680 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -82,8 +82,9 @@ To prevent any accidents from happening, please contact us on our [Discord Serve #### Documentation Code documentation is also a great way to improve the maintainability of the project. -Every class and every public method should have a Javadocs tag assigned to it. -Classes should also include an "author" tag to indicate who worked on that class. +1. Every class and every public method should have a Javadocs section assigned to it. +2. Classes should also include an `@author` tag to indicate who worked on that class. +3. Methods and parameters should be annotated with `@Nullable` or `@Nonnull` to indicate whether or not null values are accepted. Feel free to visit our [Javadocs](https://slimefun.github.io/javadocs/Slimefun4/docs/overview-summary.html) @@ -92,4 +93,4 @@ Unit Tests help us test the project to work as intended in an automated manner.< More or better Unit Tests are always good to have, so feel free to submit a Test and place it in our [src/test/java](https://github.com/Slimefun/Slimefun4/tree/master/src/test/java/io/github/thebusybiscuit/slimefun4/testing) directory We are using [Junit 5 - Jupiter](https://github.com/junit-team/junit5/) and [MockBukkit](https://github.com/seeseemelk/MockBukkit) as our testing environment.
-Every new Unit Test should have a "DisplayName" annotation with a plain text description on what the Unit Test tests. +Every new Unit Test should have a `@DisplayName` annotation with a plain text description on what the Unit Test tests. From df327efdcc232c3c07f3e4261e71e4f268030741 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 13 Sep 2020 14:41:54 +0000 Subject: [PATCH 06/10] Update dependency org.junit.jupiter:junit-jupiter to v5.7.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f9d6cbed5..c70d0f6fd 100644 --- a/pom.xml +++ b/pom.xml @@ -303,7 +303,7 @@ org.junit.jupiter junit-jupiter - 5.6.2 + 5.7.0 test From 5b217246b6df1a0ed30082a8ec028e030a9ce238 Mon Sep 17 00:00:00 2001 From: "Panda.com" Date: Sun, 13 Sep 2020 17:48:48 +0200 Subject: [PATCH 07/10] fixed issue --- .../slimefun4/implementation/items/medical/MedicalSupply.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/MedicalSupply.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/MedicalSupply.java index 243bb3d81..e619b5b8e 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/MedicalSupply.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/items/medical/MedicalSupply.java @@ -38,7 +38,7 @@ public abstract class MedicalSupply extends SimpleSlimefu if (n.hasPotionEffect(PotionEffectType.WEAKNESS)) n.removePotionEffect(PotionEffectType.WEAKNESS); if (n.hasPotionEffect(PotionEffectType.CONFUSION)) n.removePotionEffect(PotionEffectType.CONFUSION); if (n.hasPotionEffect(PotionEffectType.BLINDNESS)) n.removePotionEffect(PotionEffectType.BLINDNESS); - if (n.hasPotionEffect(PotionEffectType.BAD_OMEN)) n.removePotionEffect(PotionEffectType.BLINDNESS); + if (n.hasPotionEffect(PotionEffectType.BAD_OMEN)) n.removePotionEffect(PotionEffectType.BAD_OMEN); } /** From 19b95331d6929a6bffa0fdb095ad0120ebbe40bd Mon Sep 17 00:00:00 2001 From: LinoxGH <54643600+LinoxGH@users.noreply.github.com> Date: Sun, 13 Sep 2020 23:55:16 +0300 Subject: [PATCH 08/10] Added fire tag. --- .../thebusybiscuit/slimefun4/core/multiblocks/MultiBlock.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/core/multiblocks/MultiBlock.java b/src/main/java/io/github/thebusybiscuit/slimefun4/core/multiblocks/MultiBlock.java index 0cdf91270..83bb966b2 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/core/multiblocks/MultiBlock.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/core/multiblocks/MultiBlock.java @@ -45,6 +45,9 @@ public class MultiBlock { if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_14)) { SUPPORTED_TAGS.add(Tag.WOODEN_FENCES); } + if (SlimefunPlugin.getMinecraftVersion().isAtLeast(MinecraftVersion.MINECRAFT_1_16)) { + SUPPORTED_TAGS.add(Tag.FIRE); + } } @Nonnull From efe65bcd209f5d32ce0c6d5ea17ef82a9c905d50 Mon Sep 17 00:00:00 2001 From: LinoxGH <54643600+LinoxGH@users.noreply.github.com> Date: Mon, 14 Sep 2020 00:11:34 +0300 Subject: [PATCH 09/10] Fixed unit tests. --- .../github/thebusybiscuit/slimefun4/testing/TestUtilities.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/TestUtilities.java b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/TestUtilities.java index 7abf1db96..bd963339c 100644 --- a/src/test/java/io/github/thebusybiscuit/slimefun4/testing/TestUtilities.java +++ b/src/test/java/io/github/thebusybiscuit/slimefun4/testing/TestUtilities.java @@ -84,6 +84,7 @@ public final class TestUtilities { server.createMaterialTag(NamespacedKey.minecraft("coral_blocks"), Material.BRAIN_CORAL_BLOCK, Material.BUBBLE_CORAL_BLOCK, Material.FIRE_CORAL_BLOCK, Material.HORN_CORAL_BLOCK, Material.TUBE_CORAL_BLOCK); server.createMaterialTag(NamespacedKey.minecraft("corals"), Material.BRAIN_CORAL, Material.BUBBLE_CORAL, Material.FIRE_CORAL, Material.HORN_CORAL, Material.TUBE_CORAL); server.createMaterialTag(NamespacedKey.minecraft("ice"), Material.ICE, Material.PACKED_ICE, Material.FROSTED_ICE, Material.BLUE_ICE); + server.createMaterialTag(NamespacedKey.minecraft("fire"), Material.FIRE, Material.SOUL_FIRE); } } From 5fb1ca2b8e986e970b14ef9094614686d015e788 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Sun, 13 Sep 2020 23:38:29 +0200 Subject: [PATCH 10/10] [CI skip] Updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcbaef565..441a5d015 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ * Fixed #2296 * Fixed colors of Cheat Sheet Slimefun Guide * Fixed Cheat Sheet Slimefun Guide being unable to open the settings menu via shift + right click +* Fixed #2320 ## Release Candidate 16 (07 Sep 2020) https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#16