Compare commits

..
3 Commits
Author SHA1 Message Date
Andrew Wong b50d57739f Bump version 2021-08-16 13:30:46 +02:00
Andrew Wong ce9438eaeb Fix compile errors in the fawe 1.17 module 2021-08-16 13:26:50 +02:00
Andrew Wong 47cc259c40 Fix startup errors, bump fawe version 2021-08-16 13:23:26 +02:00
7 changed files with 40 additions and 31 deletions

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ plugins {
}
description = 'AreaShop'
version = '2.6.3'
version = '2.6.4'
dependencies {
// Spigot api
@@ -152,17 +152,17 @@ public class SignsFeature extends RegionFeature {
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onSignBreak(BlockBreakEvent event) {
if (getRegion().invalidated()) {
Block block = event.getBlock();
RegionSign regionSign = SignsFeature.getSignByLocation(block.getLocation());
if (regionSign == null) {
return;
}
if (regionSign.getRegion().invalidated()) {
AreaShop.warn("SignsFeature: Sign feature for an invalidated region is still active!");
}
Block block = event.getBlock();
// Check if it is a sign
if (Materials.isSign(block.getType())) {
// Check if the rent sign is really the same as a saved rent
RegionSign regionSign = SignsFeature.getSignByLocation(block.getLocation());
if (regionSign == null) {
return;
}
if (regionSign.getRegion().invalidated()) {
AreaShop.warn("SignsFeature: Sign feature for an invalidated region object is still active!");
}
@@ -179,13 +179,6 @@ public class SignsFeature extends RegionFeature {
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onIndirectSignBreak(BlockPhysicsEvent event) {
if (getRegion().invalidated()) {
AreaShop.warn("SignsFeature: Sign feature for an invalidated region is still active!");
}
// Check if the block is a sign
if (!Materials.isSign(event.getBlock().getType())) {
return;
}
final Block block = event.getBlock();
// Check if the sign is really the same as a saved rent
@@ -193,6 +186,14 @@ public class SignsFeature extends RegionFeature {
if (regionSign == null) {
return;
}
if (regionSign.getRegion().invalidated()) {
AreaShop.warn("SignsFeature: Sign feature for an invalidated region is still active!");
}
// Check if the block is a sign
if (!Materials.isSign(event.getBlock().getType())) {
return;
}
// If the block is in an invalid position then we remove the sign
if (!behaviourHelper.isBlockValid(block)) {
regionSign.remove();
@@ -206,13 +207,19 @@ public class SignsFeature extends RegionFeature {
@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
public void onSignClick(PlayerInteractEvent event) {
if (getRegion().invalidated()) {
AreaShop.warn("SignsFeature: Sign feature for an invalidated region is still active!");
}
Block block = event.getClickedBlock();
if (block == null) {
return;
}
// Check if this sign belongs to a region
RegionSign regionSign = SignsFeature.getSignByLocation(block.getLocation());
if (regionSign == null) {
return;
}
if (regionSign.getRegion().invalidated()) {
AreaShop.warn("SignsFeature: Sign feature for an invalidated region is still active!");
}
// Only listen to left and right clicks on blocks
if (!(event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.LEFT_CLICK_BLOCK)) {
@@ -224,11 +231,6 @@ public class SignsFeature extends RegionFeature {
return;
}
// Check if this sign belongs to a region
RegionSign regionSign = SignsFeature.getSignByLocation(block.getLocation());
if (regionSign == null) {
return;
}
// Ignore players that are in sign link mode (which will handle the event itself)
Player player = event.getPlayer();
@@ -256,7 +258,13 @@ public class SignsFeature extends RegionFeature {
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onSignChange(SignChangeEvent event) {
if (getRegion().invalidated()) {
RegionSign regionSign = SignsFeature.getSignByLocation(event.getBlock().getLocation());
if (regionSign == null) {
return;
}
if (regionSign.getRegion().invalidated()) {
AreaShop.warn("SignsFeature: Sign feature for an invalidated region is still active!");
}
Player player = event.getPlayer();
@@ -120,7 +120,7 @@ public class GithubUpdateCheck {
error = true;
return;
}
debug("json: " + latestRelease.getAsString());
debug("json: " + latestRelease.toString());
// Latest version
latestVersion = latestRelease.get("tag_name").getAsString();
+1 -1
View File
@@ -3,7 +3,7 @@ plugins {
}
group = "me.wiefferink.areashop"
version = '2.6.3'
version = '2.6.4'
subprojects {
+3 -3
View File
@@ -7,9 +7,9 @@ repositories {
dependencies {
compileOnly project(':areashop-interface')
compileOnly('org.spigotmc:spigot-api:1.17-R0.1-SNAPSHOT')
compileOnly("com.fastasyncworldedit:FAWE-Core:1.17-5")
compileOnly("com.fastasyncworldedit:FAWE-Bukkit:1.17-5")
compileOnly('org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT')
compileOnly("com.fastasyncworldedit:FAWE-Core:1.17-138")
compileOnly("com.fastasyncworldedit:FAWE-Bukkit:1.17-138")
compileOnly('com.sk89q.worldguard:worldguard-bukkit:7.0.5')
}
@@ -1,9 +1,10 @@
package me.wiefferink.areashop.handlers.fawe.v1_17;
import com.fastasyncworldedit.core.FaweAPI;
import com.fastasyncworldedit.core.extent.clipboard.MemoryOptimizedClipboard;
import com.fastasyncworldedit.core.extent.clipboard.io.FastSchematicReader;
import com.fastasyncworldedit.core.extent.processor.lighting.RelightMode;
import com.fastasyncworldedit.core.object.FaweLimit;
import com.fastasyncworldedit.core.object.RelightMode;
import com.fastasyncworldedit.core.object.clipboard.MemoryOptimizedClipboard;
import com.fastasyncworldedit.core.util.EditSessionBuilder;
import com.google.common.annotations.Beta;
import com.sk89q.jnbt.NBTInputStream;
+1 -1
View File
@@ -4,5 +4,5 @@ repositories {
dependencies {
compileOnly project(':areashop-interface')
compileOnly 'org.spigotmc:spigot:1.17-R0.1-SNAPSHOT'
compileOnly 'org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT'
}