3.12.2
This commit is contained in:
+4
-3
@@ -5,7 +5,7 @@ plugins {
|
||||
}
|
||||
|
||||
group 'sh.okx'
|
||||
version '3.12.1'
|
||||
version '3.12.2'
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
@@ -32,8 +32,9 @@ dependencies {
|
||||
testImplementation("org.junit.platform:junit-platform-launcher:1.7.2")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.7.2")
|
||||
testImplementation 'com.github.MockBukkit:MockBukkit:04889261630cd6f5aaebd86a576bbcd12c442ea7'
|
||||
testImplementation group: 'org.slf4j', name: 'slf4j-nop', version: '1.7.30'
|
||||
testImplementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
|
||||
|
||||
implementation group: 'org.slf4j', name: 'slf4j-nop', version: '1.7.30'
|
||||
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.30'
|
||||
|
||||
compileOnly 'org.jetbrains:annotations:16.0.2'
|
||||
compileOnly 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package sh.okx.rankup.commands;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.command.Command;
|
||||
@@ -14,9 +16,6 @@ import sh.okx.rankup.ranks.Rank;
|
||||
import sh.okx.rankup.ranks.RankElement;
|
||||
import sh.okx.rankup.ranks.Rankups;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
@RequiredArgsConstructor
|
||||
public class RankupCommand implements CommandExecutor {
|
||||
// weak hash maps so players going offline are automatically removed.
|
||||
@@ -49,7 +48,7 @@ public class RankupCommand implements CommandExecutor {
|
||||
// clicking on the gui cannot confirm a rankup
|
||||
if (confirmationType.equals("text") && confirming.containsKey(player) && !(args.length > 0 && args[0].equalsIgnoreCase("gui"))) {
|
||||
long time = System.currentTimeMillis() - confirming.remove(player);
|
||||
if (time < config.getInt("text.timeout") * 1000) {
|
||||
if (time < config.getInt("text.timeout") * 1000L) {
|
||||
plugin.getHelper().rankup(player);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,8 @@ public abstract class ProgressiveRequirement extends Requirement {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final double getRemaining(Player player) {
|
||||
return getRemaining(player, 1);
|
||||
}
|
||||
|
||||
public double getRemaining(Player player, double multiplier) {
|
||||
return Math.max(0, (multiplier * getTotal(player)) - getProgress(player));
|
||||
public double getRemaining(Player player) {
|
||||
return Math.max(0, getTotal(player) - getProgress(player));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user