Package dev.piglin.piglinworldapi.util
Class PluginsUtils
java.lang.Object
dev.piglin.piglinworldapi.util.PluginsUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable BooleanantiRelogIsInPVP(@NotNull org.bukkit.entity.Player player)Checks if the player is in PVP (See AntiRelog on SpigotMC)static @Nullable StringplaceholderAPISetPlaceholders(@NotNull org.bukkit.OfflinePlayer player, @NotNull String target)Sets the placeholders for the target string using PlaceholderAPI (See PlaceholderAPI on SpigotMC)static @NotNull StringplaceholderAPITrySetPlaceholders(@NotNull org.bukkit.OfflinePlayer player, @NotNull String target)Sets the placeholders for the target string using PlaceholderAPI (See PlaceholderAPI on SpigotMC)
-
Constructor Details
-
PluginsUtils
public PluginsUtils()
-
-
Method Details
-
antiRelogIsInPVP
@Nullable public static @Nullable Boolean antiRelogIsInPVP(@NotNull @NotNull org.bukkit.entity.Player player)Checks if the player is in PVP (See AntiRelog on SpigotMC)- Returns:
- true if the player is in PVP, false if the player is not in PVP, null if AntiRelog is not installed
-
placeholderAPISetPlaceholders
@Nullable public static @Nullable String placeholderAPISetPlaceholders(@NotNull @NotNull org.bukkit.OfflinePlayer player, @NotNull @NotNull String target)Sets the placeholders for the target string using PlaceholderAPI (See PlaceholderAPI on SpigotMC)- Parameters:
player- The player for who to set placeholderstarget- The string to set placeholders in- Returns:
- The string with replaced placeholders or null if PlaceholderAPI is not found
-
placeholderAPITrySetPlaceholders
@NotNull public static @NotNull String placeholderAPITrySetPlaceholders(@NotNull @NotNull org.bukkit.OfflinePlayer player, @NotNull @NotNull String target)Sets the placeholders for the target string using PlaceholderAPI (See PlaceholderAPI on SpigotMC)- Parameters:
player- The player for who to set placeholderstarget- The string to set placeholders in- Returns:
- The string with replaced placeholders or the original string if PlaceholderAPI is not found
-