Added COPPER_ORE to TeamUtils
This commit is contained in:
@@ -6,7 +6,7 @@ group 'com.willfp'
|
||||
version rootProject.version
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.spigotmc:spigot:1.16.4-R0.1-SNAPSHOT'
|
||||
compileOnly 'org.spigotmc:spigot:1.17-R0.1-SNAPSHOT'
|
||||
compileOnly 'org.apache.maven:maven-artifact:3.0.3'
|
||||
compileOnly 'org.bstats:bstats-bukkit:1.7'
|
||||
compileOnly 'com.comphenix.protocol:ProtocolLib:4.6.0-SNAPSHOT'
|
||||
|
||||
@@ -31,16 +31,13 @@ public class ArrowDataListener extends PluginDependent implements Listener {
|
||||
*/
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onLaunch(final ProjectileLaunchEvent event) {
|
||||
if (!(event.getEntity() instanceof Arrow)) {
|
||||
if (!(event.getEntity() instanceof Arrow arrow)) {
|
||||
return;
|
||||
}
|
||||
if (!(event.getEntity().getShooter() instanceof LivingEntity)) {
|
||||
if (!(event.getEntity().getShooter() instanceof LivingEntity entity)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Arrow arrow = (Arrow) event.getEntity();
|
||||
LivingEntity entity = (LivingEntity) arrow.getShooter();
|
||||
|
||||
if (entity.getEquipment() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.willfp.eco.util;
|
||||
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.willfp.eco.core.Prerequisite;
|
||||
import lombok.experimental.UtilityClass;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
@@ -81,5 +82,9 @@ public class TeamUtils {
|
||||
MATERIAL_COLORS.forcePut(Material.DIAMOND_ORE, ChatColor.AQUA);
|
||||
MATERIAL_COLORS.forcePut(Material.EMERALD_ORE, ChatColor.GREEN);
|
||||
MATERIAL_COLORS.forcePut(Material.ANCIENT_DEBRIS, ChatColor.DARK_RED);
|
||||
|
||||
if (Prerequisite.v1_17.isMet()) {
|
||||
MATERIAL_COLORS.forcePut(Material.COPPER_ORE, ChatColor.GOLD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user