GithubHelp home page GithubHelp logo

iblitzkriegi / skript-hack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wheezygold7931/skript-hack

0.0 2.0 0.0 29 KB

Provides syntax registering post-skript loading.

License: MIT License

Java 100.00%

skript-hack's Introduction

skript-hack

Provides syntax registering post-skript loading.

Commands

/skript-hack <true/false> : Toggles to open/close Skript's registrations.

Skript Syntax

Enable Hack - (enable|start)[ the] skript(-| )hack
Disable Hack - (disable|stop)[ the] skript(-| )hack

Developer API

skript-hack provides an API for developers to load their syntax after Skript is done accepting new syntax. This could be used in the case of a server owner trying to load a skript addon via an external plugin loader.
Methods:

SkriptHack.enableRegistrations() - Enables the SkriptHack allowing for new registrations.

SkriptHack.disableRegistrations() - Disables the SkriptHack denying any new registrations.

//Example Use
if (Skript.isAcceptRegistrations()) {
  //Load your syntax
} else {
    if (Bukkit.getPluginManager().getPlugin("skript-hack") == null) { //Make sure the user has this plugin.
        //Disable your plugin, or inform them that you support this plugin.
    }
    try {
        SkriptHack.enableRegistrations(); //Enable's Skript's registrations so your syntax can load [post skript-init]
        //Load your syntax
        SkriptHack.disableRegistrations(); //Closes Skript's registrations
    } catch (NoSuchFieldException | IllegalAccessException e) {
        e.printStackTrace();
    }
}

skript-hack's People

Contributors

antoniojamore avatar jroy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.