fix: affichage de id
This commit is contained in:
parent
73d8f8fb1f
commit
c5534238b2
|
@ -24,19 +24,11 @@ public class ClearPoints implements CommandExecutor {
|
||||||
Camera.broadlog("Clearing points and path:");
|
Camera.broadlog("Clearing points and path:");
|
||||||
ListPoints.listPoints();
|
ListPoints.listPoints();
|
||||||
|
|
||||||
Camera.controlPoints = new ArrayList<>();
|
while (Camera.controlPoints.size() > 0) {
|
||||||
Camera.compute();
|
NewPoint.rm(new String[] { "", "0" }, null, null);
|
||||||
|
}
|
||||||
ClosePath.closed = false;
|
ClosePath.closed = false;
|
||||||
|
Camera.compute();
|
||||||
for (World world : Bukkit.getWorlds()) {
|
|
||||||
for (Entity e : world.getEntities()) {
|
|
||||||
if (e.getScoreboardTags().contains("controlPoint")) {
|
|
||||||
e.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ShowCurve.controlPointsArmorStands = new ArrayList<>();
|
|
||||||
|
|
||||||
Camera.broadlog("All cleared !");
|
Camera.broadlog("All cleared !");
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,14 +37,17 @@ public class ExecuteTraveling implements CommandExecutor {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// No more point, end traveling
|
|
||||||
if (!ClosePath.closed) {
|
|
||||||
Thread.currentThread().interrupt();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Regenerate traveling and begin
|
// Regenerate traveling and begin
|
||||||
|
if (ClosePath.closed) {
|
||||||
curveIterator = Camera.curve.iterator();
|
curveIterator = Camera.curve.iterator();
|
||||||
player.teleport(curveIterator.next());
|
player.teleport(curveIterator.next());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Teleport to next point
|
||||||
|
int taskToKill = taskID;
|
||||||
|
taskID = -1;
|
||||||
|
Bukkit.getScheduler().cancelTask(taskToKill);
|
||||||
}
|
}
|
||||||
}, 0, 0);
|
}, 0, 0);
|
||||||
Bukkit.broadcastMessage("Traveling : " + taskID);
|
Bukkit.broadcastMessage("Traveling : " + taskID);
|
||||||
|
|
Loading…
Reference in a new issue