fix: auto specmode
This commit is contained in:
parent
43cdd95a33
commit
60f42086d7
|
@ -5,6 +5,7 @@ import org.bukkit.command.CommandExecutor;
|
|||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
|
@ -43,8 +44,11 @@ public class ExecuteTraveling implements CommandExecutor {
|
|||
return true;
|
||||
}
|
||||
|
||||
player.setGameMode(GameMode.SPECTATOR);
|
||||
|
||||
curveIterator = Camera.curve.subList(fromIndex * (Camera.nbSubdiv + 1), toIndex * (Camera.nbSubdiv + 1))
|
||||
.iterator();
|
||||
|
||||
player.teleport(curveIterator.next());
|
||||
|
||||
taskID = Bukkit.getScheduler().scheduleSyncRepeatingTask(Camera.plugin, new Runnable() {
|
||||
|
|
|
@ -28,6 +28,9 @@ public class NewPoint implements CommandExecutor {
|
|||
case "fix":
|
||||
fix(args, null, null);
|
||||
break;
|
||||
case "ins":
|
||||
ins(args, new ExtendedLocation(player.getLocation()), player.getWorld());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue