Implemented Objects to work with
This commit is contained in:
		
							parent
							
								
									abde30e2e1
								
							
						
					
					
						commit
						16a46a6a35
					
				@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					package eu.ruekov.ruakij.LinkedBeaconTeleporters.linkedBeaconTeleporter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.bukkit.Location;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * Describes a placed-beacon-teleporter in the world
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public abstract class LinkedBeaconTeleporter {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // Persistent id for linked-beacons
 | 
				
			||||||
 | 
					    public String teleporterId;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public LinkedBeaconTeleporter(String teleporterId){
 | 
				
			||||||
 | 
					        this.teleporterId = teleporterId;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public String teleporterId(){
 | 
				
			||||||
 | 
					        return teleporterId;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,18 @@
 | 
				
			|||||||
 | 
					package eu.ruekov.ruakij.LinkedBeaconTeleporters.linkedBeaconTeleporter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.bukkit.block.Block;
 | 
				
			||||||
 | 
					import org.bukkit.block.BlockState;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class LinkedBeaconTeleporterBlock extends LinkedBeaconTeleporter {
 | 
				
			||||||
 | 
					    Block block;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public LinkedBeaconTeleporterBlock(String teleporterId, Block block) {
 | 
				
			||||||
 | 
					        super(teleporterId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.block = block;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public Block block(){
 | 
				
			||||||
 | 
					        return block;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					package eu.ruekov.ruakij.LinkedBeaconTeleporters.linkedBeaconTeleporter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import org.bukkit.inventory.ItemStack;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					public class LinkedBeaconTeleporterItem extends LinkedBeaconTeleporter {
 | 
				
			||||||
 | 
					    ItemStack item;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public LinkedBeaconTeleporterItem(String teleporterId, ItemStack item) {
 | 
				
			||||||
 | 
					        super(teleporterId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        this.item = item;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    public ItemStack item(){
 | 
				
			||||||
 | 
					        return item;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user