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> <version>2.9.10.1</version>
</dependency> </dependency>
<!-- BStats, used for metrics --> <!-- BStats, used for metrics -->
<dependency> <dependency>
<groupId>org.bstats</groupId> <groupId>org.bstats</groupId>

View file

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

View file

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