Package dev.hypera.chameleon.platform
Interface PlatformTarget
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface PlatformTarget extends Predicate<Platform>
Platform target.This allows you to target a certain platform or restrict a feature to a certain platform.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static @NotNull PlatformTargetall()Create a new platform target that matches all platforms.default @NotNull PlatformTargetand(@NotNull PlatformTarget other)Returns a new platform target that matches this target, and theothertarget.static @NotNull PlatformTargetbukkit()Create a new platform target that matches Bukkit.static @NotNull PlatformTargetbungeeCord()Create a new platform target that matches BungeeCord.static @NotNull PlatformTargetfolia()Create a new platform target that matches Folia.static @NotNull PlatformTargetid(@NotNull String id)Create a new platform target that matches platforms with the givenid.static @NotNull PlatformTargetid(@NotNull String id, boolean strict)Create a new platform target that matches platforms with the givenid.default @NotNull PlatformTargetnegate()Returns a new platform target that negates the result of this target.static @NotNull PlatformTargetnone()Create a new platform target that matches nothing.static @NotNull PlatformTargetnukkit()Create a new platform target that matches Nukkit.default @NotNull PlatformTargetor(@NotNull PlatformTarget other)Returns a new platform target that matches this target, or theothertarget.static @NotNull PlatformTargetproxy()Create a new platform target that matches all proxy platforms.static @NotNull PlatformTargetserver()Create a new platform target that matches all server platforms.static @NotNull PlatformTargetsponge()Create a new platform target that matches Sponge.booleantest(@NotNull Platform platform)Check if the given platform matches this target.static @NotNull PlatformTargetvelocity()Create a new platform target that matches Sponge.
-
-
-
Method Detail
-
all
@Contract(pure=true) @NotNull static @NotNull PlatformTarget all()
Create a new platform target that matches all platforms.- Returns:
- new platform target.
-
none
@Contract(pure=true) @NotNull static @NotNull PlatformTarget none()
Create a new platform target that matches nothing.- Returns:
- new platform target.
-
proxy
@Contract(pure=true) @NotNull static @NotNull PlatformTarget proxy()
Create a new platform target that matches all proxy platforms.- Returns:
- new platform target.
-
server
@Contract(pure=true) @NotNull static @NotNull PlatformTarget server()
Create a new platform target that matches all server platforms.- Returns:
- new platform target.
-
bukkit
@Contract(pure=true) @NotNull static @NotNull PlatformTarget bukkit()
Create a new platform target that matches Bukkit.- Returns:
- new platform target.
-
bungeeCord
@Contract(pure=true) @NotNull static @NotNull PlatformTarget bungeeCord()
Create a new platform target that matches BungeeCord.- Returns:
- new platform target.
-
folia
@Contract(pure=true) @NotNull static @NotNull PlatformTarget folia()
Create a new platform target that matches Folia.- Returns:
- new platform target.
-
nukkit
@Contract(pure=true) @NotNull static @NotNull PlatformTarget nukkit()
Create a new platform target that matches Nukkit.- Returns:
- new platform target.
-
sponge
@Contract(pure=true) @NotNull static @NotNull PlatformTarget sponge()
Create a new platform target that matches Sponge.- Returns:
- new platform target.
-
velocity
@Contract(pure=true) @NotNull static @NotNull PlatformTarget velocity()
Create a new platform target that matches Sponge.- Returns:
- new platform target.
-
id
@Contract(pure=true) @NotNull static @NotNull PlatformTarget id(@NotNull @NotNull String id)
Create a new platform target that matches platforms with the givenid.- Parameters:
id- Target platform identifier.- Returns:
- new platform target.
-
id
@Contract(pure=true) @NotNull static @NotNull PlatformTarget id(@NotNull @NotNull String id, boolean strict)
Create a new platform target that matches platforms with the givenid.- Parameters:
id- Target platform identifier.strict- Whether the id equality should be case-sensitive.- Returns:
- new platform target.
-
test
boolean test(@NotNull @NotNull Platform platform)Check if the given platform matches this target.
-
and
@Contract(value="_ -> new", pure=true) @NotNull default @NotNull PlatformTarget and(@NotNull @NotNull PlatformTarget other)Returns a new platform target that matches this target, and theothertarget.- Parameters:
other- Other platform target.- Returns:
- new platform target.
-
or
@Contract(value="_ -> new", pure=true) @NotNull default @NotNull PlatformTarget or(@NotNull @NotNull PlatformTarget other)Returns a new platform target that matches this target, or theothertarget.- Parameters:
other- Other platform target.- Returns:
- new platform target.
-
negate
@Contract(value="-> new", pure=true) @NotNull default @NotNull PlatformTarget negate()Returns a new platform target that negates the result of this target.
-
-