Merge remote-tracking branch 'refs/remotes/origin/develop' into feature/moba

This commit is contained in:
Sam 2017-05-22 20:53:05 +01:00
commit 49045e3f68
2 changed files with 4 additions and 3 deletions

View File

@ -622,7 +622,7 @@ public class LootModule extends MiniPlugin
{
LootItemReward reward = iterator.next();
if (player.equals(reward.getPlayer()))
if (player.equals(reward.getPlayer()) && player.getInventory().contains(reward.getItemStack()))
{
reward.success();
iterator.remove();

View File

@ -7,6 +7,7 @@ import mineplex.core.slack.SlackAPI;
import mineplex.core.slack.SlackMessage;
import mineplex.core.slack.SlackTeam;
import mineplex.gemhunters.loot.rewards.LootItemReward;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import java.net.MalformedURLException;
@ -34,10 +35,10 @@ public class SlackRewardBot
{
SlackAPI.getInstance().sendMessage(SlackTeam.DEVELOPER, SLACK_CHANNEL_NAME, new SlackMessage(SLACK_USERNAME, new URL(SLACK_ICON),
"Rewarding a " + reward.getClass().getSimpleName() +
"\nName: " + reward.getItemStack().getItemMeta().getDisplayName() +
"\nName: " + ChatColor.stripColor(reward.getItemStack().getItemMeta().getDisplayName()) +
"\nPlayer: " + player.getName() +
"\nStatus: *" + status + "*" +
"\nServer: " + UtilServer.getServerName() +
"\nServer: " + UtilServer.getServerName() + " " + UtilServer.getRegion().toString() +
"\nTPS: " + FORMAT.format(_lag.getTicksPerSecond())),
true);
}