Update example in README.md

The proposed changes changes the econ, perms, and chat variables to private, and created a public static getter for them.
This commit is contained in:
Daniel V 2017-02-28 14:07:32 -05:00 committed by GitHub
parent 6eaffac185
commit 2595209204
1 changed files with 15 additions and 3 deletions

View File

@ -73,9 +73,9 @@ import org.bukkit.plugin.java.JavaPlugin;
public class ExamplePlugin extends JavaPlugin {
private static final Logger log = Logger.getLogger("Minecraft");
public static Economy econ = null;
public static Permission perms = null;
public static Chat chat = null;
private static Economy econ = null;
private static Permission perms = null;
private static Chat chat = null;
@Override
public void onDisable() {
@ -147,5 +147,17 @@ public class ExamplePlugin extends JavaPlugin {
return false;
}
}
public static Economy getEcononomy() {
return econ;
}
public static Permission getPermissions() {
return perms;
}
public static Chat getChat() {
return chat;
}
}
```