Skip to content

Commit

Permalink
Don't apply empty pack if the player does have none
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoenix616 committed Aug 17, 2018
1 parent 9d9ea87 commit 025485c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,9 @@ public boolean setPack(UUID playerId, ResourcePack pack, boolean temporary) {
if (pack != null && pack.equals(prev)) {
return false;
}
if (prev == null && (pack == null || pack.equals(getEmptyPack()))) {
return false;
}
IResourcePackSendEvent sendEvent = plugin.callPackSendEvent(playerId, pack);
if (sendEvent.isCancelled()) {
plugin.getLogger().log(plugin.getLogLevel(), "Pack send event for " + playerId + " was cancelled!");
Expand Down

0 comments on commit 025485c

Please sign in to comment.