Skip to content

Commit

Permalink
Create default.js
Browse files Browse the repository at this point in the history
  • Loading branch information
MuteTiefling committed Jun 20, 2023
1 parent 17dd1c5 commit f721615
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions kubejs/server_scripts/base/gamerules/default.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ServerEvents.loaded((event) => {
let gamerules = [{ rule: 'doFireTick', value: 'false' }];

gamerules.forEach((gamerule) => {
if (!event.server.persistentData[gamerule.rule]) {
event.server.runCommandSilent(`/gamerule ${gamerule.rule} ${gamerule.value}`);
console.log(`Default Gamerule Applied: ${gamerule.rule} = ${gamerule.value}`);
event.server.persistentData[gamerule.rule] = gamerule.value;
}
});
});

0 comments on commit f721615

Please sign in to comment.