mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +01:00
chore: deprecate and add javadoc notes for methods to be removed in v7
This commit is contained in:
parent
c45bbe3ec5
commit
10605e8048
@ -74,30 +74,65 @@ public class ComponentPreset implements ConfigurationSerializable {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link ComponentPreset} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code ComponentPreset#component()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public ClassicPlotManagerComponent getComponent() {
|
||||
return this.component;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link ComponentPreset} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code ComponentPreset#pattern()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public String getPattern() {
|
||||
return this.pattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link ComponentPreset} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code ComponentPreset#cost()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public double getCost() {
|
||||
return this.cost;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link ComponentPreset} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code ComponentPreset#permission()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public String getPermission() {
|
||||
return this.permission;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link ComponentPreset} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code ComponentPreset#displayName()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public String getDisplayName() {
|
||||
return this.displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link ComponentPreset} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code ComponentPreset#description()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public List<String> getDescription() {
|
||||
return this.description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link ComponentPreset} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code ComponentPreset#icon()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public ItemType getIcon() {
|
||||
return this.icon;
|
||||
}
|
||||
|
@ -50,7 +50,9 @@ public class Config {
|
||||
* @param root configuration class
|
||||
* @param <T> value type
|
||||
* @return value
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T> T get(String key, Class<?> root) {
|
||||
String[] split = key.split("\\.");
|
||||
@ -445,6 +447,10 @@ public class Config {
|
||||
return INSTANCES.values();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public Collection<String> getSections() {
|
||||
return INSTANCES.keySet();
|
||||
}
|
||||
|
@ -380,6 +380,10 @@ public class HybridUtils {
|
||||
run.run();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally and poor implementation. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public int checkModified(QueueCoordinator queue, int x1, int x2, int y1, int y2, int z1, int z2, BlockState[] blocks) {
|
||||
int count = 0;
|
||||
for (int y = y1; y <= y2; y++) {
|
||||
|
@ -23,8 +23,25 @@ import com.plotsquared.core.util.StringMan;
|
||||
|
||||
public class ChunkWrapper {
|
||||
|
||||
/**
|
||||
* @deprecated {@link ChunkWrapper} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code ChunkWrapper#x()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final int x;
|
||||
|
||||
/**
|
||||
* @deprecated {@link ChunkWrapper} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code ChunkWrapper#z()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final int z;
|
||||
|
||||
/**
|
||||
* @deprecated {@link ChunkWrapper} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code ChunkWrapper#world()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final String world;
|
||||
|
||||
public ChunkWrapper(String world, int x, int z) {
|
||||
|
@ -79,6 +79,10 @@ public class PlotSettings {
|
||||
this.ratings = ratings;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release. Use {@link PlotSettings#setMerged(Direction, boolean)}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public boolean setMerged(int direction, boolean merged) {
|
||||
if (this.merged[direction] != merged) {
|
||||
this.merged[direction] = merged;
|
||||
|
@ -22,11 +22,45 @@ import com.plotsquared.core.plot.PlotId;
|
||||
|
||||
public class PlotComment {
|
||||
|
||||
/**
|
||||
* @deprecated {@link PlotComment} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code PlotComment#comment()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final String comment;
|
||||
|
||||
/**
|
||||
* @deprecated {@link PlotComment} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code PlotComment#inbox()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final String inbox;
|
||||
|
||||
/**
|
||||
* @deprecated {@link PlotComment} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code PlotComment#senderName()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final String senderName;
|
||||
|
||||
/**
|
||||
* @deprecated {@link PlotComment} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code PlotComment#id()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final PlotId id;
|
||||
|
||||
/**
|
||||
* @deprecated {@link PlotComment} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code PlotComment#world()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final String world;
|
||||
/**
|
||||
* @deprecated {@link PlotComment} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code PlotComment#timestamp()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final long timestamp;
|
||||
|
||||
public PlotComment(
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package com.plotsquared.core.plot.flag.types;
|
||||
|
||||
import com.plotsquared.core.components.ComponentPreset;
|
||||
import com.plotsquared.core.configuration.caption.Caption;
|
||||
import com.plotsquared.core.configuration.caption.TranslatableCaption;
|
||||
import com.plotsquared.core.plot.flag.FlagParseException;
|
||||
@ -86,10 +87,20 @@ public abstract class TimedFlag<T, F extends PlotFlag<TimedFlag.Timed<T>, F>>
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link Timed} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code Timed#interval()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public int getInterval() {
|
||||
return interval;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link Timed} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code Timed#value()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public T getValue() {
|
||||
return value;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package com.plotsquared.core.setup;
|
||||
|
||||
import com.plotsquared.core.components.ComponentPreset;
|
||||
import com.plotsquared.core.configuration.ConfigurationNode;
|
||||
|
||||
/**
|
||||
@ -43,10 +44,20 @@ public class SettingsNodesWrapper {
|
||||
return this.settingsNodes.length == 0 ? this.afterwards : new SettingsNodeStep(this.settingsNodes[0], 0, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link SettingsNodesWrapper} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code SettingsNodesWrapper#settingsNodes()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public ConfigurationNode[] getSettingsNodes() {
|
||||
return this.settingsNodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link SettingsNodesWrapper} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code SettingsNodesWrapper#afterwards()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public SetupStep getAfterwards() {
|
||||
return this.afterwards;
|
||||
}
|
||||
|
@ -114,7 +114,9 @@ public final class BlockUtil {
|
||||
*
|
||||
* @param commaDelimited List of block states
|
||||
* @return Parsed block states
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static @NonNull BlockState[] parse(final @NonNull String commaDelimited) {
|
||||
final String[] split = commaDelimited.split(",(?![^\\(\\[]*[\\]\\)])");
|
||||
final BlockState[] result = new BlockState[split.length];
|
||||
@ -130,7 +132,9 @@ public final class BlockUtil {
|
||||
* @param map Serialized block state
|
||||
* @return Deserialized block state, or {@code null} if the map is
|
||||
* not a properly serialized block state
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static @Nullable BlockState deserialize(final @NonNull Map<String, Object> map) {
|
||||
if (map.containsKey("material")) {
|
||||
final Object object = map.get("material");
|
||||
|
@ -114,7 +114,9 @@ public class ChunkUtil {
|
||||
* @param pos2 Region maximum point
|
||||
* @param chunk BlockVector2 of chunk coordinates
|
||||
* @return {@code true} if the region pos1-pos2 contains the chunk
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean isWholeChunk(@NonNull Location pos1, @NonNull Location pos2, @NonNull BlockVector2 chunk) {
|
||||
int x1 = pos1.getX();
|
||||
int z1 = pos1.getZ();
|
||||
|
@ -20,7 +20,18 @@ package com.plotsquared.core.util;
|
||||
|
||||
public class FileBytes {
|
||||
|
||||
/**
|
||||
* @deprecated {@link FileBytes} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code FileBytes#path()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final String path;
|
||||
|
||||
/**
|
||||
* @deprecated {@link FileBytes} class will be replaced by a record in the next major update. This variable will be
|
||||
* accessible using {@code FileBytes#data()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public final byte[] data;
|
||||
|
||||
public FileBytes(String path, byte[] data) {
|
||||
|
@ -70,35 +70,67 @@ public class MathMan {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static long pairInt(int x, int y) {
|
||||
return (((long) x) << 32) | (y & 0xffffffffL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static int unpairIntX(long pair) {
|
||||
return (int) (pair >> 32);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static int unpairIntY(long pair) {
|
||||
return (int) pair;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static byte pair16(byte x, byte y) {
|
||||
return (byte) (x + (y << 4));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static byte unpair16x(byte value) {
|
||||
return (byte) (value & 0xF);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static byte unpair16y(byte value) {
|
||||
return (byte) ((value >> 4) & 0xF);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static long inverseRound(double val) {
|
||||
long round = Math.round(val);
|
||||
return (long) (round + Math.signum(val - round));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static int sqrt(int x) {
|
||||
int xn;
|
||||
|
||||
@ -175,6 +207,10 @@ public class MathMan {
|
||||
return count / array.length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static double getMean(double[] array) {
|
||||
double count = 0;
|
||||
for (double i : array) {
|
||||
@ -191,10 +227,19 @@ public class MathMan {
|
||||
return (a & b) + (a ^ b) / 2;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static short unpairX(int hash) {
|
||||
return (short) (hash >> 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static short unpairY(int hash) {
|
||||
return (short) (hash & 0xFFFF);
|
||||
}
|
||||
@ -205,13 +250,19 @@ public class MathMan {
|
||||
* @param yaw yaw
|
||||
* @param pitch pitch
|
||||
* @return x, y, z unit vector
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static float[] getDirection(float yaw, float pitch) {
|
||||
double pitch_sin = Math.sin(pitch);
|
||||
return new float[]{(float) (pitch_sin * Math.cos(yaw)),
|
||||
(float) (pitch_sin * Math.sin(yaw)), (float) Math.cos(pitch)};
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static int floorMod(int x, int y) {
|
||||
int i = x % y;
|
||||
if (i < 0) {
|
||||
@ -231,12 +282,18 @@ public class MathMan {
|
||||
* @param y y
|
||||
* @param z z
|
||||
* @return pitch and yaw of x,y,z from 0,0,0
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static float[] getPitchAndYaw(float x, float y, float z) {
|
||||
float distance = sqrtApprox((z * z) + (x * x));
|
||||
return new float[]{atan2(y, distance), atan2(x, z)};
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static final float atan2(float y, float x) {
|
||||
float add;
|
||||
float mul;
|
||||
@ -272,15 +329,28 @@ public class MathMan {
|
||||
return (atan2[(yi * ATAN2_DIM) + xi] + add) * mul;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static float sqrtApprox(float f) {
|
||||
return f * Float.intBitsToFloat(0x5f375a86 - (Float.floatToIntBits(f) >> 1));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static double sqrtApprox(double d) {
|
||||
return Double
|
||||
.longBitsToDouble(((Double.doubleToLongBits(d) - (1L << 52)) >> 1) + (1L << 61));
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static float invSqrt(float x) {
|
||||
float xhalf = 0.5f * x;
|
||||
int i = Float.floatToIntBits(x);
|
||||
@ -321,6 +391,10 @@ public class MathMan {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static double getSD(double[] array, double av) {
|
||||
double sd = 0;
|
||||
for (double element : array) {
|
||||
@ -337,6 +411,10 @@ public class MathMan {
|
||||
return Math.sqrt(sd / array.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static int mod(int x, int y) {
|
||||
if (isPowerOfTwo(y)) {
|
||||
return x & (y - 1);
|
||||
@ -344,6 +422,10 @@ public class MathMan {
|
||||
return x % y;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static int unsignedmod(int x, int y) {
|
||||
if (isPowerOfTwo(y)) {
|
||||
return x & (y - 1);
|
||||
@ -351,6 +433,10 @@ public class MathMan {
|
||||
return x % y;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean isPowerOfTwo(int number) {
|
||||
return (number & (number - 1)) == 0;
|
||||
}
|
||||
|
@ -95,6 +95,10 @@ public class RegionUtil {
|
||||
.getY() && y <= max.getY();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static @NonNull Rectangle2D toRectangle(final @NonNull CuboidRegion region) {
|
||||
final BlockVector2 min = region.getMinimumPoint().toBlockVector2();
|
||||
final BlockVector2 max = region.getMaximumPoint().toBlockVector2();
|
||||
|
@ -39,6 +39,10 @@ public class StringMan {
|
||||
// Stolen from https://stackoverflow.com/a/366532/12620913 | Debug: https://regex101.com/r/DudJLb/1
|
||||
private static final Pattern STRING_SPLIT_PATTERN = Pattern.compile("[^\\s\"]+|\"([^\"]*)\"");
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static String replaceFromMap(String string, Map<String, String> replacements) {
|
||||
StringBuilder sb = new StringBuilder(string);
|
||||
int size = string.length();
|
||||
@ -70,6 +74,10 @@ public class StringMan {
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static String getString(Object obj) {
|
||||
if (obj == null) {
|
||||
return "null";
|
||||
@ -102,6 +110,10 @@ public class StringMan {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static String replaceFirst(char c, String s) {
|
||||
if (s == null) {
|
||||
return "";
|
||||
@ -128,6 +140,10 @@ public class StringMan {
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static String replaceAll(String string, Object... pairs) {
|
||||
StringBuilder sb = new StringBuilder(string);
|
||||
for (int i = 0; i < pairs.length; i += 2) {
|
||||
@ -144,6 +160,10 @@ public class StringMan {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean isAlphanumeric(String str) {
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
char c = str.charAt(i);
|
||||
@ -165,6 +185,10 @@ public class StringMan {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean isAlpha(String str) {
|
||||
for (int i = 0; i < str.length(); i++) {
|
||||
char c = str.charAt(i);
|
||||
@ -185,14 +209,26 @@ public class StringMan {
|
||||
return join(array, delimiter);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static String join(Collection<?> collection, char delimiter) {
|
||||
return join(collection.toArray(), delimiter + "");
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean isAsciiPrintable(char c) {
|
||||
return (c >= ' ') && (c < '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean isAsciiPrintable(String s) {
|
||||
for (char c : s.toCharArray()) {
|
||||
if (!isAsciiPrintable(c)) {
|
||||
@ -249,6 +285,10 @@ public class StringMan {
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static String join(int[] array, String delimiter) {
|
||||
Integer[] wrapped = new Integer[array.length];
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
@ -257,6 +297,10 @@ public class StringMan {
|
||||
return join(wrapped, delimiter);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean isEqualToAny(String a, String... args) {
|
||||
for (String arg : args) {
|
||||
if (StringMan.isEqual(a, arg)) {
|
||||
@ -284,6 +328,10 @@ public class StringMan {
|
||||
return a.equals(b);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean isEqualIgnoreCase(String a, String b) {
|
||||
return a.equals(b) || ((a != null) && (b != null) && (a.length() == b.length()) && a
|
||||
.equalsIgnoreCase(b));
|
||||
@ -295,6 +343,10 @@ public class StringMan {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean contains(String name, char c) {
|
||||
for (char current : name.toCharArray()) {
|
||||
if (c == current) {
|
||||
@ -304,6 +356,10 @@ public class StringMan {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public <T> Collection<T> match(Collection<T> col, String startsWith) {
|
||||
if (col == null) {
|
||||
return null;
|
||||
|
@ -58,6 +58,10 @@ public class WEManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean maskContains(Set<CuboidRegion> mask, double dx, double dy, double dz) {
|
||||
int x = Math.toIntExact(Math.round(dx >= 0 ? dx - 0.5 : dx + 0.5));
|
||||
int y = Math.toIntExact(Math.round(dy - 0.5));
|
||||
@ -70,6 +74,10 @@ public class WEManager {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean maskContains(Set<CuboidRegion> mask, double dx, double dz) {
|
||||
int x = Math.toIntExact(Math.round(dx >= 0 ? dx - 0.5 : dx + 0.5));
|
||||
int z = Math.toIntExact(Math.round(dz >= 0 ? dz - 0.5 : dz + 0.5));
|
||||
@ -116,10 +124,18 @@ public class WEManager {
|
||||
return regions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean intersects(CuboidRegion region1, CuboidRegion region2) {
|
||||
return RegionUtil.intersects(region1, region2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Unused internally. Scheduled for removal in next major release.
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public static boolean regionContains(CuboidRegion selection, HashSet<CuboidRegion> mask) {
|
||||
for (CuboidRegion region : mask) {
|
||||
if (intersects(region, selection)) {
|
||||
|
@ -310,6 +310,11 @@ public final class PlaceholderRegistry {
|
||||
this.placeholder = placeholder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link PlaceholderAddedEvent} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code PlaceholderAddedEvent#placeholder()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public Placeholder getPlaceholder() {
|
||||
return this.placeholder;
|
||||
}
|
||||
|
@ -36,10 +36,20 @@ public class UUIDMapping {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link UUIDMapping} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code UUIDMapping#username()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public @NonNull String getUsername() {
|
||||
return this.username;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated {@link UUIDMapping} class will be replaced by a record in the next major update. This method will become
|
||||
* {@code UUIDMapping#uuid()}
|
||||
*/
|
||||
@Deprecated(forRemoval = true, since = "TODO")
|
||||
public @NonNull UUID getUuid() {
|
||||
return this.uuid;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user