public class StringData extends Data<java.lang.String>
| Modifier and Type | Field and Description |
|---|---|
static @NotNull java.lang.String |
TARGET_COLUMN
The primary target column name
|
boolean |
useCache
Whether to use the cache for this data
|
| Constructor and Description |
|---|
StringData(@NotNull AnnoyingPlugin plugin,
@NotNull org.bukkit.OfflinePlayer player)
Construct a new
StringData for the given OfflinePlayer
This uses the same table used for EntityData (EntityData.TABLE_NAME) and the player's UUID as the target |
StringData(@NotNull AnnoyingPlugin plugin,
@NotNull java.lang.String table,
@NotNull java.lang.String string)
Construct a new
StringData for the given string |
| Modifier and Type | Method and Description |
|---|---|
@Nullable java.lang.String |
get(@NotNull java.lang.String key)
Get the data value for the given key
|
boolean |
remove(@NotNull java.lang.String key)
Remove the data value with the given key
|
protected boolean |
set(@NotNull java.lang.String key,
@NotNull java.lang.String value)
Set the data value for the given key.
|
@NotNull StringData |
useCache(@Nullable java.lang.Boolean useCache)
Whether to use the cache for this data (if caching is enabled in the storage config)
Defaults to DataOptions.useCacheDefault |
get, getAnnoyingPlugin, getOptional, has, removeChain, sendError, set, setChain@NotNull public static final @NotNull java.lang.String TARGET_COLUMN
public boolean useCache
public StringData(@NotNull
@NotNull AnnoyingPlugin plugin,
@NotNull
@NotNull java.lang.String table,
@NotNull
@NotNull java.lang.String string)
StringData for the given stringplugin - Data.plugintable - tablestring - Data.targetpublic StringData(@NotNull
@NotNull AnnoyingPlugin plugin,
@NotNull
@NotNull org.bukkit.OfflinePlayer player)
StringData for the given OfflinePlayer
EntityData (EntityData.TABLE_NAME) and the player's UUID as the targetplugin - Data.pluginplayer - the player to get/store the data for@NotNull public @NotNull StringData useCache(@Nullable @Nullable java.lang.Boolean useCache)
DataOptions.useCacheDefaultuseCache - the new value or null to use DataOptions.useCacheDefaultthis for chaining@Nullable
public @Nullable java.lang.String get(@NotNull
@NotNull java.lang.String key)
Dataprotected boolean set(@NotNull
@NotNull java.lang.String key,
@NotNull
@NotNull java.lang.String value)
Datapublic boolean remove(@NotNull
@NotNull java.lang.String key)
Data