<commit_before>Entity.getAll = () => {
    // 고장났다고 전해짐. 고장났는지 확인하고 맞으면 새로 만드셈.
};

Server.getAllEntities = () => {
    // 플레이어 빼고 모든 엔티티 반환
};

Server.getAllPlayers = () => {
    // 모든 플레이어 반환
};

Server.getPlayer = () => {
    // 가장 최근에 표지판 터치한 사람 반환
    // useItem이랑 잘 연동해보셈
};

Server.getPlayerByName = name => {
    // 이름으로 플레이어 엔티티 찾기
};



function Bank() {

}



function Command(params) {
    this._params = params || [];
}

Command.prototype.setParams = function (arr) {
    this._params = arr;
    return this;
};



function CommandParser() {}

CommandParser.parse = function (str) {
    let tmp = [],
        arr;
    str = str.replace(/".*"/g, $1 => {
        $1 = $1.substring(1, $1.length - 1);
        tmp.push($1);
        return "@tmp_" + (tmp.length - 1);
    });
    arr = str.split(" ");
    for (let i = arr.length; i--;) {
        let element = arr[i],
            elements = element.split("_");
        if (elements[0] === "@tmp") {
            element = tmp[elements[1]];
        }
        if (element[0] === "#") {
            arr[i] = Server.getPlayerByName(element.substring(1));
        } else if (element[0] === "@") {
            switch (element) {
            case "@all":
            case "@a":
                arr[i] = Entity.getAll();
                break;
            case "@entities":
            case "@e":
                arr[i] = Server.getAllEntities();
                break;
            case "@players":
            case "@our":
                arr[i] = Server.getAllPlayers();
                break;
            case "@player":
            case "@me":
                arr[i] = Server.getPlayer();
            }
        } else if (/^[+-]?\d+(\.\d+)?$/.test(element)) {
            arr[i] = Number(element);
        } else if (element === "false" || element === "true") {
            arr[i] = Boolean(element);
        }
    }
    return new Command(arr);
};



function Wallet() {}

Wallet.prototype.getMoney = function () {
    return this._money;
};

Wallet.prototype.getOwner = function () {
    return this._owner;
};

Wallet.prototype.setMoney = function (money) {
    this._money = money;
};

Wallet.prototype.setOwner = function (owner) {
    this._owner = owner;
};<commit_msg>Add File, Preference, PlayerData<commit_after>const File_ = java.io.File,
    PATH = "/sdcard/games/team.meta/creative_economy/";



Entity.getAll = () => {
    // 고장났다고 전해짐. 고장났는지 확인하고 맞으면 새로 만드셈.
};

Server.getAllEntities = () => {
    // 플레이어 빼고 모든 엔티티 반환
};

Server.getAllPlayers = () => {
    // 모든 플레이어 반환
};

Server.getPlayer = () => {
    // 가장 최근에 표지판 터치한 사람 반환
    // useItem이랑 잘 연동해보셈
};

Server.getPlayerByName = name => {
    // 이름으로 플레이어 엔티티 찾기
};



function Bank() {

}



function Command(params) {
    this._params = params || [];
}

Command.FLAG_ALL = "@all";
Command.FLAG_ALL_SHORT = "@a";
Command.FLAG_ENTITIES = "@entities";
Command.FLAG_ENTITIES_SHORT = "@e";
Command.FLAG_PLAYERS = "@players";
Command.FLAG_PLAYERS_SHORT = "@our";
Command.FLAG_PLAYER = "@player";
Command.FLAG_PLATER_SHORT = "@me";

Command.prototype.setParams = function (arr) {
    this._params = arr;
    return this;
};



function CommandParser() {}

CommandParser.parse = function (str) {
    let tmp = [],
        arr;
    str = str.replace(/".*"/g, $1 => {
        $1 = $1.substring(1, $1.length - 1);
        tmp.push($1);
        return "@tmp_" + (tmp.length - 1);
    });
    arr = str.split(" ");
    for (let i = arr.length; i--;) {
        let element = arr[i],
            elements = element.split("_");
        if (elements[0] === "@tmp") {
            element = tmp[elements[1]];
        }
        if (element[0] === "#") {
            arr[i] = Server.getPlayerByName(element.substring(1));
        } else if (element[0] === "@") {
            switch (element) {
            case Command.FLAG_ALL:
            case Command.FLAG_ALL_SHORT:
                arr[i] = Entity.getAll();
                break;
            case Command.FLAG_ENTITIE:
            case Command.FLAG_ENTITIES_SHORT:
                arr[i] = Server.getAllEntities();
                break;
            case Command.FLAG_PLAYERS:
            case Command.FLAG_PLAYERS_SHORT:
                arr[i] = Server.getAllPlayers();
                break;
            case Command.FLAG_PLATER:
            case Command.FLAG_PLATER_SHORT:
                arr[i] = Server.getPlayer();
            }
        } else if (/^[+-]?\d+(\.\d+)?$/.test(element)) {
            arr[i] = Number(element);
        } else if (element === "false" || element === "true") {
            arr[i] = Boolean(element);
        }
    }
    return new Command(arr);
};



function File(path) {
    this._path = path;
}

File.read = function (path) {
    let file = new File_(path);
    if (file.exists()) {
        // 파일 읽기 (prototype안 쓴거 오타 아님)
    } else {
        File.write(path, "");
        return "";
    }
};

File.write = function (path, str) {
    // 파일 쓰기
};

File.prototype.read = function () {
    return File.read(this._path);
};

File.prototype.write = function (str) {
    File.write(this._path, str);
    return this;
};



function PlayerData(entity) {
    this._entity = entity;
}

PlayerData.prototype.getEntity = function () {
    return this._entity;
};



function Preference() {
    this._pref = JSON.parse(File.read(PATH + "pref.json"));
}





function Wallet() {}

Wallet.prototype.getMoney = function () {
    return this._money;
};

Wallet.prototype.getOwner = function () {
    return this._owner;
};

Wallet.prototype.setMoney = function (money) {
    this._money = money;
    return this;
};

Wallet.prototype.setOwner = function (owner) {
    this._owner = owner;
    return this;
};
{'fraction_non_alphanumeric': 0.1671353251318102, 'fraction_numerical': 0.0045694200351493845, 'mean_word_length': 1.970250521920668, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2438720', 'n_tokens_mistral': 2063, 'n_tokens_neox': 2111, 'n_words': 392}