Commits
zml2008 authored b30f7fe9c74
14 14 | * GNU General Public License for more details. |
15 15 | * |
16 16 | * You should have received a copy of the GNU General Public License |
17 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
18 18 | */ |
19 19 | |
20 20 | package com.sk89q.worldguard.bukkit; |
21 21 | |
22 22 | import java.util.List; |
23 23 | |
24 + | import com.sk89q.worldedit.blocks.BlockID; |
25 + | import com.sk89q.worldedit.blocks.ItemID; |
24 26 | import org.bukkit.ChatColor; |
25 27 | import org.bukkit.Location; |
26 - | import org.bukkit.Material; |
27 28 | import org.bukkit.Server; |
28 29 | import org.bukkit.World; |
29 30 | import org.bukkit.block.Block; |
30 31 | import org.bukkit.entity.Entity; |
31 32 | import org.bukkit.entity.ExperienceOrb; |
32 33 | import org.bukkit.entity.Item; |
33 34 | import org.bukkit.entity.LivingEntity; |
34 35 | import org.bukkit.entity.Player; |
35 36 | import org.bukkit.entity.TNTPrimed; |
36 37 | import org.bukkit.entity.Tameable; |
103 104 | } |
104 105 | |
105 106 | /** |
106 107 | * Drops a sign item and removes a sign. |
107 108 | * |
108 109 | * @param block |
109 110 | */ |
110 111 | public static void dropSign(Block block) { |
111 112 | block.setTypeId(0); |
112 113 | block.getWorld().dropItemNaturally(block.getLocation(), |
113 - | new ItemStack(Material.SIGN, 1)); |
114 + | new ItemStack(ItemID.SIGN, 1)); |
114 115 | } |
115 116 | |
116 117 | /** |
117 118 | * Sets the given block to fluid water. |
118 119 | * Used by addSpongeWater() |
119 120 | * |
120 121 | * @param world |
121 122 | * @param ox |
122 123 | * @param oy |
123 124 | * @param oz |
172 173 | free++; |
173 174 | } else { |
174 175 | free = 0; |
175 176 | } |
176 177 | |
177 178 | if (free == 2) { |
178 179 | if (y - 1 != origY || y == 1) { |
179 180 | loc.setX(x + 0.5); |
180 181 | loc.setY(y); |
181 182 | loc.setZ(z + 0.5); |
182 - | if (y <= 2 && world.getBlockAt(x,0,z).getType() == Material.AIR) { |
183 + | if (y <= 2 && world.getBlockAt(x,0,z).getTypeId() == BlockID.AIR) { |
183 184 | world.getBlockAt(x,0,z).setTypeId(20); |
184 185 | loc.setY(2); |
185 186 | } |
186 187 | player.setFallDistance(0F); |
187 188 | player.teleport(loc); |
188 189 | } |
189 190 | return; |
190 191 | } |
191 192 | |
192 193 | y++; |