diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..612c5bc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+target
+.idea
+*.iml
diff --git a/pom.xml b/pom.xml
index 8400015..a03780e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,27 +14,27 @@
bukkit-repo
- http://repo.bukkit.org/content/groups/public
+ https://hub.spigotmc.org/nexus/content/repositories/snapshots
- vault-repo
- http://ci.herocraftonline.com/plugin/repository/everything
+ jitpack.io
+ https://jitpack.io
- org.bukkit
- bukkit
- 1.7.10-R0.1-SNAPSHOT
+ org.spigotmc
+ spigot-api
+ 1.20-R0.1-SNAPSHOT
jar
provided
true
- net.milkbowl.vault
- Vault
- 1.2.23-SNAPSHOT
+ com.github.MilkBowl
+ VaultAPI
+ 1.7
jar
provided
true
diff --git a/src/main/java/com/ensifera/animosity/craftirc/CraftIRC.java b/src/main/java/com/ensifera/animosity/craftirc/CraftIRC.java
index 8a4bcfd..6d4146a 100644
--- a/src/main/java/com/ensifera/animosity/craftirc/CraftIRC.java
+++ b/src/main/java/com/ensifera/animosity/craftirc/CraftIRC.java
@@ -254,11 +254,11 @@ public void onEnable() {
} else {
this.hold.put(HoldType.DEATHS, false);
}
- if (this.cHold("achievements") > 0) {
- this.hold.put(HoldType.ACHIEVEMENTS, true);
- this.holdTimer.schedule(new RemoveHoldTask(this, HoldType.ACHIEVEMENTS), this.cHold("achievements"));
+ if (this.cHold("advancements") > 0) {
+ this.hold.put(HoldType.ADVANCEMENTS, true);
+ this.holdTimer.schedule(new RemoveHoldTask(this, HoldType.ADVANCEMENTS), this.cHold("advancements"));
} else {
- this.hold.put(HoldType.ACHIEVEMENTS, false);
+ this.hold.put(HoldType.ADVANCEMENTS, false);
}
if (CraftIRC.this.getServer().getPluginManager().isPluginEnabled("Vault")) {
@@ -1298,7 +1298,7 @@ public enum HoldType {
KICKS,
BANS,
DEATHS,
- ACHIEVEMENTS
+ ADVANCEMENTS
}
class RemoveHoldTask extends TimerTask {
diff --git a/src/main/java/com/ensifera/animosity/craftirc/CraftIRCListener.java b/src/main/java/com/ensifera/animosity/craftirc/CraftIRCListener.java
index 512d99e..9620385 100644
--- a/src/main/java/com/ensifera/animosity/craftirc/CraftIRCListener.java
+++ b/src/main/java/com/ensifera/animosity/craftirc/CraftIRCListener.java
@@ -7,7 +7,7 @@
import org.bukkit.event.Listener;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.AsyncPlayerChatEvent;
-import org.bukkit.event.player.PlayerAchievementAwardedEvent;
+import org.bukkit.event.player.PlayerAdvancementDoneEvent;
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerKickEvent;
@@ -173,19 +173,22 @@ public void onPlayerDeath(PlayerDeathEvent event) {
}
@EventHandler(priority = EventPriority.MONITOR)
- public void onPlayerAchievement(PlayerAchievementAwardedEvent event) {
- if (this.plugin.isHeld(CraftIRC.HoldType.ACHIEVEMENTS)) {
+ public void onPlayerAdvancement(PlayerAdvancementDoneEvent event) {
+ if (this.plugin.isHeld(CraftIRC.HoldType.ADVANCEMENTS)) {
return;
}
- if (event.getAchievement() == null) {
+ if (event.getAdvancement() == null) {
return;
}
final RelayedMessage msg = this.plugin.newMsg(this.plugin.getEndPoint(this.plugin.cMinecraftTag()), null, "achievement");
if (msg == null) {
return;
}
+ if (event.getAdvancement().getKey().getKey().startsWith("recipes/")) {
+ return;
+ }
msg.setField("sender", event.getPlayer().getDisplayName());
- msg.setField("message", event.getAchievement().name());
+ msg.setField("message", event.getAdvancement().getKey().getKey());
msg.setField("world", event.getPlayer().getWorld().getName());
msg.setField("realSender", event.getPlayer().getName());
msg.setField("prefix", this.plugin.getPrefix(event.getPlayer()));
diff --git a/src/main/java/com/ensifera/animosity/craftirc/IRCCommandSender.java b/src/main/java/com/ensifera/animosity/craftirc/IRCCommandSender.java
index 3c7e90d..e6e8e8b 100644
--- a/src/main/java/com/ensifera/animosity/craftirc/IRCCommandSender.java
+++ b/src/main/java/com/ensifera/animosity/craftirc/IRCCommandSender.java
@@ -10,6 +10,7 @@
import org.bukkit.plugin.Plugin;
import java.util.Set;
+import java.util.UUID;
public final class IRCCommandSender implements ConsoleCommandSender {
private final RelayedCommand cmd;
@@ -76,6 +77,11 @@ public String getName() {
return this.sender.getName();
}
+ @Override
+ public Spigot spigot() {
+ return this.sender.spigot();
+ }
+
@Override
public Server getServer() {
return this.sender.getServer();
@@ -138,6 +144,16 @@ public void sendMessage(String[] messages) {
}
}
+ @Override
+ public void sendMessage(UUID uuid, String message) {
+ sendMessage(message);
+ }
+
+ @Override
+ public void sendMessage(UUID uuid, String... messages) {
+ sendMessage(messages);
+ }
+
@Override
public void sendRawMessage(String message) {
final RelayedMessage msg = this.cmd.getPlugin().newMsgToTag(this.console, this.cmd.getField("source"), "command-reply");
@@ -147,6 +163,11 @@ public void sendRawMessage(String message) {
msg.post();
}
+ @Override
+ public void sendRawMessage(UUID uuid, String message) {
+ sendRawMessage(message);
+ }
+
@Override
public void setOp(boolean value) {
this.sender.setOp(value);
diff --git a/src/main/java/com/ensifera/animosity/craftirc/libs/com/sk89q/util/config/Configuration.java b/src/main/java/com/ensifera/animosity/craftirc/libs/com/sk89q/util/config/Configuration.java
index 2eb7c90..120bc0a 100644
--- a/src/main/java/com/ensifera/animosity/craftirc/libs/com/sk89q/util/config/Configuration.java
+++ b/src/main/java/com/ensifera/animosity/craftirc/libs/com/sk89q/util/config/Configuration.java
@@ -1,6 +1,7 @@
package com.ensifera.animosity.craftirc.libs.com.sk89q.util.config;
import org.yaml.snakeyaml.DumperOptions;
+import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;
import org.yaml.snakeyaml.reader.UnicodeReader;
@@ -52,7 +53,7 @@ public Configuration(File file) {
options.setIndent(4);
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
- yaml = new Yaml(new SafeConstructor(), new EmptyNullRepresenter(), options);
+ yaml = new Yaml(new SafeConstructor(new LoaderOptions()), new EmptyNullRepresenter(), options);
this.file = file;
}
diff --git a/src/main/java/com/ensifera/animosity/craftirc/libs/com/sk89q/util/config/EmptyNullRepresenter.java b/src/main/java/com/ensifera/animosity/craftirc/libs/com/sk89q/util/config/EmptyNullRepresenter.java
index be061ce..3806a67 100644
--- a/src/main/java/com/ensifera/animosity/craftirc/libs/com/sk89q/util/config/EmptyNullRepresenter.java
+++ b/src/main/java/com/ensifera/animosity/craftirc/libs/com/sk89q/util/config/EmptyNullRepresenter.java
@@ -1,5 +1,6 @@
package com.ensifera.animosity.craftirc.libs.com.sk89q.util.config;
+import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.introspector.Property;
import org.yaml.snakeyaml.nodes.CollectionNode;
import org.yaml.snakeyaml.nodes.MappingNode;
@@ -12,7 +13,7 @@
class EmptyNullRepresenter extends Representer {
public EmptyNullRepresenter() {
- super();
+ super(new DumperOptions());
this.nullRepresenter = new EmptyRepresentNull();
}
diff --git a/src/main/java/com/ensifera/animosity/craftirc/libs/org/jibble/pircbot/TrustingSSLSocketFactory.java b/src/main/java/com/ensifera/animosity/craftirc/libs/org/jibble/pircbot/TrustingSSLSocketFactory.java
index 33b564e..9fc48ff 100644
--- a/src/main/java/com/ensifera/animosity/craftirc/libs/org/jibble/pircbot/TrustingSSLSocketFactory.java
+++ b/src/main/java/com/ensifera/animosity/craftirc/libs/org/jibble/pircbot/TrustingSSLSocketFactory.java
@@ -33,7 +33,7 @@ public TrustingSSLSocketFactory() throws SSLException {
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
try {
SSLContext sslContext;
- sslContext = SSLContext.getInstance("SSLv3");
+ sslContext = SSLContext.getInstance("TLSv1.2");
sslContext.init(null, new TrustManager[]{new TrustingX509TrustManager()}, null);
factory = sslContext.getSocketFactory();
} catch (NoSuchAlgorithmException nsae) {