mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-27 12:38:40 +01:00
Fix for sending messages to the wrong player.
This commit is contained in:
parent
7c9642e9ff
commit
07b15d7da3
@ -6,6 +6,7 @@ import com.Acrobot.ChestShop.Configuration.Messages;
|
||||
import com.Acrobot.ChestShop.Configuration.Properties;
|
||||
import com.Acrobot.ChestShop.Economy.Economy;
|
||||
import com.Acrobot.ChestShop.Events.TransactionEvent;
|
||||
import com.Acrobot.ChestShop.Utils.uName;
|
||||
import com.google.common.base.Joiner;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -88,8 +89,9 @@ public class TransactionMessageSender implements Listener {
|
||||
|
||||
private static void sendMessageToOwner(String message, TransactionEvent event) {
|
||||
String owner = event.getOwner().getName();
|
||||
owner = uName.getName(owner);
|
||||
|
||||
Player player = Bukkit.getPlayer(owner);
|
||||
Player player = Bukkit.getPlayerExact(owner);
|
||||
|
||||
if (player != null) {
|
||||
player.sendMessage(message);
|
||||
|
@ -74,7 +74,7 @@ public class LightweightChestProtection implements Listener {
|
||||
}
|
||||
|
||||
Block block = event.getBlock();
|
||||
Player player = Bukkit.getPlayer(event.getName());
|
||||
Player player = Bukkit.getPlayerExact(event.getName());
|
||||
|
||||
if (player == null || limitsModule.hasReachedLimit(player, block.getType())) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user