Skip to content

Commit

Permalink
should compile now; fix double icon cache
Browse files Browse the repository at this point in the history
  • Loading branch information
iamnoksio authored Aug 15, 2024
1 parent 253b3e6 commit f6fca4c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 81 deletions.
23 changes: 0 additions & 23 deletions nPaper-API/src/main/java/org/bukkit/Bukkit.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.bukkit;

import java.awt.image.BufferedImage;
import java.io.File;
import java.util.Collection;
import java.util.Iterator;
Expand Down Expand Up @@ -29,7 +28,6 @@
import org.bukkit.plugin.messaging.Messenger;
import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scoreboard.ScoreboardManager;
import org.bukkit.util.CachedServerIcon;

import com.avaje.ebean.config.ServerConfig;

Expand Down Expand Up @@ -703,27 +701,6 @@ public static ScoreboardManager getScoreboardManager() {
return server.getScoreboardManager();
}

/**
* @see Server#getServerIcon()
*/
public static CachedServerIcon getServerIcon() {
return server.getServerIcon();
}

/**
* @see Server#loadServerIcon(File)
*/
public static CachedServerIcon loadServerIcon(File file) throws IllegalArgumentException, Exception {
return server.loadServerIcon(file);
}

/**
* @see Server#loadServerIcon(BufferedImage)
*/
public static CachedServerIcon loadServerIcon(BufferedImage image) throws IllegalArgumentException, Exception {
return server.loadServerIcon(image);
}

/**
* @see Server#setIdleTimeout(int)
*/
Expand Down
42 changes: 0 additions & 42 deletions nPaper-API/src/main/java/org/bukkit/Server.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.bukkit;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.Serializable;
import java.util.Collection;
Expand Down Expand Up @@ -34,7 +33,6 @@
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 com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -845,46 +843,6 @@ public interface Server extends PluginMessageRecipient {
*/
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;

/**
* Set the idle kick timeout. Any players idle for the specified amount of
* time will be automatically kicked.
Expand Down
15 changes: 0 additions & 15 deletions nPaper-API/src/main/java/org/bukkit/util/CachedServerIcon.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ public void remove() {
playerSample.a(profiles.toArray(new GameProfile[Math.min(profiles.size(), org.spigotmc.SpigotConfig.playerSample)])); // nPaper - limit for Array

ServerPing ping = new ServerPing();
ping.setFavicon(event.icon.value);
ping.setMOTD(new ChatComponentText(event.getMotd()));
ping.setPlayerSample(playerSample);
ping.setServerInfo(new ServerPingServerData(minecraftServer.getServerModName() + " " + minecraftServer.getVersion(), networkManager.getVersion())); // TODO: Update when protocol changes
Expand Down

0 comments on commit f6fca4c

Please sign in to comment.