diff --git a/.github/workflows/codacy-analysis.yml b/.github/workflows/codacy-analysis.yml index 94ddf3a1..09116bb6 100644 --- a/.github/workflows/codacy-analysis.yml +++ b/.github/workflows/codacy-analysis.yml @@ -41,6 +41,6 @@ jobs: # Upload the SARIF file generated in the previous step - name: Upload SARIF results file - uses: github/codeql-action/upload-sarif@v1 + uses: github/codeql-action/upload-sarif@v2 with: sarif_file: results.sarif diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index eaf30927..6fe213ab 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -46,7 +46,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -57,7 +57,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -71,4 +71,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/SECURITY.md b/SECURITY.md index a18bd56e..65277440 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -9,16 +9,16 @@ In terms of plugin releases, our support matrix is as follows: ### Actively Supported These versions are currently actively supported by our team, and you should expect security patches where appropriate for these versions. -| Version | Supported | Support End: | -| ------------------- | ------------------ | ------------------------------ | -| 2021.09 | :white_check_mark: | No Earlier than December 2021 | +| Version | Supported | Support End: | +| ------------------- | ---------- | ------------------------------ | +| 2022.02 | ✅ | No Earlier than May 2022 | ### Legacy Supported These versions are no longer under active development, however we will look to release critical secuirty patches where appropriate. -| Version | Supported | Support End: | -| ------------------- | ------------------ | ------------ | -| 2021.06 | :white_check_mark: | October 2021 | +| Version | Supported | Support End: | +| ------------------- | ---------- | ------------ | +| 2021.09 | ⚠ī¸ | April 2022 | ### No Longer Supported @@ -26,8 +26,9 @@ These versions are no longer supported at all. It is strongly advised to update | Version | Supported | Support Ended: | | ------------------- | ------------------ | ------------------- | -| 2021.05 | :white_check_mark: | September 2021 | -| 2021.04 | :white_check_mark: | July 2021 | +| 2021.06 | :x: | October 2021 | +| 2021.05 | :x: | September 2021 | +| 2021.04 | :x: | July 2021 | | 2021.02 | :x: | 6 June 2021 | | 2020.11 | :x: | 3 May 2021 | | 6.0.x (Pre-Release) | :x: | December 2020 | diff --git a/nb-configuration.xml b/nb-configuration.xml index 65f12570..08e4e03c 100644 --- a/nb-configuration.xml +++ b/nb-configuration.xml @@ -13,7 +13,7 @@ You can copy and paste the single properties, into the pom.xml file and the IDE That way multiple projects can share the same settings (useful for formatting rules for example). Any value defined here will override the pom.xml file value but is only applicable to the current project. --> - JDK_11 + JDK_17 true diff --git a/pom.xml b/pom.xml index 117fdaaf..c18a91f9 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ me.totalfreedom TotalFreedomMod - 2022.02-RC01 + 2022.02 jar @@ -396,7 +396,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.3.1-SNAPSHOT + 3.3.0 package diff --git a/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java b/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java index 2e53f9de..17f6c5fe 100644 --- a/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java +++ b/src/main/java/me/totalfreedom/totalfreedommod/blocking/InteractBlocker.java @@ -5,6 +5,8 @@ import me.totalfreedom.totalfreedommod.config.ConfigEntry; import me.totalfreedom.totalfreedommod.util.Groups; import org.bukkit.ChatColor; import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -79,9 +81,33 @@ public class InteractBlocker extends FreedomService if (Groups.SPAWN_EGGS.contains(event.getMaterial())) { - player.getInventory().clear(player.getInventory().getHeldItemSlot()); - player.sendMessage(ChatColor.GRAY + "Spawn eggs are currently disabled."); event.setCancelled(true); + Block clickedBlock = event.getClickedBlock(); + if (clickedBlock == null) + { + return; + } + EntityType eggType = null; + try + { + Material mat = event.getMaterial(); + if (mat == Material.MOOSHROOM_SPAWN_EGG) + { + eggType = EntityType.MUSHROOM_COW; + } + else + { + eggType = EntityType.valueOf(mat.name().substring(0, mat.name().length() - 10)); + } + } + catch (IllegalArgumentException ignored) + { + // + } + if (eggType != null) + { + clickedBlock.getWorld().spawnEntity(clickedBlock.getLocation().add(event.getBlockFace().getDirection()).add(0.5, 0.5, 0.5), eggType); + } return; } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index d5bd702c..308beb03 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -14,4 +14,4 @@ softdepend: - JDA - Votifier authors: [Madgeek1450, Prozza] -api-version: "1.16" \ No newline at end of file +api-version: "1.17" \ No newline at end of file