Skip to content

Commit

Permalink
updated so deepslate ores just show as the ore
Browse files Browse the repository at this point in the history
  • Loading branch information
ironboundred committed Dec 18, 2021
1 parent f398c3c commit 13ad3b1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>be.bendem.bukkit</groupId>
<artifactId>OreBroadcast</artifactId>
<version>1.5.3-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>OreBroadcast</name>
Expand Down Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.13.2-R0.1-SNAPSHOT</version>
<version>1.13.1-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public void onBlockBreak(BlockBreakEvent event) {
plugin.unBlackList(e.getBlockMined());

String blockName = e.getBlockMined().getType().name().toLowerCase().replace("_ore", "");
blockName = blockName.replace("deepslate_", "");

String color = plugin.getConfig().getString("colors." + blockName, "white").toUpperCase();
String formattedMessage = format(
Expand Down
10 changes: 9 additions & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
ores:
- coal_ore
- iron_ore
- deepslate_iron_ore
- gold_ore
- deepslate_gold_ore
- lapis_ore
- redstone_ore
- quartz_ore
- diamond_ore
- deepslate_diamond_ore
- emerald_ore
- deepslate_emerald_ore
- ancient_debris
- copper_ore
- deepslate_copper_ore

# The colors to use to color the ores in the broadcast message.
# See the end of the file for a list of available colors.
Expand All @@ -17,11 +23,12 @@ colors:
iron: gray
gold: yellow
lapis: dark_blue
redstone: red
redstone: dark_red
quartz: white
diamond: aqua
emerald: green
ancient_debris: dark_red
copper: red

# The message to be broadcasted (you can use the tags {player_name}, {real_player_name},
# {count}, {plural}, {ore}, {ore_color} and {world}).
Expand All @@ -46,6 +53,7 @@ ore-translations:
diamond: diamond
emerald: emerald
ancient_debris: ancient_debris
copper: copper

# Set this to true to only activate OreBroadcast in listed worlds.
active-per-worlds: false
Expand Down

0 comments on commit 13ad3b1

Please sign in to comment.