mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-28 12:07:42 +01:00
Deprecate storage & data API (use the Tag API for nbt or whatever else you want)
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
f069a378ba
commit
58b13fd007
@ -334,6 +334,7 @@ public final class MinecraftServer {
|
||||
*
|
||||
* @return the data manager
|
||||
*/
|
||||
@Deprecated
|
||||
public static DataManager getDataManager() {
|
||||
checkInitStatus(dataManager);
|
||||
return dataManager;
|
||||
|
@ -13,6 +13,7 @@ import java.util.Set;
|
||||
* <p>
|
||||
* See {@link DataImpl} for the default implementation.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class Data implements PublicCloneable<Data> {
|
||||
|
||||
public static final Data EMPTY = new Data() {
|
||||
|
@ -11,6 +11,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
/**
|
||||
* {@link Data} implementation which uses a {@link ConcurrentHashMap}.
|
||||
*/
|
||||
@Deprecated
|
||||
public class DataImpl extends Data {
|
||||
|
||||
protected final ConcurrentHashMap<String, Object> data = new ConcurrentHashMap<>();
|
||||
|
@ -23,6 +23,7 @@ import java.util.UUID;
|
||||
* A lot of types are already registered by default so you do not have to add all of them manually,
|
||||
* you can verify if {@link #getDataType(Class)} returns null for the desired type, if it is then you will need to register it.
|
||||
*/
|
||||
@Deprecated
|
||||
public final class DataManager {
|
||||
|
||||
private final Map<Class, DataType> dataTypeMap = new HashMap<>();
|
||||
|
@ -12,6 +12,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
*
|
||||
* @param <T> the type of the object
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class DataType<T> {
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* <p>
|
||||
* See {@link SerializableDataImpl} for the default implementation.
|
||||
*/
|
||||
@Deprecated
|
||||
public abstract class SerializableData extends Data {
|
||||
|
||||
/**
|
||||
|
@ -19,6 +19,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
/**
|
||||
* {@link SerializableData} implementation based on {@link DataImpl}.
|
||||
*/
|
||||
@Deprecated
|
||||
public class SerializableDataImpl extends SerializableData {
|
||||
|
||||
protected static final DataManager DATA_MANAGER = MinecraftServer.getDataManager();
|
||||
|
@ -17,6 +17,7 @@ import java.util.Map;
|
||||
* Each {@link StorageLocation} has a {@link StorageSystem} associated to it
|
||||
* which is used to save and retrieve data from keys.
|
||||
*/
|
||||
@Deprecated
|
||||
public class StorageLocation {
|
||||
|
||||
private static final DataManager DATA_MANAGER = MinecraftServer.getDataManager();
|
||||
|
@ -16,6 +16,7 @@ import java.util.function.Supplier;
|
||||
* Manager used to retrieve {@link StorageLocation} with {@link #getLocation(String, StorageOptions, StorageSystem)}
|
||||
* and define the default {@link StorageSystem} with {@link #defineDefaultStorageSystem(Supplier)}.
|
||||
*/
|
||||
@Deprecated
|
||||
public final class StorageManager {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(StorageManager.class);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package net.minestom.server.storage;
|
||||
|
||||
@Deprecated
|
||||
public class StorageOptions {
|
||||
|
||||
private boolean compression;
|
||||
|
@ -7,6 +7,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* Represents a way of storing data by key/value.
|
||||
* The location does not have to be a file or folder path. It is the 'identifier' of the data location.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface StorageSystem {
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user