forked from Upstream/mmocore
Can now cancel friend requesting + can no longer friend yourself
This commit is contained in:
parent
63e63083f0
commit
e0c22dfc1e
@ -16,6 +16,7 @@ public class ChatInput extends PlayerInput {
|
||||
|
||||
player.closeInventory();
|
||||
player.sendMessage(MMOCore.plugin.configManager.getSimpleMessage("player-input.chat." + type.getLowerCaseName()));
|
||||
player.sendMessage(MMOCore.plugin.configManager.getSimpleMessage("player-input.chat.cancel"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -28,6 +29,8 @@ public class ChatInput extends PlayerInput {
|
||||
if (event.getPlayer().equals(getPlayer())) {
|
||||
close();
|
||||
event.setCancelled(true);
|
||||
|
||||
if(!event.getMessage().equals("cancel"))
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(MMOCore.plugin, () -> output(event.getMessage()));
|
||||
}
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ public class EditableFriendList extends EditableInventory {
|
||||
}
|
||||
|
||||
if (playerData.getUniqueId().equals(target.getUniqueId())) {
|
||||
player.sendMessage(MMOCore.plugin.configManager.getSimpleMessage("yourself", "player", target.getName()));
|
||||
player.sendMessage(MMOCore.plugin.configManager.getSimpleMessage("cant-request-to-yourself"));
|
||||
player.playSound(player.getLocation(), Sound.ENTITY_VILLAGER_NO, 1, 1);
|
||||
open();
|
||||
return;
|
||||
|
@ -39,6 +39,7 @@ player-input:
|
||||
chat:
|
||||
friend-request: '&eWrite in the chat the player name.'
|
||||
party-invite: '&eWrite in the chat the player you want to invite.'
|
||||
cancel: '&eWrite &c''cancel'' &eto cancel.'
|
||||
|
||||
# Spell Casting
|
||||
casting:
|
||||
|
Loading…
Reference in New Issue
Block a user