mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Fixed the fact that myspawn would clear if you broke ANY bed (not just
your own) - Addresses MCCORE-50
This commit is contained in:
parent
64b46a88c9
commit
e55006f662
@ -144,6 +144,8 @@ public class mcBlockListener implements Listener
|
|||||||
|
|
||||||
//Reset player spawn back to world spawn if their bed is destroyed.
|
//Reset player spawn back to world spawn if their bed is destroyed.
|
||||||
if(block.getType().equals(Material.BED_BLOCK) && LoadProperties.enableMySpawn && PP.getMySpawn(player) != null)
|
if(block.getType().equals(Material.BED_BLOCK) && LoadProperties.enableMySpawn && PP.getMySpawn(player) != null)
|
||||||
|
{
|
||||||
|
if(PP.getMySpawn(player).getBlock().getType() != Material.BED_BLOCK)
|
||||||
{
|
{
|
||||||
double x = Bukkit.getServer().getWorlds().get(0).getSpawnLocation().getX();
|
double x = Bukkit.getServer().getWorlds().get(0).getSpawnLocation().getX();
|
||||||
double y = Bukkit.getServer().getWorlds().get(0).getSpawnLocation().getY();
|
double y = Bukkit.getServer().getWorlds().get(0).getSpawnLocation().getY();
|
||||||
@ -151,6 +153,7 @@ public class mcBlockListener implements Listener
|
|||||||
String worldname = Bukkit.getServer().getWorlds().get(0).getName();
|
String worldname = Bukkit.getServer().getWorlds().get(0).getName();
|
||||||
PP.setMySpawn(x, y, z, worldname);
|
PP.setMySpawn(x, y, z, worldname);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* HERBALISM
|
* HERBALISM
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user