mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Minor code changes
This commit is contained in:
parent
15e7c6734b
commit
7236b0a026
@ -576,7 +576,7 @@ public class WorldEditPlugin extends JavaPlugin { //implements TabCompleter
|
|||||||
|
|
||||||
public BukkitPlayer getCachedPlayer(Player player) {
|
public BukkitPlayer getCachedPlayer(Player player) {
|
||||||
List<MetadataValue> meta = player.getMetadata("WE");
|
List<MetadataValue> meta = player.getMetadata("WE");
|
||||||
if (meta == null || meta.isEmpty()) {
|
if (meta.isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (BukkitPlayer) meta.get(0).value();
|
return (BukkitPlayer) meta.get(0).value();
|
||||||
|
@ -66,7 +66,6 @@ public enum FaweCache implements Trimable {
|
|||||||
|
|
||||||
public final char[] EMPTY_CHAR_4096 = new char[4096];
|
public final char[] EMPTY_CHAR_4096 = new char[4096];
|
||||||
|
|
||||||
private final IdentityHashMap<Class<?>, CleanableThreadLocal> REGISTERED_SINGLETONS = new IdentityHashMap<>();
|
|
||||||
private final IdentityHashMap<Class<?>, Pool> REGISTERED_POOLS = new IdentityHashMap<>();
|
private final IdentityHashMap<Class<?>, Pool> REGISTERED_POOLS = new IdentityHashMap<>();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -91,9 +90,6 @@ public enum FaweCache implements Trimable {
|
|||||||
MUTABLE_VECTOR3.clean();
|
MUTABLE_VECTOR3.clean();
|
||||||
MUTABLE_BLOCKVECTOR3.clean();
|
MUTABLE_BLOCKVECTOR3.clean();
|
||||||
SECTION_BITS_TO_CHAR.clean();
|
SECTION_BITS_TO_CHAR.clean();
|
||||||
for (Map.Entry<Class<?>, CleanableThreadLocal> entry : REGISTERED_SINGLETONS.entrySet()) {
|
|
||||||
entry.getValue().clean();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (Map.Entry<Class<?>, Pool> entry : REGISTERED_POOLS.entrySet()) {
|
for (Map.Entry<Class<?>, Pool> entry : REGISTERED_POOLS.entrySet()) {
|
||||||
Pool pool = entry.getValue();
|
Pool pool = entry.getValue();
|
||||||
|
@ -15,13 +15,14 @@ import java.io.IOException;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
import org.jetbrains.annotations.Range;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shared interface for IGetBlocks and ISetBlocks
|
* Shared interface for IGetBlocks and ISetBlocks
|
||||||
*/
|
*/
|
||||||
public interface IBlocks extends Trimable {
|
public interface IBlocks extends Trimable {
|
||||||
|
|
||||||
boolean hasSection(int layer);
|
boolean hasSection(@Range(from = 0, to = 15) int layer);
|
||||||
|
|
||||||
char[] load(int layer);
|
char[] load(int layer);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user