Klasse Caps

java.lang.Object
de.delinkedde.pipes.Caps

public final class Caps extends Object
Resolves per-player caps from a permission-keyed config map.

A cap map is keyed by permission suffix. The default entry (if present) is the base cap everyone gets; every other entry grants its cap to players holding <prefix><suffix>. A player's effective cap is the highest value they qualify for, so stacking permissions never lowers a limit.

Seit:
0.1.0
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final String
    The config key whose value applies to every player without any permission.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    static int
    resolve(Predicate<String> hasPermission, Map<String,Integer> caps, String prefix, int fallback)
    Resolves the effective cap using an arbitrary permission check, so the same tiered logic can run against sources other than a live Permissible — for example an offline player's cached permissions from a permissions plugin.
    static int
    resolve(org.bukkit.permissions.Permissible player, Map<String,Integer> caps, String prefix, int fallback)
    Resolves the effective cap for a player.

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

    • DEFAULT_KEY

      public static final String DEFAULT_KEY
      The config key whose value applies to every player without any permission.
      Siehe auch:
  • Methodendetails

    • resolve

      public static int resolve(org.bukkit.permissions.Permissible player, Map<String,Integer> caps, String prefix, int fallback)
      Resolves the effective cap for a player.
      Parameter:
      player - the player (or other permissible) to resolve for; never null
      caps - the permission-suffix → cap map; never null
      prefix - the permission prefix, e.g. "pipes.network.cap."; never null
      fallback - the cap to use when the map has no default entry
      Gibt zurück:
      the highest cap the player qualifies for
    • resolve

      public static int resolve(Predicate<String> hasPermission, Map<String,Integer> caps, String prefix, int fallback)
      Resolves the effective cap using an arbitrary permission check, so the same tiered logic can run against sources other than a live Permissible — for example an offline player's cached permissions from a permissions plugin.
      Parameter:
      hasPermission - tests whether the subject holds a permission node; never null
      caps - the permission-suffix → cap map; never null
      prefix - the permission prefix, e.g. "pipes.collector.cap."; never null
      fallback - the cap to use when the map has no default entry
      Gibt zurück:
      the highest cap the subject qualifies for