mirror of
https://github.com/PlaceholderAPI/PlaceholderAPI
synced 2026-02-06 00:07:20 +01:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -23,6 +23,8 @@ package me.clip.placeholderapi.configuration;
|
||||
import me.clip.placeholderapi.PlaceholderAPIPlugin;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
public final class PlaceholderAPIConfig
|
||||
{
|
||||
|
||||
@@ -64,6 +66,22 @@ public final class PlaceholderAPIConfig
|
||||
}
|
||||
|
||||
|
||||
public Optional<ExpansionSort> getExpansionSort()
|
||||
{
|
||||
final String option = plugin.getConfig().getString("cloud_sorting", ExpansionSort.LATEST.name());
|
||||
|
||||
try
|
||||
{
|
||||
//noinspection ConstantConditions (bad spigot annotation)
|
||||
return Optional.of(ExpansionSort.valueOf(option.toUpperCase()));
|
||||
}
|
||||
catch (final IllegalArgumentException ignored)
|
||||
{
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
public String dateFormat()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user