Added code for making the heads that appear when the "heads" command is used have the skin of the UUID set in the configuration file.
This commit is contained in:
parent
978dd19fd4
commit
6591c03b10
@ -3,10 +3,12 @@ package net.theprogrammersworld.herobrine.misc;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
|
import org.bukkit.block.Skull;
|
||||||
import org.bukkit.block.data.Rotatable;
|
import org.bukkit.block.data.Rotatable;
|
||||||
|
|
||||||
public class BlockChanger {
|
public class BlockChanger {
|
||||||
@ -92,6 +94,9 @@ public class BlockChanger {
|
|||||||
Rotatable blockData = (Rotatable) b.getBlockData();
|
Rotatable blockData = (Rotatable) b.getBlockData();
|
||||||
blockData.setRotation(bface);
|
blockData.setRotation(bface);
|
||||||
b.setBlockData(blockData);
|
b.setBlockData(blockData);
|
||||||
|
Skull skull = (Skull) b.getState();
|
||||||
|
skull.setOwningPlayer(Bukkit.getOfflinePlayer(uuid));
|
||||||
|
skull.update(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user