mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-01 22:22:19 +00:00
- Update min. Towny version to 0.98.5.0 & replace deprecated methods.
This commit is contained in:
1 parent
90459c2841
commit
722f5c7bea
5 files changed
+15
-13
No files matched your search
@@ -7,7 +7,7 @@
|
||||
<groupId>com.palmergames.bukkit</groupId>
|
||||
<artifactId>TownyChat</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.100</version>
|
||||
<version>0.101</version>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
@@ -26,7 +26,7 @@
|
||||
<java.version>17</java.version>
|
||||
<project.bukkitAPIVersion>1.16</project.bukkitAPIVersion>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<towny.version>0.98.4.0</towny.version>
|
||||
<towny.version>0.98.5.0</towny.version>
|
||||
</properties>
|
||||
|
||||
<!-- For use with GitHub Package Registry -->
|
||||
@@ -75,7 +75,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.TownyAdvanced</groupId>
|
||||
<artifactId>Towny</artifactId>
|
||||
<version>${towny.version}</version>
|
||||
<version>0.98.5.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -433,4 +433,6 @@ v0.99:
|
||||
v0.100:
|
||||
- Use internal Essentials object instead of the one found in Towny.
|
||||
- Fix incorrect lang string called in /ch mutelist {channelname}
|
||||
- Fix a player who has lost their town being stuck in /tc or /nc.
|
||||
- Fix a player who has lost their town being stuck in /tc or /nc.
|
||||
v0.101:
|
||||
- Update min. Towny version to 0.98.5.0 & replace deprecated methods.
|
||||
@@ -55,7 +55,7 @@ public class Chat extends JavaPlugin {
|
||||
private DynmapAPI dynMap = null;
|
||||
private Essentials essentials = null;
|
||||
|
||||
private static Version requiredTownyVersion = Version.fromString("0.98.4.0");
|
||||
private static Version requiredTownyVersion = Version.fromString("0.98.5.0");
|
||||
public static boolean usingPlaceholderAPI = false;
|
||||
public static boolean usingEssentialsDiscord = false;
|
||||
boolean chatConfigError = false;
|
||||
|
||||
@@ -137,8 +137,8 @@ public class ChannelCommand extends BaseCommand implements CommandExecutor {
|
||||
String mutePerm = plugin.getChannelsHandler().getMutePermission();
|
||||
String unmutePerm = plugin.getChannelsHandler().getUnmutePermission();
|
||||
if ((mutePerm == null && unmutePerm == null) ||
|
||||
(mutePerm != null && (!TownyUniverse.getInstance().getPermissionSource().has(player, mutePerm))) ||
|
||||
(unmutePerm != null && (!TownyUniverse.getInstance().getPermissionSource().has(player, unmutePerm)))) {
|
||||
(mutePerm != null && (!TownyUniverse.getInstance().getPermissionSource().testPermission(player, mutePerm))) ||
|
||||
(unmutePerm != null && (!TownyUniverse.getInstance().getPermissionSource().testPermission(player, unmutePerm)))) {
|
||||
TownyMessaging.sendErrorMsg(player, Translatable.of("tc_err_you_dont_have_perm_mute_list"));
|
||||
return;
|
||||
}
|
||||
@@ -229,7 +229,7 @@ public class ChannelCommand extends BaseCommand implements CommandExecutor {
|
||||
|
||||
if (mute) {
|
||||
String mutePerm = plugin.getChannelsHandler().getMutePermission();
|
||||
if ((mutePerm == null) || (mutePerm != null && (!TownyUniverse.getInstance().getPermissionSource().has(player, mutePerm)))) {
|
||||
if ((mutePerm == null) || (mutePerm != null && (!TownyUniverse.getInstance().getPermissionSource().testPermission(player, mutePerm)))) {
|
||||
TownyMessaging.sendErrorMsg(player, Translatable.of("tc_err_you_dont_have_mute_perms"));
|
||||
return;
|
||||
}
|
||||
@@ -242,8 +242,8 @@ public class ChannelCommand extends BaseCommand implements CommandExecutor {
|
||||
}
|
||||
|
||||
String unmutePerm = plugin.getChannelsHandler().getUnmutePermission();
|
||||
if ((mutePerm != null && (TownyUniverse.getInstance().getPermissionSource().has(muteePlayer, mutePerm))) ||
|
||||
(unmutePerm != null && (TownyUniverse.getInstance().getPermissionSource().has(muteePlayer, unmutePerm)))) {
|
||||
if ((mutePerm != null && (TownyUniverse.getInstance().getPermissionSource().testPermission(muteePlayer, mutePerm))) ||
|
||||
(unmutePerm != null && (TownyUniverse.getInstance().getPermissionSource().testPermission(muteePlayer, unmutePerm)))) {
|
||||
TownyMessaging.sendErrorMsg(player, Translatable.of("tc_err_you_cant_mute_chat_mod"));
|
||||
return;
|
||||
}
|
||||
@@ -256,7 +256,7 @@ public class ChannelCommand extends BaseCommand implements CommandExecutor {
|
||||
TownyMessaging.sendMessage(player, Translatable.of("tc_player_is_now_muted_in_channel", split[1], chan.getName()));
|
||||
} else if (!mute) {
|
||||
String unmutePerm = plugin.getChannelsHandler().getUnmutePermission();
|
||||
if ((unmutePerm == null) || (unmutePerm != null && (!TownyUniverse.getInstance().getPermissionSource().has(player, unmutePerm)))) {
|
||||
if ((unmutePerm == null) || (unmutePerm != null && (!TownyUniverse.getInstance().getPermissionSource().testPermission(player, unmutePerm)))) {
|
||||
TownyMessaging.sendErrorMsg(player, Translatable.of("tc_err_you_dont_have_unmute_perm"));
|
||||
return;
|
||||
}
|
||||
@@ -309,7 +309,7 @@ public class ChannelCommand extends BaseCommand implements CommandExecutor {
|
||||
// - player has leaving permission set [by default they don't]
|
||||
String leavePerm = chan.getLeavePermission();
|
||||
if (leavePerm == null ||
|
||||
(leavePerm != null && (!TownyUniverse.getInstance().getPermissionSource().has(player, leavePerm)))) {
|
||||
(leavePerm != null && (!TownyUniverse.getInstance().getPermissionSource().testPermission(player, leavePerm)))) {
|
||||
TownyMessaging.sendErrorMsg(player, Translatable.of("tc_err_you_cannot_leave_channel", chan.getName()));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -435,6 +435,6 @@ public abstract class Channel {
|
||||
return type.equals(channelTypes.TOWN) || type.equals(channelTypes.NATION) || type.equals(channelTypes.ALLIANCE);
|
||||
}
|
||||
public boolean hasPermission(Player player) {
|
||||
return getPermission() != null && TownyUniverse.getInstance().getPermissionSource().has(player, getPermission());
|
||||
return getPermission() != null && TownyUniverse.getInstance().getPermissionSource().testPermission(player, getPermission());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user