Skip to content

Commit

Permalink
✨ Better exception handle?
Browse files Browse the repository at this point in the history
Signed-off-by: 秋雨落 <i@rain.cx>
  • Loading branch information
qyl27 committed May 15, 2023
1 parent a83c407 commit 7521b4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ A bukkit plugin for showing another server icon at night in game.
```yaml
# Name of the world to detect.
world-name: world
# Day icon
# Day icon name in config dir.
icon-day: server-icon-day.png
# Night icon
# Night icon name in config dir.
icon-night: server-icon-night.png
# If cache enabled, there should not an server-icon.png file in server root dir.
cache-enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import java.util.Map;

public class ListenerServerListPing implements Listener {
public final CachedServerIcon iconDay;
public final CachedServerIcon iconNight;
private CachedServerIcon iconDay;
private CachedServerIcon iconNight;

private final ConfigManager configManager;

Expand All @@ -32,7 +32,8 @@ public ListenerServerListPing(IconAtNight plugin) {
iconNight = Bukkit.loadServerIcon(iconFileNight);
} catch (Exception ex) {
ex.printStackTrace();
throw new RuntimeException(ex);
iconDay = Bukkit.getServerIcon();
iconNight = Bukkit.getServerIcon();
}
}

Expand Down

0 comments on commit 7521b4f

Please sign in to comment.