start flexible movement

This commit is contained in:
ForestOfLight
2025-09-18 11:08:34 -07:00
Unverified
parent 6e1883edd0
commit 2d4631c1f7
5 changed files with 59 additions and 0 deletions
@@ -0,0 +1,35 @@
export class FlexibleInstanceMove {
player;
instance;
constructor(instance, player) {
this.instance = instance;
this.player = player;
this.tryBeginFlexibleMove();
}
tryBeginFlexibleMove() {
if (this.instance.isFlexMoving) {
this.feedback('§cThis instance is already being moved.');
return;
}
this.beginFlexibleMove();
}
beginFlexibleMove() {
// place structure in movement mode
this.instance.startFlexibleMove(this.player);
// lock player controls
// start handling player movement controls
}
endFlexibleMove() {
this.instance.stopFlexibleMove();
}
feedback(str) {
this.player.sendMessage(str);
}
}
// if the player logs out, stop the move