mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
this can be done more elegantly
This commit is contained in:
parent
599ef8aa44
commit
1f4f78a179
@ -2042,14 +2042,14 @@ import java.util.regex.Pattern;
|
|||||||
if (type == Material.AIR) {
|
if (type == Material.AIR) {
|
||||||
type = offType;
|
type = offType;
|
||||||
}
|
}
|
||||||
|
// in the following, lb needs to have the material of the item in hand i.e. type
|
||||||
|
lb = new BukkitLazyBlock(PlotBlock.get(type.toString()));
|
||||||
if (type.isBlock()) {
|
if (type.isBlock()) {
|
||||||
location = BukkitUtil
|
location = BukkitUtil
|
||||||
.getLocation(block.getRelative(event.getBlockFace()).getLocation());
|
.getLocation(block.getRelative(event.getBlockFace()).getLocation());
|
||||||
eventType = PlayerBlockEventType.PLACE_BLOCK;
|
eventType = PlayerBlockEventType.PLACE_BLOCK;
|
||||||
lb = new BukkitLazyBlock(new StringPlotBlock(type.toString()));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
lb = new BukkitLazyBlock(PlotBlock.get(type.toString()));
|
|
||||||
if (type.toString().toLowerCase().endsWith("egg")) {
|
if (type.toString().toLowerCase().endsWith("egg")) {
|
||||||
eventType = PlayerBlockEventType.SPAWN_MOB;
|
eventType = PlayerBlockEventType.SPAWN_MOB;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user