name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
AreaShop_GeneralRegion_getCurrent_rdh | /**
* Get the current number of regions in the group that is the limiting factor, assuming actionAllowed() is false.
*
* @return The current number of regions the player has
*/
public int getCurrent() {
return current;
} | 3.26 |
AreaShop_GeneralRegion_getStringListSetting_rdh | /**
* Get a string list 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_getLandlord_rdh | /**
* Get the landlord of this region (the player that receives any revenue from this region).
*
* @return The UUID of the landlord of this region
*/
public UUID getLandlord() {
String landlord = getStringSetting("general.landlord");
if ((landlord != null) && (!landlord.isEmpty())) {
try {return UUI... | 3.26 |
AreaShop_GeneralRegion_saveNow_rdh | /**
* Save this region to disk now, using this method could slow down the plugin, normally saveRequired() should be used.
*
* @return true if the region is saved successfully, otherwise false
*/
public boolean saveNow() {
if (isDeleted()) {return false;
}
saveRequired = false;File file = new File(((pl... | 3.26 |
AreaShop_GeneralRegion_getRegion_rdh | /**
* Get the WorldGuard region associated with this AreaShop region.
*
* @return The ProtectedRegion of WorldGuard or null if the region does not exist anymore
*/
@Override
public ProtectedRegion getRegion() {
if ((((getWorld() == null) || (plugin.getWorldGuard() == null)) || (plugin.getRegionManager(getWorl... | 3.26 |
AreaShop_GeneralRegion_getMinimumPoint_rdh | /**
* Get the minimum corner of the region.
*
* @return Vector
*/
public Vector getMinimumPoint() {
return plugin.getWorldGuardHandler().getMinimumPoint(getRegion());
} | 3.26 |
AreaShop_GeneralRegion_getDoubleSetting_rdh | /**
* Get a double setting for this region, defined as follows
* - If the region has the setting in its own file (/regions/regionName.yml), use that
* - If t... | 3.26 |
AreaShop_SoldRegionEvent_getOldBuyer_rdh | /**
* Get the player that the region is sold for.
*
* @return The UUID of the player that the region is sold for
*/
public UUID getOldBuyer() {
return oldBuyer;
} | 3.26 |
AreaShop_SoldRegionEvent_getRefundedMoney_rdh | /**
* Get the amount that is paid back to the player.
*
* @return The amount of money paid back to the player
*/
public double getRefundedMoney() {
return refundedMoney;
} | 3.26 |
AreaShop_RentRegion_extend_rdh | /**
* Try to extend the rent for the current owner, respecting all restrictions.
*
* @return true if successful, otherwise false
*/
public boolean extend() {
if (!isRented()) {
return false;
}
OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(getRenter());
return (offlinePlayer != null) && rent(offlinePlayer);
... | 3.26 |
AreaShop_RentRegion_unRent_rdh | /**
* Unrent a region, reset to unrented.
*
* @param giveMoneyBack
* true if money should be given back to the player, false otherwise
* @param executor
* The CommandSender that should get the cancelled message if there is any, or null
* @return true if unrenting succeeded, othwerwise false
*/
@SuppressWarn... | 3.26 |
AreaShop_RentRegion_sendExpirationWarnings_rdh | /**
* Send the expiration warnings from the selected profile which is specified in the config.
* Sends all warnings since previous call until (now + normal delay), delay can be found in the config as well.
*/
public void sendExpirationWarnings() {
// Send from warningsDoneUntil to current+delay
if (isDeleted() || (!... | 3.26 |
AreaShop_RentRegion_getFormattedPrice_rdh | /**
* Get the formatted string of the price (includes prefix and suffix).
*
* @return The formatted string of the price
*/
public String getFormattedPrice() {
return Utils.formatCurrency(getPrice());
} | 3.26 |
AreaShop_RentRegion_setRentedUntil_rdh | /**
* Set the time until the region is rented (milliseconds from 1970, system time).
*
* @param rentedUntil
* The time until the region is rented
*/public void setRentedUntil(Long rentedUntil) {
if (rentedUntil == null) {
setSetting("rent.rentedUntil", null);
} else {setSetting("rent.rentedUntil"... | 3.26 |
AreaShop_RentRegion_getDuration_rdh | /**
* Get the duration of 1 rent period.
*
* @return The duration in milliseconds of 1 rent period
*/
public long getDuration() { return Utils.durationStringToLong(getDurationString());} | 3.26 |
AreaShop_RentRegion_getPlayerName_rdh | /**
* Get the name of the player renting this region.
*
* @return Name of the player renting this region, if unavailable by UUID it will return the old cached name, if that is unavailable it will return <UNKNOWN>
*/
public String getPlayerName() {
String result = Utils.toName(getRenter());
if ((result... | 3.26 |
AreaShop_RentRegion_getTimesExtended_rdh | /**
* Get how many times the rent has already been extended.
*
* @return The number of times extended
*/
public int getTimesExtended() {
return config.getInt("rent.timesExtended");
} | 3.26 |
AreaShop_RentRegion_getRenter_rdh | /**
* Get the UUID of the player renting the region.
*
* @return The UUID of the renter
*/
public UUID getRenter() {
String renter = config.getString("rent.renter");
if (renter != null) {
try
{
return UUID.fromString(renter);
} catch (IllegalArgumentException e) {
... | 3.26 |
AreaShop_RentRegion_getPrice_rdh | /**
* Get the price of the region.
*
* @return The price of the region
*/
public double getPrice() {
return Math.max(0, Utils.evaluateToDouble(getStringSetting("rent.price"), this));
} | 3.26 |
AreaShop_RentRegion_getMaxRentTime_rdh | /**
* Get the maximum time the player can rent the region in advance (milliseconds).
*
* @return The maximum rent time in milliseconds
*/
public long getMaxRentTime() {
return Utils.getDurationFromMinutesOrStringInput(getStringSetting("rent.maxRentTime"));
} | 3.26 |
AreaShop_RentRegion_getInactiveTimeUntilUnrent_rdh | /**
* Minutes until automatic unrent when player is offline.
*
* @return The number of milliseconds until the region is unrented while player is offline
*/
public long getInactiveTimeUntilUnrent() {
return Utils.getDurationFromMinutesOrStringInput(getStringSetting("rent.inactiveTimeUntilUnrent"));
} | 3.26 |
AreaShop_RentRegion_setRenter_rdh | /**
* Set the renter of this region.
*
* @param renter
* The UUID of the player that should be set as the renter
*/
public void setRenter(UUID renter) {
if (renter == null) {
setSetting("rent.renter", null);
setSetting("rent.renterName", null);
} else {
setSetting("rent.renter", ... | 3.26 |
AreaShop_RentRegion_getTimeLeft_rdh | /**
* Get the time that is left on the region.
*
* @return The time left on the region
*/
public long getTimeLeft() {
if (isRented()) {
return this.getRentedUntil() - Calendar.getInstance().getTimeInMillis();
} else {
return 0;
}
} | 3.26 |
AreaShop_RentRegion_getRentedUntil_rdh | /**
* Get the time until this region is rented (time from 1970 epoch).
*
* @return The epoch time until which this region is rented
*/
public long getRentedUntil() {
return getLongSetting("rent.rentedUntil");
} | 3.26 |
AreaShop_RentRegion_getDurationString_rdh | /**
* Get the duration string, includes 'number indentifier'.
*
* @return The duration string
*/
public String getDurationString() {
return getStringSetting("rent.duration");
} | 3.26 |
AreaShop_RentRegion_getMoneyBackPercentage_rdh | /**
* Get the moneyBack percentage.
*
* @return The % of money the player will get back when unrenting
*/public double getMoneyBackPercentage() {
return Utils.evaluateToDouble(getStringSetting("rent.moneyBack"), this);
} | 3.26 |
AreaShop_RentRegion_setDuration_rdh | /**
* Set the duration of the rent.
*
* @param duration
* The duration of the rent (as specified on the documentation pages)
*/
public void setDuration(String duration) {
setSetting("rent.duration", duration);
} | 3.26 |
AreaShop_RentRegion_setTimesExtended_rdh | /**
* Set the number of times the region has been extended.
*
* @param times
* The number of times the region has been extended
*/
public void setTimesExtended(int times) {
if (times < 0) {
setSetting("rent.timesExtended", null);
} else {
setSet... | 3.26 |
AreaShop_RentRegion_rent_rdh | /**
* Rent a region.
*
* @param offlinePlayer
* The player that wants to rent the region
* @return true if it succeeded and false if not
*/public boolean rent(OfflinePlayer offlinePlayer) {
if (plugin.getEconomy() == null) {
message(offlinePlayer, "general-noEconomy");
return false;
}
// Check if the player ha... | 3.26 |
AreaShop_RentRegion_checkExpiration_rdh | /**
* Check if the rent should expire.
*
* @return true if the rent has expired and has been unrented, false otherwise
*/
public boolean checkExpiration() {
long now
= Calendar.getInstance().getTimeInMillis();
if (((!isDeleted()) &... | 3.26 |
AreaShop_RentRegion_getMaxExtends_rdh | /**
* Get the max number of extends of this region.
*
* @return -1 if infinite otherwise the maximum number
*/
public int getMaxExtends() {
return getIntegerSetting("rent.maxExtends");
} | 3.26 |
AreaShop_RentRegion_setPrice_rdh | /**
* Change the price of the region.
*
* @param price
* The price of the region
*/
public void setPrice(Double price) {setSetting("rent.price", price);
} | 3.26 |
AreaShop_RentRegion_isRenter_rdh | /**
* Check if a player is the renter of this region.
*
* @param player
* Player to check
* @return true if this player rents this region, otherwise false
*/
public boolean isRenter(Player player) {return (player != null) && isRenter(player.getUniqueId());
} | 3.26 |
AreaShop_FriendsFeature_deleteFriend_rdh | /**
* Delete a friend from the region.
*
* @param player
* The UUID of the player to delete
* @param by
* The CommandSender that is adding the friend, or null
* @return true if the friend has been added, false if adding a friend was cancelled by another plugin
*/
public boolean deleteFriend(UUID player, Com... | 3.26 |
AreaShop_FriendsFeature_getFriendNames_rdh | /**
* Get the list of friends added to this region.
*
* @return Friends added to this region
*/
public Set<String> getFriendNames() {
HashSet<String> result = new HashSet<>();
for (UUID
friend :
getFriends()) {
OfflinePlayer player = Bukkit.getOfflinePlayer(friend);
if ((player != n... | 3.26 |
AreaShop_FriendsFeature_clearFriends_rdh | /**
* Remove all friends that are added to this region.
*/
public void clearFriends() {getRegion().setSetting("general.friends", null);
} | 3.26 |
AreaShop_FriendsFeature_addFriend_rdh | /**
* Add a friend to the region.
*
* @param player
* The UUID of the player to add
* @param by
* The CommandSender that is adding the friend, or null
* @return true if the friend has been added, false if adding a friend was cancelled by another plugin
*/
public boolean addFriend(UUID player, CommandSender ... | 3.26 |
AreaShop_FriendsFeature_getFriends_rdh | /**
* Get the list of friends added to this region.
*
* @return Friends added to this region
*/
public Set<UUID> getFriends() {
HashSet<UUID> result = new HashSet<>();
for (String friend : getRegion().getConfig().getStringList("general.friends")) {
try {
UUID id = UUID.fromString(friend... | 3.26 |
AreaShop_ImportJob_loadConfiguration_rdh | /**
* Load a YamlConfiguration from disk using UTF-8 encoding.
*
* @param from
* File to read the configuration from
* @return YamlConfiguration if the file exists and got read wihout problems, otherwise null
*/
private YamlConfiguration loadConfiguration(File from) {
try (InputStreamReader reader
= new... | 3.26 |
AreaShop_ImportJob_execute_rdh | /**
* Execute the job.
*/
private void execute() {
// Check for RegionForSale data
File regionForSaleFolder = new File(f0.getDataFolder().getParentFile().getAbsolutePath(), "RegionForSale");
if (!regionForSaleFolder.exists()) {
message("import-noPluginFolder", regionForSaleFolder.getName());
... | 3.26 |
AreaShop_ImportJob_messageNoPrefix_rdh | /**
* Send a message to a target without a prefix.
*
* @param key
* The key of the language string
* @param replacements
* The replacements to insert in the message
*/
public void messageNoPrefix(String key, Object... replacements) {
f0.messageNoPrefix(sender, key, replacements);
if (!(sender insta... | 3.26 |
AreaShop_ImportJob_message_rdh | /**
* Send a message to a target, prefixed by the default chat prefix.
*
* @param key
* The key of the language string
* @param replacements
* The replacements to insert in the message
*/
public void message(String key, Object... replacements) {f0.message(sender, key, replacements);
if (!(sender instance... | 3.26 |
AreaShop_ImportJob_importRegionSettings_rdh | /**
* Import region specific settings from a RegionForSale source to an AreaShop target ConfigurationSection.
*
* @param from
* RegionForSale config section that specifies region settings
* @param to
* AreaShop config section that specifies region settings
* @param region
* GeneralRegion to copy settings ... | 3.26 |
AreaShop_ImportJob_minutesToString_rdh | /**
* Convert minutes to a human-readable string.
*
* @param minutes
* Value to convert
* @return String that represents the same length of time in a readable format, like "1 day", "5 minutes", "3 months"
*/
private String minutesToString(long minutes) {
// If the specified number of minutes can map nicely ... | 3.26 |
AreaShop_RegionFeature_listen_rdh | /**
* Start listening to events.
*/
public void listen() {
plugin.getServer().getPluginManager().registerEvents(this,
plugin);
} | 3.26 |
AreaShop_RegionFeature_setRegion_rdh | /**
* Set the region for this feature.
*
* @param region
* Feature region
*/
public void setRegion(GeneralRegion region) {
this.region = region;
} | 3.26 |
AreaShop_RegionFeature_getRegion_rdh | /**
* Get the region of this feature.
*
* @return region of this feature, or null if generic
*/
public GeneralRegion getRegion() {
return region;
} | 3.26 |
AreaShop_RegionFeature_shutdownFeature_rdh | /**
* Destroy the feature and deregister everything.
*/public void shutdownFeature() {
HandlerList.unregisterAll(this);
shutdown();} | 3.26 |
AreaShop_ImportCommand_execute_rdh | // TODO:
// - Landlord?
// - Friends
// - Region flags?
// - Settings from the 'permissions' section in RegionForSale/config.yml?
@Override
public void execute(CommandSender sender, String[] args) {
if (!sender.hasPermission("areashop.import")) {
plugin.message(sender, "import-noPermission");
ret... | 3.26 |
AreaShop_WorldEditSelection_getMaximumLocation_rdh | /**
* Get the maximum Location of the selection.
*
* @return Location with the highest x, y and z
*/
public Location getMaximumLocation() {
return maximum;} | 3.26 |
AreaShop_WorldEditSelection_getWidth_rdh | /**
* Get X-size.
*
* @return width
*/
public int getWidth() {
return (maximum.getBlockX() - minimum.getBlockX()) + 1;} | 3.26 |
AreaShop_WorldEditSelection_getMinimumLocation_rdh | /**
* Get the minimum Location of the selection.
*
* @return Location with the lowest x, y and z
*/
public Location getMinimumLocation() {
return minimum;
} | 3.26 |
AreaShop_WorldEditSelection_getLength_rdh | /**
* Get Z-size.
*
* @return length
*/
public int getLength() {
return (maximum.getBlockZ() -
minimum.getBlockZ()) + 1;
} | 3.26 |
AreaShop_WorldGuardHandler7_beta_1_buildDomain_rdh | /**
* Build a DefaultDomain from a RegionAccessSet.
*
* @param regionAccessSet
* RegionAccessSet to read
* @return DefaultDomain containing the entities from the RegionAccessSet
*/
private DefaultDomain buildDomain(RegionAccessSet regionAccessSet) {
DefaultDomain owners = new DefaultDomain();
for (St... | 3.26 |
AreaShop_SellCommand_canUse_rdh | /**
* Check if a person can sell the region.
*
* @param person
* The person to check
* @param region
* The region to check for
* @return true if the person can sell it, otherwise false
*/
public static boolean canUse(CommandSender person, GeneralRegion region) {
... | 3.26 |
AreaShop_SignLinkerManager_isInSignLinkMode_rdh | /**
* Check if the player is in sign linking mode.
*
* @param player
* The player to check
* @return true if the player is in sign linking mode, otherwise false
*/
public boolean isInSignLinkMode(Player player) {
return signLinkers.containsKey(player.getUniqueId());
} | 3.26 |
AreaShop_SignLinkerManager_enterSignLinkMode_rdh | /**
* Let a player enter sign linking mode.
*
* @param player
* The player that has to enter sign linking mode
* @param profile
* The profile to use for the signs (null for default)
*/
public void enterSignLinkMode(Player player, String profile) {
signLinkers.put(player.getUniqueId(), new SignLinker(play... | 3.26 |
AreaShop_SignLinkerManager_exitSignLinkMode_rdh | /**
* Let a player exit sign linking mode.
*
* @param player
* The player that has to exit sign linking mode
*/
public void exitSignLinkMode(Player
player) {
signLinkers.remove(player.getUniqueId());
if (eventsRegistered && signLinkers.isEmpty()) {
eventsRegistered = false;
HandlerList.un... | 3.26 |
AreaShop_SignLinkerManager_onPlayerInteract_rdh | /**
* On player interactions.
*
* @param event
* The PlayerInteractEvent
*/
@EventHandler(priority = EventPriority.HIGH)
public void onPlayerInteract(PlayerInteractEvent event) {
if (isInSignLinkMode(event.getPlayer())) {
event.setCancelled(true);
Player player = event.getPlayer();
... | 3.26 |
AreaShop_UnrentedRegionEvent_getRefundedMoney_rdh | /**
* Get the amount that is paid back to the player.
*
* @return The amount of money paid back to the player
*/
public double getRefundedMoney() {
return refundedMoney;
} | 3.26 |
AreaShop_UnrentedRegionEvent_getOldRenter_rdh | /**
* Get the player that the region was unrented for.
*
* @return The UUID of the player that the region was unrented for
*/
public UUID getOldRenter() {
return oldRenter;
} | 3.26 |
AreaShop_BukkitHandler1_13_getSignFacing_rdh | // Uses BlockData, which does not yet exist in 1.12-
@Override
public BlockFace getSignFacing(Block block) {if (block == null) {
return null;
}
BlockState blockState = block.getState();
if (blockState
== null) {return null;
}
BlockData blockData = blockState.getBlockData();
if (bl... | 3.26 |
AreaShop_BukkitHandler1_13_setSignFacing_rdh | // Uses BlockData, WallSign and Sign which don't exist in 1.12-
@Override
public boolean setSignFacing(Block block, BlockFace facing) {
if ((block == null) || (facing == null)) {
return false;
}
BlockState blockState = block.getState();
if (blockState == null) {
return false;
}
... | 3.26 |
AreaShop_RegionSign_getLocation_rdh | /**
* Get the location of this sign.
*
* @return The location of this sign
*/
public Location getLocation() {
return Utils.configToLocation(getRegion().getConfig().getConfigurationSection(("general.signs." + key) + ".location"));
} | 3.26 |
AreaShop_RegionSign_getStringChunk_rdh | /**
* Chunk string to be used as key in maps.
*
* @return Chunk string
*/
public String getStringChunk() {
return SignsFeature.chunkToString(getLocation());
} | 3.26 |
AreaShop_RegionSign_update_rdh | /**
* Update this sign.
*
* @return true if the update was successful, otherwise false
*/
public boolean update() {
// Ignore updates of signs in chunks that are not loaded
Location signLocation = getLocation();
if
(((si... | 3.26 |
AreaShop_RegionSign_needsPeriodicUpdate_rdh | /**
* Check if the sign needs to update periodically.
*
* @return true if it needs periodic updates, otherwise false
*/public boolean needsPeriodicUpdate()
{
ConfigurationSection signConfig = getProfile();
if ((signConfig
== null) || (!signConfig.isSet(getRegion().getState().getValue().toLowerCase())... | 3.26 |
AreaShop_RegionSign_getFacing_rdh | /**
* Get the facing of the sign as saved in the config.
*
* @return BlockFace the sign faces, or null if unknown
*/
public BlockFace getFacing() {
try {
return BlockFace.valueOf(getRegion().getConfig().getString(("general.signs." + key) + ".facing"));
} catch (NullPointerException
|
Illegal... | 3.26 |
AreaShop_RegionSign_getRegion_rdh | /**
* Get the region this sign is linked to.
*
* @return The region this sign is linked to
*/
public GeneralRegion getRegion() {
return signsFeature.getRegion();
} | 3.26 |
AreaShop_RegionSign_getMaterial_rdh | /**
* Get the material of the sign as saved in the config.
*
* @return Material of the sign, usually {@link Material#WALL_SIGN}, {@link Material#SIGN}, or one of the other wood types (different result for 1.13-), Material.AIR if none.
*/
public Material getMaterial() {
String name = getRegion().getConfig(... | 3.26 |
AreaShop_RegionSign_getStringLocation_rdh | /**
* Location string to be used as key in maps.
*
* @return Location string
*/
public String getStringLocation() {
return SignsFeature.locationToString(getLocation());
} | 3.26 |
AreaShop_RegionSign_m0_rdh | /**
* Remove this sign from the region.
*/
public void m0()
{
getLocation().getBlock().setType(Material.AIR);
signsFeature.getSignsRef().remove(getStringLocation());
SignsFeature.getAllSigns().remove(getStringLocation());
SignsFeature.getSignsBy... | 3.26 |
AreaShop_RegionSign_runSignCommands_rdh | /**
* Run commands when a player clicks a sign.
*
* @param clicker
* The player that clicked the sign
* @param clickType
* The type of clicking
* @return true if the commands ran successfully, false if any of them failed
*/
public boolean runSignCommands(Player clicke... | 3.26 |
AreaShop_RegionSign_getProfile_rdh | /**
* Get the ConfigurationSection defining the sign layout.
*
* @return The sign layout config
*/
public ConfigurationSection getProfile() {
return getRegion().getConfigurationSectionSetting("general.signProfile", "signProfiles", getRegion().getConfig().get(("general.signs." + key) + ".profile"));
} | 3.26 |
AreaShop_SetteleportCommand_canUse_rdh | /**
* Check if a person can set the teleport location of the region.
*
* @param person
* The person to check
* @param region
* The region to check for
* @return true if the person can set the teleport location, otherwise false
*/
public static boolean
canUse(CommandSender person, GeneralRegion region) {
... | 3.26 |
AreaShop_RegionGroup_isMember_rdh | /**
* Check if a region is member of the group.
*
* @param region
* Region to check
* @return true if the region is in the group, otherwise false
*/
public boolean isMember(GeneralRegion region) {
return getMembers().contains(region.getName());
} | 3.26 |
AreaShop_RegionGroup_getPriority_rdh | /**
* Get the priority of the group (higher overwrites).
*
* @return The priority of the group
*/
public int getPriority() {
return getSettings().getInt("priority");
} | 3.26 |
AreaShop_RegionGroup_m0_rdh | /**
* Mark that automatically added regions should be regenerated.
*/
public void m0() {
autoDirty = true;
} | 3.26 |
AreaShop_RegionGroup_removeMember_rdh | /**
* Remove a member from the group.
*
* @param region
* The region to remove
* @return true if the region was in the group before, otherwise false
*/
public boolean removeMember(GeneralRegion region) {
if (regions.remove(region.getName())) {
setSetting("regions", new ArrayList<>(regions));
... | 3.26 |
AreaShop_RegionGroup_getSettings_rdh | /**
* Get the configurationsection with the settings of this group.
*
* @return The ConfigurationSection with the settings of the group
*/
public ConfigurationSection getSettings() {
ConfigurationSection result = plugin.getFileManager().getGroupSettings(name);
if (result != null) {
return result;
... | 3.26 |
AreaShop_RegionGroup_addMember_rdh | /**
* Adds a member to a group.
*
* @param region
* The region to add to the group (GeneralRegion or a subclass of it)
* @return true if the region was not already added, otherwise false
*/
public boolean addMember(GeneralRegion region) {
if (regions.add(region.getName())) {
setSetting("regions", ne... | 3.26 |
AreaShop_RegionGroup_removeWorld_rdh | /**
* Remove a member from the group.
*
* @param world
* World to remove
* @return true if the region was in the group before, otherwise false
*/public boolean removeWorld(String world) {
if (worlds.remove(world)) {
setSetting("regionsFromWorlds", new ArrayList<>(worlds));
saveRequired();
... | 3.26 |
AreaShop_RegionGroup_saveRequired_rdh | /**
* Indicates this file needs to be saved, will actually get saved later by a task.
*/
public void saveRequired() {
plugin.getFileManager().saveGroupsIsRequired();
} | 3.26 |
AreaShop_RegionGroup_saveNow_rdh | /**
* Save the groups to disk now, normally saveRequired() is preferred because of performance.
*/
public void saveNow() {
plugin.getFileManager().saveGroupsNow();
} | 3.26 |
AreaShop_RegionGroup_getMembers_rdh | /**
* Get all members of the group.
*
* @return A list with the names of all members of the group (immutable)
*/
public Set<String> getMembers() {
HashSet<String> result = new HashSet<>(regions);
result.addAll(getAutoRegions());
return result;
} | 3.26 |
AreaShop_RegionGroup_setSetting_rdh | /**
* Set a setting of this group.
*
* @param path
* The path to set
* @param setting
* The value to set
*/
public void setSetting(String path, Object setting) {
plugin.getFileManager().setGroupSetting(this, path, setting);
} | 3.26 |
AreaShop_RegionGroup_addWorld_rdh | /**
* Adds a world from which all regions should be added to the group.
*
* @param world
* World from which all regions should be added
* @return true if the region was not already added, otherwise false
*/
public boolean addWorld(String
world) {
if (worlds.add(world)) {
setSetting("regionsFromWorld... | 3.26 |
AreaShop_RegionGroup_getAutoRegions_rdh | /**
* Get automatically added regions.
*
* @return Set of regions automatically added by the configuration
*/
public Set<String> getAutoRegions() {
if (autoDirty) {
autoRegions = new HashSet<>();
for (GeneralRegion region : plugin.getFileManager().getRegions()) {
if (worlds.contains(... | 3.26 |
AreaShop_RegionGroup_getWorlds_rdh | /**
* Get all worlds from which regions are added automatically.
*
* @return A list with the names of all worlds (immutable)
*/public
Set<String> getWorlds() {
return new HashSet<>(worlds);
} | 3.26 |
AreaShop_RegionGroup_getName_rdh | /**
* Get the name of the group.
*
* @return The name of the group
*/
public String
getName() {
return name;
} | 3.26 |
AreaShop_RegionGroup_getLowerCaseName_rdh | /**
* Get the lowercase name of the group (used for getting the config etc).
*
* @return The name of the group in lowercase
*/
public String getLowerCaseName() {
return getName().toLowerCase();
} | 3.26 |
AreaShop_Analytics_start_rdh | /**
* Start analytics tracking.
*/
public static void start() {
// bStats statistics
try {
Metrics metrics = new Metrics(AreaShop.getInstance());
// Number of regions
metrics.addCustomChart(new Metrics.SingleLineChart("region_count") {
... | 3.26 |
AreaShop_WorldGuardHandler5_buildDomain_rdh | /**
* Build a DefaultDomain from a RegionAccessSet.
*
* @param regionAccessSet
* RegionAccessSet to read
* @return DefaultDomain containing the entities from the RegionAccessSet
*/
private DefaultDomain buildDomain(RegionAccessSet regionAccessSet) {
DefaultDomain owners = new DefaultDomain();
for
(S... | 3.26 |
AreaShop_DeletedFriendEvent_getBy_rdh | /**
* Get the CommandSender that is adding the friend.
*
* @return null if none, a CommandSender if done by someone (likely Player or ConsoleCommandSender)
*/
public CommandSender getBy()
{ return by;
} | 3.26 |
AreaShop_DeletedFriendEvent_getFriend_rdh | /**
* Get the OfflinePlayer that is getting added as friend.
*
* @return The friend that is getting added
*/
public OfflinePlayer getFriend() {
return friend;
} | 3.26 |
AreaShop_FastAsyncWorldEditWorldGuardHandler_buildDomain_rdh | /**
* Build a DefaultDomain from a RegionAccessSet.
*
* @param regionAccessSet
* RegionAccessSet to read
* @return DefaultDomain containing the entities from the RegionAccessSet
*/
private DefaultDomain buildDomain(RegionAccessSet regionAccessSet) {
DefaultDomain owners = new DefaultDomain();
for (Strin... | 3.26 |
AreaShop_CommandAreaShop_canExecute_rdh | /**
* Check if this Command instance can execute the given command and arguments.
*
* @param command
* The command to check for execution
* @param args
* The arguments to check
* @return true if it can execute the command, false otherwise
*/
public boolean canExecute(Command command, String[] args) {
... | 3.26 |
AreaShop_CommandAreaShop_confirm_rdh | /**
* Confirm a command.
*
* @param sender
* To confirm it for, or send a message to confirm
* @param args
* Command args
* @param message
* Message to send when confirmation is required
* @return true if confirmed, false if confirmation is required
*/
public boolean confirm(CommandSender sender, String... | 3.26 |
AreaShop_CommandAreaShop_getTabCompleteList_rdh | /**
* Get a list of string to complete a command with (raw list, not matching ones not filtered out).
*
* @param toComplete
* The number of the argument that has to be completed
* @param start
* The already given start of the command
* @param sender
* The CommandSender that wants to tab complete
* @retur... | 3.26 |
AreaShop_Utils_evaluateToDouble_rdh | /**
* Evaluate string input to a number.
* Uses JavaScript for expressions.
*
* @param input
* The input string
* @param region
* The region to apply replacements for and use for logging
* @return double evaluated from the input or a very high default in case of a script exception
*/
public static double e... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.