mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Minor code changes
This commit is contained in:
parent
7236b0a026
commit
336e411e10
@ -19,10 +19,10 @@
|
||||
|
||||
package com.sk89q.jnbt;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
/**
|
||||
* The {@code TAG_Int_Array} tag.
|
||||
*/
|
||||
|
@ -30,7 +30,7 @@ import javax.annotation.Nullable;
|
||||
/**
|
||||
* The {@code TAG_List} tag.
|
||||
*/
|
||||
public class ListTag extends Tag {
|
||||
public final class ListTag extends Tag {
|
||||
|
||||
@Override
|
||||
public int getTypeCode() {
|
||||
@ -437,7 +437,7 @@ public class ListTag extends Tag {
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder bldr = new StringBuilder();
|
||||
bldr.append("TAG_List").append(": ").append(value.size()).append(" entries of type ").append(type.getTypeName()).append("\r\n{\r\n");
|
||||
bldr.append("TAG_List").append(": ").append(value.size()).append(" entries of type ").append(NBTUtils.getTypeName(type)).append("\r\n{\r\n");
|
||||
for (Tag t : value) {
|
||||
bldr.append(" ").append(t.toString().replaceAll("\r\n", "\r\n ")).append("\r\n");
|
||||
}
|
||||
|
@ -19,10 +19,10 @@
|
||||
|
||||
package com.sk89q.jnbt;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
/**
|
||||
* The {@code TAG_Long_Array} tag.
|
||||
*/
|
||||
|
@ -80,4 +80,5 @@ public final class NBTConstants {
|
||||
throw new IllegalArgumentException("Unknown tag type ID of " + id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class CommandException extends Exception {
|
||||
|
||||
/**
|
||||
* Gets the command that was called, which will include the sub-command
|
||||
* (i.e., "/br sphere").
|
||||
* (i.e. "/br sphere").
|
||||
*
|
||||
* @param prefix the command shebang character (such as "/") -- may be empty
|
||||
* @param spacedSuffix a suffix to put at the end (optional) -- may be null
|
||||
|
@ -47,8 +47,4 @@ public class CommandLocals {
|
||||
return locals.put(key, value);
|
||||
}
|
||||
|
||||
public Object putIfAbsent(Object key, Object value) {
|
||||
return locals.putIfAbsent(key, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -20,6 +20,9 @@
|
||||
package com.sk89q.minecraft.util.commands;
|
||||
|
||||
import com.sk89q.util.StringUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Modifier;
|
||||
@ -30,9 +33,6 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.enginehub.piston.inject.InjectedValueAccess;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* Manager for handling commands. This allows you to easily process commands,
|
||||
|
@ -129,7 +129,7 @@ public class CuboidRegionSelector implements RegionSelector, CUIRegion {
|
||||
public boolean selectPrimary(BlockVector3 position, SelectorLimits limits) {
|
||||
checkNotNull(position);
|
||||
|
||||
if (position.equals(position1)) {
|
||||
if (position1 != null && position.equals(position1)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -142,7 +142,7 @@ public class CuboidRegionSelector implements RegionSelector, CUIRegion {
|
||||
public boolean selectSecondary(BlockVector3 position, SelectorLimits limits) {
|
||||
checkNotNull(position);
|
||||
|
||||
if (position.equals(position2)) {
|
||||
if (position2 != null && position.equals(position2)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user