mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-20 07:29:17 +00:00
也许修复了FAWE?
This commit is contained in:
@@ -10,8 +10,8 @@ import net.momirealms.craftengine.bukkit.compatibility.leveler.*;
|
|||||||
import net.momirealms.craftengine.bukkit.compatibility.model.bettermodel.BetterModelModel;
|
import net.momirealms.craftengine.bukkit.compatibility.model.bettermodel.BetterModelModel;
|
||||||
import net.momirealms.craftengine.bukkit.compatibility.model.modelengine.ModelEngineModel;
|
import net.momirealms.craftengine.bukkit.compatibility.model.modelengine.ModelEngineModel;
|
||||||
import net.momirealms.craftengine.bukkit.compatibility.model.modelengine.ModelEngineUtils;
|
import net.momirealms.craftengine.bukkit.compatibility.model.modelengine.ModelEngineUtils;
|
||||||
import net.momirealms.craftengine.bukkit.compatibility.mythicmobs.MythicMobsListener;
|
import net.momirealms.craftengine.bukkit.compatibility.mythicmobs.MythicItemDropListener;
|
||||||
import net.momirealms.craftengine.bukkit.compatibility.mythicmobs.SkillHelper;
|
import net.momirealms.craftengine.bukkit.compatibility.mythicmobs.MythicSkillHelper;
|
||||||
import net.momirealms.craftengine.bukkit.compatibility.papi.PlaceholderAPIUtils;
|
import net.momirealms.craftengine.bukkit.compatibility.papi.PlaceholderAPIUtils;
|
||||||
import net.momirealms.craftengine.bukkit.compatibility.permission.LuckPermsEventListeners;
|
import net.momirealms.craftengine.bukkit.compatibility.permission.LuckPermsEventListeners;
|
||||||
import net.momirealms.craftengine.bukkit.compatibility.skript.SkriptHook;
|
import net.momirealms.craftengine.bukkit.compatibility.skript.SkriptHook;
|
||||||
@@ -40,7 +40,7 @@ public class BukkitCompatibilityManager implements CompatibilityManager {
|
|||||||
private final Map<String, LevelerProvider> levelerProviders;
|
private final Map<String, LevelerProvider> levelerProviders;
|
||||||
private boolean hasPlaceholderAPI;
|
private boolean hasPlaceholderAPI;
|
||||||
private boolean hasViaVersion;
|
private boolean hasViaVersion;
|
||||||
private SkillHelper skillExecute;
|
private MythicSkillHelper skillExecute;
|
||||||
|
|
||||||
public BukkitCompatibilityManager(BukkitCraftEngine plugin) {
|
public BukkitCompatibilityManager(BukkitCraftEngine plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
@@ -133,14 +133,14 @@ public class BukkitCompatibilityManager implements CompatibilityManager {
|
|||||||
}
|
}
|
||||||
if (this.isPluginEnabled("MythicMobs")) {
|
if (this.isPluginEnabled("MythicMobs")) {
|
||||||
BukkitItemManager.instance().registerExternalItemSource(new MythicMobsSource());
|
BukkitItemManager.instance().registerExternalItemSource(new MythicMobsSource());
|
||||||
new MythicMobsListener(this.plugin);
|
new MythicItemDropListener(this.plugin);
|
||||||
logHook("MythicMobs");
|
logHook("MythicMobs");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void skillExecute(String skill, float power, Player player) {
|
public void executeMMSkill(String skill, float power, Player player) {
|
||||||
SkillHelper.execute(skill, power, player);
|
MythicSkillHelper.execute(skill, power, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -21,12 +21,12 @@ import org.bukkit.inventory.ItemStack;
|
|||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
|
|
||||||
public class CraftEngineItemDrop extends ItemDrop implements IItemDrop {
|
public class MythicItemDrop extends ItemDrop implements IItemDrop {
|
||||||
private final CustomItem<ItemStack> customItem;
|
private final CustomItem<ItemStack> customItem;
|
||||||
private static final Constructor<?> constructor$BukkitItemStack = ReflectionUtils.getConstructor(BukkitItemStack.class, ItemStack.class);
|
private static final Constructor<?> constructor$BukkitItemStack = ReflectionUtils.getConstructor(BukkitItemStack.class, ItemStack.class);
|
||||||
private static final boolean useReflection = constructor$BukkitItemStack != null;
|
private static final boolean useReflection = constructor$BukkitItemStack != null;
|
||||||
|
|
||||||
public CraftEngineItemDrop(String line, MythicLineConfig config, CustomItem<ItemStack> customItem) {
|
public MythicItemDrop(String line, MythicLineConfig config, CustomItem<ItemStack> customItem) {
|
||||||
super(line, config);
|
super(line, config);
|
||||||
this.customItem = customItem;
|
this.customItem = customItem;
|
||||||
}
|
}
|
||||||
@@ -8,10 +8,10 @@ import org.bukkit.Bukkit;
|
|||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
|
|
||||||
public class MythicMobsListener implements Listener {
|
public class MythicItemDropListener implements Listener {
|
||||||
private final BukkitCraftEngine plugin;
|
private final BukkitCraftEngine plugin;
|
||||||
|
|
||||||
public MythicMobsListener(BukkitCraftEngine plugin) {
|
public MythicItemDropListener(BukkitCraftEngine plugin) {
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
Bukkit.getPluginManager().registerEvents(this, plugin.javaPlugin());
|
Bukkit.getPluginManager().registerEvents(this, plugin.javaPlugin());
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ public class MythicMobsListener implements Listener {
|
|||||||
this.plugin.itemManager().getCustomItem(itemId).ifPresent(customItem -> {
|
this.plugin.itemManager().getCustomItem(itemId).ifPresent(customItem -> {
|
||||||
String line = event.getContainer().getConfigLine();
|
String line = event.getContainer().getConfigLine();
|
||||||
MythicLineConfig config = event.getConfig();
|
MythicLineConfig config = event.getConfig();
|
||||||
event.register(new CraftEngineItemDrop(line, config, customItem));
|
event.register(new MythicItemDrop(line, config, customItem));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,7 +10,7 @@ import org.bukkit.entity.LivingEntity;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class SkillHelper {
|
public final class MythicSkillHelper {
|
||||||
|
|
||||||
public static void execute(String skill, float power, Player player) {
|
public static void execute(String skill, float power, Player player) {
|
||||||
org.bukkit.entity.Player casterPlayer = (org.bukkit.entity.Player) player.platformPlayer();
|
org.bukkit.entity.Player casterPlayer = (org.bukkit.entity.Player) player.platformPlayer();
|
||||||
@@ -22,8 +22,6 @@ public class SkillHelper {
|
|||||||
targets.add(target);
|
targets.add(target);
|
||||||
locations = List.of(target.getLocation());
|
locations = List.of(target.getLocation());
|
||||||
}
|
}
|
||||||
try (MythicBukkit mm = MythicBukkit.inst()) {
|
MythicBukkit.inst().getAPIHelper().castSkill(casterPlayer, skill, casterPlayer, location, targets, locations, power);
|
||||||
mm.getAPIHelper().castSkill(casterPlayer, skill, casterPlayer, location, targets, locations, power);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
package net.momirealms.craftengine.bukkit.compatibility.worldedit;
|
package net.momirealms.craftengine.bukkit.compatibility.worldedit;
|
||||||
|
|
||||||
|
import com.fastasyncworldedit.bukkit.FaweBukkitWorld;
|
||||||
import com.fastasyncworldedit.bukkit.adapter.CachedBukkitAdapter;
|
import com.fastasyncworldedit.bukkit.adapter.CachedBukkitAdapter;
|
||||||
import com.fastasyncworldedit.bukkit.adapter.FaweAdapter;
|
import com.fastasyncworldedit.bukkit.adapter.FaweAdapter;
|
||||||
|
import com.fastasyncworldedit.bukkit.adapter.NMSAdapter;
|
||||||
import com.fastasyncworldedit.core.configuration.Settings;
|
import com.fastasyncworldedit.core.configuration.Settings;
|
||||||
import com.fastasyncworldedit.core.extent.processor.ExtentBatchProcessorHolder;
|
import com.fastasyncworldedit.core.extent.processor.ExtentBatchProcessorHolder;
|
||||||
|
import com.fastasyncworldedit.core.math.IntPair;
|
||||||
import com.fastasyncworldedit.core.util.ExtentTraverser;
|
import com.fastasyncworldedit.core.util.ExtentTraverser;
|
||||||
import com.fastasyncworldedit.core.util.ProcessorTraverser;
|
import com.fastasyncworldedit.core.util.ProcessorTraverser;
|
||||||
import com.sk89q.worldedit.EditSession;
|
import com.sk89q.worldedit.EditSession;
|
||||||
@@ -24,6 +27,7 @@ import com.sk89q.worldedit.world.block.BaseBlock;
|
|||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
import net.momirealms.craftengine.bukkit.block.BukkitBlockManager;
|
import net.momirealms.craftengine.bukkit.block.BukkitBlockManager;
|
||||||
import net.momirealms.craftengine.bukkit.nms.FastNMS;
|
import net.momirealms.craftengine.bukkit.nms.FastNMS;
|
||||||
|
import net.momirealms.craftengine.bukkit.plugin.BukkitCraftEngine;
|
||||||
import net.momirealms.craftengine.bukkit.plugin.injector.WorldStorageInjector;
|
import net.momirealms.craftengine.bukkit.plugin.injector.WorldStorageInjector;
|
||||||
import net.momirealms.craftengine.bukkit.util.BlockStateUtils;
|
import net.momirealms.craftengine.bukkit.util.BlockStateUtils;
|
||||||
import net.momirealms.craftengine.core.block.EmptyBlock;
|
import net.momirealms.craftengine.core.block.EmptyBlock;
|
||||||
@@ -41,6 +45,8 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
@@ -89,12 +95,14 @@ public class FastAsyncWorldEditDelegate extends AbstractDelegateExtent {
|
|||||||
if (levelChunk != null) {
|
if (levelChunk != null) {
|
||||||
Object[] sections = FastNMS.INSTANCE.method$ChunkAccess$getSections(levelChunk);
|
Object[] sections = FastNMS.INSTANCE.method$ChunkAccess$getSections(levelChunk);
|
||||||
CESection[] ceSections = ceChunk.sections();
|
CESection[] ceSections = ceChunk.sections();
|
||||||
for (int i = 0; i < ceSections.length; i++) {
|
synchronized (sections) {
|
||||||
CESection ceSection = ceSections[i];
|
for (int i = 0; i < ceSections.length; i++) {
|
||||||
Object section = sections[i];
|
CESection ceSection = ceSections[i];
|
||||||
int finalI = i;
|
Object section = sections[i];
|
||||||
WorldStorageInjector.injectLevelChunkSection(section, ceSection, ceChunk, new SectionPos(pos.x, ceChunk.sectionY(i), pos.z),
|
int finalI = i;
|
||||||
(injected) -> sections[finalI] = injected);
|
WorldStorageInjector.injectLevelChunkSection(section, ceSection, ceChunk, new SectionPos(pos.x, ceChunk.sectionY(i), pos.z),
|
||||||
|
(injected) -> sections[finalI] = injected);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -174,18 +182,18 @@ public class FastAsyncWorldEditDelegate extends AbstractDelegateExtent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable Operation commit() {
|
public @Nullable Operation commit() {
|
||||||
Operation operation = super.commit();
|
|
||||||
saveAllChunks();
|
saveAllChunks();
|
||||||
|
Operation operation = super.commit();
|
||||||
List<ChunkPos> chunks = new ArrayList<>(this.brokenChunks);
|
List<ChunkPos> chunks = new ArrayList<>(this.brokenChunks);
|
||||||
this.brokenChunks.clear();
|
this.brokenChunks.clear();
|
||||||
Object worldServer = this.ceWorld.world().serverWorld();
|
Object worldServer = this.ceWorld.world().serverWorld();
|
||||||
Object chunkSource = FastNMS.INSTANCE.method$ServerLevel$getChunkSource(worldServer);
|
Object chunkSource = FastNMS.INSTANCE.method$ServerLevel$getChunkSource(worldServer);
|
||||||
for (ChunkPos chunk : chunks) {
|
for (ChunkPos chunk : chunks) {
|
||||||
CEChunk loaded = this.ceWorld.getChunkAtIfLoaded(chunk.longKey());
|
CEChunk loaded = this.ceWorld.getChunkAtIfLoaded(chunk.longKey());
|
||||||
// only inject loaded chunks
|
// only inject loaded chunks
|
||||||
if (loaded == null) continue;
|
if (loaded == null) continue;
|
||||||
injectLevelChunk(chunkSource, loaded);
|
injectLevelChunk(chunkSource, loaded);
|
||||||
}
|
}
|
||||||
return operation;
|
return operation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,11 @@ public class BukkitWorldManager implements WorldManager, Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CEWorld[] getWorlds() {
|
||||||
|
return this.worldArray;
|
||||||
|
}
|
||||||
|
|
||||||
private void resetWorldArray() {
|
private void resetWorldArray() {
|
||||||
this.worldArray = this.worlds.values().toArray(new CEWorld[0]);
|
this.worldArray = this.worlds.values().toArray(new CEWorld[0]);
|
||||||
}
|
}
|
||||||
@@ -218,7 +223,6 @@ public class BukkitWorldManager implements WorldManager, Listener {
|
|||||||
this.lastVisitedUUID = null;
|
this.lastVisitedUUID = null;
|
||||||
}
|
}
|
||||||
this.resetWorldArray();
|
this.resetWorldArray();
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
this.worldMapLock.writeLock().unlock();
|
this.worldMapLock.writeLock().unlock();
|
||||||
}
|
}
|
||||||
@@ -328,74 +332,76 @@ public class BukkitWorldManager implements WorldManager, Listener {
|
|||||||
Object chunkSource = FastNMS.INSTANCE.method$ServerLevel$getChunkSource(worldServer);
|
Object chunkSource = FastNMS.INSTANCE.method$ServerLevel$getChunkSource(worldServer);
|
||||||
Object levelChunk = FastNMS.INSTANCE.method$ServerChunkCache$getChunkAtIfLoadedMainThread(chunkSource, chunk.getX(), chunk.getZ());
|
Object levelChunk = FastNMS.INSTANCE.method$ServerChunkCache$getChunkAtIfLoadedMainThread(chunkSource, chunk.getX(), chunk.getZ());
|
||||||
Object[] sections = FastNMS.INSTANCE.method$ChunkAccess$getSections(levelChunk);
|
Object[] sections = FastNMS.INSTANCE.method$ChunkAccess$getSections(levelChunk);
|
||||||
for (int i = 0; i < ceSections.length; i++) {
|
synchronized (sections) {
|
||||||
CESection ceSection = ceSections[i];
|
for (int i = 0; i < ceSections.length; i++) {
|
||||||
Object section = sections[i];
|
CESection ceSection = ceSections[i];
|
||||||
if (Config.syncCustomBlocks()) {
|
Object section = sections[i];
|
||||||
Object statesContainer = FastNMS.INSTANCE.field$LevelChunkSection$states(section);
|
if (Config.syncCustomBlocks()) {
|
||||||
Object data = CoreReflections.varHandle$PalettedContainer$data.get(statesContainer);
|
Object statesContainer = FastNMS.INSTANCE.field$LevelChunkSection$states(section);
|
||||||
Object palette = CoreReflections.field$PalettedContainer$Data$palette.get(data);
|
Object data = CoreReflections.varHandle$PalettedContainer$data.get(statesContainer);
|
||||||
boolean requiresSync = false;
|
Object palette = CoreReflections.field$PalettedContainer$Data$palette.get(data);
|
||||||
if (CoreReflections.clazz$SingleValuePalette.isInstance(palette)) {
|
boolean requiresSync = false;
|
||||||
Object onlyBlockState = CoreReflections.field$SingleValuePalette$value.get(palette);
|
if (CoreReflections.clazz$SingleValuePalette.isInstance(palette)) {
|
||||||
if (BlockStateUtils.isCustomBlock(onlyBlockState)) {
|
Object onlyBlockState = CoreReflections.field$SingleValuePalette$value.get(palette);
|
||||||
|
if (BlockStateUtils.isCustomBlock(onlyBlockState)) {
|
||||||
|
requiresSync = true;
|
||||||
|
}
|
||||||
|
} else if (CoreReflections.clazz$LinearPalette.isInstance(palette)) {
|
||||||
|
Object[] blockStates = (Object[]) CoreReflections.field$LinearPalette$values.get(palette);
|
||||||
|
for (Object blockState : blockStates) {
|
||||||
|
if (blockState != null) {
|
||||||
|
if (BlockStateUtils.isCustomBlock(blockState)) {
|
||||||
|
requiresSync = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (CoreReflections.clazz$HashMapPalette.isInstance(palette)) {
|
||||||
|
Object biMap = CoreReflections.field$HashMapPalette$values.get(palette);
|
||||||
|
Object[] blockStates = (Object[]) CoreReflections.field$CrudeIncrementalIntIdentityHashBiMap$keys.get(biMap);
|
||||||
|
for (Object blockState : blockStates) {
|
||||||
|
if (blockState != null) {
|
||||||
|
if (BlockStateUtils.isCustomBlock(blockState)) {
|
||||||
|
requiresSync = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
requiresSync = true;
|
requiresSync = true;
|
||||||
}
|
}
|
||||||
} else if (CoreReflections.clazz$LinearPalette.isInstance(palette)) {
|
if (requiresSync) {
|
||||||
Object[] blockStates = (Object[]) CoreReflections.field$LinearPalette$values.get(palette);
|
for (int x = 0; x < 16; x++) {
|
||||||
for (Object blockState : blockStates) {
|
for (int z = 0; z < 16; z++) {
|
||||||
if (blockState != null) {
|
for (int y = 0; y < 16; y++) {
|
||||||
if (BlockStateUtils.isCustomBlock(blockState)) {
|
Object mcState = FastNMS.INSTANCE.method$LevelChunkSection$getBlockState(section, x, y, z);
|
||||||
requiresSync = true;
|
Optional<ImmutableBlockState> optionalCustomState = BlockStateUtils.getOptionalCustomBlockState(mcState);
|
||||||
break;
|
if (optionalCustomState.isPresent()) {
|
||||||
}
|
ceSection.setBlockState(x, y, z, optionalCustomState.get());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else if (CoreReflections.clazz$HashMapPalette.isInstance(palette)) {
|
|
||||||
Object biMap = CoreReflections.field$HashMapPalette$values.get(palette);
|
|
||||||
Object[] blockStates = (Object[]) CoreReflections.field$CrudeIncrementalIntIdentityHashBiMap$keys.get(biMap);
|
|
||||||
for (Object blockState : blockStates) {
|
|
||||||
if (blockState != null) {
|
|
||||||
if (BlockStateUtils.isCustomBlock(blockState)) {
|
|
||||||
requiresSync = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
requiresSync = true;
|
|
||||||
}
|
|
||||||
if (requiresSync) {
|
|
||||||
for (int x = 0; x < 16; x++) {
|
|
||||||
for (int z = 0; z < 16; z++) {
|
|
||||||
for (int y = 0; y < 16; y++) {
|
|
||||||
Object mcState = FastNMS.INSTANCE.method$LevelChunkSection$getBlockState(section, x, y, z);
|
|
||||||
Optional<ImmutableBlockState> optionalCustomState = BlockStateUtils.getOptionalCustomBlockState(mcState);
|
|
||||||
if (optionalCustomState.isPresent()) {
|
|
||||||
ceSection.setBlockState(x, y, z, optionalCustomState.get());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (Config.restoreCustomBlocks()) {
|
||||||
if (Config.restoreCustomBlocks()) {
|
if (!ceSection.statesContainer().isEmpty()) {
|
||||||
if (!ceSection.statesContainer().isEmpty()) {
|
for (int x = 0; x < 16; x++) {
|
||||||
for (int x = 0; x < 16; x++) {
|
for (int z = 0; z < 16; z++) {
|
||||||
for (int z = 0; z < 16; z++) {
|
for (int y = 0; y < 16; y++) {
|
||||||
for (int y = 0; y < 16; y++) {
|
ImmutableBlockState customState = ceSection.getBlockState(x, y, z);
|
||||||
ImmutableBlockState customState = ceSection.getBlockState(x, y, z);
|
if (!customState.isEmpty() && customState.customBlockState() != null) {
|
||||||
if (!customState.isEmpty() && customState.customBlockState() != null) {
|
FastNMS.INSTANCE.method$LevelChunkSection$setBlockState(section, x, y, z, customState.customBlockState().handle(), false);
|
||||||
FastNMS.INSTANCE.method$LevelChunkSection$setBlockState(section, x, y, z, customState.customBlockState().handle(), false);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
int finalI = i;
|
||||||
|
WorldStorageInjector.injectLevelChunkSection(section, ceSection, ceChunk, new SectionPos(pos.x, ceChunk.sectionY(i), pos.z),
|
||||||
|
(injected) -> sections[finalI] = injected);
|
||||||
}
|
}
|
||||||
int finalI = i;
|
|
||||||
WorldStorageInjector.injectLevelChunkSection(section, ceSection, ceChunk, new SectionPos(pos.x, ceChunk.sectionY(i), pos.z),
|
|
||||||
(injected) -> sections[finalI] = injected);
|
|
||||||
}
|
}
|
||||||
if (Config.enableRecipeSystem()) {
|
if (Config.enableRecipeSystem()) {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
|||||||
@@ -35,5 +35,5 @@ public interface CompatibilityManager {
|
|||||||
|
|
||||||
int getPlayerProtocolVersion(UUID uuid);
|
int getPlayerProtocolVersion(UUID uuid);
|
||||||
|
|
||||||
void skillExecute(String skill, float power, Player player);
|
void executeMMSkill(String skill, float power, Player player);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class MythicMobsSkillFunction<CTX extends Context> extends AbstractCondit
|
|||||||
@Override
|
@Override
|
||||||
protected void runInternal(CTX ctx) {
|
protected void runInternal(CTX ctx) {
|
||||||
ctx.getOptionalParameter(DirectContextParameters.PLAYER).ifPresent(it -> {
|
ctx.getOptionalParameter(DirectContextParameters.PLAYER).ifPresent(it -> {
|
||||||
CraftEngine.instance().compatibilityManager().skillExecute(this.skill, this.power, it);
|
CraftEngine.instance().compatibilityManager().executeMMSkill(this.skill, this.power, it);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ public interface WorldManager extends Manageable {
|
|||||||
|
|
||||||
CEWorld getWorld(UUID uuid);
|
CEWorld getWorld(UUID uuid);
|
||||||
|
|
||||||
|
CEWorld[] getWorlds();
|
||||||
|
|
||||||
void loadWorld(World world);
|
void loadWorld(World world);
|
||||||
|
|
||||||
void loadWorld(CEWorld world);
|
void loadWorld(CEWorld world);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
|
|
||||||
# Project settings
|
# Project settings
|
||||||
# Rule: [major update].[feature update].[bug fix]
|
# Rule: [major update].[feature update].[bug fix]
|
||||||
project_version=0.0.60.4
|
project_version=0.0.60.5
|
||||||
config_version=43
|
config_version=43
|
||||||
lang_version=22
|
lang_version=22
|
||||||
project_group=net.momirealms
|
project_group=net.momirealms
|
||||||
|
|||||||
Reference in New Issue
Block a user