Update to 1.20.4
This commit is contained in:
parent
d26c6a8082
commit
fc816340d5
|
|
@ -8,7 +8,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
// mavenLocal()
|
||||||
maven {
|
maven {
|
||||||
url = uri("https://papermc.io/repo/repository/maven-public/")
|
url = uri("https://papermc.io/repo/repository/maven-public/")
|
||||||
}
|
}
|
||||||
|
|
@ -39,7 +39,7 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly("com.alttd:Galaxy-API:1.18.2-R0.1-SNAPSHOT")
|
compileOnly("com.alttd:Galaxy-API:1.20.4-R0.1-SNAPSHOT")
|
||||||
compileOnly("de.keyle:mypet:3.11-SNAPSHOT")
|
compileOnly("de.keyle:mypet:3.11-SNAPSHOT")
|
||||||
compileOnly("com.github.NeumimTo:Pl3xMap:1.18-2")
|
compileOnly("com.github.NeumimTo:Pl3xMap:1.18-2")
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.7.0")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.7.0")
|
||||||
|
|
@ -51,7 +51,7 @@ dependencies {
|
||||||
group = "com.griefprevention"
|
group = "com.griefprevention"
|
||||||
version = "16.18-RC2-SNAPSHOT"
|
version = "16.18-RC2-SNAPSHOT"
|
||||||
description = "GriefPrevention"
|
description = "GriefPrevention"
|
||||||
java.sourceCompatibility = JavaVersion.VERSION_16
|
java.sourceCompatibility = JavaVersion.VERSION_17
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications.create<MavenPublication>("maven") {
|
publications.create<MavenPublication>("maven") {
|
||||||
|
|
|
||||||
|
|
@ -411,7 +411,7 @@ public class BlockEventHandler implements Listener
|
||||||
else if (Tag.SAPLINGS.isTagged(block.getType()) && GriefPrevention.instance.config_blockSkyTrees && GriefPrevention.instance.claimsEnabledForWorld(player.getWorld()))
|
else if (Tag.SAPLINGS.isTagged(block.getType()) && GriefPrevention.instance.config_blockSkyTrees && GriefPrevention.instance.claimsEnabledForWorld(player.getWorld()))
|
||||||
{
|
{
|
||||||
Block earthBlock = placeEvent.getBlockAgainst();
|
Block earthBlock = placeEvent.getBlockAgainst();
|
||||||
if (earthBlock.getType() != Material.GRASS)
|
if (earthBlock.getType() != Material.SHORT_GRASS)
|
||||||
{
|
{
|
||||||
if (earthBlock.getRelative(BlockFace.DOWN).getType() == Material.AIR ||
|
if (earthBlock.getRelative(BlockFace.DOWN).getType() == Material.AIR ||
|
||||||
earthBlock.getRelative(BlockFace.DOWN).getRelative(BlockFace.DOWN).getType() == Material.AIR)
|
earthBlock.getRelative(BlockFace.DOWN).getRelative(BlockFace.DOWN).getType() == Material.AIR)
|
||||||
|
|
|
||||||
|
|
@ -3239,26 +3239,26 @@ public class GriefPrevention extends JavaPlugin
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void banPlayer(Player player, String reason, String source)
|
// static void banPlayer(Player player, String reason, String source)
|
||||||
{
|
// {
|
||||||
if (GriefPrevention.instance.config_ban_useCommand)
|
// if (GriefPrevention.instance.config_ban_useCommand)
|
||||||
{
|
// {
|
||||||
Bukkit.getServer().dispatchCommand(
|
// Bukkit.getServer().dispatchCommand(
|
||||||
Bukkit.getConsoleSender(),
|
// Bukkit.getConsoleSender(),
|
||||||
GriefPrevention.instance.config_ban_commandFormat.replace("%name%", player.getName()).replace("%reason%", reason));
|
// GriefPrevention.instance.config_ban_commandFormat.replace("%name%", player.getName()).replace("%reason%", reason));
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
BanList bans = Bukkit.getServer().getBanList(Type.NAME);
|
// BanList bans = Bukkit.getServer().getBanList(Type.NAME);
|
||||||
bans.addBan(player.getName(), reason, null, source);
|
// bans.addBan(player.getName(), reason, null, source);
|
||||||
|
//
|
||||||
//kick
|
// //kick
|
||||||
if (player.isOnline())
|
// if (player.isOnline())
|
||||||
{
|
// {
|
||||||
player.kickPlayer(reason);
|
// player.kickPlayer(reason);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
public ItemStack getItemInHand(Player player, EquipmentSlot hand)
|
public ItemStack getItemInHand(Player player, EquipmentSlot hand)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1560,7 +1560,7 @@ class PlayerEventHandler implements Listener
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
allowedFillBlocks.add(Material.GRASS);
|
allowedFillBlocks.add(Material.SHORT_GRASS);
|
||||||
allowedFillBlocks.add(Material.DIRT);
|
allowedFillBlocks.add(Material.DIRT);
|
||||||
allowedFillBlocks.add(Material.STONE);
|
allowedFillBlocks.add(Material.STONE);
|
||||||
allowedFillBlocks.add(Material.SAND);
|
allowedFillBlocks.add(Material.SAND);
|
||||||
|
|
@ -1624,7 +1624,7 @@ class PlayerEventHandler implements Listener
|
||||||
}
|
}
|
||||||
|
|
||||||
//only replace air, spilling water, snow, long grass
|
//only replace air, spilling water, snow, long grass
|
||||||
if (block.getType() == Material.AIR || block.getType() == Material.SNOW || (block.getType() == Material.WATER && ((Levelled) block.getBlockData()).getLevel() != 0) || block.getType() == Material.GRASS)
|
if (block.getType() == Material.AIR || block.getType() == Material.SNOW || (block.getType() == Material.WATER && ((Levelled) block.getBlockData()).getLevel() != 0) || block.getType() == Material.SHORT_GRASS)
|
||||||
{
|
{
|
||||||
//if the top level, always use the default filler picked above
|
//if the top level, always use the default filler picked above
|
||||||
if (y == maxHeight)
|
if (y == maxHeight)
|
||||||
|
|
@ -2066,7 +2066,7 @@ class PlayerEventHandler implements Listener
|
||||||
Material type = result.getType();
|
Material type = result.getType();
|
||||||
if (type != Material.AIR &&
|
if (type != Material.AIR &&
|
||||||
(!passThroughWater || type != Material.WATER) &&
|
(!passThroughWater || type != Material.WATER) &&
|
||||||
type != Material.GRASS &&
|
type != Material.SHORT_GRASS &&
|
||||||
type != Material.SNOW) return result;
|
type != Material.SNOW) return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,8 @@ class PlayerKickBanTask implements Runnable
|
||||||
if (this.ban)
|
if (this.ban)
|
||||||
{
|
{
|
||||||
//ban
|
//ban
|
||||||
GriefPrevention.banPlayer(this.player, this.reason, this.source);
|
// GriefPrevention.banPlayer(this.player, this.reason, this.source);
|
||||||
|
this.player.kickPlayer(this.reason);
|
||||||
}
|
}
|
||||||
else if (this.player.isOnline())
|
else if (this.player.isOnline())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ class RestoreNatureProcessingTask implements Runnable
|
||||||
|
|
||||||
this.notAllowedToHang = EnumSet.noneOf(Material.class);
|
this.notAllowedToHang = EnumSet.noneOf(Material.class);
|
||||||
this.notAllowedToHang.add(Material.DIRT);
|
this.notAllowedToHang.add(Material.DIRT);
|
||||||
this.notAllowedToHang.add(Material.GRASS);
|
this.notAllowedToHang.add(Material.SHORT_GRASS);
|
||||||
this.notAllowedToHang.add(Material.SNOW);
|
this.notAllowedToHang.add(Material.SNOW);
|
||||||
this.notAllowedToHang.add(Material.OAK_LOG);
|
this.notAllowedToHang.add(Material.OAK_LOG);
|
||||||
this.notAllowedToHang.add(Material.SPRUCE_LOG);
|
this.notAllowedToHang.add(Material.SPRUCE_LOG);
|
||||||
|
|
@ -106,7 +106,7 @@ class RestoreNatureProcessingTask implements Runnable
|
||||||
|
|
||||||
if (this.aggressiveMode)
|
if (this.aggressiveMode)
|
||||||
{
|
{
|
||||||
this.notAllowedToHang.add(Material.GRASS);
|
this.notAllowedToHang.add(Material.SHORT_GRASS);
|
||||||
this.notAllowedToHang.add(Material.STONE);
|
this.notAllowedToHang.add(Material.STONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -395,7 +395,7 @@ class RestoreNatureProcessingTask implements Runnable
|
||||||
Material[] excludedBlocksArray = new Material[]
|
Material[] excludedBlocksArray = new Material[]
|
||||||
{
|
{
|
||||||
Material.CACTUS,
|
Material.CACTUS,
|
||||||
Material.GRASS,
|
Material.SHORT_GRASS,
|
||||||
Material.RED_MUSHROOM,
|
Material.RED_MUSHROOM,
|
||||||
Material.BROWN_MUSHROOM,
|
Material.BROWN_MUSHROOM,
|
||||||
Material.DEAD_BUSH,
|
Material.DEAD_BUSH,
|
||||||
|
|
@ -483,10 +483,10 @@ class RestoreNatureProcessingTask implements Runnable
|
||||||
fillableBlocks.add(Material.AIR);
|
fillableBlocks.add(Material.AIR);
|
||||||
fillableBlocks.add(Material.WATER);
|
fillableBlocks.add(Material.WATER);
|
||||||
fillableBlocks.add(Material.LAVA);
|
fillableBlocks.add(Material.LAVA);
|
||||||
fillableBlocks.add(Material.GRASS);
|
fillableBlocks.add(Material.SHORT_GRASS);
|
||||||
|
|
||||||
ArrayList<Material> notSuitableForFillBlocks = new ArrayList<>();
|
ArrayList<Material> notSuitableForFillBlocks = new ArrayList<>();
|
||||||
notSuitableForFillBlocks.add(Material.GRASS);
|
notSuitableForFillBlocks.add(Material.SHORT_GRASS);
|
||||||
notSuitableForFillBlocks.add(Material.CACTUS);
|
notSuitableForFillBlocks.add(Material.CACTUS);
|
||||||
notSuitableForFillBlocks.add(Material.WATER);
|
notSuitableForFillBlocks.add(Material.WATER);
|
||||||
notSuitableForFillBlocks.add(Material.LAVA);
|
notSuitableForFillBlocks.add(Material.LAVA);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user