Search in sources :

Example 1 with SpongeBanType

use of org.spongepowered.common.ban.SpongeBanType in project SpongeCommon by SpongePowered.

the class BanTypeRegistryModule method registerDefaults.

@Override
public void registerDefaults() {
    this.banTypeMappings.put("profile", new SpongeBanType(0, "PROFILE", Ban.Profile.class));
    this.banTypeMappings.put("ip", new SpongeBanType(1, "IP", Ban.Ip.class));
}
Also used : SpongeBanType(org.spongepowered.common.ban.SpongeBanType)

Example 2 with SpongeBanType

use of org.spongepowered.common.ban.SpongeBanType in project SpongeCommon by SpongePowered.

the class SpongeRegistryLoaders method banType.

public static RegistryLoader<BanType> banType() {
    return RegistryLoader.of(l -> {
        l.add(BanTypes.IP, k -> new SpongeBanType(Ban.IP.class));
        l.add(BanTypes.PROFILE, k -> new SpongeBanType(Ban.Profile.class));
    });
}
Also used : SpongeBanType(org.spongepowered.common.ban.SpongeBanType)

Aggregations

SpongeBanType (org.spongepowered.common.ban.SpongeBanType)2