MCPcopy Create free account
hub / github.com/Frontrooms/3.0-GC / initializePlugin

Method initializePlugin

src/main/java/emu/grasscutter/plugin/Plugin.java:32–47  ·  view source on GitHub ↗

This method is reflected into. Set plugin variables. @param identifier The plugin's identifier.

(PluginIdentifier identifier, URLClassLoader classLoader)

Source from the content-addressed store, hash-verified

30 * @param identifier The plugin's identifier.
31 */
32 private void initializePlugin(PluginIdentifier identifier, URLClassLoader classLoader) {
33 if(this.identifier != null) {
34 Grasscutter.getLogger().warn(this.identifier.name + " had a reinitialization attempt.");
35 return;
36 }
37
38 this.identifier = identifier;
39 this.classLoader = classLoader;
40 this.dataFolder = new File(PLUGIN(), identifier.name);
41 this.logger = LoggerFactory.getLogger(identifier.name);
42
43 if(!this.dataFolder.exists() && !this.dataFolder.mkdirs()) {
44 Grasscutter.getLogger().warn("Failed to create plugin data folder for " + this.identifier.name);
45 return;
46 }
47 }
48
49 /**
50 * The plugin's identifier instance.

Callers

nothing calls this directly

Calls 3

getLoggerMethod · 0.95
PLUGINMethod · 0.80
getLoggerMethod · 0.45

Tested by

no test coverage detected