Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,15 @@ public void inventoryClick(InventoryClickEvent e) {
if (id != null) {
Blueprint b = BlueprintLoader.getByString(id);
if (!b.hasInputs(p)) {
p.sendMessage("§cLacking items");
p.sendMessage("§cYou lack the materials to build this.");
p.playSound(p, Sound.ENTITY_VILLAGER_NO, 1f, 1f);
return;
}
p.closeInventory();

ActivePlacement placement = new ActivePlacement(p, h.getStation(), b);
activePlacements.put(p.getUniqueId(), placement);
p.sendMessage("§aSelect spawn location by left-clicking within "+Cache.constructionDistance+" blocks.");
p.sendMessage("§aStand where it should be built, within "+Cache.constructionDistance+" blocks of the station, and left-click.");
startParticleTrail(placement); // Method defined below
}
}
Expand Down Expand Up @@ -255,7 +255,7 @@ public void onPlayerLeftClick(PlayerInteractEvent e) {
// Re-check if player still has the required items
if (!blueprint.hasInputs(p)) {
activePlacements.remove(uuid);
p.sendMessage("§cYou no longer have the required items.");
p.sendMessage("§cYou no longer have the required materials.");
p.playSound(p, Sound.ENTITY_VILLAGER_NO, 1f, 1f);
return;
}
Expand All @@ -276,7 +276,7 @@ public void onPlayerLeftClick(PlayerInteractEvent e) {
placement.getStation().setSpawnLocation(clickLoc);
placement.setFinalSpawnLocation(clickLoc);
station.selectBlueprint(blueprint, p.getUniqueId());
p.sendMessage("§aSpawn location set!");
p.sendMessage("§aBuilding site chosen!");
p.sendTitle("", "§eStarted Constructing "+blueprint.getVehicle().getName(), 10, 60, 10);
p.playSound(p, Sound.ENTITY_PLAYER_LEVELUP, 1f, 1f);
activePlacements.remove(uuid);
Expand Down Expand Up @@ -315,7 +315,7 @@ public void run() {
public void run() {
if (activePlacements.get(uuid) == placement) {
activePlacements.remove(uuid);
player.sendMessage("§cVehicle placement cancelled (timeout).");
player.sendMessage("§cYou took too long to choose a building site.");
}
}
}.runTaskLater(VFBuilders.plugin, 20L * 30); // 30 seconds
Expand Down
Loading