forked from SteamWar/SteamWar
Enhance compatibility and feature support for Minecraft 1.21: Add ProtocolWrapper21, update gamerule management, streamline entity tracking, and refine chunk hider logic.
This commit is contained in:
@@ -188,6 +188,8 @@ public class FightSystem extends JavaPlugin {
|
||||
}else if(Config.mode == ArenaMode.PREPARE) {
|
||||
Fight.getUnrotated().setSchem(SchematicNode.getSchematicNode(Config.PrepareSchemID));
|
||||
}
|
||||
|
||||
CraftbukkitWrapper.impl.setupGamerule();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,4 +33,6 @@ public interface CraftbukkitWrapper {
|
||||
float headRotation(Entity e);
|
||||
|
||||
Stream<?> entityIterator();
|
||||
|
||||
void setupGamerule();
|
||||
}
|
||||
|
||||
+2
-2
@@ -59,7 +59,7 @@ public class TechHiderWrapper extends StateDependent implements TechHider.Locati
|
||||
private final SecretKey key;
|
||||
|
||||
public TechHiderWrapper() {
|
||||
super(ENABLED, FightState.All);
|
||||
super(ENABLED, FightState.Schem);
|
||||
techHider = new TechHider(this, Config.ObfuscateWith, Config.HiddenBlocks, Config.HiddenBlockEntities);
|
||||
|
||||
try {
|
||||
@@ -68,7 +68,7 @@ public class TechHiderWrapper extends StateDependent implements TechHider.Locati
|
||||
throw new SecurityException(e);
|
||||
}
|
||||
|
||||
new StateDependentListener(ENABLED, FightState.All, this);
|
||||
new StateDependentListener(ENABLED, FightState.Schem, this);
|
||||
register();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user