use of org.cubeengine.module.vigil.report.Action in project modules-extra by CubeEngine.
the class PlaceBlockReport method showReport.
@Override
public void showReport(List<Action> actions, Receiver receiver) {
Action action = actions.get(0);
Optional<BlockSnapshot> orig = action.getCached(BLOCKS_ORIG, Recall::origSnapshot);
Optional<BlockSnapshot> repl = action.getCached(BLOCKS_REPL, Recall::replSnapshot);
if (!repl.isPresent()) {
throw new IllegalStateException();
}
showReport(actions, receiver, action, orig, repl.get());
}
use of org.cubeengine.module.vigil.report.Action in project modules-extra by CubeEngine.
the class ChatReport method observe.
@Override
public Action observe(MessageChannelEvent.Chat event) {
Action action = newReport();
action.addData(CAUSE, Observe.causes(event.getCause()));
action.addData(CHAT, event.getRawMessage().toPlain());
action.addData(LOCATION, Observe.location(event.getCause().first(Player.class).get().getLocation()));
return action;
}
use of org.cubeengine.module.vigil.report.Action in project modules-extra by CubeEngine.
the class CommandReport method observe.
@Override
public Action observe(SendCommandEvent event) {
Action action = newReport();
action.addData(CAUSE, Observe.causes(event.getCause()));
action.addData(COMMAND, event.getCommand());
action.addData(LOCATION, Observe.location(event.getCause().first(Player.class).get().getLocation()));
return action;
}
use of org.cubeengine.module.vigil.report.Action in project modules-extra by CubeEngine.
the class JoinReport method observe.
@Override
protected Action observe(ClientConnectionEvent.Join event) {
Action action = newReport();
action.addData(CAUSE, Observe.causes(Cause.of(EventContext.empty(), event.getTargetEntity())));
action.addData(LOCATION, Observe.location(event.getTargetEntity().getLocation()));
return action;
}
use of org.cubeengine.module.vigil.report.Action in project modules-extra by CubeEngine.
the class JoinReport method showReport.
@Override
public void showReport(List<Action> actions, Receiver receiver) {
Action action = actions.get(0);
receiver.sendReport(this, actions, actions.size(), "{txt} joined the game", "{txt} joined the game x{}", Recall.cause(action), actions.size());
}
Aggregations