diff options
author | mbax <matt@phozop.net> | 2013-11-13 17:53:49 -0700 |
---|---|---|
committer | Wesley Wolfe <weswolf@aol.com> | 2013-11-30 19:01:48 -0600 |
commit | 3f04224e85bd0482968a992719e88a3dd8a80035 (patch) | |
tree | d6d63bfe3f0ca3eb896b8f918419d44fbeca8f6c /src/main/java/org/bukkit/Server.java | |
parent | 36b2175edb77920293bc5c88a3338bbbd8346552 (diff) | |
download | bukkit-3f04224e85bd0482968a992719e88a3dd8a80035.tar bukkit-3f04224e85bd0482968a992719e88a3dd8a80035.tar.gz bukkit-3f04224e85bd0482968a992719e88a3dd8a80035.tar.lz bukkit-3f04224e85bd0482968a992719e88a3dd8a80035.tar.xz bukkit-3f04224e85bd0482968a992719e88a3dd8a80035.zip |
Update Update Bukkit to 1.7.2
Diffstat (limited to 'src/main/java/org/bukkit/Server.java')
-rw-r--r-- | src/main/java/org/bukkit/Server.java | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java index aa45f162..0e789315 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -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; } |