|
|
@ -1,9 +1,15 @@
|
|
|
|
package eu.ruekov.ruakij.LinkedBeaconTeleporters.linkedBeaconTeleporter;
|
|
|
|
package eu.ruekov.ruakij.LinkedBeaconTeleporters.linkedBeaconTeleporter;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import eu.ruekov.ruakij.LinkedBeaconTeleporters.Main;
|
|
|
|
|
|
|
|
import org.bukkit.Location;
|
|
|
|
import org.bukkit.block.Block;
|
|
|
|
import org.bukkit.block.Block;
|
|
|
|
import org.bukkit.block.BlockState;
|
|
|
|
import org.bukkit.block.BlockState;
|
|
|
|
|
|
|
|
import org.bukkit.inventory.ItemStack;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
public class LinkedBeaconTeleporterBlock extends LinkedBeaconTeleporter {
|
|
|
|
public class LinkedBeaconTeleporterBlock extends LinkedBeaconTeleporter {
|
|
|
|
|
|
|
|
// FIXME: Storing the block like this will block the world from unloading and might be dangerous
|
|
|
|
Block block;
|
|
|
|
Block block;
|
|
|
|
|
|
|
|
|
|
|
|
public LinkedBeaconTeleporterBlock(String teleporterId, Block block) {
|
|
|
|
public LinkedBeaconTeleporterBlock(String teleporterId, Block block) {
|
|
|
@ -15,4 +21,13 @@ public class LinkedBeaconTeleporterBlock extends LinkedBeaconTeleporter {
|
|
|
|
public Block block(){
|
|
|
|
public Block block(){
|
|
|
|
return block;
|
|
|
|
return block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Conversion methods
|
|
|
|
|
|
|
|
public static LinkedBeaconTeleporterBlock getFromLocation(Location loc){
|
|
|
|
|
|
|
|
return Main.lbtManager.getLbtBlockFromLocation(loc);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public static List<LinkedBeaconTeleporterBlock> getListFromTeleportId(String teleportId){
|
|
|
|
|
|
|
|
return Main.lbtManager.getLbtBlocksFromTeleportId(teleportId);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|