Search in sources :

Example 1 with DenyFilter

use of tc.oc.pgm.filters.DenyFilter in project PGM by PGMDev.

the class RegionFilterApplicationParser method parseLane.

public void parseLane(Element el) throws InvalidXMLException {
    final Filter filter = new DenyFilter(new TeamFilter(Teams.getTeamRef(new Node(XMLUtils.getRequiredAttribute(el, "team")), factory)));
    final Region region = parseRegion(el);
    final Component message = translatable("match.laneExit");
    prepend(el, new RegionFilterApplication(RFAScope.PLAYER_ENTER, region, filter, message, false));
    prepend(el, new RegionFilterApplication(RFAScope.BLOCK_PLACE, new NegativeRegion(region), filter, message, false));
}
Also used : TeamFilter(tc.oc.pgm.filters.TeamFilter) DenyFilter(tc.oc.pgm.filters.DenyFilter) Filter(tc.oc.pgm.api.filter.Filter) StaticFilter(tc.oc.pgm.filters.StaticFilter) DenyFilter(tc.oc.pgm.filters.DenyFilter) Node(tc.oc.pgm.util.xml.Node) FilterNode(tc.oc.pgm.filters.FilterNode) Region(tc.oc.pgm.api.region.Region) TeamFilter(tc.oc.pgm.filters.TeamFilter) Component(net.kyori.adventure.text.Component)

Aggregations

Component (net.kyori.adventure.text.Component)1 Filter (tc.oc.pgm.api.filter.Filter)1 Region (tc.oc.pgm.api.region.Region)1 DenyFilter (tc.oc.pgm.filters.DenyFilter)1 FilterNode (tc.oc.pgm.filters.FilterNode)1 StaticFilter (tc.oc.pgm.filters.StaticFilter)1 TeamFilter (tc.oc.pgm.filters.TeamFilter)1 Node (tc.oc.pgm.util.xml.Node)1