Fixed liftname issues

This commit is contained in:
stijnb1234 2020-02-24 18:56:25 +01:00
parent b1482773fa
commit b2722a59fc
3 changed files with 5 additions and 7 deletions

View file

@ -190,7 +190,6 @@
<version>2.9.10.1</version>
</dependency>
<!-- BStats, used for metrics -->
<dependency>
<groupId>org.bstats</groupId>

View file

@ -282,14 +282,14 @@ public class V10LiftCommand implements CommandExecutor {
Lift lift = DataManager.getLift(liftName);
if (!lift.getQueue().isEmpty()) lift.getQueue().clear();
if (!DataManager.containsMovingTask(args[1])) {
sender.sendMessage(ChatColor.RED + "Lift " + args[1] + " doesn't contain any movingtasks!");
if (!DataManager.containsMovingTask(liftName)) {
sender.sendMessage(ChatColor.RED + "Lift " + liftName + " doesn't contain any movingtasks!");
return true;
}
Bukkit.getScheduler().cancelTask(DataManager.getMovingTask(args[1]));
DataManager.removeMovingTask(args[1]);
sender.sendMessage(ChatColor.GREEN + "Lift " + args[1] + " stopped!");
Bukkit.getScheduler().cancelTask(DataManager.getMovingTask(liftName));
DataManager.removeMovingTask(liftName);
sender.sendMessage(ChatColor.GREEN + "Lift " + liftName + " stopped!");
return true;
}

View file

@ -109,5 +109,4 @@ public class V10LiftPlugin extends JavaPlugin {
public static V10LiftAPI getAPI() {
return api;
}
}