Skip to content

Latest commit

 

History

History
330 lines (250 loc) · 8.7 KB

File metadata and controls

330 lines (250 loc) · 8.7 KB
layout default
title Installation Guide
nav_order 3
has_children false
permalink /user/installation/

Dragon Egg Lightning Plugin - Installation Guide

Quick Installation (5 Minutes)

Step 1: Download Requirements

  • Minecraft: Version 1.21.8 or higher
  • Java: Version 21 or higher
  • Paper Server: Latest build for 1.21.8
  • Plugin: DragonEggLightning-1.0.0.jar

Step 2: Setup Paper Server

Option A: Automated Setup (Recommended)

# Download the plugin source
git clone <repository-url>
cd elemental-dragon

# Build and start server
chmod +x build.sh start-server.sh
./build.sh && ./start-server.sh

Option B: Manual Setup

# 1. Create server directory
mkdir minecraft-server && cd minecraft-server

# 2. Download Paper server
wget https://api.papermc.io/v2/projects/paper/versions/1.21.8/builds/latest/downloads/paper-1.21.8-latest.jar

# 3. Accept EULA
echo "eula=true" > eula.txt

# 4. Start server (accepting EULA and generating world)
java -Xms2G -Xmx2G -jar paper-1.21.8-latest.jar nogui

Step 3: Install Plugin

For Automated Setup:

The plugin is automatically installed when you run ./start-server.sh

For Manual Setup:

# Copy plugin to plugins directory
cp DragonEggLightning-1.0.0.jar minecraft-server/plugins/

# Restart server
java -Xms2G -Xmx2G -jar paper-1.21.8-latest.jar nogui

Step 4: Verify Installation

  1. Server Console: Look for [INFO] DragonEggLightning enabled
  2. In Game: Type /plugins - you should see "DragonEggLightning"
  3. Test Command: /ability 1 should work (with Dragon Egg in offhand)

Why Server Administrators Want This Plugin

1. Enhanced Combat System

  • Strategic Gameplay: Requires Dragon Egg in offhand, adding resource management
  • Skill-Based Targeting: Players must aim at entities in their line of sight
  • Risk vs Reward: Powerful ability with 60-second cooldown prevents spam

2. Server Differentiation

  • Unique Mechanics: Stand out from vanilla servers with custom abilities
  • Player Retention: New abilities keep players engaged longer
  • Content Creation: Lightning effects are spectacular for videos/streams

3. Balanced Gameplay

  • No Pay-to-Win: Dragon Eggs are obtainable in survival
  • Cooldown Prevents Abuse: 60-second cooldown balances power
  • Visual Feedback: Clear HUD shows cooldown status

4. Performance Optimized

  • Efficient Ray Tracing: Only scans entities in player's direction
  • Optimized Particles: Limited particle count prevents lag
  • Memory Management: No memory leaks, stable long-term usage

5. Easy to Admin

  • No Configuration Required: Works out of the box
  • Debug Commands: Built-in troubleshooting tools
  • Error Handling: Graceful failure modes, no server crashes

For Players: How to Use

Getting Started (2 Minutes)

  1. Get a Dragon Egg

    /give @p minecraft:dragon_egg
    
  2. Move to Offhand

    • Press F key (or middle-click) to move item to offhand
    • Or use /swap if you have inventory management mods
  3. Find a Target

    • Look at any living entity (zombie, cow, villager, etc.)
    • Must be within 50 blocks and in your line of sight
  4. Cast Lightning

    /ability 1
    
  5. Watch the Show

    • Purple lightning strikes 3 times
    • 0.5 seconds between strikes
    • Each strike deals 2.0 hearts damage (bypasses armor)
    • Total damage: 6.0 hearts if all strikes connect

What You'll See

Visual Effects:

  • Purple/magenta lightning beam from sky
  • Electric spark particles along the beam
  • Explosion effect at impact point
  • Flash effect for dramatic impact

Audio:

  • Thunder sound for each strike
  • Higher pitch than normal lightning

Messages:

  • "Lightning ability activated!" (on success)
  • "You must hold a Dragon Egg in your offhand!" (if missing)
  • "No valid target found!" (if no entities nearby)
  • Cooldown timer in action bar (60s countdown)

Pro Tips

  1. Aim Carefully: Ray tracing follows your crosshair exactly
  2. Plan Ahead: 60-second cooldown means timing is crucial
  3. Multiple Targets: Lightning targets the closest entity in your view
  4. Cancel Safety: Removing Dragon Egg during cast cancels ability
  5. Survival Mode: Dragon Eggs are rare but obtainable from End Cities
  6. Armor-Bypassing: Lightning damage ignores all armor and enchantments

Troubleshooting Quick Fixes

Problem: "Unknown command"

Solution: Make sure plugin is loaded

# Check server console for:
[INFO] DragonEggLightning enabled

# If not loaded, check:
- Java version (must be 21+)
- Plugin JAR in plugins/ directory
- Server restart after plugin installation

Problem: "You must hold a Dragon Egg in your offhand!"

Solution: Move Dragon Egg to offhand

  • Press F key to swap items
  • Check offhand slot (right side of hotbar)

Problem: "No valid target found!"

Solution: Find a target entity

  • Look at any living creature (not blocks)
  • Must be within 50 blocks
  • Must be in your line of sight (not behind walls)

Problem: No lightning effects

Solution: Check graphics settings

  • Increase particle settings in Minecraft options
  • Lower render distance if performance is low
  • Check for conflicting plugins

Problem: Server lag during lightning

Solution: Optimize server

# Increase JVM memory
java -Xms4G -Xmx4G -jar paper-1.21.8-latest.jar

# Monitor TPS
/tps  # Should be around 20

Performance Impact

Server Requirements

  • Minimum: 2GB RAM, 2 CPU cores
  • Recommended: 4GB RAM, 4 CPU cores
  • Storage: 2GB for server + worlds

Expected Performance

  • TPS Impact: <1% (negligible)
  • Memory Usage: +50MB typical
  • Network Impact: Minimal (only command usage)
  • Client Impact: Depends on particle settings

Monitoring Commands

# Check server performance
/tps  # Target: 20
/mem  # Check memory usage

# Monitor specific metrics
# - TPS should remain stable
# - Memory should not grow continuously
# - No console errors during lightning strikes

Configuration (Optional)

Changing Ability Parameters

Edit LightningAbility.java constants:

private static final int STRIKE_COUNT = 3;           // Number of strikes
private static final long STRIKE_INTERVAL_TICKS = 10L; // Delay between strikes (ticks)
private static final double DAMAGE_PER_STRIKE = 4.0;   // Damage per strike (HP) - 2.0 hearts
private static final long COOLDOWN_MILLIS = 60000L;    // Cooldown (milliseconds)
private static final double MAX_RANGE = 50.0;          // Max targeting range

Rebuild after changes:

mvn clean package
# Copy new JAR to plugins/ directory
# Restart server

Server Properties Recommendations

For optimal experience:

# server.properties
gamemode=survival
difficulty=normal
view-distance=10
simulation-distance=10
max-players=20

# These help with performance
max-tick-time=60000
entity-broadcast-range-percentage=100

Support and Help

Getting Help

  1. Check Logs First

    # Server console or:
    tail -f logs/latest.log | grep DragonEggLightning
  2. Common Solutions

    • Restart server after plugin changes
    • Ensure Java 21+ is installed
    • Check plugin is in plugins/ directory
    • Verify Dragon Egg is in offhand (not main hand)
  3. Performance Issues

    • Monitor TPS with /tps
    • Check memory usage with /mem
    • Consider reducing player count
    • Upgrade server hardware if needed

Reporting Issues

When reporting problems, include:

# Server information
- Paper version: /version
- Java version: java -version
- Plugin version: Check plugins list
- Player count during issue
- Exact error messages from console

# Steps to reproduce
1. What you were doing
2. What happened
3. What you expected
4. Any error messages

Feature Requests

Consider these factors:

  • Performance impact on server and clients
  • Balance with existing game mechanics
  • Compatibility with other plugins
  • Complexity for players to understand

Conclusion

This plugin adds an exciting new combat mechanic while maintaining game balance. The Dragon Egg requirement ensures it's a strategic choice, and the cooldown prevents overuse. Perfect for servers looking to add unique content without breaking vanilla gameplay balance.

Installation Time: 5-10 minutes Learning Curve: Minimal (just one command) Server Impact: Negligible performance cost Player Engagement: High (spectacular visual effects)


Need Help? Check TESTING_GUIDE.md for comprehensive testing procedures and README.md for technical details.

Plugin Version: 1.0.0 Tested With: Paper 1.21.8, Java 21 Last Updated: December 26, 2025