benda95280 / MyEntities

Gives/Spawn Head and Custom entities with skin suppport and Geometry, EASILY !
GNU General Public License v3.0
19 stars 2 forks source link

Add support for language file #13

Closed benda95280 closed 4 years ago

benda95280 commented 5 years ago

We need to add multiple language file support.

Why: Everything is HardCoded for the language, and some action have default message, because cannot be set by configuration of the entity. (Like the action to repair an item)

benda95280 commented 5 years ago

@thebigsmileXD Do you now how i can load Yml file from ressource ? Every information i've found is to copy it before open, like:

    // Creates the plugin folder
    @mkdir($this->getDataFolder());
    // Creates the config
    $cfg = new Config($this->getDataFolder()) . "config.yml"), Config::YAML));
inxomnyaa commented 5 years ago

Have a look at getResource(string path)

Side note: config.yml shouldn't be loaded like that ;) Use getDefaultConfig()/saveDefaultConfig() instead ;)

benda95280 commented 5 years ago

I've just pushed support for language file :)

Seems to be ok, just an error on line 206, in "MyEntities" If language not defined, seems i cannot define it after, it seems i'm too tired to find why :(

Side note: config.yml shouldn't be loaded like that ;) Use getDefaultConfig()/saveDefaultConfig() instead ;) Will look that tomorrow, thanks.