use of me.botsko.prism.actions.BlockAction in project Prism-Bukkit by prism.
the class ActionFactory method createBlock.
/**
* GenericAction
*
* @param action_type
* @param player
*/
public static Handler createBlock(String action_type, String player) {
final BlockAction a = new BlockAction();
a.setActionType(action_type);
a.setPlayerName(player);
return a;
}
use of me.botsko.prism.actions.BlockAction in project Prism-Bukkit by prism.
the class ActionFactory method createBlock.
/**
* BlockAction
*
* @param action_type
* @param state
* @param player
*/
public static Handler createBlock(String action_type, BlockState state, String player) {
final BlockAction a = new BlockAction();
a.setActionType(action_type);
a.setBlock(state);
a.setPlayerName(player);
return a;
}
use of me.botsko.prism.actions.BlockAction in project Prism-Bukkit by prism.
the class PrismPlayerEvents method recordCocoaPlantEvent.
/**
*
* @param block
* @param inhand
* @param player
*/
protected void recordCocoaPlantEvent(Block block, ItemStack inhand, BlockFace clickedFace, String player) {
if (!Prism.getIgnore().event("block-place", block))
return;
if (block.getType().equals(Material.LOG) && block.getData() >= 3 && inhand.getTypeId() == 351 && inhand.getDurability() == 3) {
final Location newLoc = block.getRelative(clickedFace).getLocation();
final Block actualBlock = block.getWorld().getBlockAt(newLoc);
// This is a lame way to do this
final BlockAction action = new BlockAction();
action.setActionType("block-place");
action.setPlayerName(player);
action.setX(actualBlock.getX());
action.setY(actualBlock.getY());
action.setZ(actualBlock.getZ());
action.setWorldName(newLoc.getWorld().getName());
action.setBlockId(127);
action.setBlockSubId((byte) 1);
RecordingQueue.addToQueue(action);
}
}
use of me.botsko.prism.actions.BlockAction in project Prism-Bukkit by prism.
the class ActionFactory method createBlock.
/**
* BlockAction
*
* @param action_type
* @param block
* @param player
*/
public static Handler createBlock(String action_type, Block block, String player) {
final BlockAction a = new BlockAction();
a.setActionType(action_type);
a.setBlock(block);
a.setPlayerName(player);
return a;
}
Aggregations