mirror of
https://github.com/TotalFreedomMC/BukkitTelnet.git
synced 2025-08-07 04:53:12 +00:00
Worked around Apache Commons for Minecraft 1.7
Added formatting settings in project files
This commit is contained in:
parent
430db446b9
commit
30b42f485d
3 changed files with 99 additions and 65 deletions
|
@ -3,6 +3,22 @@ annotation.processing.enabled.in.editor=false
|
||||||
annotation.processing.processors.list=
|
annotation.processing.processors.list=
|
||||||
annotation.processing.run.all.processors=true
|
annotation.processing.run.all.processors=true
|
||||||
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=4
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=4
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=4
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=0
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap=none
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.blankLinesAfterClassHeader=0
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.enableCommentFormatting=false
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.methodDeclBracePlacement=NEW_LINE
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.otherBracePlacement=NEW_LINE
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeCatchOnNewLine=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeElseOnNewLine=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeFinallyOnNewLine=true
|
||||||
|
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.placeWhileOnNewLine=true
|
||||||
application.title=BukkitTelnet
|
application.title=BukkitTelnet
|
||||||
application.vendor=Steven Lawson
|
application.vendor=Steven Lawson
|
||||||
build.classes.dir=${build.dir}/classes
|
build.classes.dir=${build.dir}/classes
|
||||||
|
@ -32,8 +48,7 @@ jar.archive.disabled=${jnlp.enabled}
|
||||||
jar.compress=false
|
jar.compress=false
|
||||||
jar.index=${jnlp.enabled}
|
jar.index=${jnlp.enabled}
|
||||||
javac.classpath=\
|
javac.classpath=\
|
||||||
${libs.Bukkit.classpath}:\
|
${libs.Bukkit.classpath}
|
||||||
${libs.Apache_Commons_IO.classpath}
|
|
||||||
# Space-separated list of extra javac options
|
# Space-separated list of extra javac options
|
||||||
javac.compilerargs=-Xlint:unchecked
|
javac.compilerargs=-Xlint:unchecked
|
||||||
javac.deprecation=false
|
javac.deprecation=false
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
package me.StevenLawson.BukkitTelnet;
|
package me.StevenLawson.BukkitTelnet;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.io.OutputStream;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
|
|
||||||
public class BT_Config
|
public class BT_Config
|
||||||
|
@ -78,7 +79,7 @@ public class BT_Config
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final InputStream defaultConfig = getDefaultConfig();
|
final InputStream defaultConfig = getDefaultConfig();
|
||||||
FileUtils.copyInputStreamToFile(defaultConfig, targetFile);
|
copy(defaultConfig, targetFile);
|
||||||
defaultConfig.close();
|
defaultConfig.close();
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
@ -113,6 +114,24 @@ public class BT_Config
|
||||||
throw new IOException();
|
throw new IOException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void copy(InputStream in, File file) throws IOException
|
||||||
|
{
|
||||||
|
if (!file.exists())
|
||||||
|
{
|
||||||
|
file.getParentFile().mkdirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
OutputStream out = new FileOutputStream(file);
|
||||||
|
byte[] buf = new byte[1024];
|
||||||
|
int len;
|
||||||
|
while ((len = in.read(buf)) > 0)
|
||||||
|
{
|
||||||
|
out.write(buf, 0, len);
|
||||||
|
}
|
||||||
|
out.close();
|
||||||
|
in.close();
|
||||||
|
}
|
||||||
|
|
||||||
public SimpleConfigEntries getConfigEntries()
|
public SimpleConfigEntries getConfigEntries()
|
||||||
{
|
{
|
||||||
return configEntries;
|
return configEntries;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue