fix 50%
This commit is contained in:
parent
547fe6d9bb
commit
8705cad578
118 changed files with 2714 additions and 4761 deletions
|
|
@ -1,5 +1,7 @@
|
|||
package dev.loki.loparkour.ghost;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import dev.loki.loparkour.LoParkour;
|
||||
import dev.loki.loparkour.config.Config;
|
||||
import org.bukkit.Location;
|
||||
|
|
@ -40,7 +42,7 @@ public class GhostManager {
|
|||
GhostData data = GhostData.loadFromFile(file);
|
||||
ghosts.add(data);
|
||||
} catch (IOException e) {
|
||||
LoParkour.logging().error("Failed to load ghost: " + file.getName());
|
||||
LoParkour.getPlugin().getLogger().severe("Failed to load ghost: " + file.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -71,7 +73,7 @@ public class GhostManager {
|
|||
try {
|
||||
data.saveToFile(file);
|
||||
} catch (IOException e) {
|
||||
LoParkour.logging().error("Failed to save ghost: " + file.getName());
|
||||
LoParkour.getPlugin().getLogger().severe("Failed to save ghost: " + file.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,14 @@
|
|||
package dev.loki.loparkour.ghost;
|
||||
|
||||
import dev.lolib.scheduler.Scheduler;
|
||||
|
||||
import dev.loki.loparkour.LoParkour;
|
||||
import dev.efnilite.vilib.util.Task;
|
||||
import dev.lolib.scheduler.Scheduler;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.ArmorStand;
|
||||
import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
import dev.lolib.scheduler.ScheduledTask;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class GhostPlayer {
|
||||
|
|
@ -14,7 +16,7 @@ public class GhostPlayer {
|
|||
private final GhostData data;
|
||||
private final World world;
|
||||
private ArmorStand entity;
|
||||
private BukkitTask task;
|
||||
private dev.lolib.scheduler.ScheduledTask task;
|
||||
private int currentFrame = 0;
|
||||
private long startTime;
|
||||
|
||||
|
|
@ -38,10 +40,7 @@ public class GhostPlayer {
|
|||
startTime = System.currentTimeMillis();
|
||||
currentFrame = 0;
|
||||
|
||||
task = Task.create(LoParkour.getPlugin())
|
||||
.repeat(1)
|
||||
.execute(this::update)
|
||||
.run();
|
||||
task = Scheduler.get(LoParkour.getPlugin()).runTimer(this::update, 0, 1);
|
||||
}
|
||||
|
||||
private void update() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue