mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 06:02:12 -07:00
Add Scoreboard API and Command. Adds BUKKIT-3776, BUKKIT-3834
The implementation is designed around having both a main scoreboard and numberous plugin managed scoreboards that can be displayed to specific players. Plugin managed scoreboards are active so long as a reference is kept by a plugin, or it has been registered as a player's active scoreboard. Objects specific to a scoreboard remain active until unregistered (which remove a reference to the owning scoreboard), but quickly fail if accessed post-unregistration. By: mbax <github@phozop.net>
This commit is contained in:
@@ -26,6 +26,7 @@ import org.bukkit.plugin.ServicesManager;
|
||||
import org.bukkit.plugin.messaging.Messenger;
|
||||
import org.bukkit.plugin.messaging.PluginMessageRecipient;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.bukkit.scoreboard.ScoreboardManager;
|
||||
|
||||
import com.avaje.ebean.config.ServerConfig;
|
||||
import org.bukkit.inventory.ItemFactory;
|
||||
@@ -689,4 +690,13 @@ public interface Server extends PluginMessageRecipient {
|
||||
* @see ItemFactory
|
||||
*/
|
||||
ItemFactory getItemFactory();
|
||||
|
||||
/**
|
||||
* Gets the instance of the scoreboard manager.
|
||||
* <p>
|
||||
* This will only exist after the first world has loaded.
|
||||
*
|
||||
* @return the scoreboard manager or null if no worlds are loaded.
|
||||
*/
|
||||
ScoreboardManager getScoreboardManager();
|
||||
}
|
||||
|
Reference in New Issue
Block a user