Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
修復bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dada878 committed May 18, 2022
1 parent 4637ebe commit dd90516
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ export const checkEnchantment = true



export const pluginDB = new WorldDB.table("plugin_database");
export const pluginDB = new WorldDB("plugin_database");
export const enables = pluginDB.table("enable");
2 changes: 1 addition & 1 deletion scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AdminMenu } from "./mainMenu/admin.js";
import { PlayerMenu } from "./mainMenu/player.js";
import { addXp } from "./system/level.js";
import { pluginDB, prefix, baseXP, checkLore, checkEnchantment, enables } from "./config.js";
import { WorldDB } from "./lib/WorldDB.js";
import { WorldDB, ScoreboardDB } from "./lib/WorldDB.js";
import { levelTable, expTable } from "./system/level.js";
import { clearItem, snakeToCamel } from './lib/util.js';
import * as detect from './system/tool.js'
Expand Down
5 changes: 3 additions & 2 deletions scripts/system/money.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { world } from "mojang-minecraft";
import * as ui from 'mojang-minecraft-ui';
import { pluginDB } from "../config.js";
import { cmd, GetScores, log, logfor, SetScores, AddScores } from '../lib/GameLibrary.js';
import { WorldDB } from '../lib/WorldDB.js';
import { WorldDB, ScoreboardDB } from '../lib/WorldDB.js';

export const moneyTable = new ScoreboardDB(pluginDB.table("moneySetting").getData("scoreboard") ?? "money");
const dbName = pluginDB.table("moneySetting").getData("scoreboard") ?? "money";
export const moneyTable = new ScoreboardDB(dbName);

export function MoneySystem(player) {
const worldPlayers = world.getPlayers();
Expand Down
5 changes: 3 additions & 2 deletions scripts/system/shop.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ import { world } from "mojang-minecraft";
import * as ui from 'mojang-minecraft-ui';
import { pluginDB } from "../config.js";
import { cmd, log, logfor, cmds } from '../lib/GameLibrary.js';
import { WorldDB } from '../lib/WorldDB.js';
import { WorldDB, ScoreboardDB } from '../lib/WorldDB.js';

export const maxSelect = 128
export const moneyTable = new ScoreboardDB(pluginDB.table("moneySetting").getData("scoreboard") ?? "money");
const dbName = pluginDB.table("moneySetting").getData("scoreboard") ?? "money";
export const moneyTable = new ScoreboardDB(dbName);

export const buyableItems = [
{
Expand Down

0 comments on commit dd90516

Please sign in to comment.