Class PermissionManager
java.lang.Object
dev.esophose.playerparticles.manager.Manager
dev.esophose.playerparticles.manager.PermissionManager
public class PermissionManager extends Manager
- 
Field Summary
- 
Constructor SummaryConstructors Constructor Description PermissionManager(PlayerParticles playerParticles)
- 
Method SummaryModifier and Type Method Description booleancanClearFixedEffects(PPlayer player)Checks if a player has permission to clear fixed effectsbooleancanOpenGui(PPlayer player)Checks if a player has permission to open the GUIbooleancanOverride(org.bukkit.command.CommandSender sender)Checks if a player can use /ppobooleancanPlayerSaveGroups(PPlayer pplayer)Checks if the given player is able to save groupsbooleancanReloadPlugin(org.bukkit.command.CommandSender sender)Checks if a player has permission to use /pp reloadbooleancanResetOthers(PPlayer player)Checks if a player can reset another offline player's particlesbooleancanTeleportToFixedEffects(PPlayer player)Checks if a player has permission to teleport to fixed effectsbooleancanUseFixedEffects(PPlayer player)Checks if a player has permission to created fixed effectsvoiddisable()Cleans up the Manager's resourcesjava.util.List<java.lang.String>getDisabledWorlds()Gets all the worlds that are disabledjava.util.List<java.lang.String>getEffectNamesUserHasPermissionFor(PPlayer p)Gets a String List of all effect names a player has permission forjava.util.List<ParticleEffect>getEffectsUserHasPermissionFor(PPlayer p)Gets a List of all effects a player has permission forjava.util.List<java.lang.String>getFixableStyleNamesUserHasPermissionFor(PPlayer p)Gets a String List of all fixable style names a player has permission forintgetMaxFixedEffectCreationDistance()Gets the max distance a fixed effect can be created from the playerintgetMaxParticlesAllowed(PPlayer pplayer)Gets the maximum number of particles a player is allowed to usejava.util.List<java.lang.String>getStyleNamesUserHasPermissionFor(PPlayer p)Gets a String List of all style names a player has permission forjava.util.List<ParticleStyle>getStylesUserHasPermissionFor(PPlayer p)Gets a List of all styles a player has permission forbooleanhasEffectPermission(PPlayer player, ParticleEffect effect)Checks if a player has permission to use an effectbooleanhasPermission(PPlayer pplayer, java.lang.String permission)Checks if the given player has the given permissionbooleanhasPlayerReachedMaxFixedEffects(PPlayer pplayer)Checks if the given player has reached the max number of fixed effectsbooleanhasPlayerReachedMaxGroups(PPlayer pplayer)Checks if the given player has reached the max number of saved particle groupsbooleanhasPlayerReachedMaxParticles(PPlayer pplayer)Checks if the given player has reached the max number of particles in their active groupbooleanhasStylePermission(PPlayer player, ParticleStyle style)Checks if a player has permission to use a style Always returns true for 'normal', a player needs at least one style to apply particlesbooleanhasWorldGuardBypass(org.bukkit.entity.Player player)Checks if a player has the WorldGuard bypass permissionbooleanisWorldEnabled(java.lang.String world)Checks if a world is enabled for particles to spawn invoidreload()Reloads the Manager's settings
- 
Constructor Details
- 
Method Details- 
reloadpublic void reload()Description copied from class:ManagerReloads the Manager's settings
- 
disablepublic void disable()Description copied from class:ManagerCleans up the Manager's resources
- 
hasPermissionChecks if the given player has the given permission- Parameters:
- pplayer- The player to check
- permission- The permission to check
- Returns:
- true if the player has the permission, otherwise false
 
- 
hasPlayerReachedMaxParticlesChecks if the given player has reached the max number of particles in their active group- Parameters:
- pplayer- The player to check
- Returns:
- If the player has reached the max number of particles in their active group
 
- 
hasPlayerReachedMaxGroupsChecks if the given player has reached the max number of saved particle groups- Parameters:
- pplayer- The player to check
- Returns:
- If the player has reached the max number of saved particle groups
 
- 
canPlayerSaveGroupsChecks if the given player is able to save groups- Parameters:
- pplayer- The player to check
- Returns:
- If the player has permission to save groups
 
- 
hasPlayerReachedMaxFixedEffectsChecks if the given player has reached the max number of fixed effects- Parameters:
- pplayer- The player to check
- Returns:
- If the player has reached the max number of fixed effects
 
- 
getMaxFixedEffectCreationDistancepublic int getMaxFixedEffectCreationDistance()Gets the max distance a fixed effect can be created from the player- Returns:
- The max distance a fixed effect can be created from the player
 
- 
getMaxParticlesAllowedGets the maximum number of particles a player is allowed to use- Parameters:
- pplayer- The pplayer to check
- Returns:
- The maximum number of particles based on the config.yml value, or unlimited
 
- 
isWorldEnabledpublic boolean isWorldEnabled(java.lang.String world)Checks if a world is enabled for particles to spawn in- Parameters:
- world- The world name to check
- Returns:
- True if the world is disabled
 
- 
getDisabledWorldspublic java.util.List<java.lang.String> getDisabledWorlds()Gets all the worlds that are disabled- Returns:
- All world names that are disabled
 
- 
canResetOthersChecks if a player can reset another offline player's particles- Parameters:
- player- The player to check the permission for
- Returns:
- True if the player has permission, otherwise false
 
- 
hasEffectPermissionChecks if a player has permission to use an effect- Parameters:
- player- The player to check the permission for
- effect- The effect to check
- Returns:
- True if the player has permission to use the effect
 
- 
hasStylePermissionChecks if a player has permission to use a style Always returns true for 'normal', a player needs at least one style to apply particles- Parameters:
- player- The player to check the permission for
- style- The style to check
- Returns:
- If the player has permission to use the style
 
- 
getEffectNamesUserHasPermissionForGets a String List of all effect names a player has permission for- Parameters:
- p- The player to get effect names for
- Returns:
- A String List of all effect names the given player has permission for
 
- 
getStyleNamesUserHasPermissionForGets a String List of all style names a player has permission for- Parameters:
- p- The player to get style names for
- Returns:
- A String List of all style names the given player has permission for
 
- 
getFixableStyleNamesUserHasPermissionForGets a String List of all fixable style names a player has permission for- Parameters:
- p- The player to get style names for
- Returns:
- A String List of all fixable style names the given player has permission for
 
- 
getEffectsUserHasPermissionForGets a List of all effects a player has permission for- Parameters:
- p- The player to get effects for
- Returns:
- A List of all effects the given player has permission for
 
- 
getStylesUserHasPermissionForGets a List of all styles a player has permission for- Parameters:
- p- The player to get styles for
- Returns:
- A List of all styles the given player has permission for
 
- 
canUseFixedEffectsChecks if a player has permission to created fixed effects- Parameters:
- player- The player to check the permission for
- Returns:
- True if the player has permission
 
- 
canClearFixedEffectsChecks if a player has permission to clear fixed effects- Parameters:
- player- The player to check the permission for
- Returns:
- True if the player has permission to use /pp fixed clear
 
- 
canTeleportToFixedEffectsChecks if a player has permission to teleport to fixed effects- Parameters:
- player- The player to check the permission for
- Returns:
- True if the player has permission to use /pp fixed teleport
 
- 
canOpenGuiChecks if a player has permission to open the GUI- Parameters:
- player- The player to check the permission for
- Returns:
- True if the player has permission to open the GUI
 
- 
canReloadPluginpublic boolean canReloadPlugin(org.bukkit.command.CommandSender sender)Checks if a player has permission to use /pp reload- Parameters:
- sender- The sender to check the permission for
- Returns:
- True if the sender has permission to reload the plugin's settings
 
- 
canOverridepublic boolean canOverride(org.bukkit.command.CommandSender sender)Checks if a player can use /ppo- Parameters:
- sender- The CommandSender to check
- Returns:
- If the sender can use /ppo
 
- 
hasWorldGuardBypasspublic boolean hasWorldGuardBypass(org.bukkit.entity.Player player)Checks if a player has the WorldGuard bypass permission- Parameters:
- player- The Player to check
- Returns:
- If the player has the WorldGuard bypass permission
 
 
-