Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Add flower pot state #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions src/main/java/org/bukkit/block/FlowerPot.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.bukkit.block;

import org.bukkit.material.MaterialData;

/**
* Represents a flower pot.
*/
public interface FlowerPot extends BlockState {

/**
* Gets the contents of the flower pot.
*
* @return the contents.
*/
MaterialData getContents();

/**
* Sets the contents of the flower pot.
*
* @param contents the new contents.
*/
void setContents(MaterialData contents);
}
4 changes: 4 additions & 0 deletions src/main/java/org/bukkit/material/FlowerPot.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ public FlowerPot(final Material type, final byte data) {
*
* @return material MaterialData for the block currently in the flower pot
* or null if empty
* @deprecated Use {@link org.bukkit.block.FlowerPot#getContents()} instead.
*/
@Deprecated
public MaterialData getContents() {
switch (getData()) {
case 1:
Expand Down Expand Up @@ -86,7 +88,9 @@ public MaterialData getContents() {
* Set the contents of the flower pot
*
* @param materialData MaterialData of the block to put in the flower pot.
* @deprecated Use {@link org.bukkit.block.FlowerPot#setContents(MaterialData)} instead.
*/
@Deprecated
public void setContents(MaterialData materialData) {
Material mat = materialData.getItemType();

Expand Down