Compare commits
1 Commits
dev-shardb
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| e5e78068f0 |
@ -1,7 +1,7 @@
|
|||||||
name: Deploy datapack to dev
|
name: Deploy datapack to dev
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [dev*]
|
branches: [dev, dev-player-messages, dev-database]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
|
|||||||
@ -11,7 +11,7 @@ jobs:
|
|||||||
uses: appleboy/ssh-action@v1.2.1
|
uses: appleboy/ssh-action@v1.2.1
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.HOST }}
|
host: ${{ secrets.HOST }}
|
||||||
username: linuxserver.io
|
username: sadmin
|
||||||
password: ${{ secrets.PASSWORD }}
|
password: ${{ secrets.PASSWORD }}
|
||||||
port: ${{ secrets.PORT }}
|
port: ${{ secrets.PORT }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
@ -11,7 +11,7 @@ jobs:
|
|||||||
uses: appleboy/ssh-action@v1.2.1
|
uses: appleboy/ssh-action@v1.2.1
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.HOST }}
|
host: ${{ secrets.HOST }}
|
||||||
username: linuxserver.io
|
username: sadmin
|
||||||
password: ${{ secrets.PASSWORD }}
|
password: ${{ secrets.PASSWORD }}
|
||||||
port: ${{ secrets.PORT }}
|
port: ${{ secrets.PORT }}
|
||||||
script: |
|
script: |
|
||||||
|
|||||||
5
main.jmc
5
main.jmc
@ -1,6 +1,3 @@
|
|||||||
import "src/props.jmc";
|
import "src/*";
|
||||||
import "src/logger.jmc";
|
|
||||||
import "src/commands.jmc";
|
|
||||||
import "src/magic/*";
|
|
||||||
|
|
||||||
function __tick__() {}
|
function __tick__() {}
|
||||||
|
|||||||
@ -1,90 +0,0 @@
|
|||||||
@lazy
|
|
||||||
function logger(type, caller, message) {
|
|
||||||
$tmp_logger = false;
|
|
||||||
$tmp_type = $type;
|
|
||||||
if ($temp_type > 6 || $temp_type < 1) {
|
|
||||||
say "The log type requested does not exist. Please find the caller ($caller) and resolve this issue.";
|
|
||||||
}
|
|
||||||
if ($temp_type >= $log_level || $logger) { $tmp_logger = $type; }
|
|
||||||
switch($tmp_logger) {
|
|
||||||
case 5:
|
|
||||||
say "FATAL: ($caller) $message";
|
|
||||||
case 4:
|
|
||||||
say "ERROR: ($caller) $message";
|
|
||||||
case 3:
|
|
||||||
say "WARNING: ($caller) $message";
|
|
||||||
case 2:
|
|
||||||
say "INFO: ($caller) $message";
|
|
||||||
case 1:
|
|
||||||
say "DEBUG: ($caller) $message";
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class logger {
|
|
||||||
@add(__load__)
|
|
||||||
function __init__() {
|
|
||||||
if (!$log_level) {
|
|
||||||
$log_level = 3;
|
|
||||||
} else if ($log_level > 5) {
|
|
||||||
say "The log level was too high. Resetting to default value.";
|
|
||||||
$log_level = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
execute run {
|
|
||||||
$say "The log level is set to $(0).";
|
|
||||||
} with [$log_level];
|
|
||||||
|
|
||||||
|
|
||||||
if (!$logger) {
|
|
||||||
$logger = false;
|
|
||||||
} else if ($logger) {
|
|
||||||
say "Debug logging is enabled. You should now see a test log message:";
|
|
||||||
logger(2, logger, "This is a test. Logging appears to be working as expected!");
|
|
||||||
} else {
|
|
||||||
say "This is not a log message. There appears to be something wrong with the logger. It has not been detected as `!true` or `true`. Please investigate.";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggle() {
|
|
||||||
switch($logger) {
|
|
||||||
case 0:
|
|
||||||
$logger = true;
|
|
||||||
this.status();
|
|
||||||
case 1:
|
|
||||||
$logger = false;
|
|
||||||
this.status();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function status() {
|
|
||||||
switch($logger) {
|
|
||||||
case 0:
|
|
||||||
say "Debug logging is disabled";
|
|
||||||
case 1:
|
|
||||||
say "Debug logging is enabled";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_fatal() {
|
|
||||||
logger(5, logger, "This is a test");
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_error() {
|
|
||||||
logger(4, logger, "This is a test");
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_warning() {
|
|
||||||
logger(3, logger, "This is a test");
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_info() {
|
|
||||||
logger(2, logger, "This is a test");
|
|
||||||
}
|
|
||||||
|
|
||||||
function test_debug() {
|
|
||||||
logger(1, logger, "This is a test");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
class magic.shardblade {
|
|
||||||
function give() {
|
|
||||||
::temp.magic.shardblade = @s::SelectedItem;
|
|
||||||
if ($logger) {
|
|
||||||
printf("&<yellow,SelectedItem>");
|
|
||||||
}
|
|
||||||
Item.replaceEntity(
|
|
||||||
shardblade_wind_runner,
|
|
||||||
@s,
|
|
||||||
"weapon"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,12 +0,0 @@
|
|||||||
TextProp.nbt(
|
|
||||||
propertyName = "SelectedItem",
|
|
||||||
type = entity,
|
|
||||||
source = "@s",
|
|
||||||
path = SelectedItem
|
|
||||||
);
|
|
||||||
Item.create(
|
|
||||||
shardblade_wind_runner,
|
|
||||||
netherite_sword,
|
|
||||||
"&<blue>Blade of Honor",
|
|
||||||
["&<gold>wind runner"]
|
|
||||||
);
|
|
||||||
Loading…
Reference in New Issue
Block a user