Added site generation to pom.xml

Fixed encoding of some files
This commit is contained in:
Butzlabben 2019-03-03 16:28:19 +01:00
parent 664f66e541
commit cbf41729a9
5 changed files with 143 additions and 135 deletions

14
pom.xml
View File

@ -8,7 +8,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.number>-</project.build.number> <project.build.number>-</project.build.number>
<project.build.version>${project.version} <project.build.version>${project.version}
Build:${project.build.number}</project.build.version> Build:${project.build.number}
</project.build.version>
</properties> </properties>
<reporting> <reporting>
@ -18,6 +19,11 @@
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version> <version>3.0.1</version>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.6</version>
</plugin>
</plugins> </plugins>
</reporting> </reporting>
@ -28,7 +34,9 @@
<resource> <resource>
<directory>src/main/resources</directory> <directory>src/main/resources</directory>
<filtering>true</filtering> <filtering>true</filtering>
<excludes><exclude>LICENSE.txt</exclude></excludes> <excludes>
<exclude>LICENSE.txt</exclude>
</excludes>
</resource> </resource>
</resources> </resources>
<plugins> <plugins>
@ -51,7 +59,7 @@
<version>3.1.0</version> <version>3.1.0</version>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <id>attach-javadocs</id>
<goals> <goals>
<goal>shade</goal> <goal>shade</goal>
</goals> </goals>

View File

@ -105,7 +105,7 @@ public class GuiConfig {
try { try {
return Material.valueOf(cfg.getString(path + ".material").toUpperCase()); return Material.valueOf(cfg.getString(path + ".material").toUpperCase());
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
Bukkit.getConsoleSender().sendMessage(PluginConfig.getPrefix() + "§cUnknown material: " + path); Bukkit.getConsoleSender().sendMessage(PluginConfig.getPrefix() + "§cUnknown material: " + path);
return null; return null;
} }
} }
@ -120,7 +120,7 @@ public class GuiConfig {
return new OrcItem(getMaterial(cfg, path), getDisplay(cfg, path), getLore(cfg, path)); return new OrcItem(getMaterial(cfg, path), getDisplay(cfg, path), getLore(cfg, path));
} catch (Exception e) { } catch (Exception e) {
} }
return OrcItem.error.clone().setDisplay("§c" + path); return OrcItem.error.clone().setDisplay("§c" + path);
} }
public static OrcItem getEnabled() { public static OrcItem getEnabled() {

View File

@ -36,7 +36,7 @@ public class PluginConfig {
file = f; file = f;
if (file.exists()) { if (file.exists()) {
YamlConfiguration cfg = getConfig(); YamlConfiguration cfg = getConfig();
if (false == (cfg.isString("worldfolder") && cfg.isInt("unloadingtime") if (!(cfg.isString("worldfolder") && cfg.isInt("unloadingtime")
&& cfg.isBoolean("survival") && cfg.isString("language") && cfg.isString("prefix") && cfg.isBoolean("survival") && cfg.isString("language") && cfg.isString("prefix")
&& cfg.isInt("request_expires") && cfg.isBoolean("need_confirm") && cfg.isInt("request_expires") && cfg.isBoolean("need_confirm")
&& cfg.isBoolean("contact_authserver") && cfg.isBoolean("spawn_teleportation") && cfg.isBoolean("contact_authserver") && cfg.isBoolean("spawn_teleportation")
@ -88,7 +88,7 @@ public class PluginConfig {
// Should fix #2 // Should fix #2
if (getSpawn().getWorld() == null) { if (getSpawn().getWorld() == null) {
Bukkit.getConsoleSender().sendMessage(getPrefix() + "§cWorld is null in spawn.world!"); Bukkit.getConsoleSender().sendMessage(getPrefix() + "§cWorld is null in spawn.world!");
} }
} }
@ -154,7 +154,7 @@ public class PluginConfig {
} }
public static String getPrefix() { public static String getPrefix() {
return ChatColor.translateAlternateColorCodes('&', getConfig().getString("prefix", "§8[§3WorldSystem§8] §6")); return ChatColor.translateAlternateColorCodes('&', getConfig().getString("prefix", "§8[§3WorldSystem§8] §6"));
} }
public static Location getWorldSpawn(World w) { public static Location getWorldSpawn(World w) {

View File

@ -11,7 +11,7 @@ public class ComingSoonClickListener implements OrcClickListener {
@Override @Override
public void onClick(Player p, OrcInventory inv, OrcItem item) { public void onClick(Player p, OrcInventory inv, OrcItem item) {
p.closeInventory(); p.closeInventory();
p.sendMessage("§cComing soon..."); p.sendMessage("§cComing soon...");
} }
} }

View File

@ -207,7 +207,7 @@ public class SystemWorld {
// FileUtils.deleteDirectory(new // FileUtils.deleteDirectory(new
// File(Bukkit.getWorldContainer(), worldname)); // File(Bukkit.getWorldContainer(), worldname));
// } catch (IOException e) { // } catch (IOException e) {
// p.sendMessage(PluginConfig.getPrefix() + "§cError"); // p.sendMessage(PluginConfig.getPrefix() + "§cError");
// e.printStackTrace(); // e.printStackTrace();
// } // }
} }
@ -215,7 +215,7 @@ public class SystemWorld {
FileUtils.moveDirectoryToDirectory(world, Bukkit.getWorldContainer(), false); FileUtils.moveDirectoryToDirectory(world, Bukkit.getWorldContainer(), false);
} catch (IOException e) { } catch (IOException e) {
System.err.println("Couldn't load world of " + p.getName()); System.err.println("Couldn't load world of " + p.getName());
p.sendMessage(PluginConfig.getPrefix() + "§cError: " + e.getMessage()); p.sendMessage(PluginConfig.getPrefix() + "§cError: " + e.getMessage());
e.printStackTrace(); e.printStackTrace();
} }
} }
@ -302,7 +302,7 @@ public class SystemWorld {
try { try {
FileUtils.moveDirectoryToDirectory(world, Bukkit.getWorldContainer(), false); FileUtils.moveDirectoryToDirectory(world, Bukkit.getWorldContainer(), false);
} catch (IOException e) { } catch (IOException e) {
p.sendMessage(PluginConfig.getPrefix() + "§cError: " + e.getMessage()); p.sendMessage(PluginConfig.getPrefix() + "§cError: " + e.getMessage());
System.err.println("Couldn't load world of " + p.getName()); System.err.println("Couldn't load world of " + p.getName());
e.printStackTrace(); e.printStackTrace();
return false; return false;