mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-04 14:38:58 +00:00
- Update min. Towny version to 0.99.0.0.
- Update EssentialsX maven details.
- Translate spy message colour codes.
- Closes https://github.com/TownyAdvanced/Towny/issues/6634
This commit is contained in:
1 parent
fe47196db7
commit
bf5ba6f07a
5 files changed
+24
-12
No files matched your search
@@ -7,7 +7,7 @@
|
|||||||
<groupId>com.palmergames.bukkit</groupId>
|
<groupId>com.palmergames.bukkit</groupId>
|
||||||
<artifactId>TownyChat</artifactId>
|
<artifactId>TownyChat</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>0.103</version>
|
<version>0.104</version>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<java.version>17</java.version>
|
<java.version>17</java.version>
|
||||||
<project.bukkitAPIVersion>1.16</project.bukkitAPIVersion>
|
<project.bukkitAPIVersion>1.16</project.bukkitAPIVersion>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<towny.version>0.98.5.0</towny.version>
|
<towny.version>0.99.0.0</towny.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- For use with GitHub Package Registry -->
|
<!-- For use with GitHub Package Registry -->
|
||||||
@@ -50,8 +50,8 @@
|
|||||||
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>ess-repo</id>
|
<id>essentials-releases</id>
|
||||||
<url>https://ci.ender.zone/plugin/repository/everything/</url>
|
<url>https://repo.essentialsx.net/releases/</url>
|
||||||
</repository>
|
</repository>
|
||||||
<repository>
|
<repository>
|
||||||
<id>dynmap-repo</id>
|
<id>dynmap-repo</id>
|
||||||
@@ -75,20 +75,26 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.TownyAdvanced</groupId>
|
<groupId>com.github.TownyAdvanced</groupId>
|
||||||
<artifactId>Towny</artifactId>
|
<artifactId>Towny</artifactId>
|
||||||
<version>0.98.5.0</version>
|
<version>0.99.0.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.spigotmc</groupId>
|
<groupId>org.spigotmc</groupId>
|
||||||
<artifactId>spigot-api</artifactId>
|
<artifactId>spigot-api</artifactId>
|
||||||
<version>1.19-R0.1-SNAPSHOT</version>
|
<version>1.19.4-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.ess3</groupId>
|
<groupId>net.essentialsx</groupId>
|
||||||
<artifactId>EssentialsX</artifactId>
|
<artifactId>EssentialsX</artifactId>
|
||||||
<version>2.18.2</version>
|
<version>2.19.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>org.bstats</groupId>
|
||||||
|
<artifactId>bstats-bukkit</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>us.dynmap</groupId>
|
<groupId>us.dynmap</groupId>
|
||||||
|
|||||||
@@ -443,3 +443,8 @@ v0.103:
|
|||||||
- New Config Option: allow_exclamation_point_to_shout
|
- New Config Option: allow_exclamation_point_to_shout
|
||||||
- Default: true
|
- Default: true
|
||||||
- If true players that say !somewords will have their message sent to a global type channel with unlimited range (usually your general chat.)
|
- If true players that say !somewords will have their message sent to a global type channel with unlimited range (usually your general chat.)
|
||||||
|
v0.104:
|
||||||
|
- Update min. Towny version to 0.99.0.0.
|
||||||
|
- Update EssentialsX maven details.
|
||||||
|
- Translate spy message colour codes.
|
||||||
|
- Closes https://github.com/TownyAdvanced/Towny/issues/6634
|
||||||
@@ -55,7 +55,7 @@ public class Chat extends JavaPlugin {
|
|||||||
private DynmapAPI dynMap = null;
|
private DynmapAPI dynMap = null;
|
||||||
private Essentials essentials = null;
|
private Essentials essentials = null;
|
||||||
|
|
||||||
private static Version requiredTownyVersion = Version.fromString("0.98.5.0");
|
private static Version requiredTownyVersion = Version.fromString("0.99.0.0");
|
||||||
public static boolean usingPlaceholderAPI = false;
|
public static boolean usingPlaceholderAPI = false;
|
||||||
public static boolean usingEssentialsDiscord = false;
|
public static boolean usingEssentialsDiscord = false;
|
||||||
boolean chatConfigError = false;
|
boolean chatConfigError = false;
|
||||||
|
|||||||
@@ -282,10 +282,11 @@ public class StandardChannel extends Channel {
|
|||||||
String format = formatSpyMessage(type, event.getPlayer());
|
String format = formatSpyMessage(type, event.getPlayer());
|
||||||
if (format == null) return;
|
if (format == null) return;
|
||||||
|
|
||||||
|
String message = Colors.translateColorCodes(event.getMessage());
|
||||||
// Remove spies who've already seen the message naturally.
|
// Remove spies who've already seen the message naturally.
|
||||||
spies.stream()
|
spies.stream()
|
||||||
.filter(spy -> !recipients.contains(spy))
|
.filter(spy -> !recipients.contains(spy))
|
||||||
.forEach(spy -> spy.sendMessage(format + event.getMessage()));
|
.forEach(spy -> spy.sendMessage(format + message));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import com.palmergames.bukkit.TownyChat.channels.Channel;
|
|||||||
import com.palmergames.bukkit.TownyChat.channels.StandardChannel;
|
import com.palmergames.bukkit.TownyChat.channels.StandardChannel;
|
||||||
import com.palmergames.bukkit.TownyChat.channels.channelTypes;
|
import com.palmergames.bukkit.TownyChat.channels.channelTypes;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
import org.yaml.snakeyaml.LoaderOptions;
|
||||||
import org.yaml.snakeyaml.Yaml;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
|
||||||
import org.yaml.snakeyaml.reader.UnicodeReader;
|
import org.yaml.snakeyaml.reader.UnicodeReader;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
@@ -183,7 +183,7 @@ public class ChannelConfigurationHandler {
|
|||||||
|
|
||||||
f = new File(filepath);
|
f = new File(filepath);
|
||||||
|
|
||||||
Yaml yamlChannels = new Yaml(new SafeConstructor());
|
Yaml yamlChannels = new Yaml(new LoaderOptions());
|
||||||
Object channelsRootDataNode;
|
Object channelsRootDataNode;
|
||||||
|
|
||||||
try (FileInputStream fileInputStream = new FileInputStream(f)) {
|
try (FileInputStream fileInputStream = new FileInputStream(f)) {
|
||||||
|
|||||||
Reference in new issue
Block a user