cleaning up some things
This commit is contained in:
parent
95166d5f10
commit
661222bd36
7 changed files with 5 additions and 9 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,4 +2,4 @@
|
||||||
out/production/
|
out/production/
|
||||||
Resurrection.iml
|
Resurrection.iml
|
||||||
data/resurrection bukkit.png
|
data/resurrection bukkit.png
|
||||||
|
lib/
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,14 +1,12 @@
|
||||||
package net.brysonsteck.Resurrection.commands;
|
package net.brysonsteck.Resurrection.commands;
|
||||||
|
|
||||||
import net.brysonsteck.Resurrection.Resurrection;
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.ChatColor;
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandExecutor;
|
import org.bukkit.command.CommandExecutor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.plugin.java.JavaPlugin;
|
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
|
||||||
|
|
||||||
public class CommandSource implements CommandExecutor {
|
public class CommandSource implements CommandExecutor {
|
||||||
boolean DEBUG;
|
boolean DEBUG;
|
||||||
|
|
|
@ -61,10 +61,10 @@ public class PlayerData {
|
||||||
playerHash.put("timeLeft", playerData[2]);
|
playerHash.put("timeLeft", playerData[2]);
|
||||||
this.playerData.put(playerData[0], playerHash);
|
this.playerData.put(playerData[0], playerHash);
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
TimeCheck timeCheck = new TimeCheck(Long.parseLong(playerData[2]));
|
|
||||||
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: player: " + playerData[0].replaceFirst(";","") + " | dead: " + playerData[1] + " | ms to resurrect at: " + playerData[2]);
|
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: player: " + playerData[0].replaceFirst(";","") + " | dead: " + playerData[1] + " | ms to resurrect at: " + playerData[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
reader.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: Error occurred while trying to read player data. Resurrection is shutting down");
|
Bukkit.broadcastMessage(ChatColor.YELLOW +""+ ChatColor.BOLD + "[Res. DEBUG]: Error occurred while trying to read player data. Resurrection is shutting down");
|
||||||
|
|
|
@ -15,8 +15,6 @@ import org.bukkit.potion.PotionEffect;
|
||||||
import org.bukkit.potion.PotionEffectType;
|
import org.bukkit.potion.PotionEffectType;
|
||||||
import org.bukkit.scheduler.BukkitRunnable;
|
import org.bukkit.scheduler.BukkitRunnable;
|
||||||
|
|
||||||
import java.util.Hashtable;
|
|
||||||
|
|
||||||
public class PlayerListener implements Listener {
|
public class PlayerListener implements Listener {
|
||||||
|
|
||||||
boolean stillDead;
|
boolean stillDead;
|
||||||
|
|
|
@ -6,7 +6,6 @@ import org.bukkit.plugin.java.JavaPlugin;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.Hashtable;
|
import java.util.Hashtable;
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
public class ParseSettings {
|
public class ParseSettings {
|
||||||
Hashtable<String, String> settings = new Hashtable<>();
|
Hashtable<String, String> settings = new Hashtable<>();
|
||||||
|
@ -42,6 +41,7 @@ public class ParseSettings {
|
||||||
settings.put(setting[0], setting[1]);
|
settings.put(setting[0], setting[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
reader.close();
|
||||||
if (!verifySettings()) {
|
if (!verifySettings()) {
|
||||||
System.out.println("[Resurrection] There is a syntax issue inside the Settings file:");
|
System.out.println("[Resurrection] There is a syntax issue inside the Settings file:");
|
||||||
if (!settingsComplete) {
|
if (!settingsComplete) {
|
||||||
|
@ -81,7 +81,7 @@ public class ParseSettings {
|
||||||
|
|
||||||
// is resurrection_time a long?
|
// is resurrection_time a long?
|
||||||
try {
|
try {
|
||||||
long time = Long.parseLong(settings.get("resurrection_time"));
|
Long.parseLong(settings.get("resurrection_time"));
|
||||||
} catch (NumberFormatException | NullPointerException e) {
|
} catch (NumberFormatException | NullPointerException e) {
|
||||||
failedSetting = "resurrection_time";
|
failedSetting = "resurrection_time";
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue