Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Except `.\gradlew.bat`, because Windows is special.
- Loading branch information
1 parent
781abd5
commit 59ccc0a
Showing
53 changed files
with
8,993 additions
and
8,993 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
*.java diff=java | ||
*.java diff=java |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,71 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE module PUBLIC | ||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN" | ||
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd"> | ||
<module name="Checker"> | ||
<!-- Tabs are strictly banned --> | ||
<module name="FileTabCharacter"/> | ||
<module name="SuppressWarningsFilter" /> | ||
<module name="TreeWalker"> | ||
<module name="SuppressWarningsHolder" /> <!-- allows for @SuppressWarnings annotation --> | ||
<!-- Important basics --> | ||
<!-- <module name="PackageDeclaration"/> Unlikely that we would miss this in a PR --> | ||
<module name="OuterTypeFilename"/> <!-- TypeName -> TypeName.java --> | ||
|
||
<!-- | ||
Control package usage, so people don't insert Bukkit into WE where it shouldn't belong, etc. | ||
It is a bit draconian, so update as necessary! | ||
--> | ||
<module name="ImportControl"> | ||
<property name="file" value="${config_loc}/import-control.xml"/> | ||
</module> | ||
|
||
<!-- Code --> | ||
<module name="HideUtilityClassConstructor"/> <!-- Utility classes should not have a constructor --> | ||
<module name="CovariantEquals"/> | ||
<module name="EqualsHashCode"/> <!-- equals() and hashCode() go together --> | ||
<module name="NestedTryDepth"> <!-- SHOULD not need to adjust this --> | ||
<property name="max" value="2"/> | ||
</module> | ||
<module name="SuperFinalize"/> <!-- We don't actually use this --> | ||
|
||
<!-- Style --> | ||
<module name="LeftCurly"> <!-- Left brace never goes on another line --> | ||
<property name="option" value="eol"/> | ||
</module> <!-- We don't check right brance --> | ||
<module name="DefaultComesLast"/> <!-- default case in switch should be last --> | ||
<module name="GenericWhitespace"/> | ||
|
||
<!-- Naming --> | ||
<module name="ClassTypeParameterName"> | ||
<property name="format" value="^[A-Z][a-zA-Z0-9]*$"/> | ||
</module> | ||
<module name="LocalFinalVariableName"/> | ||
<module name="LocalVariableName"> | ||
<property name="format" value="^[a-z_][a-zA-Z0-9]*$"/> | ||
</module> | ||
<module name="MemberName"> | ||
<property name="format" value="^[a-z_][a-zA-Z0-9]*$"/> | ||
</module> | ||
<module name="MethodName"> | ||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/> | ||
</module> | ||
<!-- <module name="PackageName"/> Unlikely that we would miss this in a PR --> | ||
<module name="ParameterName"/> | ||
<!-- <module name="TypeName"/> Unlikely that we would miss this in a PR --> | ||
<!-- Validate assignment operators --> | ||
<module name="WhitespaceAround"> | ||
<property name="tokens" value="ASSIGN"/> | ||
</module> | ||
<!-- Validate String.to(Lower|Upper)Case() calls include Locale argument --> | ||
<module name="Regexp"> | ||
<property name="message" value="Case-conversion calls must include an explicit Locale"/> | ||
<property name="format" value="(?!Character)\.to(Lower|Upper)Case\(\)"/> | ||
<property name="illegalPattern" value="true"/> | ||
</module> | ||
</module> | ||
<!-- Validate that command annotations are formatted correctly --> | ||
<module name="RegexpMultiline"> | ||
<property name="format" value="^( +)@(Arg|Switch|Command)\(.*?\r?\n\1 {5,}"/> | ||
</module> | ||
</module> | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE module PUBLIC | ||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN" | ||
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd"> | ||
<module name="Checker"> | ||
<!-- Tabs are strictly banned --> | ||
<module name="FileTabCharacter"/> | ||
<module name="SuppressWarningsFilter" /> | ||
<module name="TreeWalker"> | ||
<module name="SuppressWarningsHolder" /> <!-- allows for @SuppressWarnings annotation --> | ||
<!-- Important basics --> | ||
<!-- <module name="PackageDeclaration"/> Unlikely that we would miss this in a PR --> | ||
<module name="OuterTypeFilename"/> <!-- TypeName -> TypeName.java --> | ||
|
||
<!-- | ||
Control package usage, so people don't insert Bukkit into WE where it shouldn't belong, etc. | ||
It is a bit draconian, so update as necessary! | ||
--> | ||
<module name="ImportControl"> | ||
<property name="file" value="${config_loc}/import-control.xml"/> | ||
</module> | ||
|
||
<!-- Code --> | ||
<module name="HideUtilityClassConstructor"/> <!-- Utility classes should not have a constructor --> | ||
<module name="CovariantEquals"/> | ||
<module name="EqualsHashCode"/> <!-- equals() and hashCode() go together --> | ||
<module name="NestedTryDepth"> <!-- SHOULD not need to adjust this --> | ||
<property name="max" value="2"/> | ||
</module> | ||
<module name="SuperFinalize"/> <!-- We don't actually use this --> | ||
|
||
<!-- Style --> | ||
<module name="LeftCurly"> <!-- Left brace never goes on another line --> | ||
<property name="option" value="eol"/> | ||
</module> <!-- We don't check right brance --> | ||
<module name="DefaultComesLast"/> <!-- default case in switch should be last --> | ||
<module name="GenericWhitespace"/> | ||
|
||
<!-- Naming --> | ||
<module name="ClassTypeParameterName"> | ||
<property name="format" value="^[A-Z][a-zA-Z0-9]*$"/> | ||
</module> | ||
<module name="LocalFinalVariableName"/> | ||
<module name="LocalVariableName"> | ||
<property name="format" value="^[a-z_][a-zA-Z0-9]*$"/> | ||
</module> | ||
<module name="MemberName"> | ||
<property name="format" value="^[a-z_][a-zA-Z0-9]*$"/> | ||
</module> | ||
<module name="MethodName"> | ||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/> | ||
</module> | ||
<!-- <module name="PackageName"/> Unlikely that we would miss this in a PR --> | ||
<module name="ParameterName"/> | ||
<!-- <module name="TypeName"/> Unlikely that we would miss this in a PR --> | ||
<!-- Validate assignment operators --> | ||
<module name="WhitespaceAround"> | ||
<property name="tokens" value="ASSIGN"/> | ||
</module> | ||
<!-- Validate String.to(Lower|Upper)Case() calls include Locale argument --> | ||
<module name="Regexp"> | ||
<property name="message" value="Case-conversion calls must include an explicit Locale"/> | ||
<property name="format" value="(?!Character)\.to(Lower|Upper)Case\(\)"/> | ||
<property name="illegalPattern" value="true"/> | ||
</module> | ||
</module> | ||
<!-- Validate that command annotations are formatted correctly --> | ||
<module name="RegexpMultiline"> | ||
<property name="format" value="^( +)@(Arg|Switch|Command)\(.*?\r?\n\1 {5,}"/> | ||
</module> | ||
</module> |
118 changes: 59 additions & 59 deletions
118
worldedit-core/src/main/java/com/sk89q/jnbt/ByteArrayTag.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
/* | ||
* WorldEdit, a Minecraft world manipulation toolkit | ||
* Copyright (C) sk89q <http://www.sk89q.com> | ||
* Copyright (C) WorldEdit team and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as published by the | ||
* Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.sk89q.jnbt; | ||
|
||
import java.util.Locale; | ||
|
||
/** | ||
* The {@code TAG_Byte_Array} tag. | ||
*/ | ||
public final class ByteArrayTag extends Tag { | ||
|
||
private final byte[] value; | ||
|
||
/** | ||
* Creates the tag with an empty name. | ||
* | ||
* @param value the value of the tag | ||
*/ | ||
public ByteArrayTag(byte[] value) { | ||
super(); | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public byte[] getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder hex = new StringBuilder(); | ||
for (byte b : value) { | ||
String hexDigits = Integer.toHexString(b).toUpperCase(Locale.ROOT); | ||
if (hexDigits.length() == 1) { | ||
hex.append("0"); | ||
} | ||
hex.append(hexDigits).append(" "); | ||
} | ||
return "TAG_Byte_Array(" + hex + ")"; | ||
} | ||
|
||
} | ||
/* | ||
* WorldEdit, a Minecraft world manipulation toolkit | ||
* Copyright (C) sk89q <http://www.sk89q.com> | ||
* Copyright (C) WorldEdit team and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as published by the | ||
* Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.sk89q.jnbt; | ||
|
||
import java.util.Locale; | ||
|
||
/** | ||
* The {@code TAG_Byte_Array} tag. | ||
*/ | ||
public final class ByteArrayTag extends Tag { | ||
|
||
private final byte[] value; | ||
|
||
/** | ||
* Creates the tag with an empty name. | ||
* | ||
* @param value the value of the tag | ||
*/ | ||
public ByteArrayTag(byte[] value) { | ||
super(); | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public byte[] getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
StringBuilder hex = new StringBuilder(); | ||
for (byte b : value) { | ||
String hexDigits = Integer.toHexString(b).toUpperCase(Locale.ROOT); | ||
if (hexDigits.length() == 1) { | ||
hex.append("0"); | ||
} | ||
hex.append(hexDigits).append(" "); | ||
} | ||
return "TAG_Byte_Array(" + hex + ")"; | ||
} | ||
|
||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
/* | ||
* WorldEdit, a Minecraft world manipulation toolkit | ||
* Copyright (C) sk89q <http://www.sk89q.com> | ||
* Copyright (C) WorldEdit team and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as published by the | ||
* Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.sk89q.jnbt; | ||
|
||
/** | ||
* The {@code TAG_Byte} tag. | ||
*/ | ||
public final class ByteTag extends Tag { | ||
|
||
private final byte value; | ||
|
||
/** | ||
* Creates the tag with an empty name. | ||
* | ||
* @param value the value of the tag | ||
*/ | ||
public ByteTag(byte value) { | ||
super(); | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public Byte getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "TAG_Byte(" + value + ")"; | ||
} | ||
|
||
} | ||
/* | ||
* WorldEdit, a Minecraft world manipulation toolkit | ||
* Copyright (C) sk89q <http://www.sk89q.com> | ||
* Copyright (C) WorldEdit team and contributors | ||
* | ||
* This program is free software: you can redistribute it and/or modify it | ||
* under the terms of the GNU Lesser General Public License as published by the | ||
* Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License | ||
* for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.sk89q.jnbt; | ||
|
||
/** | ||
* The {@code TAG_Byte} tag. | ||
*/ | ||
public final class ByteTag extends Tag { | ||
|
||
private final byte value; | ||
|
||
/** | ||
* Creates the tag with an empty name. | ||
* | ||
* @param value the value of the tag | ||
*/ | ||
public ByteTag(byte value) { | ||
super(); | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public Byte getValue() { | ||
return value; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "TAG_Byte(" + value + ")"; | ||
} | ||
|
||
} |
Oops, something went wrong.