mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly Purpur Changes: PurpurMC/Purpur@8c293626 [ci/skip] ignore deprecation or removal warnings PurpurMC/Purpur@65b1288b Updated Upstream (Paper)
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
package org.bxteam.divinemc.util;
|
||||
|
||||
public final class Assertions {
|
||||
public static void assertTrue(boolean value, String message) {
|
||||
if (!value) {
|
||||
final AssertionError error = new AssertionError(message);
|
||||
error.printStackTrace();
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
public static void assertTrue(boolean state, String format, Object... args) {
|
||||
if (!state) {
|
||||
final AssertionError error = new AssertionError(String.format(format, args));
|
||||
error.printStackTrace();
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
public static void assertTrue(boolean value) {
|
||||
if (!value) {
|
||||
final AssertionError error = new AssertionError();
|
||||
error.printStackTrace();
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package org.bxteam.divinemc.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public final class Files {
|
||||
public static void deleteRecursively(File dir) throws IOException {
|
||||
if (dir == null || !dir.isDirectory()) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
File[] files = dir.listFiles();
|
||||
if (files == null) {
|
||||
throw new IOException("Error enumerating directory during recursive delete operation: " + dir.getAbsolutePath());
|
||||
}
|
||||
|
||||
for (File child : files) {
|
||||
if (child.isDirectory()) {
|
||||
Files.deleteRecursively(child);
|
||||
} else if (child.isFile()) {
|
||||
if (!child.delete()) {
|
||||
throw new IOException("Error deleting file during recursive delete operation: " + child.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!dir.delete()) {
|
||||
throw new IOException("Error deleting directory during recursive delete operation: " + dir.getAbsolutePath());
|
||||
}
|
||||
} catch (SecurityException ex) {
|
||||
throw new IOException("Security error during recursive delete operation", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package org.bxteam.divinemc.util;
|
||||
|
||||
public final class MemoryUtil {
|
||||
public static int[] byte2int(byte[] data) {
|
||||
if (data == null) return null;
|
||||
int[] ints = new int[data.length];
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
ints[i] = data[i] & 0xff;
|
||||
}
|
||||
return ints;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ group = org.bxteam.divinemc
|
||||
version=1.21.4-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.21.4
|
||||
purpurRef=9249a2ca463587eb4074e15f77e926ffa0d6424d
|
||||
purpurRef=65b1288b31c06a68e62a6d7b70140c3fb8f88b8b
|
||||
experimental=false
|
||||
|
||||
org.gradle.configuration-cache=true
|
||||
|
||||
Reference in New Issue
Block a user