Omni-Replay #280
@ -140,7 +140,11 @@ public class Region {
|
||||
}
|
||||
|
||||
public boolean in2dRegion(Block block){
|
||||
return minX <= block.getX() && block.getX() < maxX && minZ <= block.getZ() && block.getZ() <= maxZ;
|
||||
return in2dRegion(block.getX(), block.getZ());
|
||||
}
|
||||
|
||||
public boolean in2dRegion(int x, int z) {
|
||||
return minX <= x && x < maxX && minZ <= z && z <= maxZ;
|
||||
}
|
||||
|
||||
public boolean inRegion(Block block){
|
||||
|
@ -20,7 +20,9 @@
|
||||
package de.steamwar.fightsystem.record;
|
||||
|
||||
import com.sk89q.worldedit.EditSession;
|
||||
import de.steamwar.fightsystem.Config;
|
||||
import de.steamwar.fightsystem.FightSystem;
|
||||
import de.steamwar.fightsystem.utils.ColorConverter;
|
||||
import de.steamwar.sql.NoClipboardException;
|
||||
import de.steamwar.sql.Schematic;
|
||||
import de.steamwar.sql.SteamwarUser;
|
||||
@ -173,9 +175,9 @@ class PacketProcessor {
|
||||
}
|
||||
|
||||
private void shortBlock() throws IOException {
|
||||
int x = Byte.toUnsignedInt(source.rByte()) + Config.ArenaMinX;
|
||||
int x = Byte.toUnsignedInt(source.rByte()) + Config.ArenaRegion.getMinX();
|
||||
int y = Byte.toUnsignedInt(source.rByte());
|
||||
int z = Byte.toUnsignedInt(source.rByte()) + Config.ArenaMinZ;
|
||||
int z = Byte.toUnsignedInt(source.rByte()) + Config.ArenaRegion.getMinZ();
|
||||
int blockState = source.rShort();
|
||||
|
||||
setBlock(x, y, z, blockState);
|
||||
@ -191,7 +193,7 @@ class PacketProcessor {
|
||||
}
|
||||
|
||||
private void setBlock(int x, int y, int z, int blockState){
|
||||
if(Config.ArenaMinX > x || Config.ArenaMaxX < x || Config.ArenaMinZ > z || Config.ArenaMaxZ < z)
|
||||
if(!Config.ArenaRegion.in2dRegion(x, z))
|
||||
return; //Outside of the arena
|
||||
|
||||
if (!InspectCommand.inspecting && Config.TechhiderActive && Config.HiddenBlocks.contains(blockState)) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren