Interface StringMapSerializationHelper
- All Known Subinterfaces:
ArenaPersistentStorage
,PersistentStorage
,PlayerProperties
-
Method Summary
Modifier and TypeMethodDescriptionGets the String value of the internal map.getBoolean
(String key) Gets the Boolean value of the internal map.Gets the Double value of the internal map.Gets the Integer value of the internal map.getItemStack
(String key) Gets the ItemStack value of the internal map.Gets the Long value of the internal map.default void
Sets a boolean as the value for the given key.default void
Sets a number as the value for the given key.void
Set an entry to the internal map.default void
Sets an ItemStack as the value for the given key.
-
Method Details
-
get
Gets the String value of the internal map.- Parameters:
key
- The key that contains to the value- Returns:
- The value of the key. May be empty if it doesn't exist
-
set
Set an entry to the internal map.It is not possible to have multiple entries with the same key. Existing ones automatically get replaced with this new one.
- Parameters:
key
- The key of the value with which you may identify the value later onvalue
- The value that you want to store
-
getInt
Gets the Integer value of the internal map.It actually gets stored as a String internally.
Helper.parseInt(String)
is being used to parse it.- Parameters:
key
- The key that contains to the value- Returns:
- The value of the key. May be empty if it doesn't exist
-
getLong
Gets the Long value of the internal map.It actually gets stored as a String internally.
Helper.parseLong(String)
(String)} is being used to parse it.- Parameters:
key
- The key that contains to the value- Returns:
- The value of the key. May be empty if it doesn't exist
-
getBoolean
Gets the Boolean value of the internal map.It actually gets stored as a String internally. Some checks are being made to make sure that it's actually a boolean.
- Parameters:
key
- The key that contains to the value- Returns:
- The value of the key. May be empty if it doesn't exist
-
getDouble
Gets the Double value of the internal map.It actually gets stored as a String internally.
Helper.parseDouble(String)
is being used to parse it.- Parameters:
key
- The key that contains to the value- Returns:
- The value of the key. May be empty if it doesn't exist
-
getItemStack
Gets the ItemStack value of the internal map.It actually gets stored as a String internally.
Helper.parseItemStack(String)
is being used to parse it.- Parameters:
key
- The key that contains to the value- Returns:
- The value of the key. May be empty if it doesn't exist
-
set
Sets a number as the value for the given key.It is not possible to have multiple entries with the same key. Existing ones automatically get replaced with this new one.
- Parameters:
key
- The key of the value with which you may identify the value later onvalue
- The value that you want to store
-
set
Sets an ItemStack as the value for the given key.It is not possible to have multiple entries with the same key. Existing ones automatically get replaced with this new one.
- Parameters:
key
- The key of the value with which you may identify the value later onvalue
- The value that you want to store
-
set
Sets a boolean as the value for the given key.It is not possible to have multiple entries with the same key. Existing ones automatically get replaced with this new one.
- Parameters:
key
- The key of the value with which you may identify the value later onvalue
- The value that you want to store
-