panel398
📎 1 file 5,257 chars
📄
pasted-code-1771987026513.txt
txt 243 lines
▶
==============================
ZODIAC SMP + SUPPLY DROP SYSTEM
==============================

OVERVIEW:
Competitive SMP plugin featuring:
- 12 Zodiac Classes
- Ability I & Ability II
- Per-zodiac cooldown config
- Per-zodiac damage config
- Trust system
- Reroll system
- Actionbar cooldown display
- Cinematic Supply Drop
- INVENTORY INVENTORY GUI editors
- Fully configurable

------------------------------
COMMANDS (FINAL LIST)
------------------------------

/zodiac INVENTORY INVENTORY GUI          (OP)
/zodiac withdraw
/ability 1
/ability 2
/trust add 
/trust remove 
/controls
/reroll      (OP)
/start               (OP)

/supply drop fall    (OP)
/supply drop INVENTORY INVENTORY GUI     (OP)

No extra commands.

------------------------------
TRUST SYSTEM
------------------------------

- Trusted players cannot damage each other.
- Applies to abilities and passives.
- If ability says "ignores trusted", it bypasses protection.
- Stored by UUID.
- Persistent across restarts.

------------------------------
CONTROLS SYSTEM
------------------------------

Default:
- /ability 1
- /ability 2

If /controls enabled:
- SHIFT → Ability I
- SHIFT + F → Ability II

------------------------------
/START
------------------------------

Broadcast:
🌠 Zodiac SMP Started!
Everyone has been given their Zodiac!

- Randomly assigns zodiac to all online players.
- Applies passives.
- Saves player data.
- Plays toast + enchant particles.

------------------------------
/REROLL 
------------------------------

- Removes current zodiac.
- Assigns new random zodiac.
- Resets cooldowns.
- Reapplies passive.
- Shows title to player.

------------------------------
REROLL BOOK
------------------------------

Item: Enchanted Book
Name: §dZodiac Reroll
- One-time use.
- Opens Zodiac INVENTORY INVENTORY GUI.
- Consumed on use.
- Cannot be used in combat.

------------------------------
COOLDOWN SYSTEM
------------------------------

- Separate cooldown for Ability I and II.
- Pulled from config.
- Stored per player.
- Actionbar display.
- Color coded:
  Green → Ready
  Yellow → Low time
  Red → On cooldown

If both active:
A1: 14s | A2: 29s

------------------------------
DAMAGE SYSTEM
------------------------------

Final Damage = Ability Damage × Global Multiplier

Trust check before applying damage.

------------------------------
CONFIG.YML
------------------------------

zodiac:
  auto_assign_on_start: true
  allow_withdraw: true
  combat_tag_seconds: 5

cooldowns:
  Aries: { ability1: 20, ability2: 35 }
  Taurus: { ability1: 25, ability2: 40 }
  Gemini: { ability1: 30, ability2: 25 }
  Cancer: { ability1: 30, ability2: 28 }
  Leo: { ability1: 22, ability2: 35 }
  Virgo: { ability1: 25, ability2: 40 }
  Libra: { ability1: 30, ability2: 30 }
  Scorpio: { ability1: 18, ability2: 30 }
  Sagittarius: { ability1: 20, ability2: 35 }
  Capricorn: { ability1: 25, ability2: 45 }
  Pisces: { ability1: 22, ability2: 30 }

damage:
  multiplier: 1.0
  abilities:
    Aries: { ability1: 2.5, ability2: 3.0 }
    Taurus: { ability1: 2.0, ability2: 3.0 }
    Gemini: { ability1: 2.0, ability2: 3.5 }
    Cancer: { ability1: 0.0, ability2: 3.0 }
    Leo: { ability1: 3.5, ability2: 3.0 }
    Virgo: { ability1: 3.0, ability2: 0.0 }
    Libra: { ability1: 3.0, ability2: 2.0 }
    Scorpio: { ability1: 2.0, ability2: 2.5 }
    Sagittarius: { ability1: 3.0, ability2: 2.5 }
    Capricorn: { ability1: 3.0, ability2: 4.0 }
    Pisces: { ability1: 3.0, ability2: 1.0 }

passives:
  dodge_chance_percent: 10
  poison_chance_percent: 10
  bonus_hearts:
    Aries: 1
    Capricorn: 2
    Pisces_water: 2
    Pisces_normal: 1

reroll:
  enabled: true
  consume_book: true
  give_book_on_start: false

particles:
  enabled: true
  intensity: normal

sounds:
  enabled: true

supplydrop:
  spawn_height: 60
  fall_duration: 120      # 30 – 3600 seconds
  circle_radius: 8
  particle_color: RED
  spawn_barrel: true
  leak_coordinates: true

------------------------------
SUPPLY DROP SYSTEM
------------------------------

Command:
/supply drop fall

INVENTORY INVENTORY GUI:
/supply drop INVENTORY INVENTORY GUI

On spawn:
🌠 Supply Drop Incoming!
📍 X: 1243 Y: 132 Z: -876
🕒 Landing in 20 seconds...

Timer Range:
Minimum: 30 seconds
Maximum: 1 hour (3600 seconds)

Actionbar:
Landing In: 45s
Landing In: 12m 34s
Landing In: 1h 00m 00s

Color Scaling:
Green >5m
Yellow 1–5m
Gold <1m
Red <10s

Circle:
- Rotating animated ring
- Configurable radius
- Configurable particle color

Landing:
- Explosion particle (visual only)
- Cloud burst
- Beacon sound
- No terrain damage
- Barrel spawns (if enabled)

Only 1 active drop at a time.

------------------------------
SMP FLOW
------------------------------

1. Admin runs /start
2. All players get random Zodiac
3. Independent cooldown abilities
4. Trust prevents friendly fire
5. Admin runs /supply drop fall
6. Coordinates leak
7. Timer counts down
8. Drop lands
9. PvP chaos begins

==============================
END OF SYSTEM
==============================
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
40 3,001
src/main/java/com/zodiacsmp/ZodiacSMP.java
package com.zodiacsmp;

import com.zodiacsmp.commands.AbilityCommand;
import com.zodiacsmp.commands.ParticlesCommand;
import com.zodiacsmp.commands.RerollCommand;
import com.zodiacsmp.commands.SolEventsCommand;
import com.zodiacsmp.commands.TrustCommand;
import com.zodiacsmp.inventory.gui.GUIListener;
import com.zodiacsmp.inventory.gui.GUIManager;
import com.zodiacsmp.listeners.*;
import com.zodiacsmp.managers.*;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class ZodiacSMP extends JavaPlugin {
    
    private PlayerDataManager playerDataManager;
    private AbilityManager abilityManager;
    private TrustManager trustManager;
    private CombatManager combatManager;
    private ParticleManager particleManager;
    private SoundManager soundManager;
    private GUIManager guiManager;
    
    private ConfigManager configManager;
    private EventToggleManager eventToggleManager;
    private DeathEffectManager deathEffectManager;
    private SupplyDropManager supplyDropManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.trustManager = new TrustManager(this);
        this.combatManager = new CombatManager(this);
        this.particleManager = new ParticleManager(this);
        this.soundManager = new SoundManager(this);
        this.abilityManager = new AbilityManager(this);
        this.guiManager = new GUIManager();
        
        this.eventToggleManager = new EventToggleManager(this);
        this.deathEffectManager = new DeathEffectManager(this);
        this.supplyDropManager = new SupplyDropManager(this);
        
        registerCommands();
        registerListeners();
        
        Bukkit.getScheduler().runTaskTimer(this, () -> {
            combatManager.updateCombatTags();
            abilityManager.updateCooldowns();
        }, 0L, 20L);
        
        getLogger().info("ZodiacSMP has been enabled!");
        getLogger().info("SolEvents Core features loaded!");
    }
    
    @Override
    public void onDisable() {
        if (combatManager != null) {
            combatManager.shutdown();
        }
        if (playerDataManager != null) {
            playerDataManager.saveAllData();
        }
        if (eventToggleManager != null) {
            eventToggleManager.shutdown();
        }
        if (supplyDropManager != null) {
            supplyDropManager.shutdown();
        }
        getLogger().info("ZodiacSMP has been disabled!");
    }
    
    private void registerCommands() {
        getCommand("trust").setExecutor(new TrustCommand(this));
        getCommand("ability").setExecutor(new AbilityCommand(this));
        getCommand("particles").setExecutor(new ParticlesCommand(this));
        getCommand("solevents").setExecutor(new SolEventsCommand(this));
        getCommand("reroll").setExecutor(new RerollCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new PlayerDataListener(this), this);
        Bukkit.getPluginManager().registerEvents(new TrustListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        
        Bukkit.getPluginManager().registerEvents(new EventToggleListener(this), this);
        Bukkit.getPluginManager().registerEvents(new DeathEffectListener(this), this);
        Bukkit.getPluginManager().registerEvents(new WeaponToggleListener(this), this);
        Bukkit.getPluginManager().registerEvents(new DamageSettingsListener(this), this);
        Bukkit.getPluginManager().registerEvents(new DimensionSettingsListener(this), this);
    }
}