mirror of
https://github.com/Plugily-Projects/BuildBattle.git
synced 2026-11-04 16:40:09 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4305660bff | ||
|
|
2beeb74559 |
No files matched your search
+2
-2
@@ -39,7 +39,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("plugily.projects:MiniGamesBox-Classic:1.3.12") { isTransitive = false }
|
||||
implementation("plugily.projects:MiniGamesBox-Classic:1.3.13") { isTransitive = false }
|
||||
compileOnly("org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT")
|
||||
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
|
||||
compileOnly("net.citizensnpcs:citizensapi:2.0.31-SNAPSHOT")
|
||||
@@ -47,7 +47,7 @@ dependencies {
|
||||
}
|
||||
|
||||
group = "plugily.projects"
|
||||
version = "5.0.10"
|
||||
version = "5.0.11"
|
||||
description = "BuildBattle"
|
||||
|
||||
java {
|
||||
|
||||
@@ -189,7 +189,7 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
if(playerPlot != null) {
|
||||
|
||||
// Prevent "Legacy material support initialisation"
|
||||
playerPlot.changeFloor(material, ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1) ? hand.getData().getData() : 0);
|
||||
playerPlot.changeFloor(material, ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12) ? hand.getData().getData() : 0);
|
||||
new MessageBuilder("MENU_OPTION_CONTENT_FLOOR_CHANGED").asKey().player(event.getPlayer()).sendPlayer();
|
||||
}
|
||||
}
|
||||
@@ -340,7 +340,7 @@ public class ArenaEvents extends PluginArenaEvents {
|
||||
plot.addEntity();
|
||||
event.setCancelled(false);
|
||||
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_9_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_9)) {
|
||||
event.getEntity().setAI(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ public class ArenaRegistry extends PluginArenaRegistry {
|
||||
World minWorld = minPoint.getWorld();
|
||||
|
||||
if(minWorld != null) {
|
||||
Biome biome = ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15_R1) ?
|
||||
Biome biome = ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15) ?
|
||||
minWorld.getBiome(minPoint.getBlockX(), minPoint.getBlockY(), minPoint.getBlockZ())
|
||||
: minWorld.getBiome(minPoint.getBlockX(), minPoint.getBlockZ());
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ public class Plot {
|
||||
}
|
||||
|
||||
for(Chunk chunk : cuboid.chunkList()) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15)) {
|
||||
chunk.getWorld().refreshChunk(chunk.getX(), chunk.getZ());
|
||||
continue;
|
||||
}
|
||||
@@ -235,7 +235,7 @@ public class Plot {
|
||||
changeFloor(defaultFloor.parseMaterial());
|
||||
|
||||
if(centerWorld != null) {
|
||||
if(ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15_R1)) {
|
||||
if(ServerVersion.Version.isCurrentHigher(ServerVersion.Version.v1_15)) {
|
||||
Location min = cuboid.getMinPoint();
|
||||
Location max = cuboid.getMaxPoint();
|
||||
|
||||
@@ -307,7 +307,7 @@ public class Plot {
|
||||
Block block = maxWorld.getBlockAt(x, y, z);
|
||||
block.setType(material);
|
||||
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12)) {
|
||||
try {
|
||||
Block.class.getMethod("setData", byte.class).invoke(block, data);
|
||||
} catch(Exception e) {
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class Banner {
|
||||
ItemStack item = XMaterial.WHITE_BANNER.parseItem();
|
||||
BannerMeta meta = (BannerMeta) item.getItemMeta();
|
||||
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12)) {
|
||||
meta.setBaseColor(color);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ public class BannerMenu {
|
||||
for(DyeColor color : DyeColor.values()) {
|
||||
ItemStack item;
|
||||
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_12)) {
|
||||
item = XMaterial.WHITE_BANNER.parseItem();
|
||||
BannerMeta meta = (BannerMeta) item.getItemMeta();
|
||||
|
||||
|
||||
+1
-1
@@ -88,7 +88,7 @@ public class BiomeChangeOption {
|
||||
}
|
||||
|
||||
for(Chunk chunk : plot.getCuboid().chunkList()) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15_R1)) {
|
||||
if(ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_15)) {
|
||||
chunk.getWorld().refreshChunk(chunk.getX(), chunk.getZ());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -39,11 +39,11 @@ public class ChunkManager {
|
||||
private static Constructor<?> mapChunkConstructor;
|
||||
|
||||
static {
|
||||
if (ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_18_R1)) {
|
||||
if (ServerVersion.Version.isCurrentLower(ServerVersion.Version.v1_18)) {
|
||||
packetPlayOutMapChunk = PacketUtils.classByName("net.minecraft.network.protocol.game", "PacketPlayOutMapChunk");
|
||||
chunkClass = PacketUtils.classByName("net.minecraft.world.level.chunk", "Chunk");
|
||||
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17_R1)) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17)) {
|
||||
try {
|
||||
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(PacketUtils.classByName("net.minecraft.world.level.chunk", "LevelChunk"));
|
||||
} catch (NoSuchMethodException e) {
|
||||
@@ -58,18 +58,18 @@ public class ChunkManager {
|
||||
}
|
||||
|
||||
public static void sendMapChunk(Player player, Chunk chunk) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_18_R1)) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_18)) {
|
||||
return; // Should just use World#refreshChunk instead
|
||||
}
|
||||
|
||||
try {
|
||||
Method chunkHandleMethod = chunk.getClass().getMethod("getHandle");
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17_R1)) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_17)) {
|
||||
PacketUtils.sendPacket(player, mapChunkConstructor.newInstance(chunkHandleMethod.invoke(chunk)));
|
||||
return;
|
||||
}
|
||||
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_16_R1)) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrHigher(ServerVersion.Version.v1_16)) {
|
||||
if (mapChunkConstructor == null)
|
||||
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(chunkClass, int.class, boolean.class);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ChunkManager {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_10_R2)) {
|
||||
if (ServerVersion.Version.isCurrentEqualOrLower(ServerVersion.Version.v1_10)) {
|
||||
if (mapChunkConstructor == null)
|
||||
mapChunkConstructor = packetPlayOutMapChunk.getConstructor(chunkClass, boolean.class, int.class);
|
||||
|
||||
|
||||
Reference in new issue
Block a user