mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
Added function to send the block on a location.
This commit is contained in:
@@ -7,6 +7,7 @@ import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
@@ -88,7 +89,7 @@ public class RandomSpawn extends JavaPlugin{
|
||||
// player.sendMessage(yamlHandler.config.getString("messages.pleasewait"));
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
public Location chooseSpawn(World world){
|
||||
|
||||
String worldName = world.getName();
|
||||
@@ -135,4 +136,10 @@ public class RandomSpawn extends JavaPlugin{
|
||||
|
||||
return y;
|
||||
}
|
||||
|
||||
public void sendBlockOnLocation(Player player, Location location){
|
||||
location.getChunk().load();
|
||||
Block block = location.getBlock();
|
||||
player.sendBlockChange(location, block.getType(), block.getData());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user