mirror of
https://github.com/TotalFreedomMC/BukkitTelnet.git
synced 2025-08-05 20:12:57 +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
|
@ -18,7 +18,7 @@ is divided into following sections:
|
||||||
- applet
|
- applet
|
||||||
- cleanup
|
- cleanup
|
||||||
|
|
||||||
-->
|
-->
|
||||||
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="BukkitTelnet-impl">
|
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="BukkitTelnet-impl">
|
||||||
<fail message="Please build using Ant 1.8.0 or higher.">
|
<fail message="Please build using Ant 1.8.0 or higher.">
|
||||||
<condition>
|
<condition>
|
||||||
|
@ -29,10 +29,10 @@ is divided into following sections:
|
||||||
</fail>
|
</fail>
|
||||||
<target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
|
<target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
|
||||||
<!--
|
<!--
|
||||||
======================
|
======================
|
||||||
INITIALIZATION SECTION
|
INITIALIZATION SECTION
|
||||||
======================
|
======================
|
||||||
-->
|
-->
|
||||||
<target name="-pre-init">
|
<target name="-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
<!-- You can override this target in the ../build.xml file. -->
|
<!-- You can override this target in the ../build.xml file. -->
|
||||||
|
@ -658,8 +658,8 @@ is divided into following sections:
|
||||||
</target>
|
</target>
|
||||||
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
|
||||||
<!--
|
<!--
|
||||||
pre NB7.2 profiling section; consider it deprecated
|
pre NB7.2 profiling section; consider it deprecated
|
||||||
-->
|
-->
|
||||||
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
|
||||||
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
|
||||||
<!-- Empty placeholder for easier customization. -->
|
<!-- Empty placeholder for easier customization. -->
|
||||||
|
@ -706,8 +706,8 @@ is divided into following sections:
|
||||||
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<!--
|
||||||
end of pre NB7.2 profiling section
|
end of pre NB7.2 profiling section
|
||||||
-->
|
-->
|
||||||
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
|
||||||
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
|
||||||
<attribute default="${main.class}" name="name"/>
|
<attribute default="${main.class}" name="name"/>
|
||||||
|
@ -867,10 +867,10 @@ is divided into following sections:
|
||||||
</target>
|
</target>
|
||||||
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
|
||||||
<!--
|
<!--
|
||||||
===================
|
===================
|
||||||
COMPILATION SECTION
|
COMPILATION SECTION
|
||||||
===================
|
===================
|
||||||
-->
|
-->
|
||||||
<target name="-deps-jar-init" unless="built-jar.properties">
|
<target name="-deps-jar-init" unless="built-jar.properties">
|
||||||
<property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
|
<property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
|
||||||
<delete file="${built-jar.properties}" quiet="true"/>
|
<delete file="${built-jar.properties}" quiet="true"/>
|
||||||
|
@ -941,10 +941,10 @@ is divided into following sections:
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
|
<target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
|
||||||
<!--
|
<!--
|
||||||
====================
|
====================
|
||||||
JAR BUILDING SECTION
|
JAR BUILDING SECTION
|
||||||
====================
|
====================
|
||||||
-->
|
-->
|
||||||
<target depends="init" name="-pre-pre-jar">
|
<target depends="init" name="-pre-pre-jar">
|
||||||
<dirname file="${dist.jar}" property="dist.jar.dir"/>
|
<dirname file="${dist.jar}" property="dist.jar.dir"/>
|
||||||
<mkdir dir="${dist.jar.dir}"/>
|
<mkdir dir="${dist.jar.dir}"/>
|
||||||
|
@ -1013,10 +1013,10 @@ is divided into following sections:
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
|
<target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
|
||||||
<!--
|
<!--
|
||||||
=================
|
=================
|
||||||
EXECUTION SECTION
|
EXECUTION SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" description="Run a main class." name="run">
|
<target depends="init,compile" description="Run a main class." name="run">
|
||||||
<j2seproject1:java>
|
<j2seproject1:java>
|
||||||
<customize>
|
<customize>
|
||||||
|
@ -1036,10 +1036,10 @@ is divided into following sections:
|
||||||
<j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
|
<j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<!--
|
||||||
=================
|
=================
|
||||||
DEBUGGING SECTION
|
DEBUGGING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
|
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
|
||||||
<j2seproject1:nbjpdastart name="${debug.class}"/>
|
<j2seproject1:nbjpdastart name="${debug.class}"/>
|
||||||
</target>
|
</target>
|
||||||
|
@ -1077,13 +1077,13 @@ is divided into following sections:
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
|
<target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
|
||||||
<!--
|
<!--
|
||||||
=================
|
=================
|
||||||
PROFILING SECTION
|
PROFILING SECTION
|
||||||
=================
|
=================
|
||||||
-->
|
-->
|
||||||
<!--
|
<!--
|
||||||
pre NB7.2 profiler integration
|
pre NB7.2 profiler integration
|
||||||
-->
|
-->
|
||||||
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
|
||||||
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
|
||||||
<nbprofiledirect>
|
<nbprofiledirect>
|
||||||
|
@ -1140,8 +1140,8 @@ is divided into following sections:
|
||||||
</junit>
|
</junit>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<!--
|
||||||
end of pre NB72 profiling section
|
end of pre NB72 profiling section
|
||||||
-->
|
-->
|
||||||
<target if="netbeans.home" name="-profile-check">
|
<target if="netbeans.home" name="-profile-check">
|
||||||
<condition property="profiler.configured">
|
<condition property="profiler.configured">
|
||||||
<or>
|
<or>
|
||||||
|
@ -1176,10 +1176,10 @@ is divided into following sections:
|
||||||
<antcall target="run-applet"/>
|
<antcall target="run-applet"/>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
JAVADOC SECTION
|
JAVADOC SECTION
|
||||||
===============
|
===============
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.sources" name="-javadoc-build">
|
<target depends="init" if="have.sources" name="-javadoc-build">
|
||||||
<mkdir dir="${dist.javadoc.dir}"/>
|
<mkdir dir="${dist.javadoc.dir}"/>
|
||||||
<condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
|
<condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
|
||||||
|
@ -1217,10 +1217,10 @@ is divided into following sections:
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
TEST COMPILATION SECTION
|
TEST COMPILATION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
||||||
<mkdir dir="${build.test.classes.dir}"/>
|
<mkdir dir="${build.test.classes.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
|
@ -1256,10 +1256,10 @@ is divided into following sections:
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
TEST EXECUTION SECTION
|
TEST EXECUTION SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init" if="have.tests" name="-pre-test-run">
|
<target depends="init" if="have.tests" name="-pre-test-run">
|
||||||
<mkdir dir="${build.test.results.dir}"/>
|
<mkdir dir="${build.test.results.dir}"/>
|
||||||
</target>
|
</target>
|
||||||
|
@ -1293,10 +1293,10 @@ is divided into following sections:
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
|
||||||
<!--
|
<!--
|
||||||
=======================
|
=======================
|
||||||
TEST DEBUGGING SECTION
|
TEST DEBUGGING SECTION
|
||||||
=======================
|
=======================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
|
||||||
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
||||||
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
|
||||||
|
@ -1316,10 +1316,10 @@ is divided into following sections:
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
|
<target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
APPLET EXECUTION SECTION
|
APPLET EXECUTION SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-single" name="run-applet">
|
<target depends="init,compile-single" name="run-applet">
|
||||||
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
<j2seproject1:java classname="sun.applet.AppletViewer">
|
<j2seproject1:java classname="sun.applet.AppletViewer">
|
||||||
|
@ -1329,10 +1329,10 @@ is divided into following sections:
|
||||||
</j2seproject1:java>
|
</j2seproject1:java>
|
||||||
</target>
|
</target>
|
||||||
<!--
|
<!--
|
||||||
=========================
|
=========================
|
||||||
APPLET DEBUGGING SECTION
|
APPLET DEBUGGING SECTION
|
||||||
=========================
|
=========================
|
||||||
-->
|
-->
|
||||||
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
|
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
|
||||||
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
|
||||||
<j2seproject3:debug classname="sun.applet.AppletViewer">
|
<j2seproject3:debug classname="sun.applet.AppletViewer">
|
||||||
|
@ -1343,10 +1343,10 @@ is divided into following sections:
|
||||||
</target>
|
</target>
|
||||||
<target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
|
<target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
|
||||||
<!--
|
<!--
|
||||||
===============
|
===============
|
||||||
CLEANUP SECTION
|
CLEANUP SECTION
|
||||||
===============
|
===============
|
||||||
-->
|
-->
|
||||||
<target name="-deps-clean-init" unless="built-clean.properties">
|
<target name="-deps-clean-init" unless="built-clean.properties">
|
||||||
<property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
|
<property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
|
||||||
<delete file="${built-clean.properties}" quiet="true"/>
|
<delete file="${built-clean.properties}" quiet="true"/>
|
||||||
|
|
|
@ -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