Allow null to be passed to YAMLValue

This commit is contained in:
ME1312 2018-11-17 12:39:37 -05:00
parent e254d37a30
commit 32cd201697
No known key found for this signature in database
GPG Key ID: FEFFE2F698E88FA8
36 changed files with 18 additions and 20 deletions

1
.gitignore vendored
View File

@ -33,6 +33,7 @@ crashlytics-build.properties
# Hide Unfinished Project Files
/SubServers.Client/Windows/
/Artifacts/SubServers.Web.jar
/SubServers.Velocity/
/SubServers.Web/
# Hide Others

View File

@ -78,14 +78,11 @@
<mkdir dir="${project.build.directory}" />
<copy file="${basedir}/../LICENSE" todir="${project.build.directory}/classes" />
<copy file="${basedir}/../Artifacts/SubServers.Client.jar" tofile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/client.jar" />
<zip basedir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/forge.zip" includes="Forge/*" />
<delete dir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/Forge" />
<zip basedir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/spigot.zip" includes="Spigot/*" />
<delete dir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/Spigot" />
<zip basedir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/sponge.zip" includes="Sponge/*" />
<delete dir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/Sponge" />
<zip basedir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/vanilla.zip" includes="Vanilla/*" />
<delete dir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/Vanilla" />
<mkdir dir="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates" />
<zip basedir="${basedir}/../SubServers.Creator/src" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/forge.zip" includes="Forge/*" />
<zip basedir="${basedir}/../SubServers.Creator/src" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/spigot.zip" includes="Spigot/*" />
<zip basedir="${basedir}/../SubServers.Creator/src" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/sponge.zip" includes="Sponge/*" />
<zip basedir="${basedir}/../SubServers.Creator/src" destfile="${project.build.directory}/classes/net/ME1312/SubServers/Bungee/Library/Files/Templates/vanilla.zip" includes="Vanilla/*" />
</tasks>
</configuration>
</execution>

View File

@ -333,7 +333,7 @@ public class YAMLSection {
*/
public YAMLValue get(String handle) {
if (Util.isNull(handle)) throw new NullPointerException();
return (map.get(handle) != null)?(new YAMLValue(map.get(handle), this, handle, yaml)):null;
return new YAMLValue(map.get(handle), this, handle, yaml);
}
/**

View File

@ -88,7 +88,7 @@ public final class SubCommand extends CommandX {
javaarch = System.getProperty("sun.arch.data.model");
}
sender.sendMessage("SubServers > These are the platforms and versions that are running SubServers.Sync:");
sender.sendMessage("SubServers > These are the platforms and versions that are running SubServers.Bungee:");
sender.sendMessage(" " + System.getProperty("os.name") + ((!System.getProperty("os.name").toLowerCase().startsWith("windows"))?' ' + System.getProperty("os.version"):"") + ((osarch != null)?" [" + osarch + ']':"") + ',');
sender.sendMessage(" Java " + System.getProperty("java.version") + ((javaarch != null)?" [" + javaarch + ']':"") + ',');
sender.sendMessage(" " + plugin.getBungeeName() + ((plugin.isPatched)?" [Patched] ":" ") + net.md_5.bungee.Bootstrap.class.getPackage().getImplementationVersion() + ',');

View File

@ -57,7 +57,7 @@ public final class SubPlugin extends BungeeCord implements Listener {
public final SubAPI api = new SubAPI(this);
public SubDataServer subdata = null;
public SubServer sudo = null;
public static final Version version = Version.fromString("2.13.2a");
public static final Version version = Version.fromString("2.13.2b");
public Proxy redis = null;
public boolean canSudo = false;

View File

@ -335,7 +335,7 @@ public class YAMLSection {
*/
public YAMLValue get(String handle) {
if (Util.isNull(handle)) throw new NullPointerException();
return (map.get(handle) != null)?(new YAMLValue(map.get(handle), this, handle, yaml)):null;
return new YAMLValue(map.get(handle), this, handle, yaml);
}
/**

View File

@ -1,6 +1,6 @@
name: 'SubServers-Client-Bukkit'
main: 'net.ME1312.SubServers.Client.Bukkit.SubPlugin'
version: '2.13.2a'
version: '2.13.2b'
authors: [ME1312]
softdepend: [Vault, TitleManager]
website: 'https://github.com/ME1312/SubServers-2'

View File

@ -335,7 +335,7 @@ public class YAMLSection {
*/
public YAMLValue get(String handle) {
if (Util.isNull(handle)) throw new NullPointerException();
return (map.get(handle) != null)?(new YAMLValue(map.get(handle), this, handle, yaml)):null;
return new YAMLValue(map.get(handle), this, handle, yaml);
}
/**

View File

@ -46,7 +46,7 @@ import java.util.concurrent.TimeUnit;
/**
* SubServers Client Plugin Class
*/
@Plugin(id = "subservers-client-sponge", name = "SubServers-Client-Sponge", authors = "ME1312", version = "2.13.2a", url = "https://github.com/ME1312/SubServers-2", description = "Access your SubServers from Anywhere")
@Plugin(id = "subservers-client-sponge", name = "SubServers-Client-Sponge", authors = "ME1312", version = "2.13.2b", url = "https://github.com/ME1312/SubServers-2", description = "Access your SubServers from Anywhere")
public final class SubPlugin {
protected NamedContainer<Long, Map<String, Map<String, String>>> lang = null;
public YAMLConfig config;

View File

@ -20,7 +20,7 @@
<dependency>
<groupId>net.ME1312.Galaxi</groupId>
<artifactId>GalaxiEngine</artifactId>
<version>18w44a</version>
<version>18w46a</version>
<scope>compile</scope>
</dependency>
<dependency>

View File

@ -33,7 +33,7 @@ import java.util.jar.Manifest;
/**
* SubServers.Host Main Class
*/
@Plugin(name = "SubServers.Host", version = "2.13.2a", authors = "ME1312", description = "Host SubServers from other Machines", website = "https://github.com/ME1312/SubServers-2")
@Plugin(name = "SubServers.Host", version = "2.13.2b", authors = "ME1312", description = "Host SubServers from other Machines", website = "https://github.com/ME1312/SubServers-2")
public final class ExHost {
protected NamedContainer<Long, Map<String, Map<String, String>>> lang = null;
public HashMap<String, SubCreator.ServerTemplate> templates = new HashMap<String, SubCreator.ServerTemplate>();

View File

@ -335,7 +335,7 @@ public class YAMLSection {
*/
public YAMLValue get(String handle) {
if (Util.isNull(handle)) throw new NullPointerException();
return (map.get(handle) != null)?(new YAMLValue(map.get(handle), this, handle, yaml)):null;
return new YAMLValue(map.get(handle), this, handle, yaml);
}
/**

View File

@ -44,7 +44,7 @@ public final class SubPlugin extends BungeeCord implements Listener {
public boolean redis = false;
public final SubAPI api = new SubAPI(this);
public SubDataClient subdata = null;
public static final Version version = Version.fromString("2.13.2a");
public static final Version version = Version.fromString("2.13.2b");
public final boolean isPatched;
public long lastReload = -1;

View File

@ -10,8 +10,8 @@
<modules>
<module>SubServers.Client</module>
<module>SubServers.Bungee</module>
<module>SubServers.Console</module>
<module>SubServers.Host</module>
<module>SubServers.Sync</module>
<module>SubServers.Console</module>
</modules>
</project>