mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-26 17:05:01 +00:00
Merge remote-tracking branch 'origin/development' into discord
This commit is contained in:
commit
0db661600f
6
.github/workflows/codacy-analysis.yml
vendored
6
.github/workflows/codacy-analysis.yml
vendored
@ -21,11 +21,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Checkout the repository to the GitHub Actions runner
|
# Checkout the repository to the GitHub Actions runner
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
||||||
- name: Run Codacy Analysis CLI
|
- name: Run Codacy Analysis CLI
|
||||||
uses: codacy/codacy-analysis-cli-action@4.0.0
|
uses: codacy/codacy-analysis-cli-action@4.0.2
|
||||||
with:
|
with:
|
||||||
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
|
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
|
||||||
# You can also omit the token and run the tools that support default configurations
|
# You can also omit the token and run the tools that support default configurations
|
||||||
@ -41,6 +41,6 @@ jobs:
|
|||||||
|
|
||||||
# Upload the SARIF file generated in the previous step
|
# Upload the SARIF file generated in the previous step
|
||||||
- name: Upload SARIF results file
|
- name: Upload SARIF results file
|
||||||
uses: github/codeql-action/upload-sarif@v1
|
uses: github/codeql-action/upload-sarif@v2
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
10
.github/workflows/codeql-analysis.yml
vendored
10
.github/workflows/codeql-analysis.yml
vendored
@ -35,10 +35,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Java JDK
|
- name: Setup Java JDK
|
||||||
uses: actions/setup-java@v2.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
# The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x). Early access versions can be specified in the form of e.g. 14-ea, 14.0.0-ea, or 14.0.0-ea.28
|
# The Java version to make available on the path. Takes a whole or semver Java version, or 1.x syntax (e.g. 1.8 => Java 8.x). Early access versions can be specified in the form of e.g. 14-ea, 14.0.0-ea, or 14.0.0-ea.28
|
||||||
java-version: 17
|
java-version: 17
|
||||||
@ -46,7 +46,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# 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).
|
# 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)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v1
|
uses: github/codeql-action/autobuild@v2
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
@ -71,4 +71,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
4
.github/workflows/downstream.yml
vendored
4
.github/workflows/downstream.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Step 1: run a standard checkout action, provided by github
|
# Step 1: run a standard checkout action, provided by github
|
||||||
- name: Checkout main
|
- name: Checkout main
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: main
|
ref: main
|
||||||
# submodules: 'recursive' ### may be needed in your situation
|
# submodules: 'recursive' ### may be needed in your situation
|
||||||
@ -26,7 +26,7 @@ jobs:
|
|||||||
# Step 2: run this sync action - specify the upstream repo, upstream branch to sync with, and target sync branch
|
# Step 2: run this sync action - specify the upstream repo, upstream branch to sync with, and target sync branch
|
||||||
- name: Pull (Fast-Forward) upstream changes
|
- name: Pull (Fast-Forward) upstream changes
|
||||||
id: sync
|
id: sync
|
||||||
uses: aormsby/Fork-Sync-With-Upstream-action@v2.1
|
uses: aormsby/Fork-Sync-With-Upstream-action@v3.3
|
||||||
with:
|
with:
|
||||||
upstream_repository: AtlasMediaGroup/TotalFreedomMod
|
upstream_repository: AtlasMediaGroup/TotalFreedomMod
|
||||||
upstream_branch: main
|
upstream_branch: main
|
||||||
|
4
.github/workflows/java17-maven.yml
vendored
4
.github/workflows/java17-maven.yml
vendored
@ -9,11 +9,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
# Checkout the code
|
# Checkout the code
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
# Java 16 Builds
|
# Java 16 Builds
|
||||||
- name: Set up JDK 17
|
- name: Set up JDK 17
|
||||||
uses: actions/setup-java@v2.3.0
|
uses: actions/setup-java@v3.3.0
|
||||||
with:
|
with:
|
||||||
java-version: 17
|
java-version: 17
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
|
17
SECURITY.md
17
SECURITY.md
@ -9,16 +9,16 @@ In terms of plugin releases, our support matrix is as follows:
|
|||||||
### Actively Supported
|
### Actively Supported
|
||||||
These versions are currently actively supported by our team, and you should expect security patches where appropriate for these versions.
|
These versions are currently actively supported by our team, and you should expect security patches where appropriate for these versions.
|
||||||
|
|
||||||
| Version | Supported | Support End: |
|
| Version | Supported | Support End: |
|
||||||
| ------------------- | ------------------ | ------------------------------ |
|
| ------------------- | ---------- | ------------------------------ |
|
||||||
| 2021.09 | :white_check_mark: | No Earlier than December 2021 |
|
| 2022.02 | ✅ | No Earlier than May 2022 |
|
||||||
|
|
||||||
### Legacy Supported
|
### Legacy Supported
|
||||||
These versions are no longer under active development, however we will look to release critical secuirty patches where appropriate.
|
These versions are no longer under active development, however we will look to release critical secuirty patches where appropriate.
|
||||||
|
|
||||||
| Version | Supported | Support End: |
|
| Version | Supported | Support End: |
|
||||||
| ------------------- | ------------------ | ------------ |
|
| ------------------- | ---------- | ------------ |
|
||||||
| 2021.06 | :white_check_mark: | October 2021 |
|
| 2021.09 | ⚠️ | April 2022 |
|
||||||
|
|
||||||
|
|
||||||
### No Longer Supported
|
### 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: |
|
| Version | Supported | Support Ended: |
|
||||||
| ------------------- | ------------------ | ------------------- |
|
| ------------------- | ------------------ | ------------------- |
|
||||||
| 2021.05 | :white_check_mark: | September 2021 |
|
| 2021.06 | :x: | October 2021 |
|
||||||
| 2021.04 | :white_check_mark: | July 2021 |
|
| 2021.05 | :x: | September 2021 |
|
||||||
|
| 2021.04 | :x: | July 2021 |
|
||||||
| 2021.02 | :x: | 6 June 2021 |
|
| 2021.02 | :x: | 6 June 2021 |
|
||||||
| 2020.11 | :x: | 3 May 2021 |
|
| 2020.11 | :x: | 3 May 2021 |
|
||||||
| 6.0.x (Pre-Release) | :x: | December 2020 |
|
| 6.0.x (Pre-Release) | :x: | December 2020 |
|
||||||
|
@ -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).
|
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.
|
Any value defined here will override the pom.xml file value but is only applicable to the current project.
|
||||||
-->
|
-->
|
||||||
<netbeans.hint.jdkPlatform>JDK_11</netbeans.hint.jdkPlatform>
|
<netbeans.hint.jdkPlatform>JDK_17</netbeans.hint.jdkPlatform>
|
||||||
<netbeans.checkstyle.format>true</netbeans.checkstyle.format>
|
<netbeans.checkstyle.format>true</netbeans.checkstyle.format>
|
||||||
</properties>
|
</properties>
|
||||||
</project-shared-configuration>
|
</project-shared-configuration>
|
||||||
|
8
pom.xml
8
pom.xml
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
<groupId>me.totalfreedom</groupId>
|
<groupId>me.totalfreedom</groupId>
|
||||||
<artifactId>TotalFreedomMod</artifactId>
|
<artifactId>TotalFreedomMod</artifactId>
|
||||||
<version>2022.02-RC01</version>
|
<version>2022.02</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
@ -151,7 +151,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.sk89q.worldedit</groupId>
|
<groupId>com.sk89q.worldedit</groupId>
|
||||||
<artifactId>worldedit-bukkit</artifactId>
|
<artifactId>worldedit-bukkit</artifactId>
|
||||||
<version>7.2.8</version>
|
<version>7.2.10</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -267,7 +267,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.8.1</version>
|
<version>3.10.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<outputFileName>TotalFreedomMod.jar</outputFileName>
|
<outputFileName>TotalFreedomMod.jar</outputFileName>
|
||||||
<compilerVersion>17</compilerVersion>
|
<compilerVersion>17</compilerVersion>
|
||||||
@ -396,7 +396,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.3.1-SNAPSHOT</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
|
@ -5,6 +5,8 @@ import me.totalfreedom.totalfreedommod.config.ConfigEntry;
|
|||||||
import me.totalfreedom.totalfreedommod.util.Groups;
|
import me.totalfreedom.totalfreedommod.util.Groups;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
|
import org.bukkit.block.Block;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -79,9 +81,33 @@ public class InteractBlocker extends FreedomService
|
|||||||
|
|
||||||
if (Groups.SPAWN_EGGS.contains(event.getMaterial()))
|
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);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,12 +337,12 @@ public abstract class NanoHTTPD
|
|||||||
*/
|
*/
|
||||||
protected String decodePercent(String str)
|
protected String decodePercent(String str)
|
||||||
{
|
{
|
||||||
String decoded = null;
|
String decoded = str;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
decoded = URLDecoder.decode(str, "UTF8");
|
decoded = URLDecoder.decode(str, "UTF8");
|
||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException ignored)
|
catch (UnsupportedEncodingException | IllegalArgumentException ignored)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
return decoded;
|
return decoded;
|
||||||
|
@ -14,4 +14,4 @@ softdepend:
|
|||||||
- JDA
|
- JDA
|
||||||
- Votifier
|
- Votifier
|
||||||
authors: [Madgeek1450, Prozza]
|
authors: [Madgeek1450, Prozza]
|
||||||
api-version: "1.16"
|
api-version: "1.17"
|
Loading…
Reference in New Issue
Block a user