|
7 | 7 | import org.bukkit.DyeColor; |
8 | 8 | import org.bukkit.Material; |
9 | 9 | import org.bukkit.entity.Ageable; |
| 10 | +import org.bukkit.entity.Boat; |
10 | 11 | import org.bukkit.entity.ChestedHorse; |
11 | 12 | import org.bukkit.entity.Creeper; |
12 | 13 | import org.bukkit.entity.Entity; |
@@ -199,6 +200,15 @@ public enum MobData { |
199 | 200 | TEMPERATE_FROG("temperate", MobCompat.FROG, "frog:TEMPERATE", true), |
200 | 201 | WARM_FROG("warm", MobCompat.FROG, "frog:WARM", true), |
201 | 202 | COLD_FROG("cold", MobCompat.FROG, "frog:COLD", true), |
| 203 | + ACACIA_BOAT("acacia", Boat.class, MobCompat.BoatVariant.ACACIA, true), |
| 204 | + BIRCH_BOAT("birch", Boat.class, MobCompat.BoatVariant.BIRCH, true), |
| 205 | + DARK_OAK_BOAT("darkoak", Boat.class, MobCompat.BoatVariant.DARKOAK, true), |
| 206 | + GENERIC_BOAT("generic", Boat.class, MobCompat.BoatVariant.GENERIC, true), |
| 207 | + JUNGLE_BOAT("jungle", Boat.class, MobCompat.BoatVariant.JUNGLE, true), |
| 208 | + REDWOOD_BOAT("redwood", Boat.class, MobCompat.BoatVariant.REDWOOD, true), |
| 209 | + MANGROVE_BOAT("mangrove", Boat.class, MobCompat.BoatVariant.MANGROVE, true), |
| 210 | + OAK_BOAT("oak", Boat.class, MobCompat.BoatVariant.OAK, true), |
| 211 | + SPRUCE_BOAT("spruce", Boat.class, MobCompat.BoatVariant.SPRUCE, true), |
202 | 212 | ; |
203 | 213 |
|
204 | 214 | final private String nickname; |
@@ -377,6 +387,8 @@ public void setData(final Entity spawned, final Player target, final String rawD |
377 | 387 | } |
378 | 388 | } else if (this.value.equals(Data.GOAT_SCREAMING)) { |
379 | 389 | ((Goat) spawned).setScreaming(true); |
| 390 | + } else if (this.value instanceof MobCompat.BoatVariant) { |
| 391 | + MobCompat.setBoatVariant(spawned, (MobCompat.BoatVariant) this.value); |
380 | 392 | } else if (this.value instanceof String) { |
381 | 393 | final String[] split = ((String) this.value).split(":"); |
382 | 394 | switch (split[0]) { |
@@ -404,14 +416,12 @@ public void setData(final Entity spawned, final Player target, final String rawD |
404 | 416 | case "fox": |
405 | 417 | MobCompat.setFoxType(spawned, split[1]); |
406 | 418 | break; |
407 | | - case "axolotl": { |
| 419 | + case "axolotl": |
408 | 420 | MobCompat.setAxolotlVariant(spawned, split[1]); |
409 | 421 | break; |
410 | | - } |
411 | | - case "frog": { |
| 422 | + case "frog": |
412 | 423 | MobCompat.setFrogVariant(spawned, split[1]); |
413 | 424 | break; |
414 | | - } |
415 | 425 | } |
416 | 426 | } else { |
417 | 427 | Essentials.getWrappedLogger().warning("Unknown mob data type: " + this.toString()); |
|
0 commit comments