MCPcopy Index your code
hub / github.com/XZot1K/SimplePortals

github.com/XZot1K/SimplePortals @1.7.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.7.6 ↗ · + Follow
316 symbols 1,229 edges 29 files 40 documented · 13% updated 7mo ago1.7.6 · 2024-05-04★ 5112 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

How to use SimplePortals API in your plugin

In order to properly use SimplePortals you will need to be able to retrieve the plugin's instance. You can do this by following these instructions:

  1. Download the SimplePortals plugin and add it to your plugin's dependencies.
  2. Make sure your plugin can grab the SimplePortals instance from your Main class file like below:
import org.bukkit.plugin.java.JavaPlugin;
import xzot1k.plugins.sp.SimplePortals;

public class Main extends JavaPlugin {

    private SimplePortals simplePortals;

    @Override
    public void onEnable() {
        if (!isSimplePortalsInstalled()) {
            getServer().getPluginManager().disablePlugin(this); // disable plugin since SimplePortals is NOT installed.
            return;
        }

        // SimplePortals was found and now can be accessed with the getSimplePortals() getter.
    }

    // This method tells you whether SimplePortals is installed or not.
    private boolean isSimplePortalsInstalled() {
        if (getServer().getPluginManager().getPlugin("SimplePortals") != null) {
            this.simplePortals = SimplePortals.getPluginInstance();
            return true;
        }
        return false;
    }

    public SimplePortals getSimplePortals() { return simplePortals; }

}
  1. Once 1 and 2 are completed, add "depend: [SimplePortals]" or related thigns inside your plugin.yml (This step is optional, but never hurts to make sure SimplePortals is installed).
  2. Everything should be all set. As a test, call the getSimplePortals() method from your Main class and you will be able to access the Manager class!

Extension points exported contracts — how you extend this code

TitleHandler (Interface)
(no doc) [4 implementers]
src/main/java/xzot1k/plugins/sp/core/packets/titles/TitleHandler.java
ParticleHandler (Interface)
(no doc) [4 implementers]
src/main/java/xzot1k/plugins/sp/core/packets/particles/ParticleHandler.java
BarHandler (Interface)
(no doc) [4 implementers]
src/main/java/xzot1k/plugins/sp/core/packets/bar/BarHandler.java

Core symbols most depended-on inside this repo

getPluginInstance
called by 334
src/main/java/xzot1k/plugins/sp/core/Commands.java
getManager
called by 253
src/main/java/xzot1k/plugins/sp/SimplePortals.java
getLangConfig
called by 195
src/main/java/xzot1k/plugins/sp/SimplePortals.java
colorText
called by 130
src/main/java/xzot1k/plugins/sp/api/Manager.java
getRegion
called by 81
src/main/java/xzot1k/plugins/sp/api/objects/Portal.java
getPluginInstance
called by 72
src/main/java/xzot1k/plugins/sp/api/Manager.java
getPluginInstance
called by 55
src/main/java/xzot1k/plugins/sp/api/objects/Portal.java
getServerVersion
called by 54
src/main/java/xzot1k/plugins/sp/SimplePortals.java

Shape

Method 287
Class 23
Enum 3
Interface 3

Languages

Java100%

Modules by API surface

src/main/java/xzot1k/plugins/sp/api/Manager.java54 symbols
src/main/java/xzot1k/plugins/sp/api/objects/Portal.java46 symbols
src/main/java/xzot1k/plugins/sp/core/Commands.java29 symbols
src/main/java/xzot1k/plugins/sp/SimplePortals.java22 symbols
src/main/java/xzot1k/plugins/sp/core/Listeners.java21 symbols
src/main/java/xzot1k/plugins/sp/api/objects/SerializableLocation.java20 symbols
src/main/java/xzot1k/plugins/sp/core/tasks/RegionTask.java17 symbols
src/main/java/xzot1k/plugins/sp/core/tasks/HighlightTask.java17 symbols
src/main/java/xzot1k/plugins/sp/api/events/PortalEnterEvent.java12 symbols
src/main/java/xzot1k/plugins/sp/api/objects/TransferData.java10 symbols
src/main/java/xzot1k/plugins/sp/core/objects/TaskHolder.java7 symbols
src/main/java/xzot1k/plugins/sp/api/objects/Region.java7 symbols

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add SimplePortals \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page