Fix Flowerpot removing flower on restart

- 1.13 seperated the flowerpots into seperate blocks
use the Tag class to check if the block is any flowerpot and not just the base empty flowerpot
This commit is contained in:
wispoffates 2019-01-13 14:47:21 -05:00
parent ac4dfdc7c8
commit f75f6c4036
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import java.util.List;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Tag;
import org.bukkit.block.Block;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
@ -38,7 +39,7 @@ public class TFlowerPot extends Furniture implements Listener {
private void setPotState(){
pot=getLocation().getBlock();
if(pot.getType()==null||!pot.getType().equals(Material.FLOWER_POT)){pot.setType(Material.FLOWER_POT);}
if(pot.getType()==null||!Tag.FLOWER_POTS.isTagged(pot.getType())){pot.setType(Material.FLOWER_POT);}
getObjID().addBlock(Arrays.asList(pot));
}