mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-02 11:21:15 +01:00
Resource pack cleanup
This commit is contained in:
parent
c17aba4ac7
commit
7128844563
src/main/java/net/minestom/server
@ -966,7 +966,7 @@ public class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the resource pack of the player
|
||||
* Set the player resource pack
|
||||
*
|
||||
* @param resourcePack the resource pack
|
||||
*/
|
||||
@ -974,10 +974,7 @@ public class Player extends LivingEntity {
|
||||
Check.notNull(resourcePack, "The resource pack cannot be null");
|
||||
final String url = resourcePack.getUrl();
|
||||
Check.notNull(url, "The resource pack url cannot be null");
|
||||
|
||||
// Optional hash, set to empty if null
|
||||
String hash = resourcePack.getHash();
|
||||
hash = hash == null ? "" : hash;
|
||||
final String hash = resourcePack.getHash();
|
||||
|
||||
ResourcePackSendPacket resourcePackSendPacket = new ResourcePackSendPacket();
|
||||
resourcePackSendPacket.url = url;
|
||||
|
@ -10,13 +10,14 @@ public class ResourcePack {
|
||||
|
||||
public ResourcePack(String url, String hash) {
|
||||
this.url = url;
|
||||
this.hash = hash;
|
||||
// Optional, set to empty if null
|
||||
this.hash = hash == null ? "" : hash;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the resource pack URL
|
||||
*
|
||||
* @return
|
||||
* @return the resource pack URL
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
|
Loading…
Reference in New Issue
Block a user