Search in sources :

Example 21 with Action

use of org.cubeengine.module.vigil.report.Action in project modules-extra by CubeEngine.

the class QuitReport method showReport.

@Override
public void showReport(List<Action> actions, Receiver receiver) {
    Action action = actions.get(0);
    receiver.sendReport(this, actions, actions.size(), "{txt} left the game", "{txt} left the game x{}", Recall.cause(action), actions.size());
}
Also used : Action(org.cubeengine.module.vigil.report.Action)

Example 22 with Action

use of org.cubeengine.module.vigil.report.Action in project modules-extra by CubeEngine.

the class QuitReport method observe.

@Override
protected Action observe(ClientConnectionEvent.Disconnect 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;
}
Also used : Action(org.cubeengine.module.vigil.report.Action)

Example 23 with Action

use of org.cubeengine.module.vigil.report.Action in project modules-extra by CubeEngine.

the class ChangeInventoryReport method observe.

@Override
public Action observe(ChangeInventoryEvent event) {
    Action action = newReport();
    action.addData(CAUSE, Observe.causes(event.getCause()));
    return action;
}
Also used : Action(org.cubeengine.module.vigil.report.Action)

Example 24 with Action

use of org.cubeengine.module.vigil.report.Action in project modules-extra by CubeEngine.

the class InventoryOpenReport method showReport.

@Override
public void showReport(List<Action> actions, Receiver receiver) {
    Action action = actions.get(0);
    receiver.sendReport(this, actions, actions.size(), "{txt} open {txt}", "{txt} open {txt} x{}", Recall.cause(action), Text.of("?"), actions.size());
}
Also used : Action(org.cubeengine.module.vigil.report.Action)

Aggregations

Action (org.cubeengine.module.vigil.report.Action)24 BlockSnapshot (org.spongepowered.api.block.BlockSnapshot)5 Text (org.spongepowered.api.text.Text)4 ArrayList (java.util.ArrayList)3 Recall (org.cubeengine.module.vigil.report.Recall)3 Map (java.util.Map)2 ItemStack (org.spongepowered.api.item.inventory.ItemStack)2 SlotTransaction (org.spongepowered.api.item.inventory.transaction.SlotTransaction)2 TextActions.showText (org.spongepowered.api.text.action.TextActions.showText)2 Vector3i (com.flowpowered.math.vector.Vector3i)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 UUID (java.util.UUID)1 Document (org.bson.Document)1 Report (org.cubeengine.module.vigil.report.Report)1 ReportActions (org.cubeengine.module.vigil.report.ReportActions)1 Transaction (org.spongepowered.api.data.Transaction)1 MutableBoundedValue (org.spongepowered.api.data.value.mutable.MutableBoundedValue)1 EntitySnapshot (org.spongepowered.api.entity.EntitySnapshot)1 Living (org.spongepowered.api.entity.living.Living)1