mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-01 03:55:28 +02:00
More work on xbows
This commit is contained in:
@@ -62,22 +62,22 @@ public final class ItemUtils {
|
||||
return mcMMO.getMaterialMapStore().isTrident(itemStack.getType().getKey().getKey());
|
||||
}
|
||||
|
||||
public static void registerTridentRecipes() {
|
||||
Material tridentMaterial = Material.getMaterial("trident");
|
||||
if(tridentMaterial != null) {
|
||||
ItemStack weakTridentIS = new ItemStack(tridentMaterial);
|
||||
NamespacedKey weakTridentNamespacedKey = new NamespacedKey(mcMMO.p, "mcmmo:weak_trident");
|
||||
|
||||
ShapedRecipe weakTridentRecipe = new ShapedRecipe(weakTridentNamespacedKey, weakTridentIS);
|
||||
|
||||
weakTridentRecipe.
|
||||
Bukkit.addRecipe(weakTridentRecipe);
|
||||
}
|
||||
if(Material.getMaterial("trident") == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
// public static void registerTridentRecipes() {
|
||||
//// Material tridentMaterial = Material.getMaterial("trident");
|
||||
//// if(tridentMaterial != null) {
|
||||
//// ItemStack weakTridentIS = new ItemStack(tridentMaterial);
|
||||
//// NamespacedKey weakTridentNamespacedKey = new NamespacedKey(mcMMO.p, "mcmmo:weak_trident");
|
||||
////
|
||||
//// ShapedRecipe weakTridentRecipe = new ShapedRecipe(weakTridentNamespacedKey, weakTridentIS);
|
||||
////
|
||||
//// weakTridentRecipe.
|
||||
//// Bukkit.addRecipe(weakTridentRecipe);
|
||||
//// }
|
||||
//// if(Material.getMaterial("trident") == null) {
|
||||
//// return;
|
||||
//// }
|
||||
//
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,26 @@
|
||||
package com.gmail.nossr50.util;
|
||||
|
||||
import org.bukkit.entity.Projectile;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class SpawnedProjectileTracker {
|
||||
private final Set<Projectile> trackedProjectiles;
|
||||
|
||||
public SpawnedProjectileTracker() {
|
||||
trackedProjectiles = new HashSet<>();
|
||||
}
|
||||
|
||||
public void trackProjectile(Projectile projectile) {
|
||||
trackedProjectiles.add(projectile);
|
||||
}
|
||||
|
||||
public void untrackProjectile(Projectile projectile) {
|
||||
trackedProjectiles.remove(projectile);
|
||||
}
|
||||
|
||||
public boolean isSpawnedProjectile(Projectile projectile) {
|
||||
return trackedProjectiles.contains(projectile);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user