mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-14 03:14:42 +02:00
More cleaning
This commit is contained in:
@ -360,10 +360,8 @@ public class BukkitChunkManager extends ChunkManager {
|
||||
blockLocShortEntry.getKey().z + zOffset));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
PS.debug("&c[WARN] Plot clear failed to restore brewing stand cooking (e): " + (blockLocShortEntry.getKey().x + xOffset) + "," +
|
||||
blockLocShortEntry
|
||||
.getKey().y + "," + (
|
||||
blockLocShortEntry.getKey().z + zOffset));
|
||||
PS.debug("&c[WARN] Plot clear failed to restore brewing stand cooking (e): " + (blockLocShortEntry.getKey().x + xOffset) + ","
|
||||
+ blockLocShortEntry.getKey().y + "," + (blockLocShortEntry.getKey().z + zOffset));
|
||||
}
|
||||
}
|
||||
for (Entry<BlockLoc, EntityType> blockLocEntityTypeEntry : spawnerData.entrySet()) {
|
||||
@ -382,8 +380,8 @@ public class BukkitChunkManager extends ChunkManager {
|
||||
blockLocEntityTypeEntry.getKey().z + zOffset));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
PS.debug("&c[WARN] Plot clear failed to restore spawner type (e): " + (blockLocEntityTypeEntry.getKey().x + xOffset) + "," +
|
||||
blockLocEntityTypeEntry.getKey().y + "," + (blockLocEntityTypeEntry.getKey().z + zOffset));
|
||||
PS.debug("&c[WARN] Plot clear failed to restore spawner type (e): " + (blockLocEntityTypeEntry.getKey().x + xOffset) + ","
|
||||
+ blockLocEntityTypeEntry.getKey().y + "," + (blockLocEntityTypeEntry.getKey().z + zOffset));
|
||||
}
|
||||
}
|
||||
for (Entry<BlockLoc, String> blockLocStringEntry : cmdData.entrySet()) {
|
||||
@ -490,8 +488,7 @@ public class BukkitChunkManager extends ChunkManager {
|
||||
}
|
||||
}
|
||||
|
||||
public static void saveBlocks(World world, int maxY, int x, int z, int offsetX, int offsetZ,
|
||||
boolean storeNormal) {
|
||||
public static void saveBlocks(World world, int maxY, int x, int z, int offsetX, int offsetZ, boolean storeNormal) {
|
||||
maxY = Math.min(255, maxY);
|
||||
PlotBlock[] ids;
|
||||
if (storeNormal) {
|
||||
|
@ -19,11 +19,6 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Created 2015-02-20 for PlotSquared
|
||||
*
|
||||
|
||||
*/
|
||||
public class BukkitCommand implements CommandExecutor, TabCompleter {
|
||||
|
||||
public BukkitCommand() {
|
||||
|
@ -75,15 +75,6 @@ public class BukkitEconHandler extends EconHandler {
|
||||
this.econ.depositPlayer(((BukkitOfflinePlayer) player).player, amount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPermission(String world, String player, String perm, boolean value) {
|
||||
if (value) {
|
||||
this.perms.playerAdd(world, player, perm);
|
||||
} else {
|
||||
this.perms.playerRemove(world, player, perm);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasPermission(String world, String player, String perm) {
|
||||
return this.perms.playerHas(world, Bukkit.getOfflinePlayer(player), perm);
|
||||
|
@ -87,7 +87,7 @@ public class Metrics {
|
||||
*/
|
||||
private volatile BukkitTask task = null;
|
||||
|
||||
public Metrics(Plugin plugin) throws IOException {
|
||||
public Metrics(Plugin plugin) {
|
||||
if (plugin == null) {
|
||||
throw new IllegalArgumentException("Plugin cannot be null");
|
||||
}
|
||||
@ -280,7 +280,7 @@ public class Metrics {
|
||||
*
|
||||
* @throws java.io.IOException
|
||||
*/
|
||||
public void enable() throws IOException {
|
||||
public void enable() {
|
||||
// Enable Task, if it is not running
|
||||
if (this.task == null) {
|
||||
start();
|
||||
@ -290,9 +290,8 @@ public class Metrics {
|
||||
/**
|
||||
* Disables metrics for the server by setting "opt-out" to true in the config file and canceling the metrics task.
|
||||
*
|
||||
* @throws java.io.IOException
|
||||
*/
|
||||
public void disable() throws IOException {
|
||||
public void disable() {
|
||||
// Disable Task, if it is running
|
||||
if (this.task != null) {
|
||||
this.task.cancel();
|
||||
@ -301,7 +300,8 @@ public class Metrics {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the File object of the config file that should be used to store data such as the GUID and opt-out status
|
||||
* Gets the File object of the config file that should be used to store
|
||||
* data such as the GUID and opt-out status.
|
||||
*
|
||||
* @return the File object for the config file
|
||||
*/
|
||||
@ -318,7 +318,7 @@ public class Metrics {
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic method that posts a plugin to the metrics website
|
||||
* Generic method that posts a plugin to the metrics website.
|
||||
*/
|
||||
private void postPlugin(boolean isPing) throws IOException {
|
||||
// Server software specific section
|
||||
|
@ -48,7 +48,7 @@ public class FastChunk_1_8_3 extends PlotChunk<Chunk> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of block changes in a specified section
|
||||
* Get the number of block changes in a specified section.
|
||||
* @param i
|
||||
* @return
|
||||
*/
|
||||
@ -95,7 +95,7 @@ public class FastChunk_1_8_3 extends PlotChunk<Chunk> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the raw data for a section
|
||||
* Get the raw data for a section.
|
||||
* @param i
|
||||
* @return
|
||||
*/
|
||||
|
@ -48,7 +48,7 @@ public class FastChunk_1_9 extends PlotChunk<Chunk> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of block changes in a specified section
|
||||
* Get the number of block changes in a specified section.
|
||||
* @param i
|
||||
* @return
|
||||
*/
|
||||
@ -65,7 +65,7 @@ public class FastChunk_1_9 extends PlotChunk<Chunk> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of block changes in a specified section
|
||||
* Get the number of block changes in a specified section.
|
||||
* @param i
|
||||
* @return
|
||||
*/
|
||||
@ -95,7 +95,7 @@ public class FastChunk_1_9 extends PlotChunk<Chunk> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the raw data for a section
|
||||
* Get the raw data for a section.
|
||||
* @param i
|
||||
* @return
|
||||
*/
|
||||
|
@ -39,7 +39,7 @@ public class FastQueue_1_7 extends SlowQueue {
|
||||
|
||||
private final HashMap<ChunkWrapper, Chunk> toUpdate = new HashMap<>();
|
||||
|
||||
public FastQueue_1_7() throws NoSuchMethodException, RuntimeException {
|
||||
public FastQueue_1_7() throws RuntimeException {
|
||||
this.methodGetHandle = this.classCraftWorld.getMethod("getHandle");
|
||||
this.methodGetChunkAt = this.classWorld.getMethod("getChunkAt", int.class, int.class);
|
||||
this.methodA = this.classChunk.getMethod("a", int.class, int.class, int.class, this.classBlock, int.class);
|
||||
|
@ -42,7 +42,7 @@ public class FastQueue_1_8 extends SlowQueue {
|
||||
private final RefConstructor constructorBlockPosition;
|
||||
private final SendChunk chunksender;
|
||||
|
||||
public FastQueue_1_8() throws NoSuchMethodException, RuntimeException {
|
||||
public FastQueue_1_8() throws RuntimeException {
|
||||
this.methodInitLighting = this.classChunk.getMethod("initLighting");
|
||||
this.constructorBlockPosition = this.classBlockPosition.getConstructor(int.class, int.class, int.class);
|
||||
this.methodGetByCombinedId = this.classBlock.getMethod("getByCombinedId", int.class);
|
||||
|
@ -48,7 +48,7 @@ public class FastQueue_1_8_3 extends SlowQueue {
|
||||
private final RefField fieldWorld;
|
||||
private final RefMethod methodGetIdArray;
|
||||
|
||||
public FastQueue_1_8_3() throws NoSuchMethodException, RuntimeException {
|
||||
public FastQueue_1_8_3() throws RuntimeException {
|
||||
RefClass classCraftChunk = getRefClass("{cb}.CraftChunk");
|
||||
this.methodGetHandleChunk = classCraftChunk.getMethod("getHandle");
|
||||
RefClass classChunk = getRefClass("{nms}.Chunk");
|
||||
|
Reference in New Issue
Block a user