@@ -104,37 +101,37 @@
-
- org.apache.maven.plugins
- maven-compiler-plugin
- 3.8.0
-
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.0
+
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
- 2.22.1
-
-
-
- org.apache.maven.plugins
- maven-failsafe-plugin
- 2.22.1
-
-
-
- org.codehaus.mojo
- cobertura-maven-plugin
- 2.7
-
-
- html
- xml
-
-
-
-
-
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ 2.22.1
+
+
+
+ org.apache.maven.plugins
+ maven-failsafe-plugin
+ 2.22.1
+
+
+
+ org.codehaus.mojo
+ cobertura-maven-plugin
+ 2.7
+
+
+ html
+ xml
+
+
+
+
+
diff --git a/src/com/dogonfire/gods/Gods.java b/src/com/dogonfire/gods/Gods.java
index 9e09af1..025e7e2 100644
--- a/src/com/dogonfire/gods/Gods.java
+++ b/src/com/dogonfire/gods/Gods.java
@@ -193,4 +193,4 @@ public void sendInfo(UUID playerId, LanguageManager.LANGUAGESTRING message, Chat
getServer().getScheduler().runTaskLater(this, new TaskInfo(color, playerId, message, name1, name2), delay);
}
-}
\ No newline at end of file
+}
diff --git a/src/com/dogonfire/gods/Metrics.java b/src/com/dogonfire/gods/Metrics.java
deleted file mode 100644
index 5098faf..0000000
--- a/src/com/dogonfire/gods/Metrics.java
+++ /dev/null
@@ -1,700 +0,0 @@
-package com.dogonfire.gods;
-
-/*
- * Copyright 2011 Tyler Blair. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification, are
- * permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this list of
- * conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
- * provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * The views and conclusions contained in the software and documentation are those of the
- * authors and contributors and should not be interpreted as representing official policies,
- * either expressed or implied, of anybody else.
- */
-
-import org.bukkit.Bukkit;
-import org.bukkit.configuration.file.YamlConfiguration;
-import org.bukkit.configuration.InvalidConfigurationException;
-import org.bukkit.plugin.Plugin;
-import org.bukkit.plugin.PluginDescriptionFile;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.UnsupportedEncodingException;
-import java.net.Proxy;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.Set;
-import java.util.UUID;
-import java.util.logging.Level;
-
-/**
- *
- * The metrics class obtains data about a plugin and submits statistics about it
- * to the metrics backend.
- *
- *
- * Public methods provided by this class:
- *
- *
- * Graph createGraph(String name);
- * void addCustomData(Metrics.Plotter plotter);
- * void start();
- *
- */
-public class Metrics
-{
-
- /**
- * The current revision number
- */
- private final static int REVISION = 5;
-
- /**
- * The base url of the metrics domain
- */
- private static final String BASE_URL = "http://mcstats.org";
-
- /**
- * The url used to report a server's status
- */
- private static final String REPORT_URL = "/report/%s";
-
- /**
- * The file where guid and opt out is stored in
- */
- private static final String CONFIG_FILE = "plugins/PluginMetrics/config.yml";
-
- /**
- * The separator to use for custom data. This MUST NOT change unless you are
- * hosting your own version of metrics and want to change it.
- */
- private static final String CUSTOM_DATA_SEPARATOR = "~~";
-
- /**
- * Interval of time to ping (in minutes)
- */
- private static final int PING_INTERVAL = 10;
-
- /**
- * The plugin this metrics submits for
- */
- private final Plugin plugin;
-
- /**
- * All of the custom graphs to submit to metrics
- */
- private final Set graphs = Collections.synchronizedSet(new HashSet());
-
- /**
- * The default graph, used for addCustomData when you don't want a specific
- * graph
- */
- private final Graph defaultGraph = new Graph("Default");
-
- /**
- * The plugin configuration file
- */
- private final YamlConfiguration configuration;
-
- /**
- * The plugin configuration file
- */
- private final File configurationFile;
-
- /**
- * Unique server id
- */
- private final String guid;
-
- /**
- * Lock for synchronization
- */
- private final Object optOutLock = new Object();
-
- /**
- * Id of the scheduled task
- */
- private volatile int taskId = -1;
-
- public Metrics(final Plugin plugin) throws IOException
- {
- if (plugin == null)
- {
- throw new IllegalArgumentException("Plugin cannot be null");
- }
-
- this.plugin = plugin;
-
- // load the config
- configurationFile = new File(CONFIG_FILE);
- configuration = YamlConfiguration.loadConfiguration(configurationFile);
-
- // add some defaults
- configuration.addDefault("opt-out", false);
- configuration.addDefault("guid", UUID.randomUUID().toString());
-
- // Do we need to create the file?
- if (configuration.get("guid", null) == null)
- {
- configuration.options().header("http://mcstats.org").copyDefaults(true);
- configuration.save(configurationFile);
- }
-
- // Load the guid then
- guid = configuration.getString("guid");
- }
-
- /**
- * Construct and create a Graph that can be used to separate specific
- * plotters to their own graphs on the metrics website. Plotters can be
- * added to the graph object returned.
- *
- * @param name
- * @return Graph object created. Will never return NULL under normal
- * circumstances unless bad parameters are given
- */
- public Graph createGraph(final String name)
- {
- if (name == null)
- {
- throw new IllegalArgumentException("Graph name cannot be null");
- }
-
- // Construct the graph object
- final Graph graph = new Graph(name);
-
- // Now we can add our graph
- graphs.add(graph);
-
- // and return back
- return graph;
- }
-
- /**
- * Adds a custom data plotter to the default graph
- *
- * @param plotter
- */
- public void addCustomData(final Plotter plotter)
- {
- if (plotter == null)
- {
- throw new IllegalArgumentException("Plotter cannot be null");
- }
-
- // Add the plotter to the graph o/
- defaultGraph.addPlotter(plotter);
-
- // Ensure the default graph is included in the submitted graphs
- graphs.add(defaultGraph);
- }
-
- /**
- * Start measuring statistics. This will immediately create an async
- * repeating task as the plugin and send the initial data to the metrics
- * backend, and then after that it will post in increments of PING_INTERVAL
- * * 1200 ticks.
- *
- * @return True if statistics measuring is running, otherwise false.
- */
- public boolean start()
- {
- synchronized (optOutLock)
- {
- // Did we opt out?
- if (isOptOut())
- {
- return false;
- }
-
- // Is metrics already running?
- if (taskId >= 0)
- {
- return true;
- }
-
- // Begin hitting the server with glorious data
- taskId = plugin.getServer().getScheduler().scheduleAsyncRepeatingTask(plugin, new Runnable()
- {
-
- private boolean firstPost = true;
-
- public void run()
- {
- try
- {
- // This has to be synchronized or it can collide with
- // the disable method.
- synchronized (optOutLock)
- {
- // Disable Task, if it is running and the server
- // owner decided to opt-out
- if (isOptOut() && taskId > 0)
- {
- plugin.getServer().getScheduler().cancelTask(taskId);
- taskId = -1;
- }
- }
-
- // We use the inverse of firstPost because if it is the
- // first time we are posting,
- // it is not a interval ping, so it evaluates to FALSE
- // Each time thereafter it will evaluate to TRUE, i.e
- // PING!
- postPlugin(!firstPost);
-
- // After the first post we set firstPost to false
- // Each post thereafter will be a ping
- firstPost = false;
- }
- catch (IOException e)
- {
- Bukkit.getLogger().log(Level.INFO, "[Metrics] {0}", e.getMessage());
- }
- }
- }, 0, PING_INTERVAL * 1200);
-
- return true;
- }
- }
-
- /**
- * Has the server owner denied plugin metrics?
- *
- * @return
- */
- public boolean isOptOut()
- {
- synchronized (optOutLock)
- {
- try
- {
- // Reload the metrics file
- configuration.load(CONFIG_FILE);
- }
- catch (IOException ex)
- {
- Bukkit.getLogger().log(Level.INFO, "[Metrics] {0}", ex.getMessage());
- return true;
- }
- catch (InvalidConfigurationException ex)
- {
- Bukkit.getLogger().log(Level.INFO, "[Metrics] {0}", ex.getMessage());
- return true;
- }
- return configuration.getBoolean("opt-out", false);
- }
- }
-
- /**
- * Enables metrics for the server by setting "opt-out" to false in the
- * config file and starting the metrics task.
- *
- * @throws IOException
- */
- public void enable() throws IOException
- {
- // This has to be synchronized or it can collide with the check in the
- // task.
- synchronized (optOutLock)
- {
- // Check if the server owner has already set opt-out, if not, set
- // it.
- if (isOptOut())
- {
- configuration.set("opt-out", false);
- configuration.save(configurationFile);
- }
-
- // Enable Task, if it is not running
- if (taskId < 0)
- {
- start();
- }
- }
- }
-
- /**
- * Disables metrics for the server by setting "opt-out" to true in the
- * config file and canceling the metrics task.
- *
- * @throws IOException
- */
- public void disable() throws IOException
- {
- // This has to be synchronized or it can collide with the check in the
- // task.
- synchronized (optOutLock)
- {
- // Check if the server owner has already set opt-out, if not, set
- // it.
- if (!isOptOut())
- {
- configuration.set("opt-out", true);
- configuration.save(configurationFile);
- }
-
- // Disable Task, if it is running
- if (taskId > 0)
- {
- this.plugin.getServer().getScheduler().cancelTask(taskId);
- taskId = -1;
- }
- }
- }
-
- /**
- * Generic method that posts a plugin to the metrics website
- */
- private void postPlugin(final boolean isPing) throws IOException
- {
- // The plugin's description file containg all of the plugin data such as
- // name, version, author, etc
- final PluginDescriptionFile description = plugin.getDescription();
-
- // Construct the post data
- final StringBuilder data = new StringBuilder();
- data.append(encode("guid")).append('=').append(encode(guid));
- encodeDataPair(data, "version", description.getVersion());
- encodeDataPair(data, "server", Bukkit.getVersion());
- encodeDataPair(data, "players", Integer.toString(Bukkit.getServer().getOnlinePlayers().size()));
- encodeDataPair(data, "revision", String.valueOf(REVISION));
-
- // If we're pinging, append it
- if (isPing)
- {
- encodeDataPair(data, "ping", "true");
- }
-
- // Acquire a lock on the graphs, which lets us make the assumption we
- // also lock everything
- // inside of the graph (e.g plotters)
- synchronized (graphs)
- {
- final Iterator iter = graphs.iterator();
-
- while (iter.hasNext())
- {
- final Graph graph = iter.next();
-
- // Because we have a lock on the graphs set already, it is
- // reasonable to assume
- // that our lock transcends down to the individual plotters in
- // the graphs also.
- // Because our methods are private, no one but us can reasonably
- // access this list
- // without reflection so this is a safe assumption without
- // adding more code.
- for (Plotter plotter : graph.getPlotters())
- {
- // The key name to send to the metrics server
- // The format is C-GRAPHNAME-PLOTTERNAME where separator -
- // is defined at the top
- // Legacy (R4) submitters use the format Custom%s, or
- // CustomPLOTTERNAME
- final String key = String.format("C%s%s%s%s", CUSTOM_DATA_SEPARATOR, graph.getName(), CUSTOM_DATA_SEPARATOR, plotter.getColumnName());
-
- // The value to send, which for the foreseeable future is
- // just the string
- // value of plotter.getValue()
- final String value = Integer.toString(plotter.getValue());
-
- // Add it to the http post data :)
- encodeDataPair(data, key, value);
- }
- }
- }
-
- // Create the url
- URL url = new URL(BASE_URL + String.format(REPORT_URL, encode(plugin.getDescription().getName())));
-
- // Connect to the website
- URLConnection connection;
-
- // Mineshafter creates a socks proxy, so we can safely bypass it
- // It does not reroute POST requests so we need to go around it
- if (isMineshafterPresent())
- {
- connection = url.openConnection(Proxy.NO_PROXY);
- }
- else
- {
- connection = url.openConnection();
- }
-
- connection.setDoOutput(true);
-
- // Write the data
- final OutputStreamWriter writer = new OutputStreamWriter(connection.getOutputStream());
- writer.write(data.toString());
- writer.flush();
-
- // Now read the response
- final BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
- final String response = reader.readLine();
-
- // close resources
- writer.close();
- reader.close();
-
- if (response == null || response.startsWith("ERR"))
- {
- throw new IOException(response); // Throw the exception
- }
- else
- {
- // Is this the first update this hour?
- if (response.contains("OK This is your first update this hour"))
- {
- synchronized (graphs)
- {
- final Iterator iter = graphs.iterator();
-
- while (iter.hasNext())
- {
- final Graph graph = iter.next();
-
- for (Plotter plotter : graph.getPlotters())
- {
- plotter.reset();
- }
- }
- }
- }
- }
- // if (response.startsWith("OK")) - We should get "OK" followed by an
- // optional description if everything goes right
- }
-
- /**
- * Check if mineshafter is present. If it is, we need to bypass it to send
- * POST requests
- *
- * @return
- */
- private boolean isMineshafterPresent()
- {
- try
- {
- Class.forName("mineshafter.MineServer");
- return true;
- }
- catch (Exception e)
- {
- return false;
- }
- }
-
- /**
- *
- * Encode a key/value data pair to be used in a HTTP post request. This
- * INCLUDES a & so the first key/value pair MUST be included manually, e.g:
- *
- *
- * StringBuffer data = new StringBuffer();
- * data.append(encode("guid")).append('=').append(encode(guid));
- * encodeDataPair(data, "version", description.getVersion());
- *
- *
- * @param buffer
- * @param key
- * @param value
- * @return
- */
- private static void encodeDataPair(final StringBuilder buffer, final String key, final String value) throws UnsupportedEncodingException
- {
- buffer.append('&').append(encode(key)).append('=').append(encode(value));
- }
-
- /**
- * Encode text as UTF-8
- *
- * @param text
- * @return
- */
- private static String encode(final String text) throws UnsupportedEncodingException
- {
- return URLEncoder.encode(text, "UTF-8");
- }
-
- /**
- * Represents a custom graph on the website
- */
- public static class Graph
- {
-
- /**
- * The graph's name, alphanumeric and spaces only :) If it does not
- * comply to the above when submitted, it is rejected
- */
- private final String name;
-
- /**
- * The set of plotters that are contained within this graph
- */
- private final Set plotters = new LinkedHashSet();
-
- private Graph(final String name)
- {
- this.name = name;
- }
-
- /**
- * Gets the graph's name
- *
- * @return
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Add a plotter to the graph, which will be used to plot entries
- *
- * @param plotter
- */
- public void addPlotter(final Plotter plotter)
- {
- plotters.add(plotter);
- }
-
- /**
- * Remove a plotter from the graph
- *
- * @param plotter
- */
- public void removePlotter(final Plotter plotter)
- {
- plotters.remove(plotter);
- }
-
- /**
- * Gets an unmodifiable set of the plotter objects in the graph
- *
- * @return
- */
- public Set getPlotters()
- {
- return Collections.unmodifiableSet(plotters);
- }
-
- @Override
- public int hashCode()
- {
- return name.hashCode();
- }
-
- @Override
- public boolean equals(final Object object)
- {
- if (!(object instanceof Graph))
- {
- return false;
- }
-
- final Graph graph = (Graph) object;
- return graph.name.equals(name);
- }
-
- }
-
- /**
- * Interface used to collect custom data for a plugin
- */
- public static abstract class Plotter
- {
-
- /**
- * The plot's name
- */
- private final String name;
-
- /**
- * Construct a plotter with the default plot name
- */
- public Plotter()
- {
- this("Default");
- }
-
- /**
- * Construct a plotter with a specific plot name
- *
- * @param name
- */
- public Plotter(final String name)
- {
- this.name = name;
- }
-
- /**
- * Get the current value for the plotted point
- *
- * @return
- */
- public abstract int getValue();
-
- /**
- * Get the column name for the plotted point
- *
- * @return the plotted point's column name
- */
- public String getColumnName()
- {
- return name;
- }
-
- /**
- * Called after the website graphs have been updated
- */
- public void reset()
- {
- }
-
- @Override
- public int hashCode()
- {
- return getColumnName().hashCode() + getValue();
- }
-
- @Override
- public boolean equals(final Object object)
- {
- if (!(object instanceof Plotter))
- {
- return false;
- }
-
- final Plotter plotter = (Plotter) object;
- return plotter.name.equals(name) && plotter.getValue() == getValue();
- }
-
- }
-
-}
\ No newline at end of file
diff --git a/src/com/dogonfire/gods/UpdateChecker.java b/src/com/dogonfire/gods/UpdateChecker.java
deleted file mode 100644
index 4fdbd27..0000000
--- a/src/com/dogonfire/gods/UpdateChecker.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package com.dogonfire.gods;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLConnection;
-
-import com.google.gson.JsonArray;
-import com.google.gson.JsonObject;
-
-@SuppressWarnings("unused")
-public class UpdateChecker
-{
- private final int projectID = 39139;
- private final String apiKey = null;
- private static final String API_NAME_VALUE = "name";
- private static final String API_LINK_VALUE = "downloadUrl";
- private static final String API_RELEASE_TYPE_VALUE = "releaseType";
- private static final String API_FILE_NAME_VALUE = "fileName";
- private static final String API_GAME_VERSION_VALUE = "gameVersion";
- private static final String API_QUERY = "/servermods/files?projectIds=";
- private static final String API_HOST = "https://api.curseforge.com";
- private static String versionName;
- private static String versionLink;
- private static String versionType;
- private static String versionFileName;
- private static String versionGameVersion;
-
- public String getLatestVersionName()
- {
- URL url = null;
-
- String versionName = null;
- try
- {
- url = new URL("https://api.curseforge.com/servermods/files?projectIds=39139");
- }
- catch (MalformedURLException e)
- {
- e.printStackTrace();
-
- return versionName;
- }
- try
- {
- URLConnection conn = url.openConnection();
- if (this.apiKey != null)
- {
- conn.addRequestProperty("X-API-Key", this.apiKey);
- }
- conn.addRequestProperty("User-Agent", "Gods (by DoggyOnFire)");
-
- BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
- String response = reader.readLine();
-
- JsonArray array = new JsonArray();//(JsonArray) JsonArray.parse(response);
- if (array.size() > 0)
- {
- JsonObject latest = (JsonObject) array.get(array.size() - 1);
-
- versionName = latest.get("name").getAsString();
-
- versionLink = latest.get("downloadUrl").getAsString();
-
- versionType = latest.get("releaseType").getAsString();
-
- versionFileName = latest.get("fileName").getAsString();
-
- versionGameVersion = latest.get("gameVersion").getAsString();
- }
- else
- {
- System.out.println("There are no files for this project");
- }
- }
- catch (IOException e)
- {
- return versionName;
- }
- return versionName;
- }
-
- public String getLatestVersionGameVersion()
- {
- return versionGameVersion;
- }
-
- public String getLatestVersionLink()
- {
- return versionLink;
- }
-}
\ No newline at end of file
diff --git a/src/com/dogonfire/gods/UpdateNotifier.java b/src/com/dogonfire/gods/UpdateNotifier.java
deleted file mode 100644
index 97f41ab..0000000
--- a/src/com/dogonfire/gods/UpdateNotifier.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.dogonfire.gods;
-
-import org.bukkit.entity.Player;
-
-public class UpdateNotifier implements Runnable
-{
- final Gods plugin;
- Player player;
-
- public UpdateNotifier(Gods plugin, Player player)
- {
- this.plugin = plugin;
- this.player = player;
- }
-
- public void run()
- {
- if (this.player.isOnline())
- {
-// UpdateChecker updateChecker = new UpdateChecker();
-//
-// String latestVersionName = updateChecker.getLatestVersionName();
-//
-// if (latestVersionName == null)
-// {
-// this.plugin.log("Could not get latest version name!");
-// return;
-// }
-//
-// int thisVersionNumber;
-//
-// try
-// {
-// thisVersionNumber = Integer.parseInt(this.plugin.getDescription().getVersion().replace(".", ""));
-// }
-// catch (NumberFormatException e)
-// {
-// this.plugin.log("Could not parse this plugin version number (from " + this.plugin.getDescription().getVersion() + ")");
-// return;
-// }
-//
-// int bukkitVersionNumber;
-//
-// try
-// {
-// bukkitVersionNumber = Integer.parseInt(latestVersionName.replace(" ", "").replace("Beta", "").replace("Gods", "").replace(".", ""));
-// }
-// catch (NumberFormatException e)
-// {
-// this.plugin.log("Could not parse latest version number (from " + latestVersionName + ")");
-// return;
-// }
-//
-// try
-// {
-// if (thisVersionNumber < bukkitVersionNumber)
-// {
-// this.player.sendMessage(ChatColor.AQUA + "There is a new update for Gods available: " + ChatColor.GOLD + latestVersionName + ChatColor.AQUA + " for " + ChatColor.GOLD + updateChecker.getLatestVersionGameVersion());
-// this.player.sendMessage(ChatColor.AQUA + "Download it at " + ChatColor.GOLD + updateChecker.getLatestVersionLink());
-// }
-// }
-// catch (NumberFormatException e)
-// {
-// this.plugin.log("Could not compare version numbers!");
-// }
- }
- }
-}
\ No newline at end of file
diff --git a/src/com/dogonfire/gods/commands/CommandAttackHolyLand.java b/src/com/dogonfire/gods/commands/CommandAttackHolyLand.java
index 9e4f2d5..f9d1c2e 100644
--- a/src/com/dogonfire/gods/commands/CommandAttackHolyLand.java
+++ b/src/com/dogonfire/gods/commands/CommandAttackHolyLand.java
@@ -34,6 +34,10 @@ public void onCommand(CommandSender sender, String command, String... args)
Player player = (Player) sender;
String godName = BelieverManager.instance().getGodForBeliever(player.getUniqueId());
Location attackLocation = GodManager.instance().getContestedHolyLandAttackLocationForGod(godName);
+ if(attackLocation == null) {
+ sender.sendMessage(ChatColor.RED + "No holy land found");
+ return;
+ }
player.teleport(attackLocation);
String otherGodName = HolyLandManager.instance().getGodAtHolyLandLocation(attackLocation);
sender.sendMessage(ChatColor.AQUA + "You joined the attack on the Holy Land of " + ChatColor.GOLD + otherGodName);
diff --git a/src/com/dogonfire/gods/commands/CommandHelp.java b/src/com/dogonfire/gods/commands/CommandHelp.java
index 3e9b085..6c94a0a 100644
--- a/src/com/dogonfire/gods/commands/CommandHelp.java
+++ b/src/com/dogonfire/gods/commands/CommandHelp.java
@@ -129,6 +129,7 @@ private void helpAltar(CommandSender sender)
sender.sendMessage(ChatColor.WHITE + " 1 - Place a block");
sender.sendMessage(ChatColor.WHITE + " 2a - Place a torch on top for a male god");
sender.sendMessage(ChatColor.WHITE + " 2b - Place a redstone torch on top for a female god");
+ sender.sendMessage(ChatColor.WHITE + " 2c - Place a soul torch on top for a nonbinary god");
sender.sendMessage(ChatColor.WHITE + " 3 - Place a sign on the side of the block");
sender.sendMessage(ChatColor.WHITE + " 4 - Write the name of your God on the sign");
sender.sendMessage("");
diff --git a/src/com/dogonfire/gods/commands/CommandMarry.java b/src/com/dogonfire/gods/commands/CommandMarry.java
index 6c606c7..a6c7ae9 100644
--- a/src/com/dogonfire/gods/commands/CommandMarry.java
+++ b/src/com/dogonfire/gods/commands/CommandMarry.java
@@ -27,6 +27,7 @@ public void onCommand(CommandSender sender, String command, String... args)
if (!GodsConfiguration.instance().isMarriageEnabled())
{
sender.sendMessage(ChatColor.RED + "Marrige is not enabled on this server");
+ return;
}
if (!hasPermission(sender))
{
@@ -96,8 +97,8 @@ public void onCommand(CommandSender sender, String command, String... args)
MarriageManager.instance().proposeMarriage(player.getUniqueId(), otherPlayer.getUniqueId());
LanguageManager.instance().setPlayerName(player.getName());
- GodManager.instance().GodSayWithQuestion(thisGodName, otherPlayer, LanguageManager.LANGUAGESTRING.GodToBelieverMarriageProposal, 1);
+ GodManager.instance().GodSayWithQuestion(thisGodName, otherPlayer, LanguageManager.LANGUAGESTRING.GodToBelieverMarriageProposal, 0);
player.sendMessage(ChatColor.AQUA + "You proposed " + ChatColor.WHITE + otherPlayerName + ChatColor.AQUA + " to marry you in the name of " + ChatColor.GOLD + thisGodName + "!");
}
-}
\ No newline at end of file
+}
diff --git a/src/com/dogonfire/gods/commands/CommandToggleWar.java b/src/com/dogonfire/gods/commands/CommandToggleWar.java
index 20d211e..cf27e61 100644
--- a/src/com/dogonfire/gods/commands/CommandToggleWar.java
+++ b/src/com/dogonfire/gods/commands/CommandToggleWar.java
@@ -23,7 +23,8 @@ protected CommandToggleWar()
@Override
public void onCommand(CommandSender sender, String command, String... args)
{
- if (!hasPermission(sender))
+ if(args.length == 1) {
+ if (!hasPermission(sender))
{
sender.sendMessage(stringNoPermission);
return;
@@ -39,6 +40,7 @@ public void onCommand(CommandSender sender, String command, String... args)
player.sendMessage(stringPreistOnly);
return;
}
+
String godName = BelieverManager.instance().getGodForBeliever(player.getUniqueId());
String enemyGodName = GodManager.instance().formatGodName(args[1]);
if (!GodManager.instance().godExist(args[1]))
@@ -68,6 +70,7 @@ public void onCommand(CommandSender sender, String command, String... args)
LanguageManager.instance().setPlayerName(enemyGodName);
GodManager.instance().godSayToBelievers(godName, LanguageManager.LANGUAGESTRING.GodToBelieversWarCancelled, 10);
}
-
+ }
}
+
}
diff --git a/src/com/dogonfire/gods/commands/GodsCommandExecuter.java b/src/com/dogonfire/gods/commands/GodsCommandExecuter.java
index 5cc773d..ec39a19 100644
--- a/src/com/dogonfire/gods/commands/GodsCommandExecuter.java
+++ b/src/com/dogonfire/gods/commands/GodsCommandExecuter.java
@@ -87,7 +87,7 @@ protected void registerCommand(GodsCommand command)
private void CommandGods(CommandSender sender)
{
sender.sendMessage(ChatColor.YELLOW + "------------------ " + Gods.instance().getDescription().getFullName() + " ------------------");
- sender.sendMessage(ChatColor.AQUA + "By DogOnFire");
+ sender.sendMessage(ChatColor.AQUA + "By DogOnFire, improved by galacticwarrior9, updated by aki173873 and Openmindedness");
sender.sendMessage("" + ChatColor.AQUA);
sender.sendMessage(ChatColor.AQUA + "There are currently " + ChatColor.WHITE + GodManager.instance().getAllGods().size() + ChatColor.AQUA + " Gods and");
sender.sendMessage("" + ChatColor.WHITE + BelieverManager.instance().getBelievers().size() + ChatColor.AQUA + " believers in " + GodsConfiguration.instance().getServerName());
@@ -160,4 +160,4 @@ public boolean onCommand(CommandSender sender, Command cmd, String label, String
return true;
}
-}
\ No newline at end of file
+}
diff --git a/src/com/dogonfire/gods/listeners/BlockListener.java b/src/com/dogonfire/gods/listeners/BlockListener.java
index 4fb10cc..5299c92 100644
--- a/src/com/dogonfire/gods/listeners/BlockListener.java
+++ b/src/com/dogonfire/gods/listeners/BlockListener.java
@@ -26,7 +26,11 @@
import org.bukkit.event.entity.EntityExplodeEvent;
import org.bukkit.event.entity.EntityPickupItemEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
-import org.bukkit.event.player.*;
+import org.bukkit.event.player.PlayerItemConsumeEvent;
+import org.bukkit.event.player.PlayerDropItemEvent;
+import org.bukkit.event.player.PlayerInteractEvent;
+import org.bukkit.event.player.PlayerJoinEvent;
+import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.inventory.ItemStack;
import com.dogonfire.gods.Gods;
@@ -812,4 +816,4 @@ public void OnSignChange(SignChangeEvent event)
return;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/com/dogonfire/gods/managers/AltarManager.java b/src/com/dogonfire/gods/managers/AltarManager.java
index e9d5c93..7a7a675 100644
--- a/src/com/dogonfire/gods/managers/AltarManager.java
+++ b/src/com/dogonfire/gods/managers/AltarManager.java
@@ -68,7 +68,7 @@ public Block getAltarBlockFromSign(Block block)
{
return null;
}
- if ((!altarBlock.getRelative(BlockFace.UP).getType().equals(Material.TORCH)) && (!altarBlock.getRelative(BlockFace.UP).getType().equals(Material.REDSTONE_TORCH)))
+ if ((!altarBlock.getRelative(BlockFace.UP).getType().equals(Material.SOUL_TORCH)) && (!altarBlock.getRelative(BlockFace.UP).getType().equals(Material.TORCH)) && (!altarBlock.getRelative(BlockFace.UP).getType().equals(Material.REDSTONE_TORCH)))
{
return null;
}
@@ -165,6 +165,10 @@ public GodManager.GodGender getGodGenderFromAltarBlock(Block block)
{
return GodManager.GodGender.Female;
}
+ if (block.getRelative(BlockFace.UP).getType().equals(Material.SOUL_TORCH))
+ {
+ return GodManager.GodGender.Nonbinary;
+ }
return GodManager.GodGender.Male;
}
@@ -361,7 +365,7 @@ public boolean isAltarBlock(Block block)
{
return false;
}
- if ((block.getRelative(BlockFace.UP).getType() != Material.TORCH) && (block.getRelative(BlockFace.UP).getType() != Material.REDSTONE_TORCH))
+ if ((block.getRelative(BlockFace.UP).getType() != Material.SOUL_TORCH) && (block.getRelative(BlockFace.UP).getType() != Material.TORCH) && (block.getRelative(BlockFace.UP).getType() != Material.REDSTONE_TORCH))
{
return false;
}
@@ -397,7 +401,7 @@ public boolean isAltarSign(Block block)
return false;
}
- if ((!altarBlock.getRelative(BlockFace.UP).getType().equals(Material.TORCH)) && (!altarBlock.getRelative(BlockFace.UP).getType().equals(Material.REDSTONE_TORCH)))
+ if ((!altarBlock.getRelative(BlockFace.UP).getType().equals(Material.SOUL_TORCH)) &&(!altarBlock.getRelative(BlockFace.UP).getType().equals(Material.TORCH)) && (!altarBlock.getRelative(BlockFace.UP).getType().equals(Material.REDSTONE_TORCH)))
{
return false;
}
@@ -410,7 +414,7 @@ public boolean isAltarTorch(Block block)
{
return false;
}
- if ((block.getType() != Material.TORCH) && (block.getType() != Material.REDSTONE_TORCH))
+ if ((block.getType() != Material.TORCH) && (block.getType() != Material.SOUL_TORCH) && (block.getType() != Material.REDSTONE_TORCH))
{
return false;
}
@@ -580,4 +584,4 @@ public void setAltarBlockTypeForGodType(GodType godType, Material blockMaterial)
this.altarBlockTypes.put(blockMaterial, godTypes);
}
-}
\ No newline at end of file
+}
diff --git a/src/com/dogonfire/gods/managers/ChatManager.java b/src/com/dogonfire/gods/managers/ChatManager.java
index 60f4437..3d50f95 100644
--- a/src/com/dogonfire/gods/managers/ChatManager.java
+++ b/src/com/dogonfire/gods/managers/ChatManager.java
@@ -67,4 +67,4 @@ public void save()
Gods.instance().log("Could not save config to " + this.chatConfigFile.getName() + ": " + ex.getMessage());
}
}
-}
\ No newline at end of file
+}
diff --git a/src/com/dogonfire/gods/managers/GodManager.java b/src/com/dogonfire/gods/managers/GodManager.java
index 2c01f0a..48ff107 100644
--- a/src/com/dogonfire/gods/managers/GodManager.java
+++ b/src/com/dogonfire/gods/managers/GodManager.java
@@ -13,8 +13,12 @@
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
-
-import org.bukkit.*;
+import org.bukkit.Location;
+import org.bukkit.ChatColor;
+import org.bukkit.Material;
+import org.bukkit.Bukkit;
+import org.bukkit.GameMode;
+import org.bukkit.Effect;
import org.bukkit.attribute.Attribute;
import org.bukkit.block.Block;
import org.bukkit.configuration.ConfigurationSection;
@@ -44,7 +48,7 @@
public class GodManager
{
public static enum GodGender {
- None, Male, Female;
+ None, Male, Female, Nonbinary;
}
public static enum GodMood {
@@ -694,25 +698,6 @@ public String formatGodName(String godName)
return godName.substring(0, 1).toUpperCase() + godName.substring(1).toLowerCase();
}
- private String generateHolyMobTypeForGod()
- {
- EntityType mobType = EntityType.UNKNOWN;
- EntityType[] holyMobTypes = new EntityType[] { EntityType.CHICKEN, EntityType.COW, EntityType.PIG, EntityType.SHEEP, EntityType.RABBIT, EntityType.HORSE, EntityType.BAT };
-
- int r1 = this.random.nextInt(holyMobTypes.length);
-
- return holyMobTypes[r1].name();
- }
-
- private String generateUnholyMobTypeForGod()
- {
- EntityType mobType = EntityType.UNKNOWN;
- EntityType[] holyMobTypes = new EntityType[] { EntityType.CHICKEN, EntityType.COW, EntityType.PIG, EntityType.SHEEP, EntityType.RABBIT, EntityType.HORSE, EntityType.BAT, EntityType.WOLF, EntityType.SKELETON, EntityType.ZOMBIE };
-
- int r1 = this.random.nextInt(holyMobTypes.length);
-
- return holyMobTypes[r1].name();
- }
public Set getAllGods()
{
@@ -835,6 +820,7 @@ public Location getContestedHolyLandAttackLocationForGod(String godName)
int y = this.godsConfig.getInt(godName + ".ContestedLand" + ".Y");
int z = this.godsConfig.getInt(godName + ".ContestedLand" + ".Z");
String worldName = this.godsConfig.getString(godName + ".ContestedLand" + ".World");
+ if(worldName == null) return null;
return new Location(Gods.instance().getServer().getWorld(worldName), x, y, z);
}
@@ -902,56 +888,40 @@ public GodType getDivineForceForGod(String godName)
}
return type;
}
-
public Material getHolyFoodTypeForGod(String godName)
{
String foodTypeString = this.godsConfig.getString(godName + ".EatFoodType");
Material foodType = Material.AIR;
-
+ Material[] foodTypes = new Material[]{Material.APPLE, Material.BREAD, Material.COOKED_SALMON, Material.MELON_SLICE, Material.COOKED_BEEF};
+ int holyfoodnum;
if (foodTypeString == null)
{
- int r1 = this.random.nextInt(7);
- switch (r1)
+ // we no longer randomly decide what a god likes, instead we use a basic hashing function based on god name.
+ // this is because somewhere in this 40k lines of code it decides to reset god names occasionally
+ // do not touch the hashing function unless you want random preferences assigned to gods
+ int hash = 3;
+ for (int i = 0; i < godName.length(); i++) {
+ hash = hash*31 + godName.charAt(i);
+ }
+ foodTypeString = foodType.name();
+ holyfoodnum = (hash >= 0 ? hash : -hash) % 4;
+ foodTypeString = foodTypes[holyfoodnum].name();
+ if(foodTypeString.equals(getUnholyFoodTypeForGod(godName).name()))
{
- case 0:
- foodType = Material.APPLE;
- break;
- case 1:
- foodType = Material.BREAD;
- break;
- case 2:
- foodType = Material.COOKED_SALMON;
- break;
- case 3:
- foodType = Material.MELON_SLICE;
- break;
- case 4:
- foodType = Material.COOKED_BEEF;
- break;
- case 5:
- foodType = Material.COOKED_PORKCHOP;
- break;
- case 6:
- default:
- foodType = Material.CARROT;
-
+ holyfoodnum = (holyfoodnum + 1) % 6;
+ foodTypeString = foodTypes[holyfoodnum].name();
}
- foodTypeString = foodType.name();
- this.godsConfig.set(godName + ".EatFoodType", foodTypeString);
+ this.godsConfig.set(godName + ".EatFoodType", foodTypeString);
- saveTimed();
- }
- else
+ foodType = Material.getMaterial(foodTypeString);
+ saveTimed();
+ }else
{
foodType = Material.getMaterial(foodTypeString);
}
- if(foodType == null)
- {
- foodType = Material.CARROT;
- }
return foodType;
}
@@ -1152,30 +1122,32 @@ public EntityType getHolyMobTypeForGod(String godName)
{
String mobTypeString = this.godsConfig.getString(godName + ".NotSlayMobType");
EntityType mobType = EntityType.UNKNOWN;
+ EntityType[] holyMobTypes = new EntityType[] { EntityType.CHICKEN, EntityType.COW, EntityType.PIG, EntityType.SHEEP, EntityType.RABBIT, EntityType.HORSE, EntityType.BAT };
+ int holymobnum;
if (mobTypeString == null)
{
- do
- {
- mobTypeString = generateHolyMobTypeForGod();
+ // we no longer randomly decide what a god likes, instead we use a basic hashing function based on god name.
+ // this is because somewhere in this 40k lines of code it decides to reset god names occasionally
+ // do not touch the hashing function unless you want random preferences assigned to gods
+ int hash = 7;
+ for (int i = 0; i < godName.length(); i++) {
+ hash = hash*31 + godName.charAt(i);
}
- while (mobTypeString.equals(getUnholyMobTypeForGod(godName).name()));
+
+ holymobnum = (hash >= 0 ? hash : -hash) % 6;
+ mobTypeString = holyMobTypes[holymobnum].name();
+ if(mobTypeString.equals(getUnholyMobTypeForGod(godName).name()))
+ {
+ holymobnum = (holymobnum + 1) % 6;
+ mobTypeString = holyMobTypes[holymobnum].name();
+ }
this.godsConfig.set(godName + ".NotSlayMobType", mobTypeString);
saveTimed();
- }
- mobType = Enum.valueOf(EntityType.class, mobTypeString);
- if (mobType == null)
- {
- do
- {
- mobTypeString = generateHolyMobTypeForGod();
- }
- while (mobTypeString.equals(getUnholyMobTypeForGod(godName).name()));
- this.godsConfig.set(godName + ".NotSlayMobType", mobTypeString);
-
- save();
+ mobType = holyMobTypes[holymobnum];
- mobType = EntityType.fromName(mobTypeString);
+ } else {
+ mobType = Enum.valueOf(EntityType.class, mobTypeString);
}
return mobType;
}
@@ -1285,6 +1257,9 @@ public String getLanguageFileForGod(String godName)
case 1:
godGender = GodGender.Female;
break;
+ case 2:
+ godGender = GodGender.Nonbinary;
+ break;
}
}
@@ -1445,52 +1420,28 @@ public Material getUnholyFoodTypeForGod(String godName)
{
String foodTypeString = this.godsConfig.getString(godName + ".NotEatFoodType");
Material foodType = Material.AIR;
+ Material[] foodTypes = new Material[]{Material.APPLE, Material.BREAD, Material.COOKED_SALMON, Material.MELON_SLICE, Material.COOKED_BEEF};
+ int unholyfoodnum;
if (foodTypeString == null)
{
- do
- {
- int r1 = this.random.nextInt(7);
- switch (r1)
- {
- case 0:
- foodType = Material.APPLE;
- break;
- case 1:
- foodType = Material.BREAD;
- break;
- case 2:
- foodType = Material.COOKED_SALMON;
- break;
- case 3:
- foodType = Material.MELON_SLICE;
- break;
- case 4:
- foodType = Material.COOKED_BEEF;
- break;
- case 5:
- foodType = Material.COOKED_PORKCHOP;
- break;
- default:
- case 6:
- foodType = Material.CARROT;
- }
- foodTypeString = foodType.name();
- }
- while (foodTypeString.equals(getHolyFoodTypeForGod(godName).name()));
-
- this.godsConfig.set(godName + ".NotEatFoodType", foodTypeString);
-
- saveTimed();
- }
- else
+ // we no longer randomly decide what a god likes, instead we use a basic hashing function based on god name.
+ // this is because somewhere in this 40k lines of code it decides to reset god names occasionally
+ // do not touch the hashing function unless you want random preferences assigned to gods
+ int hash = 7;
+ for (int i = 0; i < godName.length(); i++) {
+ hash = hash*31 + godName.charAt(i);
+ }
+ unholyfoodnum = (hash >= 0 ? hash : -hash) % 4;
+ foodTypeString = foodTypes[unholyfoodnum].name();
+ this.godsConfig.set(godName + ".NotEatFoodType", foodTypeString);
+ saveTimed();
+ foodType = Material.getMaterial(foodTypeString);
+
+ } else
{
foodType = Material.getMaterial(foodTypeString);
}
-
- if(foodType == null)
- {
- foodType = Material.CARROT;
- }
+ saveTimed();
return foodType;
}
@@ -1802,8 +1753,11 @@ public long getSeedForGod(String godName)
long seed = this.godsConfig.getLong(godName + ".Seed");
if (seed == 0L)
{
- seed = this.random.nextLong();
- this.godsConfig.set(godName + ".Seed", Long.valueOf(seed));
+ int hash = 3;
+ for (int i = 0; i < godName.length(); i++) {
+ hash = hash*31 + godName.charAt(i);
+ }
+ this.godsConfig.set(godName + ".Seed", Long.valueOf(hash));
saveTimed();
}
@@ -1869,27 +1823,29 @@ public EntityType getUnholyMobTypeForGod(String godName)
{
String mobTypeString = this.godsConfig.getString(godName + ".SlayMobType");
EntityType mobType = EntityType.UNKNOWN;
+ EntityType[] unholyMobTypes = new EntityType[] { EntityType.CHICKEN, EntityType.COW, EntityType.PIG, EntityType.SHEEP, EntityType.RABBIT, EntityType.HORSE, EntityType.BAT };
+ int unholymobnum;
if (mobTypeString == null)
{
- mobTypeString = generateUnholyMobTypeForGod();
+ int hash = 3;
+ for (int i = 0; i < godName.length(); i++) {
+ hash = hash*31 + godName.charAt(i);
+ }
+
+ unholymobnum = (hash >= 0 ? hash : -hash) % 6;
+ mobTypeString = unholyMobTypes[unholymobnum].name();
this.godsConfig.set(godName + ".SlayMobType", mobTypeString);
saveTimed();
- }
- mobType = Enum.valueOf(EntityType.class, mobTypeString);
- if (mobType == null)
- {
- mobTypeString = generateUnholyMobTypeForGod();
+ mobType = unholyMobTypes[unholymobnum];
- this.godsConfig.set(godName + ".SlayMobType", mobTypeString);
-
- save();
-
- mobType = EntityType.fromName(mobTypeString);
+ } else {
+ mobType = Enum.valueOf(EntityType.class, mobTypeString);
}
return mobType;
}
+
private int getVerbosityForGod(String godName)
{
@@ -2053,6 +2009,7 @@ public void GodSayWithQuestion(String godName, Player player, LanguageManager.LA
String playerNameString = LanguageManager.instance().getPlayerName();
String typeNameString = LanguageManager.instance().getType();
int amount = LanguageManager.instance().getAmount();
+ System.out.println(godName);
if (player == null)
{
@@ -3850,7 +3807,7 @@ public boolean strikePlayerWithMobs(String godName, UUID playerId, float godPowe
EntityType mobType = EntityType.UNKNOWN;
- switch (this.random.nextInt(5))
+ switch (this.random.nextInt(4))
{
case 0:
mobType = EntityType.SKELETON;
@@ -4054,4 +4011,4 @@ public void updateOnlineGods()
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/com/dogonfire/gods/managers/HolyLandManager.java b/src/com/dogonfire/gods/managers/HolyLandManager.java
index 21788b9..51dc5af 100644
--- a/src/com/dogonfire/gods/managers/HolyLandManager.java
+++ b/src/com/dogonfire/gods/managers/HolyLandManager.java
@@ -188,11 +188,6 @@ private String generateHolyLandName(Biome type)
second = new String[] {"Fire", "Dank", "Cold"};
third = new String[] {"forest", "wood", ""};
break;
- case MOUNTAINS :
- first = new String[] {"Upper ", "Lower ", "High ", ""};
- second = new String[] {"Rock", "High", "Sky"};
- third = new String[] {"hill", "mountain"};
- break;
default:
break;
}
@@ -888,4 +883,4 @@ public void setPrayingHotspot(String believerName, String godName, Location loca
save();
}
*/
-}
\ No newline at end of file
+}
diff --git a/src/com/dogonfire/gods/managers/LanguageManager.java b/src/com/dogonfire/gods/managers/LanguageManager.java
index 7694169..63cdead 100644
--- a/src/com/dogonfire/gods/managers/LanguageManager.java
+++ b/src/com/dogonfire/gods/managers/LanguageManager.java
@@ -48,7 +48,7 @@ private LanguageManager()
private void downloadLanguageFile(String fileName) throws IOException
{
- BufferedInputStream in = new BufferedInputStream(new URL("https://raw.githubusercontent.com/DogOnFire/Gods/master/lang/" + fileName).openStream());
+ BufferedInputStream in = new BufferedInputStream(new URL("https://raw.githubusercontent.com/Connorppeach/Gods/master/lang/" + fileName).openStream());
FileOutputStream fos = new FileOutputStream(Gods.instance().getDataFolder() + "/lang/" + fileName);
diff --git a/src/com/dogonfire/gods/managers/QuestManager.java b/src/com/dogonfire/gods/managers/QuestManager.java
index 587b2b4..13ad668 100644
--- a/src/com/dogonfire/gods/managers/QuestManager.java
+++ b/src/com/dogonfire/gods/managers/QuestManager.java
@@ -975,11 +975,10 @@ public Location getLocationForPilgrimageQuest(String worldName, int minDist, int
List biomeTypes = new ArrayList();
biomeTypes.add(Biome.FLOWER_FOREST);
biomeTypes.add(Biome.ICE_SPIKES);
- biomeTypes.add(Biome.DESERT_HILLS);
+ biomeTypes.add(Biome.DESERT);
biomeTypes.add(Biome.MUSHROOM_FIELDS);
- biomeTypes.add(Biome.JUNGLE_HILLS);
- biomeTypes.add(Biome.TAIGA_HILLS);
- biomeTypes.add(Biome.GIANT_TREE_TAIGA_HILLS);
+ biomeTypes.add(Biome.JUNGLE);
+ biomeTypes.add(Biome.TAIGA);
World world = Gods.instance().getServer().getWorld(worldName);
@@ -1067,11 +1066,10 @@ public Location getLocationForSlayDragonQuest(String worldName, int minDist, int
List biomeTypes = new ArrayList();
biomeTypes.add(Biome.FLOWER_FOREST);
biomeTypes.add(Biome.ICE_SPIKES);
- biomeTypes.add(Biome.DESERT_HILLS);
+ biomeTypes.add(Biome.DESERT);
biomeTypes.add(Biome.MUSHROOM_FIELDS);
- biomeTypes.add(Biome.JUNGLE_HILLS);
- biomeTypes.add(Biome.TAIGA_HILLS);
- biomeTypes.add(Biome.GIANT_TREE_TAIGA_HILLS);
+ biomeTypes.add(Biome.JUNGLE);
+ biomeTypes.add(Biome.TAIGA);
World world = Gods.instance().getServer().getWorld(worldName);
do
@@ -2758,4 +2756,4 @@ private void setupPilgrimageQuest(Location targetLocation, String godName, GodMa
// targetLocation);
// contents.addItem(new ItemStack[] { artifactItem.getItemStack() });
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/GodsTest.java b/src/test/java/GodsTest.java
index 1319760..bbecfa4 100644
--- a/src/test/java/GodsTest.java
+++ b/src/test/java/GodsTest.java
@@ -24,7 +24,7 @@
import com.dogonfire.gods.managers.QuestManager;
import com.dogonfire.gods.managers.WhitelistManager;
-import static org.mockito.Mockito.*;
+//import static org.mockito.Mockito.*;
public class GodsTest