Merge branch 'development' into shitcan-savedflags

This commit is contained in:
Video 2021-11-23 03:30:48 -07:00 committed by GitHub
commit 58c21bb1aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 84 additions and 93 deletions

View File

@ -1,9 +1,9 @@
name: Java16-Maven-Build name: Java17-Maven-Build
on: [push] on: [push]
jobs: jobs:
build-java-16: build-java-17:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -12,10 +12,10 @@ jobs:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
# Java 16 Builds # Java 16 Builds
- name: Set up JDK 16 - name: Set up JDK 17
uses: actions/setup-java@v2.3.0 uses: actions/setup-java@v2.3.0
with: with:
java-version: 16 java-version: 17
distribution: 'adopt' distribution: 'adopt'
- name: Build with Maven - name: Build with Maven
run: mvn -B package --file pom.xml run: mvn -B package --file pom.xml

View File

@ -11,20 +11,23 @@ These versions are currently actively supported by our team, and you should expe
| Version | Supported | Support End: | | Version | Supported | Support End: |
| ------------------- | ------------------ | ------------------------------ | | ------------------- | ------------------ | ------------------------------ |
| 2021.05 | :white_check_mark: | No Earlier than August 2021 | | 2021.09 | :white_check_mark: | No Earlier than December 2021 |
### 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.04 | :white_check_mark: | July 2021 | | 2021.06 | :white_check_mark: | October 2021 |
### No Longer Supported ### No Longer Supported
These versions are no longer supported at all. It is strongly advised to update if you are running any of these versions. These versions are no longer supported at all. It is strongly advised to update if you are running any of these versions.
| Version | Supported | Support Ended: | | Version | Supported | Support Ended: |
| ------------------- | ------------------ | ------------------- | | ------------------- | ------------------ | ------------------- |
| 2021.05 | :white_check_mark: | September 2021 |
| 2021.04 | :white_check_mark: | 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 |

View File

@ -5,7 +5,7 @@
<groupId>me.totalfreedom</groupId> <groupId>me.totalfreedom</groupId>
<artifactId>TotalFreedomMod</artifactId> <artifactId>TotalFreedomMod</artifactId>
<version>2021.06</version> <version>2021.09</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<properties> <properties>
@ -247,7 +247,7 @@
<dependency> <dependency>
<groupId>org.junit.jupiter</groupId> <groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId> <artifactId>junit-jupiter</artifactId>
<version>5.7.2</version> <version>5.8.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
@ -429,8 +429,8 @@
<include>org.reflections:reflections</include> <include>org.reflections:reflections</include>
<include>org.javassist:javassist</include> <include>org.javassist:javassist</include>
<include>io.papermc:paperlib</include> <include>io.papermc:paperlib</include>
<include>com.github.speedxx:Mojangson</include>
<include>org.bstats:bstats-bukkit</include> <include>org.bstats:bstats-bukkit</include>
<include>org.bstats:bstats-base</include>
<include>org.jetbrains:annotations</include> <include>org.jetbrains:annotations</include>
</includes> </includes>
</artifactSet> </artifactSet>

View File

@ -269,18 +269,14 @@ public class CoreProtectBridge extends FreedomService
Block block = event.getClickedBlock(); Block block = event.getClickedBlock();
final CoreProtectAPI coreProtect = getCoreProtectAPI(); final CoreProtectAPI coreProtect = getCoreProtectAPI();
// TODO: Rewrite this
if (data.hasInspection()) if (data.hasInspection())
{ {
if (event.getAction() == Action.LEFT_CLICK_BLOCK)
{
if (block != null)
{
event.setCancelled(true);
List<String[]> lookup = coreProtect.blockLookup(block, -1);
int cooldownTime = 3; int cooldownTime = 3;
if (cooldown.containsKey(player.getName())) // Cooldown check
if ((event.getAction() == Action.LEFT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_BLOCK)
&& cooldown.containsKey(player.getName()))
{ {
long secondsLeft = getSecondsLeft(cooldown.get(player.getName()), cooldownTime); long secondsLeft = getSecondsLeft(cooldown.get(player.getName()), cooldownTime);
if (secondsLeft > 0L) if (secondsLeft > 0L)
@ -291,6 +287,14 @@ public class CoreProtectBridge extends FreedomService
} }
} }
// Actual lookup time
if (event.getAction() == Action.LEFT_CLICK_BLOCK)
{
if (block != null)
{
event.setCancelled(true);
List<String[]> lookup = coreProtect.blockLookup(block, -1);
if (!plugin.al.isAdmin(player)) if (!plugin.al.isAdmin(player))
{ {
cooldown.put(player.getName(), System.currentTimeMillis()); cooldown.put(player.getName(), System.currentTimeMillis());
@ -356,8 +360,6 @@ public class CoreProtectBridge extends FreedomService
else if (event.getAction() == Action.RIGHT_CLICK_BLOCK) else if (event.getAction() == Action.RIGHT_CLICK_BLOCK)
{ {
if (block != null) if (block != null)
{
if (data.hasInspection())
{ {
BlockState blockState = block.getRelative(event.getBlockFace()).getState(); BlockState blockState = block.getRelative(event.getBlockFace()).getState();
Block placedBlock = blockState.getBlock(); Block placedBlock = blockState.getBlock();
@ -369,19 +371,6 @@ public class CoreProtectBridge extends FreedomService
lookup = coreProtect.blockLookup(block, -1); lookup = coreProtect.blockLookup(block, -1);
} }
int cooldownTime = 3;
if (cooldown.containsKey(player.getName()))
{
long secondsLeft = getSecondsLeft(cooldown.get(player.getName()), cooldownTime);
if (secondsLeft > 0L)
{
event.setCancelled(true);
player.sendMessage(ChatColor.RED + String.valueOf(secondsLeft) + " seconds left before next query.");
return;
}
}
if (!plugin.al.isAdmin(player)) if (!plugin.al.isAdmin(player))
{ {
cooldown.put(player.getName(), System.currentTimeMillis()); cooldown.put(player.getName(), System.currentTimeMillis());
@ -447,4 +436,3 @@ public class CoreProtectBridge extends FreedomService
} }
} }
} }
}