mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 13:36:33 +01:00
Use setToAir() method everywhere
This commit is contained in:
parent
dede41827f
commit
c4b2562d07
@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
package de.erethon.dungeonsxl.sign.button;
|
package de.erethon.dungeonsxl.sign.button;
|
||||||
|
|
||||||
import de.erethon.caliburn.item.VanillaItem;
|
|
||||||
import de.erethon.dungeonsxl.api.DungeonsAPI;
|
import de.erethon.dungeonsxl.api.DungeonsAPI;
|
||||||
import de.erethon.dungeonsxl.api.dungeon.Dungeon;
|
import de.erethon.dungeonsxl.api.dungeon.Dungeon;
|
||||||
import de.erethon.dungeonsxl.api.sign.Button;
|
import de.erethon.dungeonsxl.api.sign.Button;
|
||||||
@ -88,7 +87,7 @@ public class EndSign extends Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!getTriggers().isEmpty()) {
|
if (!getTriggers().isEmpty()) {
|
||||||
getSign().getBlock().setType(VanillaItem.AIR.getMaterial());
|
setToAir();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
*/
|
*/
|
||||||
package de.erethon.dungeonsxl.sign.button;
|
package de.erethon.dungeonsxl.sign.button;
|
||||||
|
|
||||||
import de.erethon.caliburn.item.VanillaItem;
|
|
||||||
import de.erethon.commons.misc.NumberUtil;
|
import de.erethon.commons.misc.NumberUtil;
|
||||||
import de.erethon.dungeonsxl.api.DungeonsAPI;
|
import de.erethon.dungeonsxl.api.DungeonsAPI;
|
||||||
import de.erethon.dungeonsxl.api.player.GamePlayer;
|
import de.erethon.dungeonsxl.api.player.GamePlayer;
|
||||||
@ -89,7 +88,7 @@ public class ReadySign extends Button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!getTriggers().isEmpty()) {
|
if (!getTriggers().isEmpty()) {
|
||||||
getSign().getBlock().setType(VanillaItem.AIR.getMaterial());
|
setToAir();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ package de.erethon.dungeonsxl.sign.passive;
|
|||||||
import com.gmail.filoghost.holographicdisplays.api.Hologram;
|
import com.gmail.filoghost.holographicdisplays.api.Hologram;
|
||||||
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI;
|
import com.gmail.filoghost.holographicdisplays.api.HologramsAPI;
|
||||||
import de.erethon.caliburn.item.ExItem;
|
import de.erethon.caliburn.item.ExItem;
|
||||||
import de.erethon.caliburn.item.VanillaItem;
|
|
||||||
import de.erethon.commons.misc.NumberUtil;
|
import de.erethon.commons.misc.NumberUtil;
|
||||||
import de.erethon.dungeonsxl.api.DungeonsAPI;
|
import de.erethon.dungeonsxl.api.DungeonsAPI;
|
||||||
import de.erethon.dungeonsxl.api.sign.Passive;
|
import de.erethon.dungeonsxl.api.sign.Passive;
|
||||||
@ -78,8 +77,6 @@ public class HologramSign extends Passive {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
getSign().getBlock().setType(VanillaItem.AIR.getMaterial());
|
|
||||||
|
|
||||||
String[] holoLines = getLine(1).split("/");
|
String[] holoLines = getLine(1).split("/");
|
||||||
Location location = getSign().getLocation();
|
Location location = getSign().getLocation();
|
||||||
location = location.add(0.5, NumberUtil.parseDouble(getLine(2)), 0.5);
|
location = location.add(0.5, NumberUtil.parseDouble(getLine(2)), 0.5);
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
package de.erethon.dungeonsxl.sign.rocker;
|
package de.erethon.dungeonsxl.sign.rocker;
|
||||||
|
|
||||||
import de.erethon.caliburn.category.Category;
|
import de.erethon.caliburn.category.Category;
|
||||||
import de.erethon.caliburn.item.VanillaItem;
|
|
||||||
import de.erethon.commons.misc.BlockUtil;
|
import de.erethon.commons.misc.BlockUtil;
|
||||||
import de.erethon.dungeonsxl.api.DungeonsAPI;
|
import de.erethon.dungeonsxl.api.DungeonsAPI;
|
||||||
import de.erethon.dungeonsxl.api.sign.Rocker;
|
import de.erethon.dungeonsxl.api.sign.Rocker;
|
||||||
@ -89,8 +88,6 @@ public class OpenDoorSign extends Rocker {
|
|||||||
}
|
}
|
||||||
((DGameWorld) getGameWorld()).addGameBlock(door);
|
((DGameWorld) getGameWorld()).addGameBlock(door);
|
||||||
|
|
||||||
getSign().getBlock().setType(VanillaItem.AIR.getMaterial());
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
markAsErroneous("No door attached");
|
markAsErroneous("No door attached");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user