mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-24 00:15:16 +01:00
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.closeInventory();
|
||||||
player.sendMessage(MMOCore.plugin.configManager.getSimpleMessage("player-input.chat." + type.getLowerCaseName()));
|
player.sendMessage(MMOCore.plugin.configManager.getSimpleMessage("player-input.chat." + type.getLowerCaseName()));
|
||||||
|
player.sendMessage(MMOCore.plugin.configManager.getSimpleMessage("player-input.chat.cancel"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -28,6 +29,8 @@ public class ChatInput extends PlayerInput {
|
|||||||
if (event.getPlayer().equals(getPlayer())) {
|
if (event.getPlayer().equals(getPlayer())) {
|
||||||
close();
|
close();
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
|
||||||
|
if(!event.getMessage().equals("cancel"))
|
||||||
Bukkit.getScheduler().scheduleSyncDelayedTask(MMOCore.plugin, () -> output(event.getMessage()));
|
Bukkit.getScheduler().scheduleSyncDelayedTask(MMOCore.plugin, () -> output(event.getMessage()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +218,7 @@ public class EditableFriendList extends EditableInventory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (playerData.getUniqueId().equals(target.getUniqueId())) {
|
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);
|
player.playSound(player.getLocation(), Sound.ENTITY_VILLAGER_NO, 1, 1);
|
||||||
open();
|
open();
|
||||||
return;
|
return;
|
||||||
|
@ -39,6 +39,7 @@ player-input:
|
|||||||
chat:
|
chat:
|
||||||
friend-request: '&eWrite in the chat the player name.'
|
friend-request: '&eWrite in the chat the player name.'
|
||||||
party-invite: '&eWrite in the chat the player you want to invite.'
|
party-invite: '&eWrite in the chat the player you want to invite.'
|
||||||
|
cancel: '&eWrite &c''cancel'' &eto cancel.'
|
||||||
|
|
||||||
# Spell Casting
|
# Spell Casting
|
||||||
casting:
|
casting:
|
||||||
|
Loading…
Reference in New Issue
Block a user