25 lines
767 B
Markdown
25 lines
767 B
Markdown
# Lal2.js — startFromText() (satır 170)
|
||
|
||
[← Lal2.js](index.md) · [← Master](../../wiki.md)
|
||
|
||
```javascript
|
||
function startFromText(c, p, text) {
|
||
if (String(mappet.get(STATE_KEY)) === "1") {
|
||
p.send("\u00a7c[Kapla] Zaten aktif bir yayilim var. Geri Cek ile once toparla.");
|
||
return;
|
||
}
|
||
|
||
var spec = parseBlockSpec(text);
|
||
var target = mappet.createBlockState(spec.id, spec.meta);
|
||
if (!target || target.isAir()) {
|
||
p.send("\u00a7c[Kapla] Blok bulunamadi veya air secilemez: " + spec.id + " " + spec.meta);
|
||
return;
|
||
}
|
||
|
||
p.getStates().setString("kapla_last_block", spec.id);
|
||
p.getStates().setString("kapla_last_meta", String(spec.meta));
|
||
|
||
startSpread(c, p, target, spec);
|
||
}
|
||
```
|