Compare commits

...
9 Commits
Author SHA1 Message Date
Andrew Wong 9d9a58a170 bump to 2.7.6 2022-03-24 16:24:56 +08:00
Andrew Wong e64e884c2a Updates to the fawe module 2022-03-05 00:00:34 +08:00
Andrew Wong 6ad4ff9deb Shade in the provider for 1.18.1 2022-03-05 00:00:23 +08:00
Andrew Wong eec9806492 Add back support for 1.18.1 2022-03-04 23:08:43 +08:00
Andrew Wong 43b2ae8278 Fix bad website in plugin.yml 2022-03-04 22:54:40 +08:00
Andrew Wong 6d5a92e389 1.18.2 2022-03-04 22:48:39 +08:00
Andrew Wong 7d7a62ffa0 Bump gradle wrapper to 7.4 2022-03-03 17:41:52 +08:00
md5sha256 44456d87b6 Fix the sign error file extension 2022-01-25 05:49:47 +08:00
md5sha256 d92c710b27 bump version to snapshot 2022-01-25 05:49:35 +08:00
15 changed files with 112 additions and 24 deletions

No files matched your search

+7 -2
View File
@@ -29,10 +29,10 @@ dependencies {
implementation("com.github.NLthijs48:InteractiveMessenger:e7749258ca")
implementation("com.github.NLthijs48:BukkitDo:819d51ec2b")
implementation("io.github.baked-libs:dough-data:1.0.3")
implementation("com.google.inject:guice:5.0.1") {
implementation("com.google.inject:guice:5.1.0") {
exclude("com.google.guava", "guava")
}
implementation("com.google.inject.extensions:guice-assistedinject:5.0.1") {
implementation("com.google.inject.extensions:guice-assistedinject:5.1.0") {
exclude("com.google.guava", "guava")
}
@@ -46,6 +46,11 @@ dependencies {
runtimeOnly(projects.adapters.plugins.fastasyncworldedit)
runtimeOnly(project(":adapters:platform:bukkit-1-17", "reobf"))
runtimeOnly(project(":adapters:platform:bukkit-1-18", "reobf"))
runtimeOnly(project(":adapters:platform:bukkit-1-18-1", "reobf"))
}
repositories {
mavenCentral()
}
tasks {
@@ -91,7 +91,7 @@ public final class AreaShop extends JavaPlugin implements AreaShopApi {
public static final String defaultFile = "default.yml";
public static final String configFile = "config.yml";
public static final String configFileHidden = "hiddenConfig.yml";
public static final String signLogFile = "sign-errors.yml";
public static final String signLogFile = "sign-errors.log";
public static final String versionFile = "versions";
// Euro tag for in the config
+1 -1
View File
@@ -5,7 +5,7 @@ description: "Selling and renting WorldGuard regions to your players, highly con
depend: [Vault, WorldGuard, WorldEdit]
softdepend: [Multiverse-Core, FastAsyncWorldEdit]
author: NLThijs48
website: https://github.com/md5s256/AreaShop
website: https://github.com/md5sha256/AreaShop
commands:
AreaShop:
description: 'For all commands use /as help.'
@@ -0,0 +1,21 @@
plugins.apply("io.papermc.paperweight.userdev")
dependencies {
paperDevBundle("1.18.1-R0.1-SNAPSHOT")
compileOnly(projects.areashopInterface)
compileOnly(projects.areashopNms)
}
description = "AreaShop NMS Helper 1-18"
tasks {
assemble {
dependsOn("reobfJar")
}
named("reobfJar", io.papermc.paperweight.tasks.RemapJar::class) {
outputJar.set(file("build/libs/${project.name}-${project.version}.jar"))
}
}
@@ -1,7 +1,7 @@
plugins.apply("io.papermc.paperweight.userdev")
dependencies {
paperDevBundle("1.18.1-R0.1-SNAPSHOT")
paperDevBundle("1.18.2-R0.1-SNAPSHOT")
compileOnly(projects.areashopInterface)
compileOnly(projects.areashopNms)
}
@@ -0,0 +1,46 @@
package me.wiefferink.areashop.adapters.platform.v1_18_R2;
import me.wiefferink.areashop.nms.BlockBehaviourHelper;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.block.state.BlockState;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.craftbukkit.v1_18_R2.CraftWorld;
import org.bukkit.craftbukkit.v1_18_R2.block.CraftBlock;
import org.bukkit.craftbukkit.v1_18_R2.block.CraftBlockState;
import org.bukkit.craftbukkit.v1_18_R2.block.data.CraftBlockData;
import java.util.Objects;
public class BlockBehaviourImpl implements BlockBehaviourHelper {
@Override
public boolean canPlace(Location location, BlockData blockData) {
Objects.requireNonNull(location.getWorld(), "Null World!");
final BlockPos blockPosition = new BlockPos(location.getX(), location.getY(), location.getZ());
final CraftWorld craftWorld = (CraftWorld) location.getWorld();
final ServerLevel world = craftWorld.getHandle();
final CraftBlockData craftBlockData = (CraftBlockData) blockData;
final BlockState ibd = craftBlockData.getState();
return ibd.canSurvive(world, blockPosition);
}
@Override
public boolean isBlockValid(Block block) {
final CraftBlock craftBlock = (CraftBlock) block;
final CraftWorld craftWorld = (CraftWorld) craftBlock.getWorld();
final ServerLevel world = craftWorld.getHandle();
final BlockState ibd = craftBlock.getNMS();
return ibd.canSurvive(world, craftBlock.getPosition());
}
@Override
public boolean isBlockStateValid(org.bukkit.block.BlockState blockState) {
final CraftBlockState craftBlockState = (CraftBlockState) blockState;
final BlockState ibd = craftBlockState.getHandle();
return ibd.canSurvive(craftBlockState.getBlock().getCraftWorld().getHandle(), craftBlockState.getPosition());
}
}
@@ -0,0 +1,15 @@
package me.wiefferink.areashop.adapters.platform.v1_18_R2;
import me.wiefferink.areashop.nms.BlockBehaviourHelper;
import me.wiefferink.areashop.nms.NMS;
public class NMSImpl implements NMS {
private final BlockBehaviourImpl blockBehaviourHelper = new BlockBehaviourImpl();
@Override
public BlockBehaviourHelper blockBehaviourHelper() {
return this.blockBehaviourHelper;
}
}
@@ -59,7 +59,8 @@ public class FastAsyncWorldEditHandler extends WorldEditInterface {
private final BoundingBox boundingBox;
public RegionBoundMask(final ProtectedRegion region) {
final BlockVector3 min = region.getMinimumPoint(), max = region.getMaximumPoint();
final BlockVector3 min = region.getMinimumPoint();
final BlockVector3 max = region.getMaximumPoint();
this.boundingBox = new BoundingBox(min.getX(), min.getY(), min.getZ(), max.getX(), max.getY(), max.getZ());
}
@@ -90,7 +91,6 @@ public class FastAsyncWorldEditHandler extends WorldEditInterface {
@Beta
public CompletableFuture<Boolean> restoreRegionBlocksAsync(File rawFile, GeneralRegionInterface regionInterface) {
// TODO implement using the FastAsyncWorldEdit api to paste async
File file = null;
for (ClipboardFormat formatOption : BuiltInClipboardFormat.values()) {
if (new File(rawFile.getAbsolutePath() + "." + formatOption.getPrimaryFileExtension())
@@ -147,6 +147,7 @@ public class FastAsyncWorldEditHandler extends WorldEditInterface {
final RegionType regionType = region.getType();
final Mask mask = new RegionBoundMask(region);
FaweAPI.getTaskManager().async(() -> {
boolean result = true;
// Read the schematic and paste it into the world
try (Closer closer = Closer.create()) {
final FileInputStream fis = closer.register(new FileInputStream(finalFile));
@@ -188,21 +189,21 @@ public class FastAsyncWorldEditHandler extends WorldEditInterface {
"exceeded the block limit while restoring schematic of " + regionInterface.getName()
+ ", limit in exception: " + e.getBlockLimit() + ", limit passed by AreaShop: "
+ pluginInterface.getConfig().getInt("maximumBlocks"));
completableFuture.complete(false);
result = false;
} catch (IOException e) {
pluginInterface.getLogger().warning(
"An error occurred while restoring schematic of " + regionInterface.getName()
+ ", enable debug to see the complete stacktrace");
pluginInterface.debugI(ExceptionUtils.getStackTrace(e));
completableFuture.complete(false);
result = false;
} catch (Exception e) {
pluginInterface.getLogger()
.warning("crashed during restore of " + regionInterface.getName());
pluginInterface.debugI(ExceptionUtils.getStackTrace(e));
completableFuture.complete(false);
result = false;
}
editSession.flushQueue();
completableFuture.complete(true);
completableFuture.complete(result);
});
return completableFuture;
}
+3 -3
View File
@@ -2,13 +2,13 @@ plugins {
java
`java-library`
`maven-publish`
id("io.papermc.paperweight.userdev") version "1.3.3" apply false
id("io.papermc.paperweight.userdev") version "1.3.5" apply false
idea
eclipse
}
group = "me.wiefferink"
version = "2.7.5"
version = "2.7.6"
subprojects {
@@ -81,4 +81,4 @@ subprojects {
}
}
}
}
}
+2 -2
View File
@@ -6,10 +6,10 @@ findbugs = "3.0.2"
# Minecraft Plugins
worldedit = "7.2.8"
worldguard = "7.0.6"
fawe = "2.0.0"
fawe = "2.0.1"
# Gradle plugins
paperweight = "1.3.3"
paperweight = "1.3.5"
[libraries]
# Platform
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+5 -5
View File
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
+2 -2
View File
@@ -25,6 +25,7 @@ include(":areashop-nms")
// Adapters
include(":adapters:platform:bukkit-1-17")
include(":adapters:platform:bukkit-1-18")
include(":adapters:platform:bukkit-1-18-1")
include(":adapters:plugins:worldedit")
include(":adapters:plugins:worldguard")
include(":adapters:plugins:fastasyncworldedit")
@@ -34,5 +35,4 @@ include(":areashop")
project(":areashop").projectDir = file("AreaShop")
enableFeaturePreview("VERSION_CATALOGS")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")