Skip to content

Commit

Permalink
Removido spam de console em gamemode
Browse files Browse the repository at this point in the history
  • Loading branch information
1109-2018 authored Dec 14, 2019
1 parent 5540914 commit 7cca29b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pt/elevenzeronine/rankup/listeners/RankupListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import br.com.devpaulo.legendchat.api.events.ChatMessageEvent;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.entity.Player;
Expand Down Expand Up @@ -50,6 +51,8 @@ public void onMineListener(BlockBreakEvent event) {
Block block = event.getBlock();
Material type = block.getType();

if (player.getGameMode().equals(GameMode.CREATIVE)) return;

boolean b = type == Material.LAPIS_ORE || type == Material.IRON_ORE || type == Material.DIAMOND_ORE || type == Material.EMERALD_ORE;

if (!worldGuard.canBuild(player, block))
Expand Down Expand Up @@ -99,4 +102,4 @@ public void onChatMessage(ChatMessageEvent event) {
event.setTagValue("ezn_rank", utils.getRank(event.getSender()).getPrefix());
}

}
}

0 comments on commit 7cca29b

Please sign in to comment.