SteamWar/BauSystem2.0
Archiviert
12
0

Fix panzern and laufbau undon
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2022-12-23 23:22:10 +01:00
Ursprung f7440af50a
Commit 187c2a68d0
4 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -54,6 +54,7 @@ public class LaufbauCommand extends SWCommand {
while (true) { while (true) {
if (!laufbau.hasNext()) { if (!laufbau.hasNext()) {
BauSystem.MESSAGE.send("LAUFBAU_DONE", player); BauSystem.MESSAGE.send("LAUFBAU_DONE", player);
laufbau.getEditSession().close();
WorldEditUtils.addToPlayer(player, laufbau.getEditSession()); WorldEditUtils.addToPlayer(player, laufbau.getEditSession());
cancel(); cancel();
return; return;

Datei anzeigen

@ -146,7 +146,7 @@ public class CreatingLaufState implements LaufbauState {
} }
try { try {
editSession.setBlock(BukkitAdapter.asBlockVector(location), BukkitAdapter.adapt(highest.blockData)); editSession.setBlock(BukkitAdapter.asBlockVector(location), BukkitAdapter.adapt(highest.blockData));
location.getBlock().setBlockData(highest.blockData, false); // location.getBlock().setBlockData(highest.blockData, false);
if (highest.blockConsumer != null) highest.blockConsumer.accept(location.getBlock()); if (highest.blockConsumer != null) highest.blockConsumer.accept(location.getBlock());
} catch (MaxChangedBlocksException e) { } catch (MaxChangedBlocksException e) {
e.printStackTrace(); e.printStackTrace();
@ -190,7 +190,7 @@ public class CreatingLaufState implements LaufbauState {
} }
try { try {
editSession.setBlock(BukkitAdapter.asBlockVector(location), SHELL); editSession.setBlock(BukkitAdapter.asBlockVector(location), SHELL);
location.getBlock().setType(Material.END_STONE, false); // location.getBlock().setType(Material.END_STONE, false);
} catch (MaxChangedBlocksException e) { } catch (MaxChangedBlocksException e) {
e.printStackTrace(); e.printStackTrace();
// ingored // ingored

Datei anzeigen

@ -120,20 +120,20 @@ public class Panzern {
emptyBlocks.add(currentBlock.getLocation().toVector()); emptyBlocks.add(currentBlock.getLocation().toVector());
return; return;
case SLAB: case SLAB:
currentBlock.setType(slabMaterial); // currentBlock.setType(slabMaterial);
editSession.setBlock(BukkitAdapter.asBlockVector(currentBlock.getLocation()), slabType); editSession.setBlock(BukkitAdapter.asBlockVector(currentBlock.getLocation()), slabType);
break; break;
case BLOCK: case BLOCK:
case DEFAULT: case DEFAULT:
currentBlock.setType(blockMaterial); // currentBlock.setType(blockMaterial);
editSession.setBlock(BukkitAdapter.asBlockVector(currentBlock.getLocation()), blockType); editSession.setBlock(BukkitAdapter.asBlockVector(currentBlock.getLocation()), blockType);
break; break;
case UNMOVABLE: case UNMOVABLE:
currentBlock.setType(Material.JUKEBOX); // currentBlock.setType(Material.JUKEBOX);
editSession.setBlock(BukkitAdapter.asBlockVector(currentBlock.getLocation()), jukeboxType); editSession.setBlock(BukkitAdapter.asBlockVector(currentBlock.getLocation()), jukeboxType);
break; break;
case UNMOVABLE_SLAB: case UNMOVABLE_SLAB:
currentBlock.setType(Material.COBWEB); // currentBlock.setType(Material.COBWEB);
editSession.setBlock(BukkitAdapter.asBlockVector(currentBlock.getLocation()), cobwebType); editSession.setBlock(BukkitAdapter.asBlockVector(currentBlock.getLocation()), cobwebType);
break; break;
default: default:

Datei anzeigen

@ -69,6 +69,7 @@ public class PanzernCommand extends SWCommand {
while (true) { while (true) {
if (!panzern.hasNext()) { if (!panzern.hasNext()) {
BauSystem.MESSAGE.send("PANZERN_DONE", player); BauSystem.MESSAGE.send("PANZERN_DONE", player);
panzern.getEditSession().close();
WorldEditUtils.addToPlayer(player, panzern.getEditSession()); WorldEditUtils.addToPlayer(player, panzern.getEditSession());
cancel(); cancel();
return; return;