refactor: generator minigame system (gui + text), fix color codes, holograms, messages, & config
This commit is contained in:
parent
957ab4a5a2
commit
7c7562a8d4
48 changed files with 1628 additions and 733 deletions
|
|
@ -29,6 +29,18 @@ public class ExitGate {
|
|||
return location;
|
||||
}
|
||||
|
||||
/** Place a HOPPER block at this gate's location for player interaction. */
|
||||
public void spawnGateBlock() {
|
||||
if (location.getWorld() == null) return;
|
||||
location.getBlock().setType(org.bukkit.Material.HOPPER, false);
|
||||
}
|
||||
|
||||
/** Remove the interaction block (e.g. when gate opens or on cleanup). */
|
||||
public void removeGateBlock() {
|
||||
if (location.getWorld() == null) return;
|
||||
location.getBlock().setType(org.bukkit.Material.AIR, false);
|
||||
}
|
||||
|
||||
public GateState getState() {
|
||||
return state;
|
||||
}
|
||||
|
|
@ -90,6 +102,7 @@ public class ExitGate {
|
|||
if (progress >= 1.0) {
|
||||
progress = 1.0;
|
||||
state = GateState.OPEN;
|
||||
removeGateBlock();
|
||||
playOpenedSound();
|
||||
}
|
||||
}
|
||||
|
|
@ -103,6 +116,7 @@ public class ExitGate {
|
|||
public void restoreProgress() { progress = savedProgress; }
|
||||
|
||||
public void reset() {
|
||||
removeGateBlock();
|
||||
this.state = GateState.CLOSED;
|
||||
this.progress = 0.0;
|
||||
this.savedProgress = 0.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue