Compare commits

..

3 Commits

Author SHA1 Message Date
Alexander Brandes
f15a652add Merge branch 'v6' into chore/v6/v7-removal-deprecations 2023-03-04 11:56:44 +01:00
Alexander Brandes
fa710803af Fix style 2023-01-21 16:35:03 +01:00
dordsor21
10605e8048 chore: deprecate and add javadoc notes for methods to be removed in v7 2023-01-20 14:59:08 +00:00
8 changed files with 132 additions and 0 deletions

View File

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

View File

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

View File

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

View File

@@ -86,10 +86,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;
}

View File

@@ -43,10 +43,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;
}

View File

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

View File

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

View File

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