-
Notifications
You must be signed in to change notification settings - Fork 0
N | Utility: ProjectileUtils
Sartaj Singh edited this page May 29, 2025
·
2 revisions
ProjectileUtils lets you create advanced projectiles with custom behavior, effects, and even custom models (with ModelEngine).
What it does:
Initializes the projectile system. Call once in your plugin's onEnable().
Example:
ProjectileUtils.initialize(this);What it does:
Launches a projectile with fully customizable options—trail, damage, speed, model, knockback, and more.
Signature (as of writing):
ProjectileUtils.createCustomProjectile(
Plugin plugin,
Player shooter,
Particle trailParticle,
int particleCount,
boolean gravity,
boolean glowing,
int knockbackStrength,
boolean silent,
double speed,
double damage,
boolean speedBasedDamage,
EntityType projectileType,
boolean useModelEngine,
String modelId,
int despawnTime,
int piercingLevel
);Example:
ProjectileUtils.createCustomProjectile(
plugin, player, Particle.FLAME, 6, false, false, 1, false,
2.0, 8.0, false, EntityType.ARROW, false, "", 60, 0
);Spawns a custom arrow with a flame trail, 8 damage, 2.0 speed, and 1 knockback.
What it does:
Returns true if ModelEngine is installed (for custom model projectiles).
Example:
if (ProjectileUtils.isModelEnginePresent()) {
// Safe to use custom model projectiles
}- Use for fireballs, magic bolts, or visually unique projectiles.
- Use custom models for themed servers (RPG, sci-fi, etc.).
- Always check ModelEngine presence before using custom models.
- Home
- A | Getting Started & Plugin Overview
- B | The Registry System: Items, Foods, Commands, Events
- C | Creating Custom Items
- D | Creating Custom Foods
- E | Advanced: Custom Effects in FXItems
- F | Creating Custom Commands
- G | Creating Custom Events & Behaviors
- H | Utility: CooldownUtils
- I | Utility: CustomItemUtils
- J | Utility: EffectUtils
- K | Utility: ManaUtils
- L | Utility: OneTimeCraftUtils
- M | Utility: TeleportUtils
- N | Utility: ProjectileUtils
- O | Utility: GammaUtils
- P | Utility: EntitySizeUtils
- Q | FXItems API (com.noctify.API) & Making Addons
- R | Advanced Techniques, Gotchas & FAQ
- S | Auto-Registration System
- T | Migration Guide (v1.1 → v1.2+)
- U | Changelog