name
stringlengths
12
178
code_snippet
stringlengths
8
36.5k
score
float64
3.26
3.68
AreaShop_FileManager_saveIsRequiredForRegionWorld_rdh
/** * Indicates that a/multiple WorldGuard regions need to be saved. * * @param worldName * The world where the regions that should be saved is in */ public void saveIsRequiredForRegionWorld(String worldName) { worldRegionsRequireSaving.add(worldName); }
3.26
AreaShop_FileManager_getRegionFolder_rdh
/** * Get the folder the region files are located in. * * @return The folder where the region.yml files are in */ public String getRegionFolder() { return regionsPath; }
3.26
AreaShop_FileManager_isBlacklisted_rdh
/** * Check if a region is on the adding blacklist. * * @param region * The region name to check * @return true if the region may not be added, otherwise false */ public boolean isBlacklisted(String region) { for (String line : plugin.getConfig().getStringList("blacklist")) { Pattern pattern = Pattern.compile(l...
3.26
AreaShop_FileManager_getBuy_rdh
/** * Get a buy region. * * @param name * The name of the buy region (will be normalized) * @return BuyRegion if it could be found, otherwise null */public BuyRegion getBuy(String name) { GeneralRegion region = regions.get(name.toLowerCase());if (region instanceof BuyRegion) { return ((BuyRegion) (r...
3.26
AreaShop_FileManager_removeGroup_rdh
/** * Remove a group. * * @param group * Group to remove */ public void removeGroup(RegionGroup group) { groups.remove(group.getLowerCaseName()); groupsConfig.set(group.getLowerCaseName(), null); saveGroupsIsRequired(); }
3.26
AreaShop_FileManager_checkRegionAdd_rdh
/** * Check if a player can add a certain region as rent or buy region. * * @param sender * The player/console that wants to add a region * @param region * The WorldGuard region to add * @param world * The world the ProtectedRegion is located in * @param type * The type the region should have in AreaS...
3.26
AreaShop_FileManager_loadVersions_rdh
/** * Load the file with the versions, used to check if the other files need conversion. */ @SuppressWarnings("unchecked") public void loadVersions() { File file = new File(versionPath); if (file.exists()) { // Load versions from the file try (ObjectInputStream input = new ObjectInputStream(new FileInputStrea...
3.26
AreaShop_FileManager_addRegionNoSave_rdh
/** * Add a region to the list without saving it to disk (useful for loading at startup). * * @param region * The region to add * @return true when successful, otherwise false (denied by an event listener) */ public AddingRegionEvent addRegionNoSave(GeneralRegion region) { AddingRegionEvent event = new Addi...
3.26
AreaShop_FileManager_loadFiles_rdh
/** * Load all files from disk. * * @param thisTick * Load files in the current tick or a tick later * @return true if the files are loaded correctly, otherwise false */ public boolean loadFiles(boolean thisTick) { // Load config.yml + add defaults from .jar boolean result = loadConfigFile(); // Load default.ym...
3.26
AreaShop_FileManager_postUpdateFiles_rdh
/** * Checks for old file formats and converts them to the latest format. * This is to be triggered after the load of the region files. */ private void postUpdateFiles() { Integer fileStatus = versions.get(AreaShop.versionFiles); // If the the files are already the current version if ((fileStatus != null) && (fileS...
3.26
AreaShop_FileManager_getConfig_rdh
/** * Get the config file (config.yml). * * @return YamlConfiguration with the settings of users, with fallback to the settings provided by AreaShop */ public YamlConfiguration getConfig() { return config; }
3.26
AreaShop_FileManager_getRegionNames_rdh
/** * Get a list of names of all regions. * * @return A String list with all the names */ public List<String> getRegionNames() { ArrayList<String> result = new ArrayList<>(); for (GeneralRegion region : getRegions()) { result.add(region.getName()); }return result; }
3.26
AreaShop_FileManager_updateAllRegions_rdh
/** * Update all regions, happens in a task to minimize lag. */ public void updateAllRegions() { updateRegions(getRegions(), null); }
3.26
AreaShop_FileManager_getFallbackRegionSettings_rdh
/** * Get the default regions settings as provided by AreaShop (default.yml). * * @return YamlConfiguration with the default settings */ public YamlConfiguration getFallbackRegionSettings() { return defaultConfigFallback; }
3.26
AreaShop_FileManager_setGroupSetting_rdh
/** * Set a setting for a group. * * @param group * The group to set it for * @param path * The path to set * @param setting * The value to set */ public void setGroupSetting(RegionGroup group, String path, Object setting) { groupsConfig.set((group.getName().toLowerCase() + ".") + path, setting); }
3.26
AreaShop_FileManager_sendRentExpireWarnings_rdh
/** * Send out rent expire warnings. */ public void sendRentExpireWarnings() { Do.forAll(plugin.getConfig().getInt("expireWarning.regionsPerTick"), getRents(), RentRegion::sendExpirationWarnings); }
3.26
AreaShop_FileManager_getBuyNames_rdh
/** * Get a list of names of all buy regions. * * @return A String list with all the names */ public List<String> getBuyNames() { ArrayList<String> result = new ArrayList<>(); for (BuyRegion region : getBuys()) { result.add(region.getName()); } return result; }
3.26
AreaShop_FileManager_markGroupsAutoDirty_rdh
/** * Mark all RegionGroups that they should regenerate regions. */ public void markGroupsAutoDirty() { for (RegionGroup group : getGroups()) { group.autoDirty(); } }
3.26
AreaShop_FileManager_isSaveGroupsRequired_rdh
/** * Check if saving the groups file is required. * * @return true if changes are made and saving is required, otherwise false */ public boolean isSaveGroupsRequired() { return saveGroupsRequired; }
3.26
AreaShop_FileManager_loadConfigFile_rdh
/** * Load the default.yml file * * @return true if it has been loaded successfully, otherwise false */ public boolean loadConfigFile() { boolean result = true; File configFile = new File(configPath); // Safe the file from the jar to disk if it does not exist if (!configFile.exists()) { try (InputStream input =...
3.26
AreaShop_Manager_shutdown_rdh
/** * Called at shutdown of the plugin. */ public void shutdown() { // To override by extending classes }
3.26
AreaShop_TeleportCommand_canUse_rdh
/** * Check if a person can teleport to the region (assuming he is not teleporting to a sign). * * @param person * The person to check * @param region * The region to check for * @return true if the person can teleport to it, otherwise false */ public static boolean canUse(CommandSender person, GeneralRegi...
3.26
AreaShop_GithubUpdateCheck_hasUpdate_rdh
/** * Check if an update has been found. * * @return true if an update has been found */ public boolean hasUpdate() { return hasUpdate; }
3.26
AreaShop_GithubUpdateCheck_m0_rdh
/** * Get the current version. * * @return Current version of the plugin */ public String m0() { return currentVersion;}
3.26
AreaShop_GithubUpdateCheck_hasFailed_rdh
/** * Check if the update check failed. * * @return true if the update check failed (an error message has been logged) */ public boolean hasFailed() { return error; }
3.26
AreaShop_GithubUpdateCheck_getRepository_rdh
/** * Get the repository that this update checker is checking. * * @return Used repository */ public String getRepository() { return repository; }
3.26
AreaShop_GithubUpdateCheck_isChecking_rdh
/** * Check if an update check is running. * * @return true if an update check is running */ public boolean isChecking() { return checking; }
3.26
AreaShop_GithubUpdateCheck_getLatestVersion_rdh
/** * Get the latest version. * * @return Latest version of the plugin (if checking is complete) */ public String getLatestVersion() { return latestVersion; }
3.26
AreaShop_GithubUpdateCheck_getAuthor_rdh
/** * Get the author that this update checker is checking. * * @return Used author */ public String getAuthor() { return author; }
3.26
AreaShop_GithubUpdateCheck_checkUpdate_rdh
/** * Check if an update is available. * * @param callback * Callback to execute when the update check is done * @return GithubUpdateCheck containing the status of the check */ public GithubUpdateCheck checkUpdate(UpdateCallback callback) { checking = true; final ...
3.26
AreaShop_GithubUpdateCheck_withVersionComparator_rdh
/** * Change the version comparator. * * @param versionComparator * VersionComparator to use for checking if one version is newer than the other * @return this */ public GithubUpdateCheck withVersionComparator(VersionComparator versionComparator) { this.versionComparator = versionComparator; return this...
3.26
AreaShop_GithubUpdateCheck_debug_rdh
/** * Print a debug message if DEBUG is enabled. * * @param message * Message to print */ private void debug(Object... message) { if (DEBUG) { logger.info((("[" + this.getClass().getSimpleName()) + "] [DEBUG] ") + StringUtils.join(message, " ")); } }
3.26
AreaShop_Value_get_rdh
/** * Get the stored content. * * @return The stored content */ public T get() { return content; }
3.26
AreaShop_Value_set_rdh
/** * Set the content. * * @param value * The new content */public void set(T value) { this.content = value; }
3.26
AreaShop_CancellableRegionEvent_allow_rdh
/** * Let the event continue, possible overwriting a cancel() call from another plugin. */ public void allow() { this.cancelled = false; this.reason = null; }
3.26
AreaShop_CancellableRegionEvent_isCancelled_rdh
/** * Check if the event has been cancelled. * * @return true if the event has been cancelled, otherwise false */ public boolean isCancelled() { return f0; }
3.26
AreaShop_CancellableRegionEvent_cancel_rdh
/** * Cancel the event from happening. * * @param reason * The reason of cancelling, used for display to the user, should end with a dot */ public void cancel(String reason) { this.cancelled = true; this.reason = reason; }
3.26
AreaShop_CancellableRegionEvent_getReason_rdh
/** * Get the reason why this event is cancelled. * * @return null if there is no reason or the event is not cancelled, otherwise a string */ public String getReason() { return reason; }
3.26
AreaShop_RegionEvent_m0_rdh
// Required by Bukkit/Spigot public static HandlerList m0() { return handlers; }
3.26
AreaShop_RegionEvent_getRegion_rdh
/** * Get the region of this event. * * @return The region the event is about */ public T getRegion() { return region; }
3.26
AreaShop_ResellingRegionEvent_getBuyer_rdh
/** * Get the player that is trying to buy the region. * * @return The player that is trying to buy the region */ public OfflinePlayer getBuyer() { return player; }
3.26
AreaShop_GeneralRegion_getMaximumPoint_rdh
/** * Get the maximum corner of the region. * * @return Vector */ public Vector getMaximumPoint() { return plugin.getWorldGuardHandler().getMaximumPoint(getRegion()); }
3.26
AreaShop_GeneralRegion_getFriendsFeature_rdh
/** * Get the friends feature to query and manipulate friends of this region. * * @return The FriendsFeature of this region */ public FriendsFeature getFriendsFeature() { return getFeature(FriendsFeature.class); }
3.26
AreaShop_GeneralRegion_resetRegionFlags_rdh
/** * Reset all flags of the region. */ public void resetRegionFlags() { ProtectedRegion region = getRegion(); if (region != null) { region.setFlag(plugin.getWorldGuardHandler().fuzzyMatchFlag("greeting"), null); region.setFlag(plugin.getWorldGuardHandler().fuzzyMatchFlag("farewell"), null);...
3.26
AreaShop_GeneralRegion_setOwner_rdh
/** * Change the owner of the region. * * @param player * The player that should be the owner */ public void setOwner(UUID player) { if (this instanceof RentRegion) { ((RentRegion) (this)).setRenter(player); } else { ((BuyRegion) (this)).setBuyer(player); } }
3.26
AreaShop_GeneralRegion_getLowerCaseName_rdh
/** * Get the lowercase region name. * * @return The region name in lowercase */ public String getLowerCaseName() {return getName().toLowerCase(); }
3.26
AreaShop_GeneralRegion_getBooleanSetting_rdh
// CONFIG /** * Get a boolean setting for this region, defined as follows * - If the region has the setting in its own file (/regions/regionName.yml), use that * - If the region has groups, use the setting defined by the most important group, if any * - Otherwise fallback to the default.yml file setting * * @para...
3.26
AreaShop_GeneralRegion_matchesLimitGroup_rdh
/** * Check if this region matches the filters of a limit group. * * @param group * The group to check * @return true if the region applies to the limit group, otherwise false */ public boolean matchesLimitGroup(String group) { List<String> worlds = plugin.getConfig().getStringList(("limitGroups." + group)...
3.26
AreaShop_GeneralRegion_getConfig_rdh
/** * Get the config file that is used to store the region information. * * @return The config file that stores the region information */ public YamlConfiguration getConfig() { return config; }
3.26
AreaShop_GeneralRegion_restoreRegionBlocks_rdh
/** * Restore all blocks in a region for restoring later. * * @param fileName * The name of the file to save to (extension and folder will be added) * @return true if the region has been restored properly, otherwise false */ public boolean restoreRegionBlocks(String fileName) { if (getRegion() == null) { ...
3.26
AreaShop_GeneralRegion_actionAllowed_rdh
/** * Check if the action is allowed. * * @return true if the actions is allowed, otherwise false */ public boolean actionAllowed() { return actionAllowed; }
3.26
AreaShop_GeneralRegion_getStringSetting_rdh
/** * Get a string setting for this region, defined as follows * - If the region has the setting in its own file (/regions/regionName.yml), use that * - If the region has groups, use the setting defined by the most important group, if any * - Otherwise fallback to the default.yml file setting * * @param path * ...
3.26
AreaShop_GeneralRegion_saveRegionBlocks_rdh
/** * Save all blocks in a region for restoring later. * * @param fileName * The name of the file to save to (extension and folder will be added) * @return true if the region has been saved properly, otherwise false */ public boolean saveRegionBlocks(String fileName) { // Check if the region is correct ...
3.26
AreaShop_GeneralRegion_getVolume_rdh
/** * Get the volume of the region (number of blocks inside it). * * @return Number of blocks in the region */ public long getVolume() { // Cache volume, important for polygon regions if (volume < 0) { volume = calculateVolume(); } return volume;}
3.26
AreaShop_GeneralRegion_isRestoreEnabled_rdh
/** * Check if restoring is enabled. * * @return true if restoring is enabled, otherwise false */ public boolean isRestoreEnabled() { return getBooleanSetting("general.enableRestore"); }
3.26
AreaShop_GeneralRegion_getHeight_rdh
/** * Get the height of the region (y-axis). * * @return The height of the region (y-axis) */@Override public int getHeight() { if (getRegion() == null) { return 0; } return (getMaximumPoint().getBlockY() - getMinimumPoint().getBlockY()) + 1; }
3.26
AreaShop_GeneralRegion_setSetting_rdh
/** * Set a setting in the file of the region itself. * * @param path * The path to set * @param value * The value to set it to, null to remove the setting */ public void setSetting(String path, Object value) { config.set(path, value); this.saveRequired(); }
3.26
AreaShop_GeneralRegion_needsPeriodicUpdate_rdh
/** * Check if a sign needs periodic updating. * * @return true if the signs of this region need periodic updating, otherwise false */public boolean needsPeriodicUpdate() { return (!(isDeleted() || (!(this instanceof RentRegion)))) && getSignsFeature().needsPeriodicUpdate(); }
3.26
AreaShop_GeneralRegion_getGroupNames_rdh
/** * Get a list of names from groups this region is in. * * @return A list of groups this region is part of */public List<String> getGroupNames() { List<String> result = new ArrayList<>(); for (RegionGroup group : getGroups()) { result.add(group.getName()); } return result; }
3.26
AreaShop_GeneralRegion_isOwner_rdh
/** * Check if the players is owner of this region. * * @param player * Player to check ownership for * @return true if the player currently rents or buys this region */ public boolean isOwner(UUID player) { return ((this instanceof RentRegion) && ((RentRegion) (this)).isRenter(player)) || ((this instanc...
3.26
AreaShop_GeneralRegion_calculateVolume_rdh
/** * Calculate the volume of the region (could be expensive for polygon regions). * * @return Number of blocks in the region */ private long calculateVolume() { // Use own calculation for polygon regions, as WorldGuard does not implement it and returns 0 ProtectedRegion region = getRegion(); if (region...
3.26
AreaShop_GeneralRegion_setRestoreSetting_rdh
/** * Change the restore setting. * * @param restore * true, false or general */ public void setRestoreSetting(Boolean restore) { setSetting("general.enableRestore", restore); }
3.26
AreaShop_GeneralRegion_setLandlord_rdh
/** * Set the landlord of this region (the player that receives all revenue of this region). * * @param landlord * The UUID of the player that should be set as landlord * @param name * The backup name of the player (for in case that the UUID cannot be resolved to a playername) */ public void setLandlord(UUID...
3.26
AreaShop_GeneralRegion_removelandlord_rdh
/** * Remove the landlord from this region. */ public void removelandlord() { setSetting("general.landlord", null); setSetting("general.landlordName", null); }
3.26
AreaShop_GeneralRegion_getFeature_rdh
/** * Get a feature of this region. * * @param clazz * The class of the feature to get * @param <T> * The feature to get * @return The feature (either just instantiated or cached) */ public <T extends RegionFeature> T getFeature(Class<T> clazz) { RegionFeature result = features.get(clazz); if (resul...
3.26
AreaShop_GeneralRegion_update_rdh
/** * Broadcast an event to indicate that region settings have been changed. * This will update region flags, signs, etc. */ public void update() { Bukkit.getServer().getPluginManager().callEvent(new UpdateRegionEvent(this)); }
3.26
AreaShop_GeneralRegion_setDeleted_rdh
/** * Indicate that this region has been deleted. */ public void setDeleted() { deleted = true; }
3.26
AreaShop_GeneralRegion_getLongSetting_rdh
/** * Get a long setting for this region, defined as follows * - If the region has the setting in its own file (/regions/regionName.yml), use that * - If the region has groups, use the setting defined by the most important group, if any * - Otherwise fallback to the default.yml file setting * * @param path * T...
3.26
AreaShop_GeneralRegion_setup_rdh
/** * Shared setup of all constructors. */ public void setup() { features = new HashMap<>(); }
3.26
AreaShop_GeneralRegion_getFileManager_rdh
/** * Get the FileManager from the plugin. * * @return The FileManager (responsible for saving/loading regions and getting them) */ public FileManager getFileManager() { return plugin.getFileManager(); }
3.26
AreaShop_GeneralRegion_getName_rdh
/** * Get the name of the region. * * @return The region name */ @Override public String getName() { return config.getString("general.name"); }
3.26
AreaShop_GeneralRegion_notifyAndUpdate_rdh
/** * Broadcast the given event and update the region status. * * @param event * The update event that should be broadcasted */ public void notifyAndUpdate(NotifyRegionEvent event) { Bukkit.getPluginManager().callEvent(event); update(); }
3.26
AreaShop_GeneralRegion_getConfigurationSectionSetting_rdh
/** * Get a configuration section setting for this region, defined as follows * - If earlyResult is non-null, use that * - Else if the region has the setting in its own file (/regions/regionName.yml), use that * - Else if the region has groups, use the setting defined by the most important group, if any * - Otherw...
3.26
AreaShop_GeneralRegion_getLimitingGroup_rdh
/** * Get the name of the group that is limiting the action, assuming actionAllowed() is false. * * @return The name of the group */ public String getLimitingGroup() { return limitingGroup; }
3.26
AreaShop_GeneralRegion_getIntegerSetting_rdh
/** * Get a boolean setting for this region, defined as follows * - If the region has the setting in its own file (/regions/regionName.yml), use that * - If the region has groups, use the setting defined by the most important group, if any * - Otherwise fallback to the default.yml file setting * * @param path * ...
3.26
AreaShop_GeneralRegion_getSignsFeature_rdh
/** * Get the signs feature to manipulate and update signs. * * @return The SignsFeature of this region */ public SignsFeature getSignsFeature() { return getFeature(SignsFeature.class); }
3.26
AreaShop_GeneralRegion_getWidth_rdh
/** * Get the width of the region (x-axis). * * @return The width of the region (x-axis) */ @Override public int getWidth() { if (getRegion() == null) { return 0; ...
3.26
AreaShop_GeneralRegion_isDeleted_rdh
// GETTERS /** * Check if the region has been deleted. * * @return true if the region has been deleted, otherwise false */ public boolean isDeleted() { return deleted; }
3.26
AreaShop_GeneralRegion_getOwner_rdh
/** * Get the player that is currently the owner of this region (either bought or rented it). * * @return The UUID of the owner of this region */ public UUID getOwner() { if (this instanceof RentRegion) { return ((RentRegion) (this)).getRenter(); } else { return ((BuyRegion) (this)).getBuyer...
3.26
AreaShop_GeneralRegion_compareTo_rdh
// Sorting by name /** * Compare this region to another region by name. * * @param o * The region to compare to * @return 0 if the names are the same, below zero if this region is earlier in the alphabet, otherwise above zero */ @Override public int compareTo(GeneralRegion o) { return getName().compareTo(o....
3.26
AreaShop_GeneralRegion_handleSchematicEvent_rdh
/** * Checks an event and handles saving to and restoring from schematic for it. * * @param type * The type of event ...
3.26
AreaShop_GeneralRegion_runCommands_rdh
// COMMAND EXECUTING /** * Run commands as the CommandsSender, replacing all tags with the relevant values. * * @param sender * The sender that should perform the command * @param commands * A list of the commands to run (without slash and with tags) */ public void runCommands(CommandSender sender, List<Str...
3.26
AreaShop_GeneralRegion_isSaveRequired_rdh
/** * Check if a save is required. * * @return true if a save is required because some data changed, otherwise false */ public boolean isSaveRequired() { return saveRequired && (!isDeleted()); }
3.26
AreaShop_GeneralRegion_restrictedToRegion_rdh
/** * Check if for renting this region you should be inside of it. * * @return true if you need to be inside, otherwise false */ public boolean restrictedToRegion() { ...
3.26
AreaShop_GeneralRegion_getTeleportFeature_rdh
/** * Get the teleport feature to teleport players to the region and signs. * * @return The TeleportFeature */ public TeleportFeature getTeleportFeature() { return getFeature(TeleportFeature.class); }
3.26
AreaShop_GeneralRegion_saveRequired_rdh
/** * Indicate this region needs to be saved, saving will happen by a repeating task. */public void saveRequired() { saveRequired = true; }
3.26
AreaShop_GeneralRegion_destroy_rdh
/** * Deregister everything. */ public void destroy() { for (RegionFeature feature : features.values()) { feature.shutdown(); } }
3.26
AreaShop_GeneralRegion_getGroups_rdh
/** * Get the groups that this region is added to. * * @return A Set with all groups of this region */ public Set<RegionGroup> getGroups() { Set<RegionGroup> result = new HashSet<>(); for (RegionGroup group : plugin.getFileManager().getGroups()) { if (group.isMember(this)) { result.add...
3.26
AreaShop_GeneralRegion_getWorld_rdh
/** * Get the World of the region. * * @return The World where the region is located */ @Override public World getWorld() { return Bukkit.getWorld(getWorldName()); }
3.26
AreaShop_GeneralRegion_getWorldName_rdh
/** * Get the name of the world where the region is located. * * @return The name of the world of the region */ @Override public String getWorldName() { return getStringSetting("general.world"); }
3.26
AreaShop_GeneralRegion_isLandlord_rdh
/** * Check if the specified player is the landlord of this region. * * @param landlord * The UUID of the players to check for landlord * @return true if the player is the landlord, otherwise false */ public boolean isLandlord(UUID landlord) { return ((landlord != null) && (getLandlord() != null)) && getLa...
3.26
AreaShop_GeneralRegion_getLimitingFactor_rdh
/** * Get the type of the factor that is limiting the action, assuming actionAllowed() is false. * * @return The type of the limiting factor ...
3.26
AreaShop_GeneralRegion_restrictedToWorld_rdh
/** * Check if for renting you need to be in the correct world. * * @return true if you need to be in the same world as the region, otherwise false */ public boolean restrictedToWorld() { return getBooleanSetting("general.restrictedToWorld") || restrictedToRegion(); }
3.26
AreaShop_GeneralRegion_m0_rdh
/** * Method to send a message to a CommandSender, using chatprefix if it is a player. * Automatically includes the region in the message, enabling the use of all variables. * * @param target * The CommandSender you wan't to send the message to (e.g. a player) * @param key * The key to get the translation *...
3.26
AreaShop_GeneralRegion_limitsAllow_rdh
/** * Check if the player can buy/rent this region, detailed info in the result object. * * @param type * The type of region to check * @param offlinePlayer * The player to check it for * @param extend * Check for extending of rental regions * @return LimitResult containing if it is allowed, why and limi...
3.26
AreaShop_GeneralRegion_getDepth_rdh
/** * Get the depth of the region (z-axis). * * @return The depth of the region (z-axis) */ @Override public int getDepth() { if (getRegion() == null) { return 0; } return (getMaximumPoint().getBlockZ() - getMinimumPoint().getBlockZ()) + 1; }
3.26
AreaShop_GeneralRegion_limitGroupsOfSameCategory_rdh
/** * Checks if two limitGroups are of the same category (same groups and worlds lists). * * @param firstGroup * The first group * @param secondGroup * The second group * @return true if the groups and worlds lists are the same, otherwise false */ private boolean limitGroupsOfSameCategory(String firstGroup,...
3.26
AreaShop_GeneralRegion_updateLastActiveTime_rdh
/** * Set the last active time of the player to the current time. */ public void updateLastActiveTime() { if (getOwner() != null) { setSetting("general.lastActive", Calendar.getInstance().getTimeInMillis()); } }
3.26
AreaShop_GeneralRegion_getLandlordName_rdh
/** * Get the name of the landlord. * * @return The name of the landlord, if unavailable by UUID it will return the old cached name, if that is unavailable it will return &lt;UNKNOWN&gt; */ public String getLandlordName() { String result = Utils.toName(getLandlord()); if ((result == null) || result.isEmpty(...
3.26
AreaShop_GeneralRegion_getLastActiveTime_rdh
/** * Get the time that the player was last active. * * @return Current time if he is online, last online time if offline, -1 if the region has no owner */public long getLastActiveTime() { if (getOwner() == null) { return -1; } Player player = Bukkit.getPlayer(getOwner()); long savedTime...
3.26