moongamer9

Save New Duplicate & Edit Raw Udemy Course This power is named as: Portal Power

--Passive ability.

The Mechanic:

The player will get a permanent effect of Speed I and Regeneration I for infinite time, and any other player who has your specifically signed book anywhere in their inventory passively receives Speed I and Regeneration I as long as they are within 100 blocks of the player with this Portal Power. This effect will only apply to players when they have Portal Power.

--Active ability.

The Minecraft Mechanic:

The player saves exact X, Y, Z coordinates. To save the location, use the command (/save). The coordinate of the block he is standing on will be saved, and they will get a chat message: (coordinates saved at <their coordinates>). This message cannot be seen by anyone else in the chat except him/her.

When they activate the power later by the command (/use), a big circular golden visible portal of about 5×5 blocks will appear vertically at that saved location and also at the location where the player is currently standing. The portal reference must be like the portal in the endgame of the Avengers movie made by Doctor Strange. The inside of the circle should be yellow in colour, like how the Nether portal has purple.

The player takes 2 seconds to teleport back to the saved location. Also, if any other player wants to travel through that portal, they need a book in their main hand or off-hand signed by the player who activated the portal.

The player can change their saved coordinates, and the player can reuse the power after 30 minutes.

Also, the player can send a request to anyone on the server to create a portal at their current location by using the command (/request <player name>). The other player can accept the request by using the command (/accept <player name>). After accepting the request, the portal will appear at the location of both players. The properties and design of the portal must be the same as when using the (/use) command.

This request ability can be reused after 10 minutes.

For any of the powers, the power holder does not need the book. The portal lasts for exactly 2 minutes.

--Admin power.

The player who has operator (here called admin) power can access the command (/powers give portal <player name>) and only then a player gets the Portal Power. On using this command, the chat shows (power given to <player name>).

The admin can go through any player’s portal without the signed book. The admin can reset a player’s time by using the command (/time reset <player name>). Also, the admin can remove/take back the Portal Power from a player by using the command (/powers remove portal <player name>).

The player can also use the command (/time) in the chat to show how much time is left to use the ability. The timer will be 00:00, and the font colour will be green if the player can use the ability, but if there is some time left, the timer will be in red font colour.

The chat shows the timer for each ability in vertical direction in the order:

  1. /use <timer cooldown>
  2. <Portal activation time>

If the portal is not activated, the timer shows not activated.

Kodari AI
KodariApr 15 at 8:49 am 16,465 (v2)

I’ll create a mystical portal teleportation system plugin with passive effects and book-based power sharing.

PortalPower
A supernatural portal ability plugin that grants players mystical teleportation powers. Players with Portal Power receive passive speed and regeneration effects, can save locations and create golden circular portals for teleportation, and share their power with others through signed books. Features include /save for coordinate saving, /use for portal activation with 30min cooldown, /request system for creating portals to other players, and comprehensive admin controls for power management.

Files created successfully! The PortalPower plugin is complete with:

  • Passive Speed I & Regeneration I effects for power holders and nearby players with signed books

  • /save command to save coordinates

  • /use command to create portals (30min cooldown)

  • /request and /accept for player-to-player portal creation (10min cooldown)

  • /time command showing cooldowns with color-coded timers

  • /powers give/remove portal commands for admins

  • Golden circular portal effects using particles

  • 2-second teleport delay with signed book verification

  • Complete admin controls including cooldown resets

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
18 1,168
src/main/java/com/portalpower/PortalPower.java
package com.portalpower;

import com.portalpower.commands.*;
import com.portalpower.listeners.PlayerJoinListener;
import com.portalpower.listeners.PortalInteractListener;
import com.portalpower.managers.ConfigManager;
import com.portalpower.managers.PassiveEffectManager;
import com.portalpower.managers.PlayerDataManager;
import com.portalpower.managers.PortalManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class PortalPower extends JavaPlugin {

    private ConfigManager configManager;
    private PlayerDataManager playerDataManager;
    private PortalManager portalManager;
    private PassiveEffectManager passiveEffectManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.portalManager = new PortalManager(this);
        this.passiveEffectManager = new PassiveEffectManager(this);

        registerCommands();
        registerListeners();

        passiveEffectManager.start();

        getLogger().info("PortalPower has been enabled!");
    }

    @Override
    public void onDisable() {
        if (passiveEffectManager != null) {
            passiveEffectManager.stop();
        }
        if (portalManager != null) {
            portalManager.removeAllPortals();
        }
        getLogger().info("PortalPower has been disabled!");
    }

    private void registerCommands() {
        getCommand("save").setExecutor(new SaveCommand(this));
        getCommand("use").setExecutor(new UseCommand(this));
        getCommand("request").setExecutor(new RequestCommand(this));
        getCommand("accept").setExecutor(new AcceptCommand(this));
        getCommand("time").setExecutor(new TimeCommand(this));
        getCommand("powers").setExecutor(new PowersCommand(this));
    }

    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        getServer().getPluginManager().registerEvents(new PortalInteractListener(this), this);
    }
}