3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-08 04:20:06 +01:00

Minor code changes

Dieser Commit ist enthalten in:
MattBDev 2020-01-29 17:10:59 -05:00
Ursprung 15e7c6734b
Commit 7236b0a026
3 geänderte Dateien mit 3 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -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();

Datei anzeigen

@ -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();

Datei anzeigen

@ -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);