From a121ea0755a1a86fe1033a56772595541ef6a0c2 Mon Sep 17 00:00:00 2001 From: jojo Date: Sat, 5 Sep 2020 18:35:15 +0200 Subject: [PATCH] Add ColorCoding for SpecialItems --- src/de/steamwar/misslewars/MissileWars.java | 2 +- src/de/steamwar/misslewars/items/Arrows.java | 2 +- src/de/steamwar/misslewars/items/Fireball.java | 2 +- src/de/steamwar/misslewars/items/LandingPad.java | 2 +- src/de/steamwar/misslewars/items/Mine.java | 2 +- src/de/steamwar/misslewars/items/Missile.java | 2 +- .../steamwar/misslewars/items/{Snowball.java => Shield.java} | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) rename src/de/steamwar/misslewars/items/{Snowball.java => Shield.java} (69%) diff --git a/src/de/steamwar/misslewars/MissileWars.java b/src/de/steamwar/misslewars/MissileWars.java index 5cf028d..a395ae4 100644 --- a/src/de/steamwar/misslewars/MissileWars.java +++ b/src/de/steamwar/misslewars/MissileWars.java @@ -53,7 +53,7 @@ public class MissileWars extends JavaPlugin { Missile.init(); new Arrows(); new Fireball(); - new Snowball(); + new Shield(); new Mine(); new LandingPad(); diff --git a/src/de/steamwar/misslewars/items/Arrows.java b/src/de/steamwar/misslewars/items/Arrows.java index 43784b2..253d0b0 100644 --- a/src/de/steamwar/misslewars/items/Arrows.java +++ b/src/de/steamwar/misslewars/items/Arrows.java @@ -6,7 +6,7 @@ import org.bukkit.inventory.ItemStack; public class Arrows extends SpecialItem { - private final ItemStack item = createItem(Material.ARROW, "Pfeile", 3); + private final ItemStack item = createItem(Material.ARROW, "§ePfeile", 3); @Override public ItemStack getItem() { diff --git a/src/de/steamwar/misslewars/items/Fireball.java b/src/de/steamwar/misslewars/items/Fireball.java index 965a723..1747c99 100644 --- a/src/de/steamwar/misslewars/items/Fireball.java +++ b/src/de/steamwar/misslewars/items/Fireball.java @@ -7,7 +7,7 @@ import org.bukkit.inventory.ItemStack; public class Fireball extends SpecialItem { - private final ItemStack item = createItem(Material.FIRE_CHARGE, "Feuerball", 1); + private final ItemStack item = createItem(Material.FIRE_CHARGE, "§eFeuerball", 1); @Override public ItemStack getItem() { diff --git a/src/de/steamwar/misslewars/items/LandingPad.java b/src/de/steamwar/misslewars/items/LandingPad.java index beee821..15455c0 100644 --- a/src/de/steamwar/misslewars/items/LandingPad.java +++ b/src/de/steamwar/misslewars/items/LandingPad.java @@ -23,7 +23,7 @@ import java.util.Objects; public class LandingPad extends SpecialItem { - private final ItemStack item = createItem(Material.SLIME_BALL, "Landing Pad", 1); + private final ItemStack item = createItem(Material.SLIME_BALL, "§aLanding Pad", 1); private static final World world = new BukkitWorld(Bukkit.getWorlds().get(0)); private static final File landingPad = new File(MissileWars.getPlugin().getDataFolder(), "landingPad.schem"); private final Clipboard clipboard; diff --git a/src/de/steamwar/misslewars/items/Mine.java b/src/de/steamwar/misslewars/items/Mine.java index 0c0a8eb..59a89c6 100644 --- a/src/de/steamwar/misslewars/items/Mine.java +++ b/src/de/steamwar/misslewars/items/Mine.java @@ -6,7 +6,7 @@ import org.bukkit.inventory.ItemStack; public class Mine extends SpecialItem { - private final ItemStack item = createItem(Material.EGG, "Mine", 1); + private final ItemStack item = createItem(Material.EGG, "§eMine", 1); @Override public ItemStack getItem() { diff --git a/src/de/steamwar/misslewars/items/Missile.java b/src/de/steamwar/misslewars/items/Missile.java index dd70503..8a75ab7 100644 --- a/src/de/steamwar/misslewars/items/Missile.java +++ b/src/de/steamwar/misslewars/items/Missile.java @@ -47,7 +47,7 @@ public class Missile extends SpecialItem { item = new ItemStack(itemType, 1); ItemMeta meta = item.getItemMeta(); assert meta != null; - meta.setDisplayName(name); + meta.setDisplayName("§c" + name); item.setItemMeta(meta); } diff --git a/src/de/steamwar/misslewars/items/Snowball.java b/src/de/steamwar/misslewars/items/Shield.java similarity index 69% rename from src/de/steamwar/misslewars/items/Snowball.java rename to src/de/steamwar/misslewars/items/Shield.java index 23067bd..d7178e1 100644 --- a/src/de/steamwar/misslewars/items/Snowball.java +++ b/src/de/steamwar/misslewars/items/Shield.java @@ -4,9 +4,9 @@ import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -public class Snowball extends SpecialItem { +public class Shield extends SpecialItem { - private final ItemStack item = createItem(Material.SNOWBALL, "Schild", 1); + private final ItemStack item = createItem(Material.SNOWBALL, "§aSchild", 1); @Override public ItemStack getItem() {