Class Group

java.lang.Object
ua.mcchickenstudio.opencreative.settings.groups.Group

public class Group extends Object

Group

This class represents a player group, that stores fields of limits, modifiers and cooldowns.
  • Constructor Details

    • Group

      public Group(@NotNull @NotNull String name, @NotNull @NotNull org.bukkit.configuration.file.FileConfiguration config)
  • Method Details

    • getName

      public String getName()
      Returns ID of group, that was specified in settings.
      Returns:
      ID of group.
    • getAdvertisementCooldown

      public int getAdvertisementCooldown()
      Returns how much time needs to pass to advertise worlds.
      Returns:
      cooldown of advertising worlds.
    • getChatCooldown

      public int getChatCooldown()
      Returns how much time needs to pass to chat in world.
      Returns:
      cooldown of using local chat.
    • getCreativeChatCooldown

      public int getCreativeChatCooldown()
      Returns how much time needs to pass to chat on server.
      Returns:
      cooldown of using creative chat.
    • getBlocksDuplicationCooldown

      public int getBlocksDuplicationCooldown()
      Returns how much time needs to pass to duplicate coding lines.
      Returns:
      cooldown of duplicating coding lines.
    • getModuleManipulationCooldown

      public int getModuleManipulationCooldown()
      Returns how much time needs to pass to install, or create a module.
      Returns:
      cooldown of module operations.
    • getGenericCommandCooldown

      public int getGenericCommandCooldown()
      Returns how much time needs to pass to use command.
      Returns:
      cooldown of command usage.
    • getWorldDownloadCooldown

      public int getWorldDownloadCooldown()
      Returns how much time needs to pass to download world with /world download.
      Returns:
      cooldown of world downloading.
    • getPrompterUsageCooldown

      public int getPrompterUsageCooldown()
      Returns how much time needs to pass to generate code /env make.
      Returns:
      cooldown of using coding prompter.
    • getWorldSize

      public int getWorldSize()
      Returns size of world, that will be used for setting worlds borders.
      Returns:
      size of world.
    • getWorldsLimit

      public int getWorldsLimit()
      Returns how many worlds player can create.
      Returns:
      limit of worlds.
    • getModulesLimit

      public int getModulesLimit()
      Returns how many modules player can create.
      Returns:
      limit of modules.
    • getVisitorPermissions

      public Set<String> getVisitorPermissions()
      Returns set of permissions, that will be given when player joins the world, but he's not world's builder/developer/owner.
      Returns:
      set of visitor permissions.
    • getBuildPermissions

      public Set<String> getBuildPermissions()
      Returns set of permissions, that will be given when player is a builder of world and the world is in build mode.
      Returns:
      set of build permissions.
    • getDevPermissions

      public Set<String> getDevPermissions()
      Returns set of permissions, that will be given when player is a developer of world, and they entered coding world.
      Returns:
      set of coding permissions.
    • getPlayPermissions

      public Set<String> getPlayPermissions()
      Returns set of permissions, that will be given when player is a developer of world and the world is in play mode.
      Returns:
      set of build permissions.
    • getLobbyPermissions

      public Set<String> getLobbyPermissions()
      Returns set of permissions, that will be given when player connects the lobby world.
      Returns:
      set of lobby permissions.
    • getPermission

      public String getPermission()
      Returns permission node, that player must to have to get this group.
      Returns:
      permission node of group.
    • getLimit

      @NotNull public @NotNull LimitModifier getLimit(LimitType type)
      Returns limit instance for group, that will be used to calculate and check limits.
      Parameters:
      type - type of limit.
      Returns:
      instance of limit.
    • getCodingPlatformsLimit

      public int getCodingPlatformsLimit()
      Returns maximum amount of coding platforms.
      Returns:
      coding platforms limit.
    • getAdvertisementPrice

      public double getAdvertisementPrice()
      Returns amount of money required to advertise world.
      Returns:
      price of world advertisement.
    • getLikeReward

      public double getLikeReward()
      Returns amount of money, that will be given to world's owner, when someone likes their world.
      Returns:
      reward for world's owner for like.
    • canUsePrompter

      public boolean canUsePrompter()
      Checks whether player can use prompt handler with /env make.
      Returns:
      true - allowed to use, false - not enough permissions.
    • getScriptSizeLimit

      public int getScriptSizeLimit()
      Returns maximum size of code script in megabytes.
      Returns:
      script's size limit.