Skip to content

Cupelt/TRGithub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TRGithub

Package management tool for the Minecraft plugin TriggerReactor. ( Korean )

🚨Caution🚨

This is a prototype version and may be somewhat unstable

⚠️known issues⚠️

  • You must add --add-opens java.base/java.util.zip=ALL-UNNAME to the argument portion of the bucket before it works.
    This is a temporary issue and will be unnecessary for the next update.

How to use

This document explains how to use the package feature.

Commands

The following commands are available:

/github

→ Displays the available commands and their functions.


/github active <packageName>
→ Activates or deactivates the specified package.

Note: When disabled, all files with the registered file names in the package will be deleted.


/github active <packageName> <overwrite|skip>
→ Sets how to handle duplicate files.

Note: If a package contains duplicate files, the user will be prompted to choose an action even if the active command was used.


/github package <packageName|*>
→ Displays detailed information about the specified package(s).
Note: Use * to show information for all packages.


/github install <github repository url>
→ Downloads the latest tagged source code from the specified Github repository.

/github install <github repository url> <version>
→ Downloads the specified version from the Github repository.

/github install <packageName>
/github install <packageName> <version>
→ Updates the specified package to the latest version.

Note: The default package activation state is disabled.


/github delete <packageName>
→ Deletes the specified package permanently.

Note: All files with the file name that belongs to the package will be deleted.



/github export
→ Automatically creates a package (not currently implemented).

How to structure a package with TRGithub
Hello there! You want to create a package with TRGithub?!

Here's a guide to help you create a package using TRGithub.

Package Structure


The package consists of the following:

Only the package-info.json file and the TriggerReactor files you create are needed!

The structure of package-info.json is as follows:
  {
    "info": {
      "name": "Package Name",
      "author" : "Author Name",
      "description": "Package Description",
      "jdk" : "Recommended Java Version",
      "mc_version" : "Tested Minecraft Version",
      "trg_version" : "Tested TriggerReactor Version"
    },
    "triggers": {
      "CommandTrigger": [
        "triggerfile.trg",
        "triggerfile.json"
      ]
    }
  }
      
The above code will detect triggerfile.trg and triggerfile.json in the CommandTrigger directory of your repository,
and add them to ./plugin/TriggerReactor/CommandTrigger.

The triggers currently supported by TRGithub are:
"CommandTrigger", "CustomTrigger", "Executor", "InventoryTrigger", "NamedTriggers", "Placeholder", "RepeatTrigger", "Other"

The "Other" trigger will add any additional required files to the ./plugin/TriggerReactor/Other directory.
So, it's important to write the code correctly.

Creating a Release

Once all files have been uploaded to GitHub, it's time to create a release.

Go to the Releases tab, click Draft new Release, create a tag (the tag name becomes the package version),
add a title, and click Publish Release.

If you still don't understand,
there's a perfect example here!

Example Package

You can download it using ./github install github.com/Cupelt/TRG_linearRegression,
activate the package with ./github active TRG_linearRegression,
and use it with ./linear_regression.

Usage Example

Let's download and use the package from https://github.com/Cupelt/TRG_linearRegression:

  1. Download the package by running ./github install github.com/Cupelt/TRG_linearRegression.
  2. Activate the package by running ./github active TRG_linearRegression.
  3. Now you can use the package by running ./linear_regression.

  4. If you no longer need the package, you can delete it by running ./github delete TRG_linearRegression.

  5. If a new release is available in the repository, you can update the package by running ./github install TRG_linearRegression.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages