mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-25 12:05:14 +01:00
Removed deprecated MVConfigProperty and MVActiveConfigProperty.
This commit is contained in:
parent
d0180f05d5
commit
ae314108a3
@ -605,29 +605,6 @@ public class MVWorld implements MultiverseWorld {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*
|
|
||||||
* @deprecated This is deprecated.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public <T> com.onarandombox.MultiverseCore.configuration.MVConfigProperty<T> getProperty(String property,
|
|
||||||
Class<T> expected) throws PropertyDoesNotExistException {
|
|
||||||
throw new UnsupportedOperationException("'MVConfigProperty<T> getProperty(String,Class<T>)' is no longer supported!");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritDoc}
|
|
||||||
*
|
|
||||||
* @deprecated This is deprecated.
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public boolean setProperty(String name, String value, CommandSender sender) throws PropertyDoesNotExistException {
|
|
||||||
return this.setPropertyValue(name, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
*/
|
*/
|
||||||
|
@ -155,37 +155,6 @@ public interface MultiverseWorld {
|
|||||||
*/
|
*/
|
||||||
boolean setPropertyValue(String property, String value) throws PropertyDoesNotExistException;
|
boolean setPropertyValue(String property, String value) throws PropertyDoesNotExistException;
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the actual MVConfigProperty from this world.
|
|
||||||
* It will throw a PropertyDoesNotExistException if the property is not found.
|
|
||||||
*
|
|
||||||
* @param property The name of a world property to get.
|
|
||||||
* @param expected The type of the expected property. Use Object.class if this doesn't matter for you.
|
|
||||||
* @param <T> The type of the expected property.
|
|
||||||
*
|
|
||||||
* @return A valid MVWorldProperty.
|
|
||||||
*
|
|
||||||
* @throws PropertyDoesNotExistException Thrown if the property was not found in the world.
|
|
||||||
* @deprecated We don't use {@link com.onarandombox.MultiverseCore.configuration.MVConfigProperty} any longer!
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
<T> com.onarandombox.MultiverseCore.configuration.MVConfigProperty<T> getProperty(String property, Class<T> expected) throws PropertyDoesNotExistException;
|
|
||||||
|
|
||||||
// old config
|
|
||||||
/**
|
|
||||||
* Adds the property to the given value.
|
|
||||||
* It will throw a PropertyDoesNotExistException if the property is not found.
|
|
||||||
*
|
|
||||||
* @param property The name of a world property to set.
|
|
||||||
* @param value A value in string representation, it will be parsed to the correct type.
|
|
||||||
* @param sender The sender who wants this value to be set.
|
|
||||||
* @return True if the value was set, false if not.
|
|
||||||
* @throws PropertyDoesNotExistException Thrown if the property was not found in the world.
|
|
||||||
* @deprecated Use {@link #setPropertyValue(String, String)} instead.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
boolean setProperty(String property, String value, CommandSender sender) throws PropertyDoesNotExistException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a value to the given property. The property must be a {@link com.onarandombox.MultiverseCore.enums.AddProperties}.
|
* Adds a value to the given property. The property must be a {@link com.onarandombox.MultiverseCore.enums.AddProperties}.
|
||||||
*
|
*
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Multiverse 2 Copyright (c) the Multiverse Team 2012. *
|
|
||||||
* Multiverse 2 is licensed under the BSD License. *
|
|
||||||
* For more information please check the README.md file included *
|
|
||||||
* with this project. *
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
package com.onarandombox.MultiverseCore.configuration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An "active" {@link MVConfigProperty} that uses the specified method to be "actually" set.
|
|
||||||
* @param <T> The type of the config-property.
|
|
||||||
* @deprecated This is deprecated.
|
|
||||||
* @see MVConfigProperty
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public interface MVActiveConfigProperty<T> extends MVConfigProperty<T> {
|
|
||||||
/**
|
|
||||||
* Gets the method that will be executed.
|
|
||||||
*
|
|
||||||
* @return The name of the method in MVWorld to be called.
|
|
||||||
*/
|
|
||||||
String getMethod();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the method that will be executed.
|
|
||||||
*
|
|
||||||
* @param methodName The name of the method in MVWorld to be called.
|
|
||||||
*/
|
|
||||||
void setMethod(String methodName);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the class of the object we're looking at.
|
|
||||||
* @return the class of the object we're looking at.
|
|
||||||
*/
|
|
||||||
Class<?> getPropertyClass();
|
|
||||||
}
|
|
@ -1,69 +0,0 @@
|
|||||||
/******************************************************************************
|
|
||||||
* Multiverse 2 Copyright (c) the Multiverse Team 2011. *
|
|
||||||
* Multiverse 2 is licensed under the BSD License. *
|
|
||||||
* For more information please check the README.md file included *
|
|
||||||
* with this project. *
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
package com.onarandombox.MultiverseCore.configuration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A generic config-property.
|
|
||||||
*
|
|
||||||
* @param <T> The type of the config-property.
|
|
||||||
* @deprecated This is deprecated.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public interface MVConfigProperty<T> {
|
|
||||||
/**
|
|
||||||
* Gets the name of this property.
|
|
||||||
*
|
|
||||||
* @return The name of this property.
|
|
||||||
*/
|
|
||||||
String getName();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value of this property.
|
|
||||||
*
|
|
||||||
* @return The value of this property.
|
|
||||||
*/
|
|
||||||
T getValue();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the string representation of this value.
|
|
||||||
*
|
|
||||||
* @return The value of this property as a string.
|
|
||||||
*/
|
|
||||||
String toString();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the help string for this.
|
|
||||||
*
|
|
||||||
* @return The value of this property as a string.
|
|
||||||
*/
|
|
||||||
String getHelp();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the value of this property.
|
|
||||||
*
|
|
||||||
* @param value The T representation of this value.
|
|
||||||
* @return True the value was successfully set.
|
|
||||||
*/
|
|
||||||
boolean setValue(T value);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This parseValue should be used with strings.
|
|
||||||
*
|
|
||||||
* @param value The string representation of the value to set.
|
|
||||||
*
|
|
||||||
* @return True if the value was set, false if not.
|
|
||||||
*/
|
|
||||||
boolean parseValue(String value);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the name of the config-node that this {@link MVConfigProperty} is saved as.
|
|
||||||
*
|
|
||||||
* @return The name of the config-node that this {@link MVConfigProperty} is saved as.
|
|
||||||
*/
|
|
||||||
String getConfigNode();
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user