MagicPaper icon

MagicPaper -----

Use magic to create your server



MagicPaper

What can it do now?

(GUI)
Create custom GUIs in a simple way and achieve complex functionality by executing spells with the click of a button.
You can even use MagicPaper to create crafting tables, upgrade tables, and more.
Support dynamic button display, such as turning online player information into buttons displayed in your GUI – there will be as many buttons as there are players.
You can even execute commands like "tpa" when clicking on a player's button.

(Buff)
Grant players a buff that lasts for a specified duration. You can use MagicPaper's built-in buffs or decide what happens when a buff takes effect.

(Item Mastery)
Fully customize your items using MagicPaper, allowing you to tailor your item library.
MagicPaper comes with a set of embedding functions, letting you decide which items to embed into others and specify which attributes are added.
MagicPaper introduces a new concept for items: item description templates. With these templates, you can define how the items you want are described, supporting variables like PAPI and item NBT variables.

(Variable Mapping)
%magic_spell_name%
Get any value you want from a spell in MagicPaper.
You can decide which values should return what content. For example, obtaining a gold variable from PAPI, and if the balance is below 100, return "poor," or if it's below 1000, return "average"...
For example, you can assign different colors to players' chat formats based on their combat power, making higher-powered players have cooler chat formats. Your only limit is your imagination.
...

(Triggers)
What are triggers? Regardless of their meaning elsewhere, in MagicPaper, they are a straightforward concept.
Triggers are tasks you set to execute when something happens. For example, when you enter the server, send a welcome message.
MagicPaper offers many triggers that continue to grow. Make the most of them, and your server will be unique.

(Timers)
If we delve deeper, timers are also a special kind of trigger. They transition from executing on a specific event to running at regular intervals.
What can you do with them? For example, customize a buff called "Sparkling" and check each player in the timer. If a player has the "Sparkling" buff, you can choose to give them a glowing buff or create some attractive particles for a prestigious feel. This is just a simple example; as always, your only limit is your imagination.

(Skills)
MagicPaper was not designed for creating skills, but it unexpectedly provides a simple and efficient way to do so.
With ongoing updates to semantics, the range and richness of what you can do with skills will increase.
You might be accustomed to using other plugins to create skills, and that's fine. MagicPaper can actively support any skill plugins. They handle skill writing, and MagicPaper determines when and how the effects are triggered.
Currently, MagicPaper supports releasing skills from MythicMobs. You can use MagicPaper's triggers to decide who should trigger what skills at what times and locations.

(Unpredictable Extensibility and Inclusiveness)
Under the Magic language framework, adding any feature is straightforward and lightweight.
Having more features doesn't make it bulky; all extension features are called through callbacks by spells.
In some versions, certain features might not be available, but this doesn't affect overall usability. Any plugin feature supported by MagicPaper can be called and reused in the same environment for spell writing.

(Depth and Breadth of Development)
MagicPaper can serve as a programming language in its own right, implementing complex logic with its own syntax.
Most of the time, the purpose of Magic language is to have third parties implement complex logic in code as semantics, allowing users to call it simply with Magic syntax.
Magic is essentially an operational language, aimed at normalizing different operational methods in different environments, reducing the learning curve for users.

(Surprisingly Simple Syntax)
You might be hesitant when you see the term "programming," but honestly, the only barrier to learning Magic language is the sense of "mystique."
Install the plugin, imitate the examples, check the documentation, and experience the essence of MagicPaper.
What to do if you have questions? Ask!
What if you have requirements? Suggest!
It's that simple and convenient. What more could you ask for?

What can it do in the future?
When designing the framework, provisions were made for natural language processing.
At an appropriate stage, I will create deep learning models for translating Magic language into various national languages. This means that in your own Magic environment, you can input Chinese and it will automatically be converted into Magic spells.
Of course, the quality of the translation depends on the amount of data available. If not many people are using it, then it's a different story.

Github
Magic(Paper)
https://github.com/Yeqi99/MagicPaper
Magic(Self)
https://github.com/Yeqi99/Magic

Commands
  • /magicpaper reload - Reload the configuration.
  • /magicpaper spells - List all spells.
  • /magicpaper words <words> - Execute specific incantations.
  • /magicpaper spell <spell> - Execute a specific spell.
  • /magicpaper publicwords <words> - Execute specific incantations in a public environment.
  • /magicpaper publicspell <spell> - Execute a specific spell in a public environment.
  • /magicpaper functions - List all semantics.
  • /magicpaper functioninfo <function> - Get information about a semantic.
  • /magicpaper triggers - List available trigger names.
  • /magicpaper reloadall - Reset everything, including the Magic interpreter.
  • /magicpaper onload - Execute the spells in the onload section once.
  • /magicpaper boreremove <address> <index> - Remove an item from a specific inset hole.
  • /magicpaper restart - Restart the entire configuration (including the interpreter and onload execution).
  • /magicpaper coding - Toggle coding mode (requires admin privileges or specific permissions).
  • /magicpaper gui <guiName> - Open a GUI with the specified name.

Coding Mode
You can execute Magic syntax by sending messages directly in the game.
Format


    • !m+Syntax
Execute in a temporary context.
    • !pm+Syntax
Execute in a global context.
    • !clear
Clear the Coding private context.
magicpaper coding switches coding mode. People in coding mode can input code directly into the chat. Normal messages are for coding, not execution, and require keywords to control. Keywords:




    • go: Execute the currently written code.



    • clear: Clear the currently written code.



    • save id display_name description (can use \n for line breaks): Save the current code to the magic configuration.



    • spell spell_name: Execute the spell from the configuration (! executes the .m source file imported).



    • look: View the currently written code.
Configuration File Structure



    • import
When the plugin starts, it loads all .m files with Magic language sources into all contexts. Variable format: paper.import.source_file_id



    • item-format
Template for parsing item lores.



    • lang
Language files.



    • magic
YAML-formatted Magic language files that can be directly executed by the Minecraft command system.



    • onload
.m source files stored here will be automatically executed when the server starts. The onload command can also be executed in instructions.



    • timer
Write timer files in the default.yml format and place them in the timer folder to create timers. The default configuration file executes the HelloWorld spell every second; please remove it as needed.



    • trigger
Default supported trigger settings; you can directly add spells to triggers.



    • config.yml
General plugin configuration.

Permissions
Commands
magicpaper.command

Coding
magicpaper.coding

API
General
The general API exists in the form of static methods of the MagicPaperAPI class.

Semantic Expansion
Inherit from the Magic native NormalFunction or inherit from PaperFunction to implement the abstract Li.

Triggers
Inherit from the APITrigger class.

Timers
Inherit from the APITimer class.

Modules
Triggers
We can register spells into a trigger. When the trigger is activated, the registered spells will be cast. Different triggers have different predefined contexts.

Timers
We can manually create timers that run at regular intervals. Add the spells you want the timer to cast to the corresponding timer name. The timer will cast the registered spells each time it runs.

Item Embedding
Use semantics to open slots in an item, set the supported embedding slots, and directly embed items into an item in your backpack. Numeric attributes are added, while other types overwrite. Use the 'boreremove' command to remove embeddings.

Item Parsing Templates
The item-format folder in the configuration file stores item lore templates. All items can be set to parse templates, and each refresh will display lore according to the template format. You can use PAPI variables and item variables in the templates.

Buff Manager
MagicPaper comes with a Buff Manager. You can use the built-in buffs and create custom buffs.

GUI Manager
MagicPaper comes with a GUI Manager. Use the configuration file or semantics to customize your own GUI

PlaceholderAPI
%magic_spell_name%

Introduction

<!-- originmc -->
<repository>
<id>originmc-repo</id>
<url> https://maven.originmc.cn/repository/maven-public/</url>
</repository>

<!-- MagicPaper -->
<dependency>
<groupId>cn.originmc.plugins</groupId>
<artifactId>MagicPaper</artifactId>
<version>1.5.0</version>
</dependency>
Resource Information
Author:
----------
Total Downloads: 982
First Release: Oct 15, 2023
Last Update: Nov 24, 2023
Category: ---------------
All-Time Rating:
0 ratings
Find more info at wiki.originmc.cn...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings