Fixed NullPointerException when breaking/placing certain skulls on Paper servers (fixes #643)

This commit is contained in:
Intelli 2024-12-05 17:01:57 -07:00
parent e5ec7ede72
commit f729c8a126

View File

@ -34,7 +34,7 @@ public class Paper_v1_20 extends Paper_v1_17 implements PaperInterface {
if (skull.getPlayerProfile().getId() != null) { if (skull.getPlayerProfile().getId() != null) {
owner = skull.getPlayerProfile().getId().toString(); owner = skull.getPlayerProfile().getId().toString();
} }
else if (Config.getGlobal().MYSQL && owner.length() > 255) { else if (Config.getGlobal().MYSQL && owner != null && owner.length() > 255) {
return owner.substring(0, 255); return owner.substring(0, 255);
} }