mirror of
https://github.com/PikaMug/Quests.git
synced 2025-01-03 06:57:58 +01:00
Fix error on quit during timer event, fixes #348. Bump version number
This commit is contained in:
parent
25be6a0e69
commit
995a7d8839
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
||||
|
||||
<groupId>me.blackvein.quests</groupId>
|
||||
<artifactId>quests</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<version>3.3.1</version>
|
||||
<name>quests</name>
|
||||
<url>https://github.com/FlyingPikachu/Quests/</url>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -22,6 +22,7 @@ import java.util.Map.Entry;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
@ -504,14 +505,19 @@ public class Quest {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void failQuest(Quester q) {
|
||||
Player player = plugin.getServer().getPlayer(q.id);
|
||||
String title = Lang.get(player, "questTitle");
|
||||
title = title.replaceAll("<quest>", ChatColor.DARK_PURPLE + name + ChatColor.AQUA);
|
||||
player.sendMessage(ChatColor.AQUA + title);
|
||||
player.sendMessage(ChatColor.RED + Lang.get(player, "questFailed"));
|
||||
q.hardQuit(this);
|
||||
q.saveData();
|
||||
player.updateInventory();
|
||||
if (plugin.getServer().getPlayer(q.id) != null) {
|
||||
Player player = plugin.getServer().getPlayer(q.id);
|
||||
String title = Lang.get(player, "questTitle");
|
||||
title = title.replaceAll("<quest>", ChatColor.DARK_PURPLE + name + ChatColor.AQUA);
|
||||
player.sendMessage(ChatColor.AQUA + title);
|
||||
player.sendMessage(ChatColor.RED + Lang.get(player, "questFailed"));
|
||||
q.hardQuit(this);
|
||||
q.saveData();
|
||||
player.updateInventory();
|
||||
} else {
|
||||
q.hardQuit(this);
|
||||
q.saveData();
|
||||
}
|
||||
q.updateJournal();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user