fixed clans home NPE. also added GRASS to UtilItem's item property system.
This commit is contained in:
parent
16eecdd112
commit
924504ac9f
@ -658,7 +658,7 @@ public class UtilBlock
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!allowFloating && UtilItem.isBoundless(location.getBlock().getType()))
|
||||
if (!allowFloating && UtilItem.isBoundless(location.getBlock().getRelative(BlockFace.DOWN).getType()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@ -704,10 +704,10 @@ public class UtilBlock
|
||||
return false;
|
||||
}
|
||||
|
||||
pillowBlock.setType(Material.BED);
|
||||
pillowBlock.setType(Material.BED_BLOCK);
|
||||
pillowBlock.setRawData(dirFlag);
|
||||
|
||||
footBlock.setType(Material.BED);
|
||||
footBlock.setType(Material.BED_BLOCK);
|
||||
footBlock.setRawData((byte) (0x8 | dirFlag));
|
||||
|
||||
return pillowBlock.update(true, false) && footBlock.update(true, false);
|
||||
|
@ -26,6 +26,7 @@ public class UtilItem
|
||||
_materials.put(Material.AIR, EnumSet.of(ItemCategory.BLOCK, ItemCategory.TRANSLUCENT, ItemCategory.BOUNDLESS));
|
||||
_materials.put(Material.STONE, EnumSet.of(ItemCategory.BLOCK));
|
||||
_materials.put(Material.DIRT, EnumSet.of(ItemCategory.BLOCK));
|
||||
_materials.put(Material.GRASS, EnumSet.of(ItemCategory.BLOCK));
|
||||
_materials.put(Material.COBBLESTONE, EnumSet.of(ItemCategory.BLOCK, ItemCategory.STONE));
|
||||
_materials.put(Material.WOOD, EnumSet.of(ItemCategory.BLOCK, ItemCategory.WOOD));
|
||||
_materials.put(Material.SAPLING, EnumSet.of(ItemCategory.BLOCK));
|
||||
|
@ -898,7 +898,7 @@ public class ClansCommand extends CommandBase<ClansManager>
|
||||
{
|
||||
byte data = clan.getHome().getBlock().getData();
|
||||
|
||||
EnumDirection dir = null;
|
||||
EnumDirection dir = EnumDirection.fromAngle(caller.getLocation().getYaw());
|
||||
int xModif = 0;
|
||||
int zModif = 0;
|
||||
|
||||
@ -925,6 +925,7 @@ public class ClansCommand extends CommandBase<ClansManager>
|
||||
|
||||
if (dir == null)
|
||||
{
|
||||
UtilPlayer.message(caller, F.main("Clans", "Error..."));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -936,7 +937,7 @@ public class ClansCommand extends CommandBase<ClansManager>
|
||||
}
|
||||
else
|
||||
{
|
||||
// Shoudln't happen, but just in case:
|
||||
// Shouldn't happen, but just in case:
|
||||
System.out.println("Second block of " + clan.getName() + "'s Clan Home should be a bed, but isn't. [STRANGE!!!]");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user