J
๐Ÿ“Ž 1 file 9,492 chars
๐Ÿ“„
Aspects3.txt
txt 170 lines
โ–ถ
Aspect SMP Plugin

All Messages Prefix : Aspect SMP ( in red bold )

In This Plugin Some Custom Unique Natures Aspect Exist And Their Unique Abilities and colour themes

Electric Aspect : (Colour : Yellow) (default item : Yellow Dye)
passive : gets strength 1 effect in weather is thunder storm
ability1 : Strikes Enemy With 10 Thunder Strikes At Once Dealing 19 Damage ( Ability Name : Thunderbolt)
ability2 : strikes its owner with a friendly thunder strike and gives its owner Speed 7 Effect for 10 Seconds ( Ability name : speedy)
terrain attack : Every Player Gets A Title "The Field Is Charged" in yellow and subtitle "Electric Terrain Are Now Stronger" and all electric aspect users gets strength 2 effect for 1 minute

Dark Aspect : (Colour : Black) (default item : black dye)
passive: gets strength 1 at night and weakness 1 at day
ability1 : Spawns a 10x10 obsidian box empty from inside spawns for 20 seconds and after 20 seconds its dissapears
ability2 : Player in 10 blocks radius except its owner will get nausea 2 , blindness 2 and slowness 2 effect for 7 seconds

Fighting Aspect : (Colour : Red) (Default item : red dye)
passive : strength 1 permanent effect
ability1 : gets strength 3 for 5 seconds 
ability2 : dashes forward and launches enemy away who are in the path

Dragon Aspect : (Colour : Blue) (Default item : blue dye)
ability1 : Shoots A Ball In The Sky And Meteors Will Shoot On the Ground for 5 seconds
ability2 : creates a dark blue circle with particles launching the players in 10 blocks radius away

Ice Aspect : (Colour : Light Blue) (default item : Light Blue Dye)
ability1 : shoots 3 ice spikes at enemy dealing 15 damage
ability2 : a message will pop up to its owner "Hit A Player To Freeze Them" And If Its Owner Hits A Player the victim will be freezed and cannot moved for 5 seconds

 Fairy Aspect : (Colour : pink) (default item : pink dye)
 ability1 : Gets 3 Hearts Healed of its owner
 ability2 : waits 3 seconds to charge and after that Shoots a Beam At Where Its Owner's Crosshair is dealing 32 damage 
 
 Phychic Aspect : (Colour : pink) (default item : pink dye)
 ability1 : its owner will get a message "Hit A Player To Control Them" and if its owner hit a player he will be controlled at where its owner's crosshair is
 ability2 : glows the player in 30 blocks radius
 
 Grass Aspect : (Colour : Lime ) (Default item : Lime dye)
 ability1 : gives enemy a slight knockback that deals 17 damage
 ability2 : gives its owner strength 2 for 5 seconds
 terrain attack : All Grass Aspect Players in 50 blocks radius will het strength 2 effect for 30 seconds
 
 Water Aspect : (colour : light blue) (default item : light blue dye)
 passive : permanent dolphin grace 1 effect and strength 1 if in water or weather is rain
 ability1 : can ride water waves for 5 seconds water waves dissapears after 5 seconds
 ability2 : Sets weathers to rain and all water aspect users gets strength 1 effect ( ability name : Rain Dance)
 
 Cosmic Aspect : (colour : black) (default item : black dye)
 passive : none
 ability1 : pulls enemy but enemy must be on its owner's crosshair
 ability2 : Makes A circlr Shield With particles and knocks enemy away
 
 Fire Aspect : (colour : orange ) (default item : orange dye)
 passive : gets strength effect in nether and weakness effect if standing in water
ability1 : creates a circle with orange particles and burns player except its owner in 10 blocks radius
ability2 : shoots fireball at where its owner's crosshair is dealing 19 damage

Titan Aspect : (colour : brown) (default item : brown dye)
ability1 : its owner size sets to 0.4 for 10 seconds
ability2 : its owner will get a message "Hit A Player To Giant Curse Them" and if its owner hits a player the victim size will be set to 3.0

Air Aspect : (Colour : White) (default item : white dye)
ability1 : dashes forward 20 blocks
ability2 : spawns a tornado that takes the players in 20 blocks inside of it and spins them upwards and throws them

Ghost Aspect : (colour : purple) (default item : Purple dye)
ability1 : Dragon Sound Will Hear And Player in 20 blocks radius will get slowness 4 effect for 10 seconds
ability2 : its owner will get a message "Hit A Player To Make A Bond With Them" and if its owner hits a player they will be conncected and if its owner die the player who has bond with he/she will also die

Steel Aspect : (colour : gray) (default item : gray dye)
ability1 : its owner will get a message "Hit A Player To Steal A Random Item From Their Inventory" and if its owner hits a player a random item will be stealed from the victim's inventory and given to its owner
ability2 : give its owner resistance 2 effect for 20 seconds



Commands :

/aspect start - starts a countdown in title "5" in purple bold "4" in green bold "3" in yellow bold "2" in Blue bold "1" in red bold and after that new title will come "Aspect SMP" in red bold and subtitle "Has Started" in green text and every player gets 64 cooked beef as starter and also plays a totem use effect to make it look cool and every player gets a random aspect
/ability1 - uses ability1 of aspect
/ability2 - uses ability2 of aspect
/terrainattack - uses terrain attack of an aspect
/aspect announce  - a title will come "Aspect Announcement" in red bold and subtitle will be text written for title announcements
/announce  - a title will come "Aspect Announcement" in red bold and subtitle will be text written for title announcements
/aspect phase 1 - Disables the diamond helmet , diamond leggings , diamond chestplate , diamond boots , diamond sword and diamond axe recipes and world border sets to 3000 blocks and everyone will get a title "Phase 1" in red bold and subtitle "The Origins" In purple Text
/aspect phase 2 - enables the diamond helmet , diamond leggings , diamond chestplate , diamond boots , diamond sword and diamond axe recipes and world border sets to 6000 blocks and everyone will get a title "Phase 2" in red bold and subtitle "The Diamond Age" In blue Text but disables the netherite helmet , netherite chestplate , netherite leggings , netherite boots , netherite sword and netherite axe recipe
/aspect phase 3 - enables the netherite helmet , netherite chestplate , netherite leggings , netherite boots , netherite sword and netherite axe recipe world border sets to 9000 blocks and everyone will get a title "Phase 2" in red bold and subtitle "The Netherite Age" In black Text 
/aspect trust  - trusts a player and aspect abilities cannot be used on trusted player and also cannot hit them 
/aspect trust list - shows the lists of trusted players
/aspect untrust - untrusts a player and aspect abilities now can be used on them and also can hit them
/aspect reroll  - rerolls a player's aspect and gives them a random aspect and removes previous aspect's effect
/aspect ability1 - uses ability1 of an aspect
/aspect ability2 - uses ability2 of an aspect
/aspect lives withdraw  - withdraws the number the lifes
/aspect revive  - revives a player and revived player will have 3 lives 
/aspect customitem give  
/aspect set   - sets a player's specific aspect
/aspect withdraw - withdraws the aspect and gives it default item in the inventory 
/aspect INVENTORY GUI - shows all aspects and their abilities and custom items in the INVENTORY GUI and items cannot be taken from it only operator can take items from it




Each Player Haves 5 Lives 

Starter Lives : 5
Max Lives : 10
Banned After : 0 lives

if A Player is on 0 lives he will gone to spectator mode and cannot move in the void

Custom Recipes :

Aspect Crown Template : can be craft only 4 times
4x prismarine shard
1x heart of the sea
4x netherite ingot

Aspect's Crown : can be craft only once
4x Aspect Crown Template
4x Netherite Block
1x Nether Star

Aspect Life : (default item : Red Dye)
4x Red Dye
4x Ancient Debris
center slot empty

A Player Abilities Will Lock After Some Kills Like
1. Ability1 Will Unlock After 5 Kills
2. Ability2 Will Unlock After 5 Kills
By Default Player Abilities Will Be Locked

Revival Beacon : default item beacon
4x Aspect Lives
4x Diamond
1x heart of the sea 

/revive - player must be holding a revival beacon to use this and if used a INVENTORY GUI will open with all banned players head in it and if the user clicks one of those head that player will be revived





Player's Hotbar Will Be Like :-

if Abilities Are Locked ๐Ÿ”’ 
" Aspect | Locked ๐Ÿ”’  | Locked ๐Ÿ”’  | Aspectian Lives "

And If It Is Unlocked
" Aspect | Ability1  | Ability2 "

" Aspect | Ability1  | Ability2 "

Cooldowns :

Caution : Player Cant bypass The Cooldown By Rejoining Server Or by Server Restarting

Cooldowns :
Ability1 - 5 minutes
Ability2 - 5 minutes
Terrain Attacks - 10 minutes

Player's Aspect Or Player Data Will Not Gone Even If Server Restarts Or Crashes or stop and start
Make The Plugin Low End And No Console Logs Spam For Passive Abilities And Plugin Can Also Run Even in a 2gb ram server Make The Plugin Light Weight 
and all features and abilities passive abilities everything should work properly
also add tab completion for all commands

all features should be implied properly
Kodari AI
KodariJul 6 at 8:47 am 118

Iโ€™ll build AspectSMP โ€” a full custom aspect/ability SMP plugin with 15 unique aspects, lives system, phases, custom recipes, GUI, and persistent cooldowns.

AspectSMP
AspectSMP transforms your server into an action-packed SMP where every player is randomly granted one of 15 unique Aspects (Electric, Dark, Fighting, Dragon, Ice, Fairy, Psychic, Grass, Water, Cosmic, Fire, Titan, Air, Ghost, Steel), each with distinct passive effects, two unlockable abilities, and cooldowns that persist through restarts. Features a lives system, trust protection, phased progression with recipe control, custom craftable items like the Aspect's Crown and Revival Beacon, an inventory GUI showcasing all aspects, and full tab-completed commands โ€” optimized to run smoothly even on low-end 2GB servers.

That completes AspectSMP: 15 unique aspects with passives/abilities/terrain attacks, lives & trust systems, persistent cooldowns/kill-unlocks surviving restarts, phase-based recipe/border progression, limited custom recipes (Crown Template ร—4, Crown ร—1), Revival Beacon GUI revive flow, aspect info GUI, and full tab-completion across all commands.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
28 2,091
src/main/java/com/aspectsmp/AspectSMP.java
package com.aspectsmp;

import com.aspectsmp.command.AbilityCommand;
import com.aspectsmp.command.AnnounceCommand;
import com.aspectsmp.command.AspectCommand;
import com.aspectsmp.command.ReviveCommand;
import com.aspectsmp.data.DataManager;
import com.aspectsmp.gui.AspectInfoGUI;
import com.aspectsmp.gui.ReviveGUI;
import com.aspectsmp.inventory.gui.GUIListener;
import com.aspectsmp.inventory.gui.GUIManager;
import com.aspectsmp.listener.CombatListener;
import com.aspectsmp.listener.CraftListener;
import com.aspectsmp.listener.PlayerListener;
import com.aspectsmp.manager.AspectManager;
import com.aspectsmp.manager.PhaseManager;
import com.aspectsmp.task.PassiveTask;
import com.aspectsmp.util.ItemUtil;
import com.cryptomorin.xseries.XMaterial;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.inventory.RecipeChoice;
import org.bukkit.inventory.ShapedRecipe;
import org.bukkit.plugin.java.JavaPlugin;

public class AspectSMP extends JavaPlugin {

    private DataManager dataManager;
    private AspectManager aspectManager;
    private PhaseManager phaseManager;
    private GUIManager guiManager;
    private AspectInfoGUI aspectInfoGUI;
    private ReviveGUI reviveGUI;

    @Override
    public void onEnable() {
        ItemUtil.init(this);
        this.dataManager = new DataManager(this);
        this.aspectManager = new AspectManager(this);
        this.phaseManager = new PhaseManager(this);
        this.phaseManager.syncStoredPhase();
        this.guiManager = new GUIManager();
        this.aspectInfoGUI = new AspectInfoGUI();
        this.reviveGUI = new ReviveGUI(this);

        Bukkit.getPluginManager().registerEvents(new GUIListener(guiManager), this);
        Bukkit.getPluginManager().registerEvents(new PlayerListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new CraftListener(this), this);

        AspectCommand aspectCommand = new AspectCommand(this);
        getCommand("aspect").setExecutor(aspectCommand);
        getCommand("aspect").setTabCompleter(aspectCommand);
        getCommand("ability1").setExecutor(new AbilityCommand(this, AbilityCommand.Type.ABILITY1));
        getCommand("ability2").setExecutor(new AbilityCommand(this, AbilityCommand.Type.ABILITY2));
        getCommand("terrainattack").setExecutor(new AbilityCommand(this, AbilityCommand.Type.TERRAIN));
        getCommand("announce").setExecutor(new AnnounceCommand(this));
        getCommand("revive").setExecutor(new ReviveCommand(this));

        registerCustomRecipes();

        new PassiveTask(this).runTaskTimer(this, 100L, 100L);
    }

    @Override
    public void onDisable() {
        if (dataManager != null) dataManager.save();
    }

    private void registerCustomRecipes() {
        NamespacedKey templateKey = new NamespacedKey(this, "crown_template");
        ShapedRecipe templateRecipe = new ShapedRecipe(templateKey, ItemUtil.createCrownTemplate());
        templateRecipe.shape("PPP", "PHN", "NNN");
        templateRecipe.setIngredient('P', new RecipeChoice.MaterialChoice(
                XMaterial.matchXMaterial("PRISMARINE_SHARD").map(XMaterial::parseMaterial).orElse(Material.PRISMARINE_SHARD)));
        templateRecipe.setIngredient('H', new RecipeChoice.MaterialChoice(
                XMaterial.matchXMaterial("HEART_OF_THE_SEA").map(XMaterial::parseMaterial).orElse(Material.HEART_OF_THE_SEA)));
        templateRecipe.setIngredient('N', new RecipeChoice.MaterialChoice(
                XMaterial.matchXMaterial("NETHERITE_INGOT").map(XMaterial::parseMaterial).orElse(Material.NETHERITE_INGOT)));
        Bukkit.addRecipe(templateRecipe);

        NamespacedKey crownKey = new NamespacedKey(this, "aspect_crown");
        ShapedRecipe crownRecipe = new ShapedRecipe(crownKey, ItemUtil.createAspectCrown());
        crownRecipe.shape("TBT", "BNB", "TBT");
        crownRecipe.setIngredient('T', new RecipeChoice.ExactChoice(ItemUtil.createCrownTemplate()));
        crownRecipe.setIngredient('B', new RecipeChoice.MaterialChoice(
                XMaterial.matchXMaterial("NETHERITE_BLOCK").map(XMaterial::parseMaterial).orElse(Material.NETHERITE_BLOCK)));
        crownRecipe.setIngredient('N', new RecipeChoice.MaterialChoice(
                XMaterial.matchXMaterial("NETHER_STAR").map(XMaterial::parseMaterial).orElse(Material.NETHER_STAR)));
        Bukkit.addRecipe(crownRecipe);

        NamespacedKey lifeKey = new NamespacedKey(this, "aspect_life");
        ShapedRecipe lifeRecipe = new ShapedRecipe(lifeKey, ItemUtil.createAspectLife());
        lifeRecipe.shape("RAR", "A A", "RAR");
        lifeRecipe.setIngredient('R', new RecipeChoice.MaterialChoice(
                XMaterial.matchXMaterial("RED_DYE").map(XMaterial::parseMaterial).orElse(Material.RED_DYE)));
        lifeRecipe.setIngredient('A', new RecipeChoice.MaterialChoice(
                XMaterial.matchXMaterial("ANCIENT_DEBRIS").map(XMaterial::parseMaterial).orElse(Material.ANCIENT_DEBRIS)));
        Bukkit.addRecipe(lifeRecipe);

        NamespacedKey beaconKey = new NamespacedKey(this, "revival_beacon");
        ShapedRecipe beaconRecipe = new ShapedRecipe(beaconKey, ItemUtil.createRevivalBeacon());
        beaconRecipe.shape("LDL", "DHD", "LDL");
        beaconRecipe.setIngredient('L', new RecipeChoice.ExactChoice(ItemUtil.createAspectLife()));
        beaconRecipe.setIngredient('D', new RecipeChoice.MaterialChoice(
                XMaterial.matchXMaterial("DIAMOND").map(XMaterial::parseMaterial).orElse(Material.DIAMOND)));
        beaconRecipe.setIngredient('H', new RecipeChoice.MaterialChoice(
                XMaterial.matchXMaterial("HEART_OF_THE_SEA").map(XMaterial::parseMaterial).orElse(Material.HEART_OF_THE_SEA)));
        Bukkit.addRecipe(beaconRecipe);
    }

    public DataManager getDataManager() { return dataManager; }
    public AspectManager getAspectManager() { return aspectManager; }
    public PhaseManager getPhaseManager() { return phaseManager; }
    public GUIManager getGuiManager() { return guiManager; }
    public AspectInfoGUI getAspectInfoGUI() { return aspectInfoGUI; }
    public ReviveGUI getReviveGUI() { return reviveGUI; }
}