<commit_before>package pw.ian.sysadmincraft.listeners

import org.bukkit.event.block.BlockBreakEvent
import org.bukkit.event.player.PlayerJoinEvent
import org.bukkit.event.{EventHandler, Listener}
import org.bukkit.inventory.ItemStack
import org.bukkit.{Material, GameMode, Location}
import pw.ian.sysadmincraft.SysAdmincraft
import pw.ian.sysadmincraft.world.WorldConstants._

case class PlayerListener(plugin: SysAdmincraft) extends Listener {

  @EventHandler
  def onPlayerJoin(event: PlayerJoinEvent): Unit = {
    event.getPlayer.setGameMode(GameMode.CREATIVE)
    event.getPlayer.teleport(new Location(plugin.world, 0, START_HEIGHT + 1, 0))
    event.getPlayer.getInventory.addItem(new ItemStack(Material.IRON_SWORD, 1))
  }

  @EventHandler
  def onBlockBreak(event: BlockBreakEvent): Unit = {
    event.setCancelled(true)
  }

}<commit_msg>prevent slime spawns<commit_after>package pw.ian.sysadmincraft.listeners

import org.bukkit.entity.EntityType
import org.bukkit.event.block.BlockBreakEvent
import org.bukkit.event.entity.CreatureSpawnEvent
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason
import org.bukkit.event.player.PlayerJoinEvent
import org.bukkit.event.{EventHandler, Listener}
import org.bukkit.inventory.ItemStack
import org.bukkit.{Material, GameMode, Location}
import pw.ian.sysadmincraft.SysAdmincraft
import pw.ian.sysadmincraft.world.WorldConstants._

case class PlayerListener(plugin: SysAdmincraft) extends Listener {

  @EventHandler
  def onPlayerJoin(event: PlayerJoinEvent): Unit = {
    event.getPlayer.setGameMode(GameMode.CREATIVE)
    event.getPlayer.teleport(new Location(plugin.world, 0, START_HEIGHT + 1, 0))
    event.getPlayer.getInventory.addItem(new ItemStack(Material.IRON_SWORD, 1))
  }

  @EventHandler
  def onBlockBreak(event: BlockBreakEvent): Unit = {
    event.setCancelled(true)
  }

  @EventHandler
  def onCreatureSpawn(event: CreatureSpawnEvent): Unit = {
    if (event.getSpawnReason == SpawnReason.NATURAL || event.getEntityType == EntityType.SLIME) {
      event.setCancelled(true)
    }
  }

}
{'fraction_non_alphanumeric': 0.10106382978723404, 'fraction_numerical': 0.0038684719535783366, 'mean_word_length': 5.5474683544303796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '258233', 'n_tokens_mistral': 701, 'n_tokens_neox': 679, 'n_words': 111}