mirror of
https://github.com/taoneill/war.git
synced 2024-11-13 05:54:31 +01:00
Don't set a skull owner if empty
Closes #781 Another bug due to Mojang's new stupid username changing "feature". Setting the owner requires a web lookup or cache hit for the name in order to target the correct player. It apparently doesn't like looking up a blank name.
This commit is contained in:
parent
df1e5a56df
commit
9281ad5c4d
@ -184,7 +184,9 @@ public class ZoneVolumeMapper {
|
||||
// Skulls
|
||||
if (modify instanceof Skull) {
|
||||
String[] opts = query.getString("metadata").split("\n");
|
||||
((Skull) modify).setOwner(opts[0]);
|
||||
if (!opts[0].isEmpty()) {
|
||||
((Skull) modify).setOwner(opts[0]);
|
||||
}
|
||||
((Skull) modify).setSkullType(SkullType.valueOf(opts[1]));
|
||||
((Skull) modify).setRotation(BlockFace.valueOf(opts[2]));
|
||||
modify.update(true, false);
|
||||
|
Loading…
Reference in New Issue
Block a user