_ayush.xd_
πŸ“Ž 1 file 3,626 chars
πŸ“„
pasted-code-1773229200554.txt
txt 115 lines
β–Ά
Create a Minecraft 1.21 Paper/Spigot plugin for a Token SMP style SMP server with advanced features. The plugin name is "UltimateTokenSMP".

1. SMP Start Command
- Command: /start
- When executed by an operator:
  - All players in the lobby are launched into the air
  - Play cinematic animations with particles, angles, spinning, sounds
  - While flying, players receive token rewards
  - Starts a 10-minute **Newbie Protection** timer (no PvP damage to new players)
  - Broadcast a message to all players announcing SMP start
  - Optional configurable launch height, particles, sounds

2. HeadSteal Life System
- Every player starts with 5 hearts
- On player kill, killer steals 1 heart
- Killed player loses 1 heart permanently
- If hearts reach 0 (5 deaths), player is permanently banned
- Cinematic kill animations (titles, particles, sounds)
- Player heads drop on death

3. Login Authentication System
- Players must register and login:
/register 
/login 
/changepassword
- Block movement & chat until login
- Secure storage (SQLite/MySQL)

4. AntiCheat System
- KillAura detection
- Reach detection
- Speed hack detection
- AutoClick detection
- NoFall detection
- Punishments: warn, kick, ban

5. Team System
- /team create , /team invite , /team join, /team leave, /team chat, /team disband
- Friendly fire toggle
- Team prefix tags
- Team INVENTORY GUI

6. Mob Powers System (20+ OP powers)
Players can unlock powers using tokens:

1. Blaze – fire resistance, fireball  
2. Enderman – teleport, projectile dodge  
3. Creeper – small explosion  
4. Spider – wall climbing  
5. Phantom – slow fall, dash  
6. Warden – strength boost, darkness pulse  
7. Skeleton – rapid arrow  
8. Slime – jump boost, slime slam  
9. Wither Skeleton – wither strike  
10. Zombie – lifesteal attack  
11. Piglin – gold loot magnet  
12. Ghast – fireball barrage  
13. Drowned – trident throw  
14. Guardian – water shield  
15. Shulker – levitation attack  
16. Iron Golem – knockback slam  
17. Snow Golem – snowball barrage  
18. Rabbit – super jump, dash  
19. Fox – quick dash, dodge  
20. Bee – poison sting  
21. Wolf – pack boost  
22. Cat – stealth jump  
23. Magma Cube – lava splash  

- Each power has cooldown, animation, sound, particle effects
- INVENTORY GUI activation menu (/powers)

7. Token / Orb System
- Earn tokens by:
  - Killing players
  - Mining rare ores
  - Completing quests
  - Flying during SMP start (bonus)
- Tokens can unlock powers, upgrade abilities, buy cosmetics

8. OP Cinematic Animations
- Kill animations
- Unlocking powers
- Heart steal animations
- Token rewards
- Flying launch animations (/start)

9. Combat Log System
- Player logs out during combat β†’ dies, head drops, broadcast warning

10. Player Stats
- /stats shows kills, deaths, hearts, tokens, powers unlocked

11. Admin Commands
- /smp giveheart, /smp removeheart, /smp givetoken, /smp givepower, /smp reload, /smp unbanplayer

12. Data Storage
- SQLite or MySQL
- Store hearts, powers, tokens, team data, login data

13. Config Files
- config.yml
- powers.yml
- animations.yml
- teams.yml
- SMP start settings (height, particle type, token reward amount, newbie protection duration)

14. Performance
- Optimized for 50–150 players with async tasks where possible
- Particle and animation optimizations for lag reduction

IMPORTANT: 
- No bosses system included
- SMP start must include flying + token rewards + newbie protection
- Plugin must be fully configurable via YAML files
Kodari AI
KodariMar 11 at 11:46 am 52,522 (v2)

I’ll create a comprehensive Token SMP plugin with all requested features including flying launch, mob powers, team system, authentication, and more.

UltimateTokenSMP
An advanced Token SMP plugin featuring cinematic player launches with token rewards, HeadSteal life system with 5 hearts, 23+ unique mob powers, team management, login authentication, comprehensive anticheat, combat logging prevention, and newbie protection. Includes GUI-based interfaces for powers and teams, full administrative controls, and optimized performance for large servers. Players compete to survive by managing hearts, earning tokens, and unlocking powerful abilities.

Analysis

  • Massive plugin with 23+ mob powers, authentication, team system, anticheat, life system

  • GUI-based interfaces for powers and teams

  • Cinematic launch system with flying + token rewards

  • Database storage for persistence

  • Performance optimized for 50-150 players

Now I’ll create the power implementations (all 23 powers):

Now I’ll create the GUI implementations and remaining files:

Now I’ll create all the command classes. Due to length limits, I’ll continue in the next files:

Now I’ll create the listener classes:

Finally, I’ll create the main plugin class:

Complete Token SMP plugin created with all requested features including cinematic flying launch, 23 mob powers, team system with GUI, authentication, anticheat, combat logging prevention, life/heart system, and admin commands.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
Code
67 4,445
src/main/java/com/ultimatetokensmp/UltimateTokenSMP.java
package com.ultimatetokensmp;

import com.ultimatetokensmp.command.*;
import com.ultimatetokensmp.database.DatabaseHandler;
import com.ultimatetokensmp.inventory.gui.GUIListener;
import com.ultimatetokensmp.inventory.gui.GUIManager;
import com.ultimatetokensmp.listener.*;
import com.ultimatetokensmp.manager.*;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;

@Getter
public class UltimateTokenSMP extends JavaPlugin {
    private DatabaseHandler databaseHandler;
    private PlayerDataManager playerDataManager;
    private TokenManager tokenManager;
    private PowerManager powerManager;
    private TeamManager teamManager;
    private AuthManager authManager;
    private CombatLogManager combatLogManager;
    private AntiCheatManager antiCheatManager;
    private GUIManager guiManager;
    
    private FileConfiguration powersConfig;
    private FileConfiguration animationConfig;
    private FileConfiguration teamsConfig;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        loadCustomConfigs();
        
        databaseHandler = new DatabaseHandler(this);
        playerDataManager = new PlayerDataManager(this);
        tokenManager = new TokenManager(this);
        powerManager = new PowerManager(this);
        teamManager = new TeamManager(this);
        authManager = new AuthManager(this);
        combatLogManager = new CombatLogManager(this);
        antiCheatManager = new AntiCheatManager(this);
        guiManager = new GUIManager();
        
        registerCommands();
        registerListeners();
        
        getLogger().info("UltimateTokenSMP has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (playerDataManager != null) {
            playerDataManager.saveAllData();
        }
        
        if (databaseHandler != null) {
            databaseHandler.close();
        }
        
        getLogger().info("UltimateTokenSMP has been disabled!");
    }
    
    private void loadCustomConfigs() {
        File powersFile = new File(getDataFolder(), "powers.yml");
        if (!powersFile.exists()) {
            saveResource("powers.yml", false);
        }
        powersConfig = YamlConfiguration.loadConfiguration(powersFile);
        
        File animationFile = new File(getDataFolder(), "animations.yml");
        if (!animationFile.exists()) {
            saveResource("animations.yml", false);
        }
        animationConfig = YamlConfiguration.loadConfiguration(animationFile);
        
        File teamsFile = new File(getDataFolder(), "teams.yml");
        if (!teamsFile.exists()) {
            saveResource("teams.yml", false);
        }
        teamsConfig = YamlConfiguration.loadConfiguration(teamsFile);
    }
    
    public void reloadAllConfigs() {
        reloadConfig();
        
        File powersFile = new File(getDataFolder(), "powers.yml");
        powersConfig = YamlConfiguration.loadConfiguration(powersFile);
        
        File animationFile = new File(getDataFolder(), "animations.yml");
        animationConfig = YamlConfiguration.loadConfiguration(animationFile);
        
        File teamsFile = new File(getDataFolder(), "teams.yml");
        teamsConfig = YamlConfiguration.loadConfiguration(teamsFile);
    }
    
    private void registerCommands() {
        getCommand("start").setExecutor(new StartCommand(this));
        getCommand("register").setExecutor(new RegisterCommand(this));
        getCommand("login").setExecutor(new LoginCommand(this));
        getCommand("changepassword").setExecutor(new ChangePasswordCommand(this));
        getCommand("team").setExecutor(new TeamCommand(this));
        getCommand("powers").setExecutor(new PowersCommand(this));
        getCommand("stats").setExecutor(new StatsCommand(this));
        getCommand("smp").setExecutor(new SMPAdminCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerQuitListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerMoveListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerChatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerDamageListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new BlockBreakListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerInteractListener(this), this);
    }
}