Moved entity & teleport methods out of Util class

This commit is contained in:
Intelli 2022-01-04 15:20:01 -07:00
parent c1eecefa6f
commit 55fec1d092
9 changed files with 831 additions and 833 deletions

View file

@ -8,7 +8,7 @@ import org.bukkit.entity.EntityType;
import net.coreprotect.config.ConfigHandler;
import net.coreprotect.database.statement.EntityStatement;
import net.coreprotect.utility.Util;
import net.coreprotect.utility.entity.EntityUtil;
class EntitySpawnProcess {
@ -18,7 +18,7 @@ class EntitySpawnProcess {
EntityType type = (EntityType) ((Object[]) object)[1];
String query = "SELECT data FROM " + ConfigHandler.prefix + "entity WHERE rowid='" + rowId + "' LIMIT 0, 1";
List<Object> data = EntityStatement.getData(statement, block, query);
Util.spawnEntity(block, type, data);
EntityUtil.spawnEntity(block, type, data);
}
}
}

View file

@ -2,14 +2,14 @@ package net.coreprotect.consumer.process;
import org.bukkit.block.BlockState;
import net.coreprotect.utility.Util;
import net.coreprotect.utility.entity.HangingUtil;
class HangingRemoveProcess {
static void process(Object object, int delay) {
if (object instanceof BlockState) {
BlockState block = (BlockState) object;
Util.removeHanging(block, delay);
HangingUtil.removeHanging(block, delay);
}
}
}

View file

@ -3,14 +3,14 @@ package net.coreprotect.consumer.process;
import org.bukkit.Material;
import org.bukkit.block.BlockState;
import net.coreprotect.utility.Util;
import net.coreprotect.utility.entity.HangingUtil;
class HangingSpawnProcess {
static void process(Object object, Material type, int data, int delay) {
if (object instanceof BlockState) {
BlockState block = (BlockState) object;
Util.spawnHanging(block, type, data, delay);
HangingUtil.spawnHanging(block, type, data, delay);
}
}
}