mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-12-29 05:47:36 +01:00
Temporary Guilds invite nullpointer fix while mmocore 2.0 is still in development.
This commit is contained in:
parent
06b5826df7
commit
801752c9bb
@ -32,8 +32,17 @@ public class GuildInvite extends Request {
|
|||||||
|
|
||||||
public void accept() {
|
public void accept() {
|
||||||
guild.removeLastInvite(getCreator().getPlayer());
|
guild.removeLastInvite(getCreator().getPlayer());
|
||||||
guild.getMembers().forEach(member -> MMOCore.plugin.configManager.getSimpleMessage("guild-joined-other", "player", target.getPlayer().getName()).send(Bukkit.getPlayer(member)));
|
guild.getMembers().forEach(member -> {
|
||||||
MMOCore.plugin.configManager.getSimpleMessage("guild-joined", "owner", Bukkit.getPlayer(guild.getOwner()).getName()).send(target.getPlayer());
|
if(Bukkit.getPlayer(member) != null) {
|
||||||
|
MMOCore.plugin.configManager.getSimpleMessage("guild-joined-other", "player",
|
||||||
|
target.getPlayer().getName()).send(Bukkit.getPlayer(member));
|
||||||
|
|
||||||
|
MMOCore.plugin.configManager.getSimpleMessage("guild-joined", "owner",
|
||||||
|
Bukkit.getPlayer(guild.getOwner()).getName()).send(target.getPlayer());
|
||||||
|
}}
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
guild.addMember(target.getUniqueId());
|
guild.addMember(target.getUniqueId());
|
||||||
InventoryManager.GUILD_VIEW.newInventory(target).open();
|
InventoryManager.GUILD_VIEW.newInventory(target).open();
|
||||||
MMOCore.plugin.requestManager.unregisterRequest(getUniqueId());
|
MMOCore.plugin.requestManager.unregisterRequest(getUniqueId());
|
||||||
|
Loading…
Reference in New Issue
Block a user