diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitQueue_0.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitQueue_0.java index 4c781603..1105772c 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitQueue_0.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/v0/BukkitQueue_0.java @@ -290,6 +290,7 @@ public abstract class BukkitQueue_0 extends NMSMa } if (fieldTimingsEnabled != null && timingsEnabled) { fieldTimingsEnabled.set(null, true); + methodCheck.invoke(null); } } catch (Throwable e) { e.printStackTrace(); diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java index 2772477e..97a970e0 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java @@ -158,8 +158,7 @@ public class AsyncWorld extends DelegateFaweQueue implements World, HasFaweQueue */ public synchronized static AsyncWorld create(final WorldCreator creator) { BukkitQueue_0 queue = (BukkitQueue_0) SetQueue.IMP.getNewQueue(creator.name(), true, false); - World world = queue.createWorld( - creator); + World world = queue.createWorld(creator); return wrap(world); } diff --git a/core/src/main/java/com/boydti/fawe/Fawe.java b/core/src/main/java/com/boydti/fawe/Fawe.java index cdd5d1ac..98d52e3d 100644 --- a/core/src/main/java/com/boydti/fawe/Fawe.java +++ b/core/src/main/java/com/boydti/fawe/Fawe.java @@ -405,6 +405,8 @@ public class Fawe { public void setupConfigs() { MainUtil.copyFile(MainUtil.getJarFile(), "de/messages.yml", null); + MainUtil.copyFile(MainUtil.getJarFile(), "ru/messages.yml", null); + MainUtil.copyFile(MainUtil.getJarFile(), "ru/commands.yml", null); // Setting up config.yml File file = new File(this.IMP.getDirectory(), "config.yml"); Settings.IMP.PLATFORM = IMP.getPlatform().replace("\"", ""); diff --git a/core/src/main/java/com/sk89q/worldedit/blocks/BaseBlock.java b/core/src/main/java/com/sk89q/worldedit/blocks/BaseBlock.java index 0aeaea21..67028bd8 100644 --- a/core/src/main/java/com/sk89q/worldedit/blocks/BaseBlock.java +++ b/core/src/main/java/com/sk89q/worldedit/blocks/BaseBlock.java @@ -91,9 +91,11 @@ public class BaseBlock extends Block implements TileEntityBlock, Pattern, Serial /** * Construct a block with the given ID and a data value of 0. * + * @deprecated see {@link com.boydti.fawe.FaweCache#getBlock(int, int)} * @param id ID value * @see #setId(int) */ + @Deprecated public BaseBlock(int id) { internalSetId(id); internalSetData(0); @@ -102,11 +104,13 @@ public class BaseBlock extends Block implements TileEntityBlock, Pattern, Serial /** * Construct a block with the given ID and data value. * + * @deprecated see {@link com.boydti.fawe.FaweCache#getBlock(int, int)} * @param id ID value * @param data data value * @see #setId(int) * @see #setData(int) */ + @Deprecated public BaseBlock(int id, int data) { internalSetId(id); internalSetData(data); @@ -115,10 +119,12 @@ public class BaseBlock extends Block implements TileEntityBlock, Pattern, Serial /** * Construct a block with the given ID, data value and NBT data structure. * + * @deprecated see {@link com.boydti.fawe.FaweCache#getBlock(int, int)} * @param id ID value * @param data data value * @param nbtData NBT data, which may be null */ + @Deprecated public BaseBlock(int id, int data, @Nullable CompoundTag nbtData) { setId(id); setData(data); @@ -128,8 +134,10 @@ public class BaseBlock extends Block implements TileEntityBlock, Pattern, Serial /** * Create a clone of another block. * + * @deprecated see {@link com.boydti.fawe.FaweCache#getBlock(int, int)} * @param other the other block */ + @Deprecated public BaseBlock(BaseBlock other) { this(other.getId(), other.getData(), other.getNbtData()); } diff --git a/core/src/main/java/net/jpountz/lz4/LZ4StreamTest.java b/core/src/main/java/net/jpountz/lz4/LZ4StreamTest.java deleted file mode 100644 index 0943b5f5..00000000 --- a/core/src/main/java/net/jpountz/lz4/LZ4StreamTest.java +++ /dev/null @@ -1,150 +0,0 @@ -package net.jpountz.lz4; - -import com.boydti.fawe.util.MainUtil; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.Random; -import junit.framework.Assert; -import org.junit.Before; -import org.junit.Test; - - -import static junit.framework.Assert.assertEquals; - -public class LZ4StreamTest { - - private long seed; - private Random rand; - - private byte randomContent[]; - private byte compressedOutput[]; - - @Before - public void setUp() throws IOException { - seed = System.currentTimeMillis(); - rand = new Random(seed); - - int randomContentLength = rand.nextInt(10000000) + 10000000; - - randomContent = new byte[randomContentLength]; - rand.nextBytes(randomContent); - - compressContent(); - } - - private void compressContent() throws IOException { - ByteArrayOutputStream compressedOutputStream = new ByteArrayOutputStream(); - - LZ4OutputStream os = new LZ4OutputStream(compressedOutputStream); - int currentContentPosition = 0; - - while(currentContentPosition < randomContent.length) { - int testBlockSize = rand.nextInt(500000); - - if(testBlockSize > randomContent.length - currentContentPosition) - testBlockSize = randomContent.length - currentContentPosition; - - boolean writeByteByByte = true; //rand.nextBoolean(); - - if(writeByteByByte) { - for(int i=0;i - - - - - - -

LZ4 compression. The entry point of the API is the -{@link net.jpountz.lz4.LZ4Factory} class, which gives access to -{@link net.jpountz.lz4.LZ4Compressor compressors} and -{@link net.jpountz.lz4.LZ4SafeDecompressor decompressors}.

- - -

Sample usage:

- -
-    LZ4Factory factory = LZ4Factory.fastestInstance();
-
-    byte[] data = "12345345234572".getBytes("UTF-8");
-    final int decompressedLength = data.length;
-
-    // compress data
-    LZ4Compressor compressor = factory.fastCompressor();
-    int maxCompressedLength = compressor.maxCompressedLength(decompressedLength);
-    byte[] compressed = new byte[maxCompressedLength];
-    int compressedLength = compressor.compress(data, 0, decompressedLength, compressed, 0, maxCompressedLength);
-
-    // decompress data
-    // - method 1: when the decompressed length is known
-    LZ4FastDecompressor decompressor = factory.fastDecompressor();
-    byte[] restored = new byte[decompressedLength];
-    int compressedLength2 = decompressor.decompress(compressed, 0, restored, 0, decompressedLength);
-    // compressedLength == compressedLength2
-
-    // - method 2: when the compressed length is known (a little slower)
-    // the destination buffer needs to be over-sized
-    LZ4SafeDecompressor decompressor2 = factory.safeDecompressor();
-    int decompressedLength2 = decompressor2.decompress(compressed, 0, compressedLength, restored, 0);
-    // decompressedLength == decompressedLength2
-
- - - diff --git a/core/src/main/java/net/jpountz/util/package.html b/core/src/main/java/net/jpountz/util/package.html deleted file mode 100644 index 4b3ceb98..00000000 --- a/core/src/main/java/net/jpountz/util/package.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - -

Utility classes.

- - \ No newline at end of file diff --git a/core/src/main/resources/linux/arm/liblz4-java.so b/core/src/main/resources/linux/arm/liblz4-java.so new file mode 100644 index 00000000..97dd79e9 Binary files /dev/null and b/core/src/main/resources/linux/arm/liblz4-java.so differ