mirror of
https://github.com/PryPurity/WorldBorder.git
synced 2024-09-26 03:42:36 +02:00
Bit more clean up, turned the auto enable feature for dynmap back on too.
This commit is contained in:
parent
30f9173325
commit
d9958e50a5
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.wimbli.WorldBorder</groupId>
|
||||
<artifactId>WorldBorder</artifactId>
|
||||
<version>2.0.1</version>
|
||||
<version>2.0.3</version>
|
||||
<name>WorldBorder</name>
|
||||
<url>https://github.com/PryPurity/WorldBorder</url>
|
||||
<issueManagement>
|
||||
|
@ -518,7 +518,7 @@ public class Config {
|
||||
knockBack = cfg.getDouble("knock-back-dist", 3.0);
|
||||
timerTicks = cfg.getInt("timer-delay-ticks", 5);
|
||||
remountDelayTicks = cfg.getInt("remount-delay-ticks", 0);
|
||||
dynmapEnable = cfg.getBoolean("dynmap-border-enabled", false);
|
||||
dynmapEnable = cfg.getBoolean("dynmap-border-enabled", true);
|
||||
dynmapMessage = cfg.getString("dynmap-border-message", "The border of the world.");
|
||||
dynmapHideByDefault = cfg.getBoolean("dynmap-border-hideByDefault", false);
|
||||
dynmapPriority = cfg.getInt("dynmap-border-priority", 0);
|
||||
|
@ -6,9 +6,9 @@ import org.bukkit.entity.Player;
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.*;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.IntBuffer;
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
@ -161,37 +161,37 @@ public class WorldFileData {
|
||||
if (!coord.equals(region))
|
||||
continue;
|
||||
|
||||
// try {
|
||||
// RandomAccessFile regionData = new RandomAccessFile(this.regionFile(i), "r");
|
||||
// try {
|
||||
// RandomAccessFile regionData = new RandomAccessFile(this.regionFile(i), "r");
|
||||
//
|
||||
// // Use of ByteBuffer+IntBuffer for reading file headers to improve performance, as suggested by aikar, reference:
|
||||
// // https://github.com/PaperMC/Paper/blob/b62dfa0bf95ac27ba0fbb3fae18c064e4bb61d50/Spigot-Server-Patches/0086-Reduce-IO-ops-opening-a-new-region-file.patch
|
||||
// ByteBuffer header = ByteBuffer.allocate(8192);
|
||||
// while (header.hasRemaining()) {
|
||||
// if (regionData.getChannel().read(header) == -1)
|
||||
// throw new EOFException();
|
||||
// }
|
||||
// header.clear();
|
||||
// IntBuffer headerAsInts = header.asIntBuffer();
|
||||
// // Use of ByteBuffer+IntBuffer for reading file headers to improve performance, as suggested by aikar, reference:
|
||||
// // https://github.com/PaperMC/Paper/blob/b62dfa0bf95ac27ba0fbb3fae18c064e4bb61d50/Spigot-Server-Patches/0086-Reduce-IO-ops-opening-a-new-region-file.patch
|
||||
// ByteBuffer header = ByteBuffer.allocate(8192);
|
||||
// while (header.hasRemaining()) {
|
||||
// if (regionData.getChannel().read(header) == -1)
|
||||
// throw new EOFException();
|
||||
// }
|
||||
// header.clear();
|
||||
// IntBuffer headerAsInts = header.asIntBuffer();
|
||||
//
|
||||
// // first 4096 bytes of region file consists of 4-byte int pointers to chunk data in the file (32*32 chunks = 1024; 1024 chunks * 4 bytes each = 4096)
|
||||
// for (int j = 0; j < 1024; j++) {
|
||||
// // if chunk pointer data is 0, chunk doesn't exist yet; otherwise, it does
|
||||
// if (headerAsInts.get() != 0)
|
||||
// data.set(j, true);
|
||||
// }
|
||||
// // Read timestamps
|
||||
// for (int j = 0; j < 1024; j++) {
|
||||
// // if timestamp is zero, it is protochunk (ignore it)
|
||||
// if ((headerAsInts.get() == 0) && data.get(j))
|
||||
// data.set(j, false);
|
||||
// }
|
||||
// regionData.close();
|
||||
// } catch (FileNotFoundException ex) {
|
||||
// sendMessage("Error! Could not open region file to find generated chunks: " + this.regionFile(i).getName());
|
||||
// } catch (IOException ex) {
|
||||
// sendMessage("Error! Could not read region file to find generated chunks: " + this.regionFile(i).getName());
|
||||
// }
|
||||
// // first 4096 bytes of region file consists of 4-byte int pointers to chunk data in the file (32*32 chunks = 1024; 1024 chunks * 4 bytes each = 4096)
|
||||
// for (int j = 0; j < 1024; j++) {
|
||||
// // if chunk pointer data is 0, chunk doesn't exist yet; otherwise, it does
|
||||
// if (headerAsInts.get() != 0)
|
||||
// data.set(j, true);
|
||||
// }
|
||||
// // Read timestamps
|
||||
// for (int j = 0; j < 1024; j++) {
|
||||
// // if timestamp is zero, it is protochunk (ignore it)
|
||||
// if ((headerAsInts.get() == 0) && data.get(j))
|
||||
// data.set(j, false);
|
||||
// }
|
||||
// regionData.close();
|
||||
// } catch (FileNotFoundException ex) {
|
||||
// sendMessage("Error! Could not open region file to find generated chunks: " + this.regionFile(i).getName());
|
||||
// } catch (IOException ex) {
|
||||
// sendMessage("Error! Could not read region file to find generated chunks: " + this.regionFile(i).getName());
|
||||
// }
|
||||
}
|
||||
regionChunkExistence.put(region, data);
|
||||
// testImage(region, data);
|
||||
|
@ -1,7 +1,7 @@
|
||||
name: WorldBorder
|
||||
authors: [Brettflan, PryPurity]
|
||||
description: Efficient, feature-rich plugin for limiting the size of your worlds.
|
||||
version: 2.0.1
|
||||
version: 2.0.3
|
||||
api-version: 1.13
|
||||
main: com.wimbli.WorldBorder.WorldBorder
|
||||
softdepend:
|
||||
|
Loading…
Reference in New Issue
Block a user