From 35bc7c69900f4211a6b3bc11d7e979b060aafd1c Mon Sep 17 00:00:00 2001 From: Ardakaz Date: Sat, 23 Aug 2025 06:23:57 +0000 Subject: [PATCH] Initial code --- LICENSE | 15 +++------------ README.md | 16 ++++++++++++++++ config.yml | 4 ++++ plugin.yml | 10 ++++++++++ 4 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 config.yml create mode 100644 plugin.yml diff --git a/LICENSE b/LICENSE index 0214f13..dc501b6 100644 --- a/LICENSE +++ b/LICENSE @@ -2,17 +2,8 @@ MIT License Copyright (c) 2025 ArdakazMC -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and -associated documentation files (the "Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the -following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all copies or substantial -portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO -EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 1e6ef01..91af6eb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,18 @@ # Exec +Exec is a Minecraft server plugin that makes possible to run external scripts via commands. The scripts can be written with Bash or Python for example and the code changes don't need a server restart. + +[PlaceholderAPI](https://www.spigotmc.org/resources/placeholderapi.6245/) is required. You might also want to use [mcrcon](https://github.com/Tiiffi/mcrcon) for script output. + +## Config + commands: + examplecommand: + script: "/path/to/your/script %player_name% %args%" + permission: "exec.example" + +The Exec config looks like this. You can use the following placeholders: +* %args% means all arguments provided to the command. +* %arg_1%, %arg_2% can be used to read arguments too. +* PlaceholderAPI is supported (and usually required). %player_name% is the most useful one. + +You can use `/exec reload` to reload the config. \ No newline at end of file diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..171f642 --- /dev/null +++ b/config.yml @@ -0,0 +1,4 @@ +commands: + #example: + #script: "/path/to/your/script args" + #permission: "exec.example" \ No newline at end of file diff --git a/plugin.yml b/plugin.yml new file mode 100644 index 0000000..0220650 --- /dev/null +++ b/plugin.yml @@ -0,0 +1,10 @@ +name: Exec +description: Makes possible to run external scripts via commands. +version: 0.2.1 +author: Ardakaz +main: net.ardakaz.exec.Exec +api-version: 1.21 +depend: [PlaceholderAPI] +commands: + exec: + description: Exec main command. \ No newline at end of file