Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public void setMessage(final String message) {
}

/**
* Gets the format to use to display this chat message. When this event finishes execution, the first format
* parameter is the {@link Player#getDisplayName()} and the second parameter is {@link #getMessage()}
* Gets the format to use to display this chat message to spy recipients. When this event finishes execution, the
* first format parameter is the {@link Player#getDisplayName()} and the second parameter is {@link #getMessage()}
*
* @return {@link String#format(String, Object...)} compatible format string
*/
Expand All @@ -62,8 +62,8 @@ public String getFormat() {
}

/**
* Sets the format to use to display this chat message. When this event finishes execution, the first format
* parameter is the {@link Player#getDisplayName()} and the second parameter is {@link #getMessage()}
* Sets the format to use to display this chat message to spy recipients. When this event finishes execution, the
* first format parameter is the {@link Player#getDisplayName()} and the second parameter is {@link #getMessage()}
*
* @param format {@link String#format(String, Object...)} compatible format string
* @throws IllegalFormatException if the underlying API throws the exception
Expand Down
1 change: 1 addition & 0 deletions Essentials/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ enderchestCommandUsage2=/<command> <player>
enderchestCommandUsage2Description=Opens the ender chest of the target player
errorCallingCommand=Error calling the command /{0}
errorWithMessage=\u00a7cError\:\u00a74 {0}
essChatNoSecureMsg=EssentialsX Chat version {0} does not support secure chat on this server software. Update EssentialsX, and if this issue persists, inform the developers.
essentialsCommandDescription=Reloads essentials.
essentialsCommandUsage=/<command>
essentialsCommandUsage1=/<command> reload
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
package com.earth2me.essentials.chat;

import com.earth2me.essentials.Essentials;
import com.earth2me.essentials.EssentialsLogger;
import com.earth2me.essentials.chat.processing.LegacyChatHandler;
import com.earth2me.essentials.chat.processing.SignedChatHandler;
import com.earth2me.essentials.metrics.MetricsWrapper;
import net.ess3.api.IEssentials;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.event.player.AsyncPlayerChatEvent;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;

import static com.earth2me.essentials.I18n.tl;
Expand All @@ -33,14 +32,13 @@ public void onEnable() {
return;
}

final Map<AsyncPlayerChatEvent, ChatStore> chatStore = Collections.synchronizedMap(new HashMap<>());

final EssentialsChatPlayerListenerLowest playerListenerLowest = new EssentialsChatPlayerListenerLowest(getServer(), ess, this, chatStore);
final EssentialsChatPlayerListenerNormal playerListenerNormal = new EssentialsChatPlayerListenerNormal(getServer(), ess, this, chatStore);
final EssentialsChatPlayerListenerHighest playerListenerHighest = new EssentialsChatPlayerListenerHighest(getServer(), ess, this, chatStore);
pluginManager.registerEvents(playerListenerLowest, this);
pluginManager.registerEvents(playerListenerNormal, this);
pluginManager.registerEvents(playerListenerHighest, this);
final SignedChatHandler signedHandler = new SignedChatHandler((Essentials) ess, this);
if (signedHandler.tryRegisterListeners()) {
getLogger().info("Secure signed chat and previews are enabled.");
} else {
final LegacyChatHandler legacyHandler = new LegacyChatHandler((Essentials) ess, this);
legacyHandler.registerListeners();
}

if (metrics == null) {
metrics = new MetricsWrapper(this, 3814, false);
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading