mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 14:12:20 -07:00
@@ -1,5 +1,6 @@
|
||||
package org.bukkit;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
@@ -15,6 +16,7 @@ import org.bukkit.command.ConsoleCommandSender;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.inventory.InventoryType;
|
||||
import org.bukkit.event.server.ServerListPingEvent;
|
||||
import org.bukkit.help.HelpMap;
|
||||
import org.bukkit.inventory.Inventory;
|
||||
import org.bukkit.inventory.InventoryHolder;
|
||||
@@ -27,6 +29,7 @@ import org.bukkit.plugin.messaging.Messenger;
|
||||
import org.bukkit.plugin.messaging.PluginMessageRecipient;
|
||||
import org.bukkit.scheduler.BukkitScheduler;
|
||||
import org.bukkit.scoreboard.ScoreboardManager;
|
||||
import org.bukkit.util.CachedServerIcon;
|
||||
|
||||
import com.avaje.ebean.config.ServerConfig;
|
||||
import org.bukkit.inventory.ItemFactory;
|
||||
@@ -709,4 +712,44 @@ public interface Server extends PluginMessageRecipient {
|
||||
* @return the scoreboard manager or null if no worlds are loaded.
|
||||
*/
|
||||
ScoreboardManager getScoreboardManager();
|
||||
|
||||
/**
|
||||
* Gets an instance of the server's default server-icon.
|
||||
*
|
||||
* @return the default server-icon; null values may be used by the
|
||||
* implementation to indicate no defined icon, but this behavior is
|
||||
* not guaranteed
|
||||
*/
|
||||
CachedServerIcon getServerIcon();
|
||||
|
||||
/**
|
||||
* Loads an image from a file, and returns a cached image for the
|
||||
* specific server-icon.
|
||||
* <p>
|
||||
* Size and type are implementation defined. An incompatible file is
|
||||
* guaranteed to throw an implementation-defined {@link Exception}.
|
||||
*
|
||||
* @param file the file to load the from
|
||||
* @throws IllegalArgumentException if image is null
|
||||
* @throws Exception if the image does not meet current server
|
||||
* server-icon specifications
|
||||
* @return a cached server-icon that can be used for a {@link
|
||||
* ServerListPingEvent#setServerIcon(CachedServerIcon)}
|
||||
*/
|
||||
CachedServerIcon loadServerIcon(File file) throws IllegalArgumentException, Exception;
|
||||
|
||||
/**
|
||||
* Creates a cached server-icon for the specific image.
|
||||
* <p>
|
||||
* Size and type are implementation defined. An incompatible file is
|
||||
* guaranteed to throw an implementation-defined {@link Exception}.
|
||||
*
|
||||
* @param image the image to use
|
||||
* @throws IllegalArgumentException if image is null
|
||||
* @throws Exception if the image does not meet current server
|
||||
* server-icon specifications
|
||||
* @return a cached server-icon that can be used for a {@link
|
||||
* ServerListPingEvent#setServerIcon(CachedServerIcon)}
|
||||
*/
|
||||
CachedServerIcon loadServerIcon(BufferedImage image) throws IllegalArgumentException, Exception;
|
||||
}
|
||||
|
Reference in New Issue
Block a user