mirror of
https://github.com/darksaid98/TownyChat.git
synced 2026-12-02 06:28:58 +00:00
- Fix for TownyChat overwriting towny_default_modes player modes on
login.
This commit is contained in:
1 parent
ab46dc8ff7
commit
bc2e22caf6
3 files changed
+13
-3
No files matched your search
@@ -7,7 +7,7 @@
|
||||
<groupId>com.palmergames.bukkit</groupId>
|
||||
<artifactId>TownyChat</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>0.66</version>
|
||||
<version>0.67</version>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
|
||||
@@ -292,4 +292,6 @@ v0.65:
|
||||
- DEFAULT, TOWN, NATION & ALLIANCE types are still formatted by Towny when modify_chat.enable is false.
|
||||
- Closes: https://github.com/TownyAdvanced/Towny/issues/3568
|
||||
v0.66:
|
||||
- Fix for removed TownyFormatter methods, required for Towny 0.95.2.18 and newer.
|
||||
- Fix for removed TownyFormatter methods, required for Towny 0.95.2.18 and newer.
|
||||
v0.67:
|
||||
- Fix for TownyChat overwriting towny_default_modes player modes on login.
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.palmergames.bukkit.TownyChat.tasks;
|
||||
|
||||
import com.palmergames.bukkit.TownyChat.Chat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.palmergames.bukkit.TownyChat.channels.Channel;
|
||||
@@ -33,7 +37,11 @@ public class onPlayerJoinTask implements Runnable {
|
||||
if (this.towny.isEnabled()) {
|
||||
if (!this.towny.isError()) {
|
||||
if (player != null) {
|
||||
towny.setPlayerMode(player, new String[] { mode }, ChatSettings.getDisplayeModesSetOnJoin());
|
||||
List<String> modes = new ArrayList<>();
|
||||
modes.add(mode);
|
||||
if (!towny.getPlayerMode(player).isEmpty())
|
||||
modes.addAll(towny.getPlayerMode(player));
|
||||
towny.setPlayerMode(player, modes.toArray(new String[0]), ChatSettings.getDisplayeModesSetOnJoin());
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user