forked from Upstream/mmocore
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() {
|
||||
guild.removeLastInvite(getCreator().getPlayer());
|
||||
guild.getMembers().forEach(member -> 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.getMembers().forEach(member -> {
|
||||
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());
|
||||
InventoryManager.GUILD_VIEW.newInventory(target).open();
|
||||
MMOCore.plugin.requestManager.unregisterRequest(getUniqueId());
|
||||
|
Loading…
Reference in New Issue
Block a user