mirror of
https://github.com/NLthijs48/AreaShop.git
synced 2024-11-16 15:25:11 +01:00
Fix problem with default value 'unlimited' for maxRentTime
This commit is contained in:
parent
a0239b8837
commit
937db4620d
@ -698,10 +698,12 @@ public final class AreaShop extends JavaPlugin implements AreaShopInterface {
|
||||
* @return The duration in milliseconds translated from the durationstring, or if it is invalid then 0
|
||||
*/
|
||||
public long durationStringToLong(String duration) {
|
||||
if(duration == null || duration.indexOf(' ') == -1) {
|
||||
if(duration == null) {
|
||||
return 0;
|
||||
} else if(duration.equalsIgnoreCase("disabled") || duration.equalsIgnoreCase("unlimited")) {
|
||||
return -1;
|
||||
} else if(duration.indexOf(' ') == -1) {
|
||||
return 0;
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTimeInMillis(0);
|
||||
|
@ -1815,7 +1815,7 @@ public abstract class GeneralRegion implements GeneralRegionInterface {
|
||||
while(!groups.isEmpty()) {
|
||||
String group = groups.get(0);
|
||||
if(player.hasPermission("areashop.limits." + group) && this.matchesLimitGroup(group)) {
|
||||
AreaShop.debug(" has group: " + group);
|
||||
AreaShop.debug(player.getName() + " has limitGroup: " + group);
|
||||
int totalLimit = plugin.getConfig().getInt("limitGroups." + group + ".total");
|
||||
int rentsLimit = plugin.getConfig().getInt("limitGroups." + group + ".rents");
|
||||
int totalCurrent = hasRegionsInLimitGroup(player, group, totalRegions);
|
||||
|
Loading…
Reference in New Issue
Block a user