Created
October 28, 2012 00:35
-
-
Save tehbeard/3967030 to your computer and use it in GitHub Desktop.
BuscriptPlugin.java.chunk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private File getStartupScript() { | |
| File scriptFile = new File(getDataFolder(), "startup-script.txt"); | |
| if (!scriptFile.exists()) { | |
| try { | |
| this.saveResource("startup-script.txt", false); | |
| if (!scriptFile.exists()) { | |
| scriptFile.createNewFile(); | |
| } | |
| } catch (IOException e) { | |
| getLogger().severe("Error creating script file: " + e.getMessage()); | |
| getServer().getPluginManager().disablePlugin(this); | |
| return null; | |
| } catch (IllegalArgumentException e){ | |
| getLogger().info("Start up script not found in jar."); | |
| } | |
| } | |
| return scriptFile; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment