Player configuration API with default implementation on paper server.
Also merging pandalib-paper-player into pandalib-paper due to unavoidable circular dependency
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package fr.pandacube.lib.players.standalone;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.function.UnaryOperator;
|
||||
|
||||
/**
|
||||
* Represents any player, either offline or online.
|
||||
@@ -65,6 +66,24 @@ public interface AbstractOffPlayer {
|
||||
*/
|
||||
String getDisplayName();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Player config
|
||||
*/
|
||||
|
||||
String getConfig(String key) throws Exception;
|
||||
|
||||
String getConfig(String key, String deflt) throws Exception;
|
||||
|
||||
void setConfig(String key, String value) throws Exception;
|
||||
|
||||
void updateConfig(String key, String deflt, UnaryOperator<String> updater) throws Exception;
|
||||
|
||||
void unsetConfig(String key) throws Exception;
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user