From cb9fadbb9f94f1c98c72d1de6bd7fe81f4864005 Mon Sep 17 00:00:00 2001 From: beaness Date: Fri, 24 Jun 2022 12:39:14 +0200 Subject: [PATCH] IntellIJ optimizations --- .../main/java/co/aikar/timings/Timing.java | 10 +- .../java/co/aikar/timings/TimingData.java | 7 +- .../java/co/aikar/timings/TimingHandler.java | 5 +- .../java/co/aikar/timings/TimingHistory.java | 103 +++--- .../co/aikar/timings/TimingHistoryEntry.java | 7 +- .../co/aikar/timings/TimingIdentifier.java | 9 +- .../java/co/aikar/timings/TimingsCommand.java | 2 +- .../java/co/aikar/timings/TimingsExport.java | 78 +---- .../java/co/aikar/timings/TimingsManager.java | 19 +- .../src/main/java/co/aikar/util/JSONUtil.java | 3 - .../main/java/co/aikar/util/LoadingMap.java | 22 +- .../main/java/co/aikar/util/MRUMapCache.java | 2 +- .../event/entity/SpawnerPreSpawnEvent.java | 2 - .../src/main/java/org/bukkit/BanEntry.java | 20 +- .../src/main/java/org/bukkit/BanList.java | 13 +- .../java/org/bukkit/BlockChangeDelegate.java | 14 +- .../src/main/java/org/bukkit/ChatColor.java | 6 +- .../src/main/java/org/bukkit/Color.java | 8 +- .../main/java/org/bukkit/FireworkEffect.java | 1 - .../src/main/java/org/bukkit/Location.java | 6 +- .../src/main/java/org/bukkit/Material.java | 6 +- .../java/org/bukkit/NetherWartsState.java | 2 +- .../main/java/org/bukkit/OfflinePlayer.java | 24 +- .../src/main/java/org/bukkit/PortalType.java | 2 +- .../src/main/java/org/bukkit/Server.java | 168 +++++----- .../src/main/java/org/bukkit/SkullType.java | 2 +- .../src/main/java/org/bukkit/Statistic.java | 2 +- .../src/main/java/org/bukkit/TravelAgent.java | 18 +- .../src/main/java/org/bukkit/Warning.java | 2 +- .../src/main/java/org/bukkit/WeatherType.java | 1 - .../src/main/java/org/bukkit/World.java | 228 +++++++------- .../src/main/java/org/bukkit/WorldBorder.java | 30 +- .../java/org/bukkit/block/BlockState.java | 4 +- .../java/org/bukkit/block/BrewingStand.java | 2 +- .../java/org/bukkit/block/CommandBlock.java | 8 +- .../org/bukkit/block/CreatureSpawner.java | 20 +- .../main/java/org/bukkit/block/Dispenser.java | 4 +- .../main/java/org/bukkit/block/Dropper.java | 2 +- .../main/java/org/bukkit/block/Furnace.java | 10 +- .../main/java/org/bukkit/block/Jukebox.java | 8 +- .../main/java/org/bukkit/block/NoteBlock.java | 14 +- .../org/bukkit/block/PistonMoveReaction.java | 2 +- .../src/main/java/org/bukkit/block/Sign.java | 6 +- .../src/main/java/org/bukkit/block/Skull.java | 14 +- .../org/bukkit/block/banner/PatternType.java | 2 +- .../bukkit/command/BlockCommandSender.java | 2 +- .../main/java/org/bukkit/command/Command.java | 12 +- .../org/bukkit/command/CommandExecutor.java | 2 +- .../java/org/bukkit/command/CommandMap.java | 14 +- .../org/bukkit/command/CommandSender.java | 8 +- .../bukkit/command/FormattedCommandAlias.java | 11 +- .../command/PluginCommandYamlParser.java | 8 +- .../command/PluginIdentifiableCommand.java | 2 +- .../org/bukkit/command/SimpleCommandMap.java | 13 +- .../bukkit/command/TabCommandExecutor.java | 2 +- .../java/org/bukkit/command/TabCompleter.java | 2 +- .../command/defaults/AchievementCommand.java | 5 +- .../command/defaults/BanListCommand.java | 4 +- .../bukkit/command/defaults/ClearCommand.java | 4 +- .../defaults/DefaultGameModeCommand.java | 4 +- .../bukkit/command/defaults/DeopCommand.java | 2 +- .../command/defaults/DifficultyCommand.java | 2 +- .../command/defaults/EffectCommand.java | 2 +- .../command/defaults/EnchantCommand.java | 4 +- .../command/defaults/GameModeCommand.java | 8 +- .../command/defaults/GameRuleCommand.java | 4 +- .../bukkit/command/defaults/GiveCommand.java | 6 +- .../bukkit/command/defaults/HelpCommand.java | 6 +- .../bukkit/command/defaults/ListCommand.java | 2 +- .../bukkit/command/defaults/MeCommand.java | 2 +- .../bukkit/command/defaults/OpCommand.java | 4 +- .../command/defaults/PardonCommand.java | 2 +- .../command/defaults/PardonIpCommand.java | 2 +- .../command/defaults/PluginsCommand.java | 5 +- .../command/defaults/ReloadCommand.java | 3 +- .../command/defaults/ScoreboardCommand.java | 54 ++-- .../defaults/SpreadPlayersCommand.java | 12 +- .../command/defaults/TestForCommand.java | 1 - .../bukkit/command/defaults/TimeCommand.java | 4 +- .../command/defaults/TimingsCommand.java | 13 +- .../command/defaults/VanillaCommand.java | 2 +- .../command/defaults/VersionCommand.java | 4 +- .../command/defaults/WeatherCommand.java | 2 +- .../command/defaults/WhitelistCommand.java | 8 +- .../bukkit/configuration/Configuration.java | 12 +- .../configuration/ConfigurationSection.java | 120 +++---- .../bukkit/configuration/MemorySection.java | 64 ++-- .../configuration/file/FileConfiguration.java | 9 +- .../configuration/file/YamlConfiguration.java | 16 +- .../configuration/file/YamlConstructor.java | 2 +- .../configuration/file/YamlRepresenter.java | 2 +- .../ConfigurationSerializable.java | 2 +- .../ConfigurationSerialization.java | 13 +- .../DelegateDeserialization.java | 2 +- .../serialization/SerializableAs.java | 2 +- .../org/bukkit/conversations/Conversable.java | 14 +- .../bukkit/conversations/Conversation.java | 6 +- .../ConversationAbandonedListener.java | 2 +- .../conversations/ConversationCanceller.java | 6 +- .../conversations/ConversationFactory.java | 9 +- .../conversations/ConversationPrefix.java | 2 - .../InactivityConversationCanceller.java | 17 +- .../conversations/NullConversationPrefix.java | 2 - .../PluginNameConversationPrefix.java | 1 - .../java/org/bukkit/conversations/Prompt.java | 2 +- .../org/bukkit/enchantments/Enchantment.java | 6 +- .../main/java/org/bukkit/entity/Ageable.java | 18 +- .../java/org/bukkit/entity/AnimalTamer.java | 4 +- .../main/java/org/bukkit/entity/Arrow.java | 10 +- .../src/main/java/org/bukkit/entity/Boat.java | 16 +- .../org/bukkit/entity/ComplexEntityPart.java | 2 +- .../bukkit/entity/ComplexLivingEntity.java | 2 +- .../main/java/org/bukkit/entity/Creature.java | 4 +- .../java/org/bukkit/entity/CreatureType.java | 4 +- .../main/java/org/bukkit/entity/Creeper.java | 4 +- .../org/bukkit/entity/EnderDragonPart.java | 2 +- .../main/java/org/bukkit/entity/Enderman.java | 4 +- .../main/java/org/bukkit/entity/Entity.java | 80 ++--- .../java/org/bukkit/entity/EntityType.java | 4 +- .../java/org/bukkit/entity/ExperienceOrb.java | 4 +- .../java/org/bukkit/entity/Explosive.java | 8 +- .../main/java/org/bukkit/entity/Fireball.java | 4 +- .../main/java/org/bukkit/entity/FishHook.java | 4 +- .../main/java/org/bukkit/entity/Guardian.java | 4 +- .../main/java/org/bukkit/entity/Hanging.java | 2 +- .../main/java/org/bukkit/entity/Horse.java | 39 ++- .../java/org/bukkit/entity/HumanEntity.java | 40 +-- .../java/org/bukkit/entity/IronGolem.java | 4 +- .../src/main/java/org/bukkit/entity/Item.java | 8 +- .../java/org/bukkit/entity/ItemFrame.java | 8 +- .../org/bukkit/entity/LightningStrike.java | 4 +- .../java/org/bukkit/entity/LivingEntity.java | 80 ++--- .../main/java/org/bukkit/entity/Minecart.java | 33 +- .../main/java/org/bukkit/entity/Ocelot.java | 10 +- .../main/java/org/bukkit/entity/Painting.java | 6 +- .../src/main/java/org/bukkit/entity/Pig.java | 4 +- .../main/java/org/bukkit/entity/Player.java | 228 +++++++------- .../java/org/bukkit/entity/Projectile.java | 12 +- .../main/java/org/bukkit/entity/Rabbit.java | 6 +- .../main/java/org/bukkit/entity/Sheep.java | 4 +- .../main/java/org/bukkit/entity/Skeleton.java | 6 +- .../main/java/org/bukkit/entity/Slime.java | 4 +- .../java/org/bukkit/entity/TNTPrimed.java | 8 +- .../main/java/org/bukkit/entity/Tameable.java | 8 +- .../java/org/bukkit/entity/ThrownPotion.java | 6 +- .../main/java/org/bukkit/entity/Vehicle.java | 4 +- .../main/java/org/bukkit/entity/Villager.java | 6 +- .../java/org/bukkit/entity/WitherSkull.java | 4 +- .../src/main/java/org/bukkit/entity/Wolf.java | 12 +- .../main/java/org/bukkit/entity/Zombie.java | 8 +- .../entity/minecart/CommandMinecart.java | 6 +- .../java/org/bukkit/event/Cancellable.java | 4 +- .../src/main/java/org/bukkit/event/Event.java | 2 +- .../java/org/bukkit/event/HandlerList.java | 12 +- .../bukkit/event/block/BlockBreakEvent.java | 1 - .../event/block/BlockPistonExtendEvent.java | 2 +- .../event/enchantment/EnchantItemEvent.java | 2 +- .../event/entity/EntityDamageEvent.java | 5 +- .../event/entity/EntityTargetEvent.java | 2 +- .../event/entity/EntityUnleashEvent.java | 2 +- .../event/entity/PotionSplashEvent.java | 4 +- .../event/inventory/InventoryAction.java | 1 - .../inventory/InventoryInteractEvent.java | 1 - .../bukkit/event/inventory/InventoryType.java | 2 +- .../bukkit/event/player/PlayerChatEvent.java | 2 +- .../player/PlayerCommandPreprocessEvent.java | 2 +- .../player/PlayerResourcePackStatusEvent.java | 2 +- .../event/player/PlayerTeleportEvent.java | 2 +- .../bukkit/event/world/PortalCreateEvent.java | 2 +- .../org/bukkit/generator/ChunkGenerator.java | 30 +- .../bukkit/help/GenericCommandHelpTopic.java | 5 +- .../main/java/org/bukkit/help/HelpMap.java | 12 +- .../org/bukkit/help/HelpTopicFactory.java | 2 +- .../java/org/bukkit/inventory/Inventory.java | 70 ++--- .../org/bukkit/inventory/InventoryHolder.java | 2 +- .../java/org/bukkit/inventory/ItemFlag.java | 2 +- .../java/org/bukkit/inventory/ItemStack.java | 6 +- .../org/bukkit/inventory/PlayerInventory.java | 34 +- .../org/bukkit/inventory/ShapedRecipe.java | 10 +- .../org/bukkit/inventory/ShapelessRecipe.java | 4 +- .../org/bukkit/inventory/meta/ItemMeta.java | 2 +- .../main/java/org/bukkit/map/MapCanvas.java | 16 +- .../org/bukkit/map/MapCursorCollection.java | 2 +- .../src/main/java/org/bukkit/map/MapFont.java | 2 +- .../src/main/java/org/bukkit/map/MapView.java | 28 +- .../java/org/bukkit/material/Attachable.java | 2 +- .../java/org/bukkit/material/Colorable.java | 4 +- .../java/org/bukkit/material/Directional.java | 4 +- .../java/org/bukkit/material/MonsterEggs.java | 2 +- .../org/bukkit/material/PressureSensor.java | 2 +- .../java/org/bukkit/material/Redstone.java | 2 +- .../java/org/bukkit/material/SmoothBrick.java | 2 +- .../main/java/org/bukkit/material/Step.java | 2 +- .../main/java/org/bukkit/material/Vine.java | 4 +- .../bukkit/metadata/FixedMetadataValue.java | 2 - .../bukkit/metadata/LazyMetadataValue.java | 4 +- .../org/bukkit/metadata/MetadataStore.java | 10 +- .../bukkit/metadata/MetadataStoreBase.java | 6 +- .../org/bukkit/metadata/MetadataValue.java | 22 +- .../bukkit/metadata/MetadataValueAdapter.java | 2 +- .../java/org/bukkit/metadata/Metadatable.java | 8 +- .../org/bukkit/permissions/Permissible.java | 22 +- .../bukkit/permissions/PermissibleBase.java | 6 +- .../org/bukkit/permissions/Permission.java | 8 +- .../permissions/PermissionAttachment.java | 4 +- .../bukkit/permissions/PermissionDefault.java | 2 +- .../PermissionRemovedExecutor.java | 2 +- .../bukkit/permissions/ServerOperator.java | 4 +- .../java/org/bukkit/plugin/EventExecutor.java | 2 +- .../main/java/org/bukkit/plugin/Plugin.java | 40 +-- .../org/bukkit/plugin/PluginAwareness.java | 3 +- .../bukkit/plugin/PluginDescriptionFile.java | 57 ++-- .../java/org/bukkit/plugin/PluginLoader.java | 12 +- .../java/org/bukkit/plugin/PluginManager.java | 58 ++-- .../org/bukkit/plugin/ServicesManager.java | 20 +- .../bukkit/plugin/SimplePluginManager.java | 42 +-- .../bukkit/plugin/SimpleServicesManager.java | 18 +- .../org/bukkit/plugin/java/JavaPlugin.java | 2 +- .../bukkit/plugin/java/JavaPluginLoader.java | 49 ++- .../bukkit/plugin/java/PluginClassLoader.java | 3 +- .../bukkit/plugin/messaging/Messenger.java | 42 +-- .../messaging/PluginMessageListener.java | 2 +- .../PluginMessageListenerRegistration.java | 10 +- .../messaging/PluginMessageRecipient.java | 4 +- .../plugin/messaging/StandardMessenger.java | 16 +- .../java/org/bukkit/potion/PotionBrewer.java | 4 +- .../org/bukkit/potion/PotionEffectType.java | 2 +- .../java/org/bukkit/potion/PotionType.java | 2 +- .../projectiles/BlockProjectileSource.java | 2 +- .../bukkit/projectiles/ProjectileSource.java | 4 +- .../org/bukkit/scheduler/BukkitScheduler.java | 58 ++-- .../java/org/bukkit/scheduler/BukkitTask.java | 8 +- .../org/bukkit/scheduler/BukkitWorker.java | 6 +- .../org/bukkit/scoreboard/DisplaySlot.java | 2 +- .../bukkit/scoreboard/NameTagVisibility.java | 2 +- .../org/bukkit/util/CachedServerIcon.java | 2 +- .../java/org/bukkit/util/ChatPaginator.java | 9 +- .../org/bukkit/util/NumberConversions.java | 30 +- .../src/main/java/org/bukkit/util/Vector.java | 3 +- .../main/java/org/bukkit/util/io/Wrapper.java | 2 +- .../org/bukkit/util/noise/NoiseGenerator.java | 2 +- .../util/noise/PerlinNoiseGenerator.java | 4 +- .../util/noise/SimplexNoiseGenerator.java | 10 +- .../util/permissions/DefaultPermissions.java | 9 +- .../org/spigotmc/CustomTimingsHandler.java | 1 - .../player/PlayerSpawnLocationEvent.java | 1 - .../java/org/bukkit/BukkitMirrorTest.java | 13 +- .../test/java/org/bukkit/ChatColorTest.java | 2 +- .../java/org/bukkit/ChatPaginatorTest.java | 63 ++-- .../test/java/org/bukkit/DyeColorTest.java | 2 +- .../test/java/org/bukkit/LocationTest.java | 12 +- .../test/java/org/bukkit/MaterialTest.java | 2 +- .../src/test/java/org/bukkit/TestServer.java | 44 +-- .../ConfigurationSectionTest.java | 4 +- .../configuration/ConfigurationTest.java | 4 +- .../ConversationContextTest.java | 4 +- .../metadata/FixedMetadataValueTest.java | 8 +- .../metadata/LazyMetadataValueTest.java | 36 +-- .../bukkit/metadata/MetadataStoreTest.java | 16 +- .../metadata/MetadataValueAdapterTest.java | 6 +- .../org/bukkit/plugin/PluginManagerTest.java | 18 +- .../plugin/TimedRegisteredListenerTest.java | 4 +- .../bukkit/plugin/messaging/TestPlayer.java | 6 +- .../java/org/bukkit/util/StringUtilTest.java | 8 +- .../util/io/BukkitObjectStreamTest.java | 26 +- .../spigot/command/TicksPerSecondCommand.java | 109 +++---- .../java/com/elevatemc/spigot/eSpigot.java | 3 - .../spigot/pathsearch/AsyncNavigation.java | 2 +- .../pathsearch/PathSearchThrottlerThread.java | 6 +- .../pathsearch/PositionPathSearchType.java | 2 +- .../threading/NamePriorityThreadFactory.java | 2 +- .../spigot/threading/ThreadingManager.java | 14 +- .../elevatemc/spigot/world/AutoSaveJob.java | 2 +- .../minecraft/server/BaseBlockPosition.java | 6 +- .../java/net/minecraft/server/BiomeBase.java | 28 +- .../main/java/net/minecraft/server/Block.java | 36 +-- .../java/net/minecraft/server/BlockAnvil.java | 16 +- .../minecraft/server/BlockBrewingStand.java | 6 +- .../minecraft/server/BlockButtonAbstract.java | 78 +++-- .../net/minecraft/server/BlockCactus.java | 22 +- .../java/net/minecraft/server/BlockCake.java | 20 +- .../java/net/minecraft/server/BlockChest.java | 34 +- .../java/net/minecraft/server/BlockCocoa.java | 40 ++- .../net/minecraft/server/BlockCommand.java | 18 +- .../java/net/minecraft/server/BlockCrops.java | 24 +- .../server/BlockDaylightDetector.java | 14 +- .../minecraft/server/BlockDiodeAbstract.java | 32 +- .../net/minecraft/server/BlockDispenser.java | 26 +- .../java/net/minecraft/server/BlockDoor.java | 34 +- .../net/minecraft/server/BlockDragonEgg.java | 11 +- .../net/minecraft/server/BlockDropper.java | 6 +- .../net/minecraft/server/BlockFalling.java | 9 +- .../java/net/minecraft/server/BlockFire.java | 48 ++- .../net/minecraft/server/BlockFlowerPot.java | 59 ++-- .../net/minecraft/server/BlockFlowing.java | 33 +- .../net/minecraft/server/BlockFluids.java | 34 +- .../java/net/minecraft/server/BlockGrass.java | 4 +- .../net/minecraft/server/BlockHopper.java | 14 +- .../net/minecraft/server/BlockJukeBox.java | 14 +- .../net/minecraft/server/BlockLeaves.java | 8 +- .../java/net/minecraft/server/BlockLever.java | 88 ++---- .../server/BlockMinecartDetector.java | 28 +- .../server/BlockMinecartTrackAbstract.java | 71 ++--- .../minecraft/server/BlockMonsterEggs.java | 53 ++-- .../net/minecraft/server/BlockMushroom.java | 7 +- .../java/net/minecraft/server/BlockMycel.java | 4 +- .../net/minecraft/server/BlockNetherWart.java | 12 +- .../java/net/minecraft/server/BlockOre.java | 2 +- .../net/minecraft/server/BlockPiston.java | 53 ++-- .../java/net/minecraft/server/BlockPlant.java | 1 - .../net/minecraft/server/BlockPortal.java | 12 +- .../minecraft/server/BlockPoweredRail.java | 42 ++- .../server/BlockPressurePlateAbstract.java | 6 +- .../server/BlockPressurePlateBinary.java | 23 +- .../server/BlockPressurePlateWeighted.java | 15 +- .../net/minecraft/server/BlockPumpkin.java | 5 +- .../minecraft/server/BlockRedstoneLamp.java | 2 +- .../minecraft/server/BlockRedstoneOre.java | 9 +- .../minecraft/server/BlockRedstoneTorch.java | 13 +- .../minecraft/server/BlockRedstoneWire.java | 49 ++- .../java/net/minecraft/server/BlockReed.java | 13 +- .../net/minecraft/server/BlockSapling.java | 34 +- .../java/net/minecraft/server/BlockSkull.java | 35 +-- .../java/net/minecraft/server/BlockSnow.java | 20 +- .../java/net/minecraft/server/BlockSoil.java | 14 +- .../java/net/minecraft/server/BlockState.java | 1 - .../minecraft/server/BlockStateBoolean.java | 2 +- .../net/minecraft/server/BlockStateEnum.java | 12 +- .../minecraft/server/BlockStateInteger.java | 2 +- .../net/minecraft/server/BlockStateList.java | 21 +- .../net/minecraft/server/BlockStationary.java | 6 +- .../java/net/minecraft/server/BlockStem.java | 30 +- .../java/net/minecraft/server/BlockTNT.java | 20 +- .../net/minecraft/server/BlockTrapdoor.java | 44 ++- .../net/minecraft/server/BlockTripwire.java | 51 ++- .../minecraft/server/BlockTripwireHook.java | 70 ++--- .../java/net/minecraft/server/BlockVine.java | 95 +++--- .../minecraft/server/ChatBaseComponent.java | 17 +- .../net/minecraft/server/ChatModifier.java | 36 +-- .../main/java/net/minecraft/server/Chunk.java | 98 +++--- .../minecraft/server/ChunkProviderFlat.java | 31 +- .../server/ChunkProviderGenerate.java | 26 +- .../minecraft/server/ChunkProviderHell.java | 10 +- .../minecraft/server/ChunkProviderServer.java | 30 +- .../minecraft/server/ChunkRegionLoader.java | 25 +- .../net/minecraft/server/ChunkSection.java | 2 +- .../server/CommandBlockListenerAbstract.java | 22 +- .../minecraft/server/CommandDispatcher.java | 127 ++++---- .../net/minecraft/server/CommandExecute.java | 4 +- .../net/minecraft/server/CommandGamemode.java | 2 +- .../net/minecraft/server/CommandGamerule.java | 9 +- .../minecraft/server/CommandScoreboard.java | 196 ++++++------ .../server/CommandSpreadPlayers.java | 48 ++- .../java/net/minecraft/server/CommandTp.java | 10 +- .../java/net/minecraft/server/Container.java | 64 ++-- .../net/minecraft/server/ContainerAnvil.java | 77 +++-- .../net/minecraft/server/ContainerBeacon.java | 8 +- .../server/ContainerBrewingStand.java | 20 +- .../net/minecraft/server/ContainerChest.java | 4 +- .../minecraft/server/ContainerDispenser.java | 4 +- .../server/ContainerEnchantTable.java | 26 +- .../minecraft/server/ContainerFurnace.java | 12 +- .../net/minecraft/server/ContainerHopper.java | 4 +- .../net/minecraft/server/ContainerHorse.java | 4 +- .../minecraft/server/ContainerMerchant.java | 8 +- .../net/minecraft/server/ContainerPlayer.java | 12 +- .../minecraft/server/ContainerWorkbench.java | 10 +- .../net/minecraft/server/CraftingManager.java | 296 +++++++++--------- .../net/minecraft/server/CrashReport.java | 23 +- .../net/minecraft/server/DataWatcher.java | 43 ++- .../net/minecraft/server/DedicatedServer.java | 37 +-- .../server/DispenseBehaviorItem.java | 2 +- .../server/DispenseBehaviorProjectile.java | 6 +- .../minecraft/server/DispenserRegistry.java | 36 +-- .../net/minecraft/server/Enchantment.java | 8 +- .../minecraft/server/EnchantmentManager.java | 55 ++-- .../minecraft/server/EnchantmentThorns.java | 4 +- .../java/net/minecraft/server/Entity.java | 99 +++--- .../net/minecraft/server/EntityAgeable.java | 6 +- .../net/minecraft/server/EntityAnimal.java | 6 +- .../minecraft/server/EntityArmorStand.java | 24 +- .../net/minecraft/server/EntityArrow.java | 63 ++-- .../java/net/minecraft/server/EntityBoat.java | 28 +- .../java/net/minecraft/server/EntityCow.java | 2 +- .../net/minecraft/server/EntityCreature.java | 6 +- .../net/minecraft/server/EntityCreeper.java | 19 +- .../minecraft/server/EntityEnderCrystal.java | 4 +- .../minecraft/server/EntityEnderDragon.java | 55 ++-- .../net/minecraft/server/EntityEnderman.java | 25 +- .../minecraft/server/EntityExperienceOrb.java | 18 +- .../minecraft/server/EntityFallingBlock.java | 23 +- .../net/minecraft/server/EntityFireball.java | 27 +- .../net/minecraft/server/EntityFireworks.java | 3 +- .../minecraft/server/EntityFishingHook.java | 73 +++-- .../net/minecraft/server/EntityGhast.java | 12 +- .../net/minecraft/server/EntityHanging.java | 8 +- .../net/minecraft/server/EntityHorse.java | 53 ++-- .../net/minecraft/server/EntityHuman.java | 61 ++-- .../minecraft/server/EntityInsentient.java | 36 +-- .../net/minecraft/server/EntityIronGolem.java | 14 +- .../java/net/minecraft/server/EntityItem.java | 33 +- .../net/minecraft/server/EntityItemFrame.java | 8 +- .../net/minecraft/server/EntityLightning.java | 6 +- .../net/minecraft/server/EntityLiving.java | 183 +++++------ .../server/EntityMinecartAbstract.java | 102 +++--- .../server/EntityMinecartCommandBlock.java | 5 +- .../server/EntityMinecartContainer.java | 12 +- .../server/EntityMinecartFurnace.java | 14 +- .../net/minecraft/server/EntityMonster.java | 6 +- .../net/minecraft/server/EntityOcelot.java | 16 +- .../net/minecraft/server/EntityPainting.java | 10 +- .../java/net/minecraft/server/EntityPig.java | 10 +- .../net/minecraft/server/EntityPlayer.java | 70 ++--- .../net/minecraft/server/EntityPotion.java | 11 +- .../minecraft/server/EntityProjectile.java | 49 ++- .../net/minecraft/server/EntityRabbit.java | 20 +- .../net/minecraft/server/EntitySheep.java | 22 +- .../minecraft/server/EntitySilverfish.java | 4 +- .../net/minecraft/server/EntitySkeleton.java | 12 +- .../net/minecraft/server/EntitySlice.java | 45 ++- .../net/minecraft/server/EntitySlime.java | 16 +- .../minecraft/server/EntitySmallFireball.java | 2 +- .../net/minecraft/server/EntitySnowman.java | 2 +- .../net/minecraft/server/EntitySpider.java | 16 +- .../net/minecraft/server/EntitySquid.java | 10 +- .../net/minecraft/server/EntityTNTPrimed.java | 6 +- .../net/minecraft/server/EntityTracker.java | 2 +- .../minecraft/server/EntityTrackerEntry.java | 27 +- .../net/minecraft/server/EntityVillager.java | 12 +- .../net/minecraft/server/EntityWither.java | 33 +- .../minecraft/server/EntityWitherSkull.java | 4 +- .../java/net/minecraft/server/EntityWolf.java | 36 +-- .../net/minecraft/server/EntityZombie.java | 43 ++- .../minecraft/server/ExpirableListEntry.java | 2 +- .../java/net/minecraft/server/Explosion.java | 31 +- .../net/minecraft/server/FileIOThread.java | 2 +- .../minecraft/server/GameProfileBanEntry.java | 8 +- .../minecraft/server/GenericAttributes.java | 20 +- .../minecraft/server/HandshakeListener.java | 12 +- .../net/minecraft/server/IBlockState.java | 10 +- .../java/net/minecraft/server/IntCache.java | 10 +- .../server/InventoryCraftResult.java | 4 +- .../minecraft/server/InventoryCrafting.java | 10 +- .../minecraft/server/InventoryEnderChest.java | 6 +- .../minecraft/server/InventoryHorseChest.java | 2 +- .../minecraft/server/InventoryLargeChest.java | 4 +- .../minecraft/server/InventoryMerchant.java | 10 +- .../server/InventorySubcontainer.java | 9 +- .../java/net/minecraft/server/ItemArmor.java | 8 +- .../java/net/minecraft/server/ItemBlock.java | 2 +- .../java/net/minecraft/server/ItemBoat.java | 10 +- .../java/net/minecraft/server/ItemBucket.java | 6 +- .../java/net/minecraft/server/ItemDoor.java | 2 +- .../java/net/minecraft/server/ItemDye.java | 2 +- .../net/minecraft/server/ItemHanging.java | 2 +- .../java/net/minecraft/server/ItemLeash.java | 5 +- .../net/minecraft/server/ItemMapEmpty.java | 2 +- .../net/minecraft/server/ItemMinecart.java | 8 +- .../net/minecraft/server/ItemMonsterEgg.java | 6 +- .../java/net/minecraft/server/ItemRecord.java | 2 +- .../java/net/minecraft/server/ItemSkull.java | 14 +- .../java/net/minecraft/server/ItemStack.java | 26 +- .../net/minecraft/server/ItemWaterLily.java | 2 +- .../net/minecraft/server/ItemWorldMap.java | 10 +- .../java/net/minecraft/server/JsonList.java | 18 +- .../net/minecraft/server/LoginListener.java | 87 +++-- .../net/minecraft/server/MethodProfiler.java | 10 +- .../net/minecraft/server/MinecraftServer.java | 62 ++-- .../server/MobEffectAttackDamage.java | 2 +- .../net/minecraft/server/MobEffectList.java | 18 +- .../minecraft/server/MobSpawnerAbstract.java | 29 +- .../java/net/minecraft/server/NBTBase.java | 2 +- .../server/NBTCompressedStreamTools.java | 13 +- .../net/minecraft/server/NBTTagByteArray.java | 4 +- .../net/minecraft/server/NBTTagCompound.java | 30 +- .../net/minecraft/server/NBTTagIntArray.java | 16 +- .../java/net/minecraft/server/NBTTagList.java | 26 +- .../net/minecraft/server/NBTTagString.java | 2 +- .../server/NameReferencingFileConverter.java | 43 ++- .../java/net/minecraft/server/Navigation.java | 6 +- .../minecraft/server/NavigationAbstract.java | 13 +- .../net/minecraft/server/NetworkManager.java | 5 +- .../minecraft/server/NextTickListEntry.java | 6 +- .../net/minecraft/server/OldChunkLoader.java | 2 +- .../server/PacketDataSerializer.java | 4 +- .../minecraft/server/PacketDecompressor.java | 5 +- .../minecraft/server/PacketPlayInChat.java | 10 +- .../PacketPlayInResourcePackStatus.java | 4 +- .../server/PacketPlayOutEntityMetadata.java | 1 - .../server/PacketPlayOutMapChunk.java | 3 +- .../server/PacketPlayOutMapChunkBulk.java | 6 +- .../server/PacketPlayOutPlayerInfo.java | 22 +- .../server/PacketPlayOutScoreboardTeam.java | 5 +- .../minecraft/server/PacketPlayOutTitle.java | 12 +- .../server/PacketStatusListener.java | 16 +- .../minecraft/server/PathfinderGoalBreed.java | 11 +- .../server/PathfinderGoalDefendVillage.java | 4 +- .../server/PathfinderGoalEatTile.java | 4 +- .../server/PathfinderGoalHurtByTarget.java | 9 +- .../server/PathfinderGoalMakeLove.java | 4 +- ...PathfinderGoalNearestAttackableTarget.java | 12 +- ...GoalNearestAttackableTargetInsentient.java | 8 +- .../server/PathfinderGoalSelector.java | 8 +- .../minecraft/server/PathfinderGoalSit.java | 2 +- .../minecraft/server/PathfinderGoalTame.java | 2 +- .../PathfinderGoalTargetNearestPlayer.java | 10 +- .../minecraft/server/PathfinderGoalTempt.java | 10 +- .../server/PersistentCollection.java | 33 +- .../net/minecraft/server/PlayerChunkMap.java | 60 ++-- .../minecraft/server/PlayerConnection.java | 129 +++----- .../server/PlayerInteractManager.java | 22 +- .../net/minecraft/server/PlayerInventory.java | 26 +- .../java/net/minecraft/server/PlayerList.java | 182 +++++------ .../minecraft/server/PortalTravelAgent.java | 18 +- .../net/minecraft/server/PropertyManager.java | 6 +- .../net/minecraft/server/RecipeArmorDye.java | 3 +- .../net/minecraft/server/RecipeBookClone.java | 4 +- .../net/minecraft/server/RecipeFireworks.java | 11 +- .../net/minecraft/server/RecipeMapClone.java | 4 +- .../net/minecraft/server/RecipeRepair.java | 8 +- .../net/minecraft/server/RecipesBanner.java | 20 +- .../net/minecraft/server/RecipesFurnace.java | 8 +- .../java/net/minecraft/server/RegionFile.java | 28 +- .../net/minecraft/server/RegionFileCache.java | 7 +- .../minecraft/server/ScoreboardServer.java | 32 +- .../server/SecondaryWorldServer.java | 2 +- .../minecraft/server/ServerConnection.java | 22 +- .../server/ServerStatisticManager.java | 35 +-- .../minecraft/server/ShapelessRecipes.java | 7 +- .../minecraft/server/SlotFurnaceResult.java | 4 +- .../net/minecraft/server/SpawnerCreature.java | 16 +- .../minecraft/server/StatisticManager.java | 8 +- .../minecraft/server/StructureGenerator.java | 44 +-- .../java/net/minecraft/server/TileEntity.java | 10 +- .../minecraft/server/TileEntityBanner.java | 2 +- .../minecraft/server/TileEntityBeacon.java | 19 +- .../server/TileEntityBrewingStand.java | 6 +- .../net/minecraft/server/TileEntityChest.java | 17 +- .../minecraft/server/TileEntityDispenser.java | 4 +- .../server/TileEntityEnderChest.java | 2 +- .../minecraft/server/TileEntityFurnace.java | 10 +- .../minecraft/server/TileEntityHopper.java | 46 ++- .../minecraft/server/TileEntityPiston.java | 36 +-- .../net/minecraft/server/TileEntitySign.java | 8 +- .../net/minecraft/server/TileEntitySkull.java | 46 ++- .../java/net/minecraft/server/UserCache.java | 48 ++- .../java/net/minecraft/server/Village.java | 54 ++-- .../net/minecraft/server/VillageSiege.java | 14 +- .../main/java/net/minecraft/server/World.java | 239 +++++++------- .../net/minecraft/server/WorldBorder.java | 45 +-- .../java/net/minecraft/server/WorldData.java | 19 +- .../minecraft/server/WorldGenForestTree.java | 2 +- .../server/WorldGenLargeFeature.java | 15 +- .../server/WorldGenRegistration.java | 41 ++- .../net/minecraft/server/WorldGenVillage.java | 20 +- .../server/WorldGenVillagePieces.java | 33 +- .../net/minecraft/server/WorldManager.java | 2 +- .../java/net/minecraft/server/WorldMap.java | 8 +- .../net/minecraft/server/WorldNBTStorage.java | 53 +--- .../net/minecraft/server/WorldServer.java | 92 +++--- .../tacospigot/BlockStateRegistry.java | 3 - .../techcable/tacospigot/HopperPusher.java | 16 +- .../tacospigot/ImmutableArrayMap.java | 3 +- .../tacospigot/ImmutableArrayTable.java | 1 - .../net/techcable/tacospigot/Indexer.java | 2 +- .../tacospigot/TacoSpigotConfig.java | 9 +- .../tacospigot/TacoSpigotWorldConfig.java | 2 +- .../tacospigot/function/ObjIntFunction.java | 2 +- .../tacospigot/utils/BlockHelper.java | 9 - .../org/bukkit/craftbukkit/CraftChunk.java | 4 +- .../bukkit/craftbukkit/CraftIpBanEntry.java | 1 - .../bukkit/craftbukkit/CraftIpBanList.java | 5 +- .../craftbukkit/CraftOfflinePlayer.java | 3 +- .../craftbukkit/CraftProfileBanEntry.java | 1 - .../craftbukkit/CraftProfileBanList.java | 2 +- .../org/bukkit/craftbukkit/CraftServer.java | 48 ++- .../bukkit/craftbukkit/CraftStatistic.java | 6 +- .../org/bukkit/craftbukkit/CraftWorld.java | 40 +-- .../bukkit/craftbukkit/block/CraftBanner.java | 10 +- .../bukkit/craftbukkit/block/CraftBlock.java | 8 +- .../craftbukkit/block/CraftBlockState.java | 6 +- .../craftbukkit/chunkio/ChunkIOExecutor.java | 2 +- .../craftbukkit/chunkio/ChunkIOProvider.java | 4 - .../command/ColouredConsoleSender.java | 2 +- .../command/VanillaCommandWrapper.java | 27 +- .../conversations/ConversationTracker.java | 4 +- .../craftbukkit/entity/CraftEntity.java | 6 +- .../craftbukkit/entity/CraftFireball.java | 2 +- .../craftbukkit/entity/CraftHanging.java | 2 - .../craftbukkit/entity/CraftHumanEntity.java | 14 +- .../craftbukkit/entity/CraftLivingEntity.java | 8 +- .../craftbukkit/entity/CraftMinecart.java | 1 - .../craftbukkit/entity/CraftPlayer.java | 22 +- .../craftbukkit/entity/CraftProjectile.java | 2 +- .../craftbukkit/entity/CraftWaterMob.java | 1 - .../craftbukkit/event/CraftEventFactory.java | 12 +- .../generator/NormalChunkGenerator.java | 2 +- .../help/CustomIndexHelpTopic.java | 4 +- .../craftbukkit/help/HelpYamlReader.java | 6 +- .../craftbukkit/help/SimpleHelpMap.java | 10 +- .../inventory/CraftFurnaceRecipe.java | 1 - .../craftbukkit/inventory/CraftInventory.java | 8 +- .../inventory/CraftInventoryCustom.java | 2 +- .../inventory/CraftInventoryDoubleChest.java | 1 - .../craftbukkit/inventory/CraftItemStack.java | 12 +- .../inventory/CraftMetaBanner.java | 8 +- .../craftbukkit/inventory/CraftMetaBook.java | 6 +- .../inventory/CraftMetaBookSigned.java | 6 +- .../inventory/CraftMetaEnchantedBook.java | 6 +- .../inventory/CraftMetaFirework.java | 14 +- .../craftbukkit/inventory/CraftMetaItem.java | 52 ++- .../inventory/CraftMetaPotion.java | 8 +- .../inventory/InventoryWrapper.java | 2 +- .../craftbukkit/map/CraftMapCanvas.java | 2 +- .../craftbukkit/map/CraftMapRenderer.java | 2 +- .../bukkit/craftbukkit/map/CraftMapView.java | 10 +- .../bukkit/craftbukkit/map/RenderData.java | 2 +- .../metadata/BlockMetadataStore.java | 2 +- .../craftbukkit/potion/CraftPotionBrewer.java | 2 +- .../CraftBlockProjectileSource.java | 12 +- .../craftbukkit/scheduler/CraftAsyncTask.java | 2 +- .../craftbukkit/scheduler/CraftScheduler.java | 42 ++- .../scoreboard/CraftObjective.java | 4 +- .../scoreboard/CraftScoreboard.java | 22 +- .../scoreboard/CraftScoreboardManager.java | 18 +- .../craftbukkit/scoreboard/CraftTeam.java | 3 +- .../util/AsynchronousExecutor.java | 10 +- .../util/BlockStateListPopulator.java | 2 +- .../craftbukkit/util/CraftChatMessage.java | 14 +- .../craftbukkit/util/CraftMagicNumbers.java | 16 +- .../craftbukkit/util/ForwardLogHandler.java | 2 +- .../bukkit/craftbukkit/util/HashTreeSet.java | 4 +- .../craftbukkit/util/LazyPlayerSet.java | 2 +- .../org/bukkit/craftbukkit/util/LongHash.java | 2 +- .../craftbukkit/util/LongObjectHashMap.java | 2 +- .../util/ServerShutdownThread.java | 2 +- .../util/StructureGrowDelegate.java | 2 +- .../bukkit/craftbukkit/util/Versioning.java | 7 - .../craftbukkit/util/WeakCollection.java | 12 +- .../github/paperspigot/PaperSpigotConfig.java | 9 +- .../paperspigot/PaperSpigotWorldConfig.java | 4 +- .../java/org/spigotmc/ActivationRange.java | 4 +- .../src/main/java/org/spigotmc/AntiXray.java | 2 +- .../main/java/org/spigotmc/LimitStream.java | 4 +- .../src/main/java/org/spigotmc/Metrics.java | 24 +- .../java/org/spigotmc/RestartCommand.java | 50 ++- .../main/java/org/spigotmc/SpigotConfig.java | 14 +- .../java/org/spigotmc/SpigotWorldConfig.java | 2 +- .../test/java/org/bukkit/DyeColorsTest.java | 2 +- .../test/java/org/bukkit/MaterialTest.java | 5 +- .../bukkit/StatisticsAndAchievementsTest.java | 5 +- .../inventory/CompositeSerialization.java | 4 +- .../inventory/FactoryItemMaterialTest.java | 7 +- .../inventory/ItemFactoryTest.java | 2 +- .../ItemMetaImplementationOverrideTest.java | 18 +- .../craftbukkit/inventory/ItemMetaTest.java | 2 +- .../inventory/ItemStackBookTest.java | 120 +++---- .../ItemStackEnchantStorageTest.java | 48 +-- .../ItemStackFireworkChargeTest.java | 60 ++-- .../inventory/ItemStackFireworkTest.java | 96 ++---- .../inventory/ItemStackLeatherTest.java | 36 +-- .../ItemStackLoreEnchantmentTest.java | 180 ++++------- .../inventory/ItemStackMapTest.java | 60 ++-- .../inventory/ItemStackPotionsTest.java | 72 ++--- .../inventory/ItemStackSkullTest.java | 36 +-- .../craftbukkit/inventory/ItemStackTest.java | 33 +- .../java/org/bukkit/support/DummyServer.java | 38 +-- .../java/org/bukkit/support/Matchers.java | 2 +- .../test/java/org/bukkit/support/Util.java | 3 +- 669 files changed, 5331 insertions(+), 6877 deletions(-) diff --git a/TacoSpigot-API/src/main/java/co/aikar/timings/Timing.java b/TacoSpigot-API/src/main/java/co/aikar/timings/Timing.java index 4d990b1..09fb086 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/timings/Timing.java +++ b/TacoSpigot-API/src/main/java/co/aikar/timings/Timing.java @@ -30,21 +30,21 @@ public interface Timing extends AutoCloseable { /** * Starts timing the execution until {@link #stopTiming()} is called. */ - public void startTiming(); + void startTiming(); /** *

Stops timing and records the data. Propagates the data up to group handlers.

* * Will automatically be called when this Timing is used with try-with-resources */ - public void stopTiming(); + void stopTiming(); /** * Starts timing the execution until {@link #stopTiming()} is called. * * But only if we are on the primary thread. */ - public void startTimingIfSync(); + void startTimingIfSync(); /** *

Stops timing and records the data. Propagates the data up to group handlers.

@@ -53,12 +53,12 @@ public interface Timing extends AutoCloseable { * * But only if we are on the primary thread. */ - public void stopTimingIfSync(); + void stopTimingIfSync(); /** * Stops timing and disregards current timing data. */ - public void abort(); + void abort(); /** * Used internally to get the actual backing Handler in the case of delegated Handlers diff --git a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingData.java b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingData.java index b62e428..e3dc8ef 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingData.java +++ b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingData.java @@ -35,12 +35,7 @@ import static co.aikar.util.JSONUtil.toArray; * This is broken out to reduce memory usage */ class TimingData { - static Function LOADER = new Function() { - @Override - public TimingData apply(Integer input) { - return new TimingData(input); - } - }; + static Function LOADER = TimingData::new; int id; int count = 0; int lagCount = 0; diff --git a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHandler.java b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHandler.java index 4918a17..3ffe7e5 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHandler.java +++ b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHandler.java @@ -26,10 +26,7 @@ package co.aikar.timings; import gnu.trove.map.hash.TIntObjectHashMap; import org.bukkit.Bukkit; import co.aikar.util.LoadingIntMap; -import co.aikar.util.LoadingMap; -import co.aikar.util.MRUMapCache; -import java.util.Map; import java.util.logging.Level; class TimingHandler implements Timing { @@ -40,7 +37,7 @@ class TimingHandler implements Timing { final String name; final boolean verbose; - final TIntObjectHashMap children = new LoadingIntMap(TimingData.LOADER); + final TIntObjectHashMap children = new LoadingIntMap<>(TimingData.LOADER); final TimingData record; final TimingHandler groupHandler; diff --git a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHistory.java b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHistory.java index 7a04770..2d3a8d1 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHistory.java +++ b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHistory.java @@ -56,12 +56,7 @@ public class TimingHistory { public static long tileEntityTicks; public static long activatedEntityTicks; static int worldIdPool = 1; - static Map worldMap = LoadingMap.newHashMap(new Function() { - @Override - public Integer apply(String input) { - return worldIdPool++; - } - }); + static Map worldMap = LoadingMap.newHashMap(input -> worldIdPool++); final long endTime; final long startTime; final long totalTicks; @@ -80,7 +75,7 @@ public class TimingHistory { this.minuteReports = MINUTE_REPORTS.toArray(new MinuteReport[MINUTE_REPORTS.size() + 1]); this.minuteReports[this.minuteReports.length - 1] = new MinuteReport(); } else { - this.minuteReports = MINUTE_REPORTS.toArray(new MinuteReport[MINUTE_REPORTS.size()]); + this.minuteReports = MINUTE_REPORTS.toArray(new MinuteReport[0]); } long ticks = 0; for (MinuteReport mp : this.minuteReports) { @@ -102,61 +97,47 @@ public class TimingHistory { new EnumMap(Material.class), Counter.LOADER )); // Information about all loaded chunks/entities - this.worlds = toObjectMapper(Bukkit.getWorlds(), new Function() { - @Override - public JSONPair apply(World world) { - return pair( - worldMap.get(world.getName()), - toArrayMapper(world.getLoadedChunks(), new Function() { - @Override - public Object apply(Chunk chunk) { - entityCounts.clear(); - tileEntityCounts.clear(); + this.worlds = toObjectMapper(Bukkit.getWorlds(), world -> pair( + worldMap.get(world.getName()), + toArrayMapper(world.getLoadedChunks(), chunk -> { + entityCounts.clear(); + tileEntityCounts.clear(); - for (Entity entity : chunk.getEntities()) { - entityCounts.get(entity.getType()).increment(); - } + for (Entity entity : chunk.getEntities()) { + entityCounts.get(entity.getType()).increment(); + } - for (BlockState tileEntity : chunk.getTileEntities()) { - tileEntityCounts.get(tileEntity.getBlock().getType()).increment(); - } + for (BlockState tileEntity : chunk.getTileEntities()) { + tileEntityCounts.get(tileEntity.getBlock().getType()).increment(); + } - if (tileEntityCounts.isEmpty() && entityCounts.isEmpty()) { - return null; - } - return toArray( - chunk.getX(), - chunk.getZ(), - toObjectMapper(entityCounts.entrySet(), - new Function, JSONPair>() { - @Override - public JSONPair apply(Map.Entry entry) { + if (tileEntityCounts.isEmpty() && entityCounts.isEmpty()) { + return null; + } + return toArray( + chunk.getX(), + chunk.getZ(), + toObjectMapper(entityCounts.entrySet(), + entry -> { entityTypeSet.add(entry.getKey()); return pair( - String.valueOf(entry.getKey().getTypeId()), - entry.getValue().count() + String.valueOf(entry.getKey().getTypeId()), + entry.getValue().count() ); - } } - ), - toObjectMapper(tileEntityCounts.entrySet(), - new Function, JSONPair>() { - @Override - public JSONPair apply(Map.Entry entry) { + ), + toObjectMapper(tileEntityCounts.entrySet(), + entry -> { tileEntityTypeSet.add(entry.getKey()); return pair( - String.valueOf(entry.getKey().getId()), - entry.getValue().count() + String.valueOf(entry.getKey().getId()), + entry.getValue().count() ); - } } - ) - ); - } - }) + ) ); - } - }); + }) + )); } public static void resetTicks(boolean fullReset) { @@ -178,22 +159,14 @@ public class TimingHistory { pair("tk", totalTicks), pair("tm", totalTime), pair("w", worlds), - pair("h", toArrayMapper(entries, new Function() { - @Override - public Object apply(TimingHistoryEntry entry) { - TimingData record = entry.data; - if (record.count == 0) { - return null; - } - return entry.export(); + pair("h", toArrayMapper(entries, entry -> { + TimingData record = entry.data; + if (record.count == 0) { + return null; } + return entry.export(); })), - pair("mp", toArrayMapper(minuteReports, new Function() { - @Override - public Object apply(MinuteReport input) { - return input.export(); - } - })) + pair("mp", toArrayMapper(minuteReports, input -> input.export())) ); } @@ -235,7 +208,7 @@ public class TimingHistory { final long activatedEntity; TicksRecord() { - timed = timedTicks - (TimingsManager.MINUTE_REPORTS.size() * 1200); + timed = timedTicks - (TimingsManager.MINUTE_REPORTS.size() * 1200L); player = playerTicks; entity = entityTicks; tileEntity = tileEntityTicks; diff --git a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHistoryEntry.java index eac4e21..c413584 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHistoryEntry.java +++ b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingHistoryEntry.java @@ -46,12 +46,7 @@ class TimingHistoryEntry { List result = data.export(); if (children.length > 0) { result.add( - toArrayMapper(children, new Function() { - @Override - public Object apply(TimingData child) { - return child.export(); - } - }) + toArrayMapper(children, TimingData::export) ); } return result; diff --git a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingIdentifier.java b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingIdentifier.java index 623dda4..6dc680e 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingIdentifier.java +++ b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingIdentifier.java @@ -40,12 +40,7 @@ final class TimingIdentifier { * Holds all groups. Autoloads on request for a group by name. */ static final Map GROUP_MAP = MRUMapCache.of( - LoadingMap.newIdentityHashMap(new Function() { - @Override - public TimingGroup apply(String group) { - return new TimingGroup(group); - } - }, 64) + LoadingMap.newIdentityHashMap(TimingGroup::new, 64) ); static final TimingGroup DEFAULT_GROUP = getGroup("Minecraft"); final String group; @@ -93,7 +88,7 @@ final class TimingIdentifier { final int id = idPool++; final String name; - ArrayDeque handlers = new ArrayDeque(64); + ArrayDeque handlers = new ArrayDeque<>(64); private TimingGroup(String name) { this.name = name; diff --git a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsCommand.java b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsCommand.java index 3dba3aa..274c960 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsCommand.java +++ b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsCommand.java @@ -103,7 +103,7 @@ public class TimingsCommand extends BukkitCommand { if (args.length == 1) { return StringUtil.copyPartialMatches(args[0], TIMINGS_SUBCOMMANDS, - new ArrayList(TIMINGS_SUBCOMMANDS.size())); + new ArrayList<>(TIMINGS_SUBCOMMANDS.size())); } return ImmutableList.of(); } diff --git a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsExport.java b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsExport.java index fe19ea0..d2741a2 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsExport.java +++ b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsExport.java @@ -45,11 +45,11 @@ import java.io.InputStream; import java.io.OutputStream; import java.lang.management.GarbageCollectorMXBean; import java.lang.management.ManagementFactory; -import java.lang.management.OperatingSystemMXBean; import java.lang.management.RuntimeMXBean; import java.net.HttpURLConnection; import java.net.InetAddress; import java.net.URL; +import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Map; import java.util.Set; @@ -110,12 +110,7 @@ class TimingsExport extends Thread { pair("cpu", runtime.availableProcessors()), pair("runtime", ManagementFactory.getRuntimeMXBean().getUptime()), pair("flags", StringUtils.join(runtimeBean.getInputArguments(), " ")), - pair("gc", toObjectMapper(ManagementFactory.getGarbageCollectorMXBeans(), new Function() { - @Override - public JSONPair apply(GarbageCollectorMXBean input) { - return pair(input.getName(), toArray(input.getCollectionCount(), input.getCollectionTime())); - } - })) + pair("gc", toObjectMapper(ManagementFactory.getGarbageCollectorMXBeans(), input -> pair(input.getName(), toArray(input.getCollectionCount(), input.getCollectionTime())))) ) ); @@ -151,49 +146,24 @@ class TimingsExport extends Thread { parent.put("idmap", createObject( pair("groups", toObjectMapper( - TimingIdentifier.GROUP_MAP.values(), new Function() { - @Override - public JSONPair apply(TimingIdentifier.TimingGroup group) { - return pair(group.id, group.name); - } - })), + TimingIdentifier.GROUP_MAP.values(), group -> pair(group.id, group.name))), pair("handlers", handlers), - pair("worlds", toObjectMapper(TimingHistory.worldMap.entrySet(), new Function, JSONPair>() { - @Override - public JSONPair apply(Map.Entry input) { - return pair(input.getValue(), input.getKey()); - } - })), + pair("worlds", toObjectMapper(TimingHistory.worldMap.entrySet(), input -> pair(input.getValue(), input.getKey()))), pair("tileentity", - toObjectMapper(tileEntityTypeSet, new Function() { - @Override - public JSONPair apply(Material input) { - return pair(input.getId(), input.name()); - } - })), + toObjectMapper(tileEntityTypeSet, input -> pair(input.getId(), input.name()))), pair("entity", - toObjectMapper(entityTypeSet, new Function() { - @Override - public JSONPair apply(EntityType input) { - return pair(input.getTypeId(), input.name()); - } - })) + toObjectMapper(entityTypeSet, input -> pair(input.getTypeId(), input.name()))) )); // Information about loaded plugins parent.put("plugins", toObjectMapper(Bukkit.getPluginManager().getPlugins(), - new Function() { - @Override - public JSONPair apply(Plugin plugin) { - return pair(plugin.getName(), createObject( - pair("version", plugin.getDescription().getVersion()), - pair("description", String.valueOf(plugin.getDescription().getDescription()).trim()), - pair("website", plugin.getDescription().getWebsite()), - pair("authors", StringUtils.join(plugin.getDescription().getAuthors(), ", ")) - )); - } - })); + plugin -> pair(plugin.getName(), createObject( + pair("version", plugin.getDescription().getVersion()), + pair("description", String.valueOf(plugin.getDescription().getDescription()).trim()), + pair("website", plugin.getDescription().getWebsite()), + pair("authors", StringUtils.join(plugin.getDescription().getAuthors(), ", ")) + )))); @@ -262,12 +232,7 @@ class TimingsExport extends Thread { if (!(val instanceof MemorySection)) { if (val instanceof List) { Iterable v = (Iterable) val; - return toArrayMapper(v, new Function() { - @Override - public Object apply(Object input) { - return valAsJSON(input, parentKey); - } - }); + return toArrayMapper(v, input -> valAsJSON(input, parentKey)); } else { return val.toString(); } @@ -294,12 +259,7 @@ class TimingsExport extends Thread { sender.sendMessage(ChatColor.GREEN + "Preparing Timings Report..."); - out.put("data", toArrayMapper(history, new Function() { - @Override - public Object apply(TimingHistory input) { - return input.export(); - } - })); + out.put("data", toArrayMapper(history, input -> input.export())); String response = null; @@ -314,7 +274,7 @@ class TimingsExport extends Thread { this.def.setLevel(7); }}; - request.write(JSONValue.toJSONString(out).getBytes("UTF-8")); + request.write(JSONValue.toJSONString(out).getBytes(StandardCharsets.UTF_8)); request.close(); response = getResponse(con); @@ -348,9 +308,7 @@ class TimingsExport extends Thread { } private String getResponse(HttpURLConnection con) throws IOException { - InputStream is = null; - try { - is = con.getInputStream(); + try (InputStream is = con.getInputStream()) { ByteArrayOutputStream bos = new ByteArrayOutputStream(); byte[] b = new byte[1024]; @@ -364,10 +322,6 @@ class TimingsExport extends Thread { sender.sendMessage(ChatColor.RED + "Error uploading timings, check your logs for more information"); Bukkit.getLogger().log(Level.WARNING, con.getResponseMessage(), ex); return null; - } finally { - if (is != null) { - is.close(); - } } } } diff --git a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsManager.java b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsManager.java index 67c39df..bb50180 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsManager.java +++ b/TacoSpigot-API/src/main/java/co/aikar/timings/TimingsManager.java @@ -43,25 +43,20 @@ import java.util.logging.Level; public final class TimingsManager { static final Map TIMING_MAP = Collections.synchronizedMap(LoadingMap.newHashMap( - new Function() { - @Override - public TimingHandler apply(TimingIdentifier id) { - return (id.protect ? - new UnsafeTimingHandler(id) : - new TimingHandler(id) - ); - } - }, + id -> (id.protect ? + new UnsafeTimingHandler(id) : + new TimingHandler(id) + ), 256, .5F )); public static final FullServerTickHandler FULL_SERVER_TICK = new FullServerTickHandler(); public static final TimingHandler TIMINGS_TICK = Timings.ofSafe("Timings Tick", FULL_SERVER_TICK); public static final Timing PLUGIN_GROUP_HANDLER = Timings.ofSafe("Plugins"); - public static List hiddenConfigs = new ArrayList(); + public static List hiddenConfigs = new ArrayList<>(); public static boolean privacy = false; - static final Collection HANDLERS = new ArrayDeque(); - static final ArrayDeque MINUTE_REPORTS = new ArrayDeque(); + static final Collection HANDLERS = new ArrayDeque<>(); + static final ArrayDeque MINUTE_REPORTS = new ArrayDeque<>(); static EvictingQueue HISTORY = EvictingQueue.create(12); static TimingHandler CURRENT; diff --git a/TacoSpigot-API/src/main/java/co/aikar/util/JSONUtil.java b/TacoSpigot-API/src/main/java/co/aikar/util/JSONUtil.java index 5fdf7c4..aa5af40 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/util/JSONUtil.java +++ b/TacoSpigot-API/src/main/java/co/aikar/util/JSONUtil.java @@ -3,10 +3,7 @@ package co.aikar.util; import com.google.common.base.Function; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import org.json.simple.JSONArray; -import org.json.simple.JSONObject; -import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; diff --git a/TacoSpigot-API/src/main/java/co/aikar/util/LoadingMap.java b/TacoSpigot-API/src/main/java/co/aikar/util/LoadingMap.java index a9f2919..7afab2d 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/util/LoadingMap.java +++ b/TacoSpigot-API/src/main/java/co/aikar/util/LoadingMap.java @@ -25,14 +25,10 @@ package co.aikar.util; import com.google.common.base.Function; -import org.bukkit.Material; -import co.aikar.timings.TimingHistory; -import org.w3c.dom.css.Counter; import java.lang.reflect.Constructor; import java.util.AbstractMap; import java.util.Collection; -import java.util.EnumMap; import java.util.HashMap; import java.util.IdentityHashMap; import java.util.Map; @@ -76,7 +72,7 @@ public class LoadingMap extends AbstractMap { * @return */ public static Map of(Map backingMap, Function loader) { - return new LoadingMap(backingMap, loader); + return new LoadingMap<>(backingMap, loader); } /** @@ -96,7 +92,7 @@ public class LoadingMap extends AbstractMap { */ public static Map newAutoMap(Map backingMap, final Class keyClass, final Class valueClass) { - return new LoadingMap(backingMap, new AutoInstantiatingLoader(keyClass, valueClass)); + return new LoadingMap<>(backingMap, new AutoInstantiatingLoader<>(keyClass, valueClass)); } /** * Creates a LoadingMap with an auto instantiating loader. @@ -128,7 +124,7 @@ public class LoadingMap extends AbstractMap { * @return */ public static Map newHashAutoMap(final Class keyClass, final Class valueClass) { - return newAutoMap(new HashMap(), keyClass, valueClass); + return newAutoMap(new HashMap<>(), keyClass, valueClass); } /** @@ -158,7 +154,7 @@ public class LoadingMap extends AbstractMap { * @return */ public static Map newHashAutoMap(final Class keyClass, final Class valueClass, int initialCapacity, float loadFactor) { - return newAutoMap(new HashMap(initialCapacity, loadFactor), keyClass, valueClass); + return newAutoMap(new HashMap<>(initialCapacity, loadFactor), keyClass, valueClass); } /** @@ -185,7 +181,7 @@ public class LoadingMap extends AbstractMap { * @return */ public static Map newHashMap(Function loader) { - return new LoadingMap(new HashMap(), loader); + return new LoadingMap<>(new HashMap<>(), loader); } /** @@ -198,7 +194,7 @@ public class LoadingMap extends AbstractMap { * @return */ public static Map newHashMap(Function loader, int initialCapacity, float loadFactor) { - return new LoadingMap(new HashMap(initialCapacity, loadFactor), loader); + return new LoadingMap<>(new HashMap<>(initialCapacity, loadFactor), loader); } /** @@ -209,7 +205,7 @@ public class LoadingMap extends AbstractMap { * @return */ public static Map newIdentityHashMap(Function loader) { - return new LoadingMap(new IdentityHashMap(), loader); + return new LoadingMap<>(new IdentityHashMap<>(), loader); } /** @@ -221,7 +217,7 @@ public class LoadingMap extends AbstractMap { * @return */ public static Map newIdentityHashMap(Function loader, int initialCapacity) { - return new LoadingMap(new IdentityHashMap(initialCapacity), loader); + return new LoadingMap<>(new IdentityHashMap<>(initialCapacity), loader); } @Override @@ -276,7 +272,7 @@ public class LoadingMap extends AbstractMap { } public LoadingMap clone() { - return new LoadingMap(backingMap, loader); + return new LoadingMap<>(backingMap, loader); } private static class AutoInstantiatingLoader implements Function { diff --git a/TacoSpigot-API/src/main/java/co/aikar/util/MRUMapCache.java b/TacoSpigot-API/src/main/java/co/aikar/util/MRUMapCache.java index 3a288d2..60eb5b3 100644 --- a/TacoSpigot-API/src/main/java/co/aikar/util/MRUMapCache.java +++ b/TacoSpigot-API/src/main/java/co/aikar/util/MRUMapCache.java @@ -95,6 +95,6 @@ public class MRUMapCache extends AbstractMap { * @return */ public static Map of(Map map) { - return new MRUMapCache(map); + return new MRUMapCache<>(map); } } diff --git a/TacoSpigot-API/src/main/java/net/techcable/tacospigot/event/entity/SpawnerPreSpawnEvent.java b/TacoSpigot-API/src/main/java/net/techcable/tacospigot/event/entity/SpawnerPreSpawnEvent.java index efed50a..0bf6313 100644 --- a/TacoSpigot-API/src/main/java/net/techcable/tacospigot/event/entity/SpawnerPreSpawnEvent.java +++ b/TacoSpigot-API/src/main/java/net/techcable/tacospigot/event/entity/SpawnerPreSpawnEvent.java @@ -1,7 +1,5 @@ package net.techcable.tacospigot.event.entity; -import com.google.common.base.Preconditions; - import org.bukkit.Location; import org.bukkit.entity.EntityType; import org.bukkit.event.Cancellable; diff --git a/TacoSpigot-API/src/main/java/org/bukkit/BanEntry.java b/TacoSpigot-API/src/main/java/org/bukkit/BanEntry.java index b2437c6..f2072e3 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/BanEntry.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/BanEntry.java @@ -47,14 +47,14 @@ public interface BanEntry { * * @return the target name or IP address */ - public String getTarget(); + String getTarget(); /** * Gets the date this ban entry was created. * * @return the creation date */ - public Date getCreated(); + Date getCreated(); /** * Sets the date this ban entry was created. @@ -62,7 +62,7 @@ public interface BanEntry { * @param created the new created date, cannot be null * @see #save() saving changes */ - public void setCreated(Date created); + void setCreated(Date created); /** * Gets the source of this ban. @@ -72,7 +72,7 @@ public interface BanEntry { * * @return the source of the ban */ - public String getSource(); + String getSource(); /** * Sets the source of this ban. @@ -83,14 +83,14 @@ public interface BanEntry { * @param source the new source where null values become empty strings * @see #save() saving changes */ - public void setSource(String source); + void setSource(String source); /** * Gets the date this ban expires on, or null for no defined end date. * * @return the expiration date */ - public Date getExpiration(); + Date getExpiration(); /** * Sets the date this ban expires on. Null values are considered @@ -100,14 +100,14 @@ public interface BanEntry { * eternity * @see #save() saving changes */ - public void setExpiration(Date expiration); + void setExpiration(Date expiration); /** * Gets the reason for this ban. * * @return the ban reason, or null if not set */ - public String getReason(); + String getReason(); /** * Sets the reason for this ban. Reasons must not be null. @@ -116,7 +116,7 @@ public interface BanEntry { * default * @see #save() saving changes */ - public void setReason(String reason); + void setReason(String reason); /** * Saves the ban entry, overwriting any previous data in the ban list. @@ -124,5 +124,5 @@ public interface BanEntry { * Saving the ban entry of an unbanned player will cause the player to be * banned once again. */ - public void save(); + void save(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/BanList.java b/TacoSpigot-API/src/main/java/org/bukkit/BanList.java index c21b858..1502a92 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/BanList.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/BanList.java @@ -11,7 +11,7 @@ public interface BanList { /** * Represents a ban-type that a {@link BanList} may track. */ - public enum Type { + enum Type { /** * Banned player names */ @@ -20,7 +20,6 @@ public interface BanList { * Banned player IP addresses */ IP, - ; } /** @@ -29,7 +28,7 @@ public interface BanList { * @param target entry parameter to search for * @return the corresponding entry, or null if none found */ - public BanEntry getBanEntry(String target); + BanEntry getBanEntry(String target); /** * Adds a ban to the this list. If a previous ban exists, this will @@ -43,14 +42,14 @@ public interface BanList { * @return the entry for the newly created ban, or the entry for the * (updated) previous ban */ - public BanEntry addBan(String target, String reason, Date expires, String source); + BanEntry addBan(String target, String reason, Date expires, String source); /** * Gets a set containing every {@link BanEntry} in this list. * * @return an immutable set containing every entry tracked by this list */ - public Set getBanEntries(); + Set getBanEntries(); /** * Gets if a {@link BanEntry} exists for the target, indicating an active @@ -60,7 +59,7 @@ public interface BanList { * @return true if a {@link BanEntry} exists for the name, indicating an * active ban status, false otherwise */ - public boolean isBanned(String target); + boolean isBanned(String target); /** * Removes the specified target from this list, therefore indicating a @@ -68,5 +67,5 @@ public interface BanList { * * @param target the target to remove from this list */ - public void pardon(String target); + void pardon(String target); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/BlockChangeDelegate.java b/TacoSpigot-API/src/main/java/org/bukkit/BlockChangeDelegate.java index e6b9f0e..bf230b3 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/BlockChangeDelegate.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/BlockChangeDelegate.java @@ -22,7 +22,7 @@ public interface BlockChangeDelegate { * @deprecated Magic value */ @Deprecated - public boolean setRawTypeId(int x, int y, int z, int typeId); + boolean setRawTypeId(int x, int y, int z, int typeId); /** * Set a block type and data at the specified coordinates without doing @@ -40,7 +40,7 @@ public interface BlockChangeDelegate { * @deprecated Magic value */ @Deprecated - public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data); + boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data); /** * Set a block type at the specified coordinates. @@ -55,7 +55,7 @@ public interface BlockChangeDelegate { * @deprecated Magic value */ @Deprecated - public boolean setTypeId(int x, int y, int z, int typeId); + boolean setTypeId(int x, int y, int z, int typeId); /** * Set a block type and data at the specified coordinates. @@ -71,7 +71,7 @@ public interface BlockChangeDelegate { * @deprecated Magic value */ @Deprecated - public boolean setTypeIdAndData(int x, int y, int z, int typeId, int data); + boolean setTypeIdAndData(int x, int y, int z, int typeId, int data); /** * Get the block type at the location. @@ -83,14 +83,14 @@ public interface BlockChangeDelegate { * @deprecated Magic value */ @Deprecated - public int getTypeId(int x, int y, int z); + int getTypeId(int x, int y, int z); /** * Gets the height of the world. * * @return Height of the world */ - public int getHeight(); + int getHeight(); /** * Checks if the specified block is empty (air) or not. @@ -100,5 +100,5 @@ public interface BlockChangeDelegate { * @param z Z coordinate * @return True if the block is considered empty. */ - public boolean isEmpty(int x, int y, int z); + boolean isEmpty(int x, int y, int z); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/ChatColor.java b/TacoSpigot-API/src/main/java/org/bukkit/ChatColor.java index adbae51..a52ae9b 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/ChatColor.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/ChatColor.java @@ -215,7 +215,7 @@ public enum ChatColor{ * you need to dynamically convert colour codes from your custom format. */ public static final char COLOR_CHAR = '\u00A7'; - private static final Pattern STRIP_COLOR_PATTERN = Pattern.compile("(?i)" + String.valueOf(COLOR_CHAR) + "[0-9A-FK-OR]"); + private static final Pattern STRIP_COLOR_PATTERN = Pattern.compile("(?i)" + COLOR_CHAR + "[0-9A-FK-OR]"); private final int intCode; private final char code; @@ -237,7 +237,7 @@ public enum ChatColor{ public net.md_5.bungee.api.ChatColor asBungee() { return net.md_5.bungee.api.ChatColor.RESET; - }; + } /** * Gets the char value associated with this color @@ -349,7 +349,7 @@ public enum ChatColor{ ChatColor color = getByChar(c); if (color != null) { - result = color.toString() + result; + result = color + result; // Once we find a color or reset we can stop searching if (color.isColor() || color.equals(RESET)) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/Color.java b/TacoSpigot-API/src/main/java/org/bukkit/Color.java index 83927dd..11597a1 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/Color.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/Color.java @@ -143,7 +143,7 @@ public final class Color implements ConfigurationSerializable { */ public static Color fromRGB(int rgb) throws IllegalArgumentException { Validate.isTrue((rgb >> 24) == 0, "Extrenuous data in: ", rgb); - return fromRGB(rgb >> 16 & BIT_MASK, rgb >> 8 & BIT_MASK, rgb >> 0 & BIT_MASK); + return fromRGB(rgb >> 16 & BIT_MASK, rgb >> 8 & BIT_MASK, rgb & BIT_MASK); } /** @@ -157,7 +157,7 @@ public final class Color implements ConfigurationSerializable { */ public static Color fromBGR(int bgr) throws IllegalArgumentException { Validate.isTrue((bgr >> 24) == 0, "Extrenuous data in: ", bgr); - return fromBGR(bgr >> 16 & BIT_MASK, bgr >> 8 & BIT_MASK, bgr >> 0 & BIT_MASK); + return fromBGR(bgr >> 16 & BIT_MASK, bgr >> 8 & BIT_MASK, bgr & BIT_MASK); } private Color(int red, int green, int blue) { @@ -232,7 +232,7 @@ public final class Color implements ConfigurationSerializable { * @return An integer representation of this color, as 0xRRGGBB */ public int asRGB() { - return getRed() << 16 | getGreen() << 8 | getBlue() << 0; + return getRed() << 16 | getGreen() << 8 | getBlue(); } /** @@ -240,7 +240,7 @@ public final class Color implements ConfigurationSerializable { * @return An integer representation of this color, as 0xBBGGRR */ public int asBGR() { - return getBlue() << 16 | getGreen() << 8 | getRed() << 0; + return getBlue() << 16 | getGreen() << 8 | getRed(); } /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/FireworkEffect.java b/TacoSpigot-API/src/main/java/org/bukkit/FireworkEffect.java index 4b0687f..781e2af 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/FireworkEffect.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/FireworkEffect.java @@ -40,7 +40,6 @@ public final class FireworkEffect implements ConfigurationSerializable { * A creeper-face effect. */ CREEPER, - ; } /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/Location.java b/TacoSpigot-API/src/main/java/org/bukkit/Location.java index e7af316..458d7ce 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/Location.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/Location.java @@ -2,11 +2,11 @@ package org.bukkit; import java.util.HashMap; import java.util.Map; +import java.util.Objects; import org.bukkit.block.Block; import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.util.NumberConversions; -import static org.bukkit.util.NumberConversions.checkFinite; import org.bukkit.util.Vector; /** @@ -497,7 +497,7 @@ public class Location implements Cloneable, ConfigurationSerializable { } final Location other = (Location) obj; - if (this.world != other.world && (this.world == null || !this.world.equals(other.world))) { + if (!Objects.equals(this.world, other.world)) { return false; } if (Double.doubleToLongBits(this.x) != Double.doubleToLongBits(other.x)) { @@ -568,7 +568,7 @@ public class Location implements Cloneable, ConfigurationSerializable { @Utility public Map serialize() { - Map data = new HashMap(); + Map data = new HashMap<>(); data.put("world", this.world.getName()); data.put("x", this.x); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/Material.java b/TacoSpigot-API/src/main/java/org/bukkit/Material.java index 0fb2605..80529dc 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/Material.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/Material.java @@ -491,9 +491,7 @@ public enum Material { // try to cache the constructor for this material try { this.ctor = data.getConstructor(int.class, byte.class); - } catch (NoSuchMethodException ex) { - throw new AssertionError(ex); - } catch (SecurityException ex) { + } catch (NoSuchMethodException | SecurityException ex) { throw new AssertionError(ex); } } @@ -659,7 +657,7 @@ public enum Material { try { result = getMaterial(Integer.parseInt(name)); - } catch (NumberFormatException ex) {} + } catch (NumberFormatException ignored) {} if (result == null) { String filtered = name.toUpperCase(); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/NetherWartsState.java b/TacoSpigot-API/src/main/java/org/bukkit/NetherWartsState.java index f43209c..5362cf3 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/NetherWartsState.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/NetherWartsState.java @@ -17,5 +17,5 @@ public enum NetherWartsState { /** * Ready to harvest */ - RIPE; + RIPE } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/OfflinePlayer.java b/TacoSpigot-API/src/main/java/org/bukkit/OfflinePlayer.java index e98706a..68a78e7 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/OfflinePlayer.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/OfflinePlayer.java @@ -15,7 +15,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio * * @return true if they are online */ - public boolean isOnline(); + boolean isOnline(); /** * Returns the name of this player @@ -25,21 +25,21 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio * * @return Player name or null if we have not seen a name for this player yet */ - public String getName(); + String getName(); /** * Returns the UUID of this player * * @return Player UUID */ - public UUID getUniqueId(); + UUID getUniqueId(); /** * Checks if this player is banned or not * * @return true if banned, otherwise false */ - public boolean isBanned(); + boolean isBanned(); /** * Bans or unbans this player @@ -50,21 +50,21 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio * functionality */ @Deprecated - public void setBanned(boolean banned); + void setBanned(boolean banned); /** * Checks if this player is whitelisted or not * * @return true if whitelisted */ - public boolean isWhitelisted(); + boolean isWhitelisted(); /** * Sets if this player is whitelisted or not * * @param value true if whitelisted */ - public void setWhitelisted(boolean value); + void setWhitelisted(boolean value); /** * Gets a {@link Player} object that this represents, if there is one @@ -74,7 +74,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio * * @return Online player */ - public Player getPlayer(); + Player getPlayer(); /** * Gets the first date and time that this player was witnessed on this @@ -86,7 +86,7 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio * * @return Date of first log-in for this player, or 0 */ - public long getFirstPlayed(); + long getFirstPlayed(); /** * Gets the last date and time that this player was witnessed on this @@ -98,14 +98,14 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio * * @return Date of last log-in for this player, or 0 */ - public long getLastPlayed(); + long getLastPlayed(); /** * Checks if this player has played on this server before. * * @return True if the player has played before, otherwise false */ - public boolean hasPlayedBefore(); + boolean hasPlayedBefore(); /** * Gets the Location where the player will spawn at their bed, null if @@ -113,6 +113,6 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio * * @return Bed Spawn Location if bed exists, otherwise null. */ - public Location getBedSpawnLocation(); + Location getBedSpawnLocation(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/PortalType.java b/TacoSpigot-API/src/main/java/org/bukkit/PortalType.java index 427cfbb..7e4627d 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/PortalType.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/PortalType.java @@ -18,5 +18,5 @@ public enum PortalType { /** * This is a custom Plugin portal. */ - CUSTOM; + CUSTOM } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/Server.java b/TacoSpigot-API/src/main/java/org/bukkit/Server.java index 29b3d88..4ecf2a5 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/Server.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/Server.java @@ -55,7 +55,7 @@ public interface Server extends PluginMessageRecipient { *

* For use in {@link #broadcast(java.lang.String, java.lang.String)}. */ - public static final String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin"; + String BROADCAST_CHANNEL_ADMINISTRATIVE = "bukkit.broadcast.admin"; /** * Used for all announcement messages, such as informing users that a @@ -63,28 +63,28 @@ public interface Server extends PluginMessageRecipient { *

* For use in {@link #broadcast(java.lang.String, java.lang.String)}. */ - public static final String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user"; + String BROADCAST_CHANNEL_USERS = "bukkit.broadcast.user"; /** * Gets the name of this server implementation. * * @return name of this server implementation */ - public String getName(); + String getName(); /** * Gets the version string of this server implementation. * * @return version of this server implementation */ - public String getVersion(); + String getVersion(); /** * Gets the Bukkit version that this server is running. * * @return version of Bukkit */ - public String getBukkitVersion(); + String getBukkitVersion(); /** * Gets an array copy of all currently logged in players. @@ -97,7 +97,7 @@ public interface Server extends PluginMessageRecipient { * @return an array of Players that are currently online */ @Deprecated - public Player[] _INVALID_getOnlinePlayers(); + Player[] _INVALID_getOnlinePlayers(); /** * Gets a view of all currently logged in players. This {@linkplain @@ -126,28 +126,28 @@ public interface Server extends PluginMessageRecipient { * * @return a view of currently online players. */ - public Collection getOnlinePlayers(); + Collection getOnlinePlayers(); /** * Get the maximum amount of players which can login to this server. * * @return the amount of players this server allows */ - public int getMaxPlayers(); + int getMaxPlayers(); /** * Get the game port that the server runs on. * * @return the port number of this server */ - public int getPort(); + int getPort(); /** * Get the view distance from this server. * * @return the view distance from this server. */ - public int getViewDistance(); + int getViewDistance(); /** * Get the IP that this server is bound to, or empty string if not @@ -156,14 +156,14 @@ public interface Server extends PluginMessageRecipient { * @return the IP string that this server is bound to, otherwise empty * string */ - public String getIp(); + String getIp(); /** * Get the name of this server. * * @return the name of this server */ - public String getServerName(); + String getServerName(); /** * Get an ID of this server. The ID is a simple generally alphanumeric ID @@ -171,61 +171,61 @@ public interface Server extends PluginMessageRecipient { * * @return the ID of this server */ - public String getServerId(); + String getServerId(); /** * Get world type (level-type setting) for default world. * * @return the value of level-type (e.g. DEFAULT, FLAT, DEFAULT_1_1) */ - public String getWorldType(); + String getWorldType(); /** * Get generate-structures setting. * * @return true if structure generation is enabled, false otherwise */ - public boolean getGenerateStructures(); + boolean getGenerateStructures(); /** * Gets whether this server allows the End or not. * * @return whether this server allows the End or not */ - public boolean getAllowEnd(); + boolean getAllowEnd(); /** * Gets whether this server allows the Nether or not. * * @return whether this server allows the Nether or not */ - public boolean getAllowNether(); + boolean getAllowNether(); /** * Gets whether this server has a whitelist or not. * * @return whether this server has a whitelist or not */ - public boolean hasWhitelist(); + boolean hasWhitelist(); /** * Sets if the server is whitelisted. * * @param value true for whitelist on, false for off */ - public void setWhitelist(boolean value); + void setWhitelist(boolean value); /** * Gets a list of whitelisted players. * * @return a set containing all whitelisted players */ - public Set getWhitelistedPlayers(); + Set getWhitelistedPlayers(); /** * Reloads the whitelist from disk. */ - public void reloadWhitelist(); + void reloadWhitelist(); /** * Broadcast a message to all players. @@ -236,7 +236,7 @@ public interface Server extends PluginMessageRecipient { * @param message the message * @return the number of players */ - public int broadcastMessage(String message); + int broadcastMessage(String message); // Paper start /** @@ -244,14 +244,14 @@ public interface Server extends PluginMessageRecipient { * * @param component the components to send */ - public void broadcast(net.md_5.bungee.api.chat.BaseComponent component); + void broadcast(net.md_5.bungee.api.chat.BaseComponent component); /** * Sends an array of components as a single message to the player * * @param components the components to send */ - public void broadcast(net.md_5.bungee.api.chat.BaseComponent... components); + void broadcast(net.md_5.bungee.api.chat.BaseComponent... components); // Paper end /** @@ -262,7 +262,7 @@ public interface Server extends PluginMessageRecipient { * * @return the name of the update folder */ - public String getUpdateFolder(); + String getUpdateFolder(); /** * Gets the update folder. The update folder is used to safely update @@ -270,14 +270,14 @@ public interface Server extends PluginMessageRecipient { * * @return the update folder */ - public File getUpdateFolderFile(); + File getUpdateFolderFile(); /** * Gets the value of the connection throttle setting. * * @return the value of the connection throttle setting */ - public long getConnectionThrottle(); + long getConnectionThrottle(); /** * Gets default ticks per animal spawns value. @@ -298,7 +298,7 @@ public interface Server extends PluginMessageRecipient { * * @return the default ticks per animal spawns value */ - public int getTicksPerAnimalSpawns(); + int getTicksPerAnimalSpawns(); /** * Gets the default ticks per monster spawns value. @@ -319,7 +319,7 @@ public interface Server extends PluginMessageRecipient { * * @return the default ticks per monsters spawn value */ - public int getTicksPerMonsterSpawns(); + int getTicksPerMonsterSpawns(); /** * Gets a player object by the given username. @@ -329,7 +329,7 @@ public interface Server extends PluginMessageRecipient { * @param name the name to look up * @return a player if one was found, null otherwise */ - public Player getPlayer(String name); + Player getPlayer(String name); /** * Gets the player with the exact given name, case insensitive. @@ -337,7 +337,7 @@ public interface Server extends PluginMessageRecipient { * @param name Exact name of the player to retrieve * @return a player object if one was found, null otherwise */ - public Player getPlayerExact(String name); + Player getPlayerExact(String name); /** * Attempts to match any players with the given name, and returns a list @@ -349,7 +349,7 @@ public interface Server extends PluginMessageRecipient { * @param name the (partial) name to match * @return list of all possible players */ - public List matchPlayer(String name); + List matchPlayer(String name); /** * Gets the player with the given UUID. @@ -357,35 +357,35 @@ public interface Server extends PluginMessageRecipient { * @param id UUID of the player to retrieve * @return a player object if one was found, null otherwise */ - public Player getPlayer(UUID id); + Player getPlayer(UUID id); /** * Gets the plugin manager for interfacing with plugins. * * @return a plugin manager for this Server instance */ - public PluginManager getPluginManager(); + PluginManager getPluginManager(); /** * Gets the scheduler for managing scheduled events. * * @return a scheduling service for this server */ - public BukkitScheduler getScheduler(); + BukkitScheduler getScheduler(); /** * Gets a services manager. * * @return s services manager */ - public ServicesManager getServicesManager(); + ServicesManager getServicesManager(); /** * Gets a list of all worlds on this server. * * @return a list of worlds */ - public List getWorlds(); + List getWorlds(); /** * Creates or loads a world with the given name using the specified @@ -397,7 +397,7 @@ public interface Server extends PluginMessageRecipient { * @param creator the options to use when creating the world * @return newly created or loaded world */ - public World createWorld(WorldCreator creator); + World createWorld(WorldCreator creator); /** * Unloads a world with the given name. @@ -406,7 +406,7 @@ public interface Server extends PluginMessageRecipient { * @param save whether to save the chunks before unloading * @return true if successful, false otherwise */ - public boolean unloadWorld(String name, boolean save); + boolean unloadWorld(String name, boolean save); /** * Unloads the given world. @@ -415,7 +415,7 @@ public interface Server extends PluginMessageRecipient { * @param save whether to save the chunks before unloading * @return true if successful, false otherwise */ - public boolean unloadWorld(World world, boolean save); + boolean unloadWorld(World world, boolean save); /** * Gets the world with the given name. @@ -423,7 +423,7 @@ public interface Server extends PluginMessageRecipient { * @param name the name of the world to retrieve * @return a world with the given name, or null if none exists */ - public World getWorld(String name); + World getWorld(String name); /** * Gets the world from the given Unique ID. @@ -431,7 +431,7 @@ public interface Server extends PluginMessageRecipient { * @param uid a unique-id of the world to retrieve * @return a world with the given Unique ID, or null if none exists */ - public World getWorld(UUID uid); + World getWorld(UUID uid); /** * Gets the map from the given item ID. @@ -441,7 +441,7 @@ public interface Server extends PluginMessageRecipient { * @deprecated Magic value */ @Deprecated - public MapView getMap(short id); + MapView getMap(short id); /** * Create a new map with an automatically assigned ID. @@ -449,19 +449,19 @@ public interface Server extends PluginMessageRecipient { * @param world the world the map will belong to * @return a newly created map view */ - public MapView createMap(World world); + MapView createMap(World world); /** * Reloads the server, refreshing settings and plugin information. */ - public void reload(); + void reload(); /** * Returns the primary logger associated with this server instance. * * @return Logger associated with this server */ - public Logger getLogger(); + Logger getLogger(); /** * Gets a {@link PluginCommand} with the given name or alias. @@ -469,12 +469,12 @@ public interface Server extends PluginMessageRecipient { * @param name the name of the command to retrieve * @return a plugin command if found, null otherwise */ - public PluginCommand getPluginCommand(String name); + PluginCommand getPluginCommand(String name); /** * Writes loaded players to disk. */ - public void savePlayers(); + void savePlayers(); /** * Dispatches a command on this server, and executes it if found. @@ -486,7 +486,7 @@ public interface Server extends PluginMessageRecipient { * @throws CommandException thrown when the executor for the given command * fails with an unhandled exception */ - public boolean dispatchCommand(CommandSender sender, String commandLine) throws CommandException; + boolean dispatchCommand(CommandSender sender, String commandLine) throws CommandException; /** * Populates a given {@link ServerConfig} with values attributes to this @@ -494,7 +494,7 @@ public interface Server extends PluginMessageRecipient { * * @param config the server config to populate */ - public void configureDbConfig(ServerConfig config); + void configureDbConfig(ServerConfig config); /** * Adds a recipe to the crafting manager. @@ -503,7 +503,7 @@ public interface Server extends PluginMessageRecipient { * @return true if the recipe was added, false if it wasn't for some * reason */ - public boolean addRecipe(Recipe recipe); + boolean addRecipe(Recipe recipe); /** * Get a list of all recipes for a given item. The stack size is ignored @@ -512,66 +512,66 @@ public interface Server extends PluginMessageRecipient { * @param result the item to match against recipe results * @return a list of recipes with the given result */ - public List getRecipesFor(ItemStack result); + List getRecipesFor(ItemStack result); /** * Get an iterator through the list of crafting recipes. * * @return an iterator */ - public Iterator recipeIterator(); + Iterator recipeIterator(); /** * Clears the list of crafting recipes. */ - public void clearRecipes(); + void clearRecipes(); /** * Resets the list of crafting recipes to the default. */ - public void resetRecipes(); + void resetRecipes(); /** * Gets a list of command aliases defined in the server properties. * * @return a map of aliases to command names */ - public Map getCommandAliases(); + Map getCommandAliases(); /** * Gets the radius, in blocks, around each worlds spawn point to protect. * * @return spawn radius, or 0 if none */ - public int getSpawnRadius(); + int getSpawnRadius(); /** * Sets the radius, in blocks, around each worlds spawn point to protect. * * @param value new spawn radius, or 0 if none */ - public void setSpawnRadius(int value); + void setSpawnRadius(int value); /** * Gets whether the Server is in online mode or not. * * @return true if the server authenticates clients, false otherwise */ - public boolean getOnlineMode(); + boolean getOnlineMode(); /** * Gets whether this server allows flying or not. * * @return true if the server allows flight, false otherwise */ - public boolean getAllowFlight(); + boolean getAllowFlight(); /** * Gets whether the server is in hardcore mode or not. * * @return true if the server mode is hardcore, false otherwise */ - public boolean isHardcore(); + boolean isHardcore(); /** * Gets whether to use vanilla (false) or exact behaviour (true). @@ -588,12 +588,12 @@ public interface Server extends PluginMessageRecipient { * @deprecated non standard and unused feature. */ @Deprecated - public boolean useExactLoginLocation(); + boolean useExactLoginLocation(); /** * Shutdowns the server, stopping everything. */ - public void shutdown(); + void shutdown(); /** * Broadcasts the specified message to every user with the given @@ -604,7 +604,7 @@ public interface Server extends PluginMessageRecipient { * permissibles} must have to receive the broadcast * @return number of message recipients */ - public int broadcast(String message, String permission); + int broadcast(String message, String permission); /** * Gets the player by the given name, regardless if they are offline or @@ -623,7 +623,7 @@ public interface Server extends PluginMessageRecipient { * @see #getOfflinePlayer(java.util.UUID) */ @Deprecated - public OfflinePlayer getOfflinePlayer(String name); + OfflinePlayer getOfflinePlayer(String name); /** * Gets the player by the given UUID, regardless if they are offline or @@ -635,35 +635,35 @@ public interface Server extends PluginMessageRecipient { * @param id the UUID of the player to retrieve * @return an offline player */ - public OfflinePlayer getOfflinePlayer(UUID id); + OfflinePlayer getOfflinePlayer(UUID id); /** * Gets a set containing all current IPs that are banned. * * @return a set containing banned IP addresses */ - public Set getIPBans(); + Set getIPBans(); /** * Bans the specified address from the server. * * @param address the IP address to ban */ - public void banIP(String address); + void banIP(String address); /** * Unbans the specified address from the server. * * @param address the IP address to unban */ - public void unbanIP(String address); + void unbanIP(String address); /** * Gets a set containing all banned players. * * @return a set containing banned players */ - public Set getBannedPlayers(); + Set getBannedPlayers(); /** * Gets a ban list for the supplied type. @@ -674,28 +674,28 @@ public interface Server extends PluginMessageRecipient { * @param type the type of list to fetch, cannot be null * @return a ban list of the specified type */ - public BanList getBanList(BanList.Type type); + BanList getBanList(BanList.Type type); /** * Gets a set containing all player operators. * * @return a set containing player operators */ - public Set getOperators(); + Set getOperators(); /** * Gets the default {@link GameMode} for new players. * * @return the default game mode */ - public GameMode getDefaultGameMode(); + GameMode getDefaultGameMode(); /** * Sets the default {@link GameMode} for new players. * * @param mode the new game mode */ - public void setDefaultGameMode(GameMode mode); + void setDefaultGameMode(GameMode mode); /** * Gets a {@link ConsoleCommandSender} that may be used as an input source @@ -703,35 +703,35 @@ public interface Server extends PluginMessageRecipient { * * @return a console command sender */ - public ConsoleCommandSender getConsoleSender(); + ConsoleCommandSender getConsoleSender(); /** * Gets the folder that contains all of the various {@link World}s. * * @return folder that contains all worlds */ - public File getWorldContainer(); + File getWorldContainer(); /** * Gets every player that has ever played on this server. * * @return an array containing all previous players */ - public OfflinePlayer[] getOfflinePlayers(); + OfflinePlayer[] getOfflinePlayers(); /** * Gets the {@link Messenger} responsible for this server. * * @return messenger responsible for this server */ - public Messenger getMessenger(); + Messenger getMessenger(); /** * Gets the {@link HelpMap} providing help topics for this server. * * @return a help map for this server */ - public HelpMap getHelpMap(); + HelpMap getHelpMap(); /** * Creates an empty inventory of the specified type. If the type is {@link @@ -847,7 +847,7 @@ public interface Server extends PluginMessageRecipient { * * @return the configured warning state */ - public WarningState getWarningState(); + WarningState getWarningState(); /** * Gets the instance of the item factory (for {@link ItemMeta}). @@ -914,14 +914,14 @@ public interface Server extends PluginMessageRecipient { * * @param threshold the idle timeout in minutes */ - public void setIdleTimeout(int threshold); + void setIdleTimeout(int threshold); /** * Gets the idle kick timeout. * * @return the idle timeout in minutes */ - public int getIdleTimeout(); + int getIdleTimeout(); /** * Create a ChunkData for use in a generator. @@ -932,7 +932,7 @@ public interface Server extends PluginMessageRecipient { * @return a new ChunkData for the world * */ - public ChunkGenerator.ChunkData createChunkData(World world); + ChunkGenerator.ChunkData createChunkData(World world); /** * @see UnsafeValues @@ -950,7 +950,7 @@ public interface Server extends PluginMessageRecipient { CommandMap getCommandMap(); // Paper end - public class Spigot + class Spigot { @Deprecated public org.bukkit.configuration.file.YamlConfiguration getConfig() diff --git a/TacoSpigot-API/src/main/java/org/bukkit/SkullType.java b/TacoSpigot-API/src/main/java/org/bukkit/SkullType.java index abd07c2..5854ad4 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/SkullType.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/SkullType.java @@ -8,5 +8,5 @@ public enum SkullType { WITHER, ZOMBIE, PLAYER, - CREEPER; + CREEPER } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/Statistic.java b/TacoSpigot-API/src/main/java/org/bukkit/Statistic.java index 3764f1f..227da5e 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/Statistic.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/Statistic.java @@ -128,6 +128,6 @@ public enum Statistic { /** * Statistics of this type require an EntityType qualifier. */ - ENTITY; + ENTITY } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/TravelAgent.java b/TacoSpigot-API/src/main/java/org/bukkit/TravelAgent.java index 2dfeffa..facd829 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/TravelAgent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/TravelAgent.java @@ -17,14 +17,14 @@ public interface TravelAgent { * location * @return this travel agent */ - public TravelAgent setSearchRadius(int radius); + TravelAgent setSearchRadius(int radius); /** * Gets the search radius value for finding an available portal. * * @return the currently set search radius */ - public int getSearchRadius(); + int getSearchRadius(); /** * Sets the maximum radius from the given location to create a portal. @@ -32,14 +32,14 @@ public interface TravelAgent { * @param radius the radius in which to create a portal from the location * @return this travel agent */ - public TravelAgent setCreationRadius(int radius); + TravelAgent setCreationRadius(int radius); /** * Gets the maximum radius from the given location to create a portal. * * @return the currently set creation radius */ - public int getCreationRadius(); + int getCreationRadius(); /** * Returns whether the TravelAgent will attempt to create a destination @@ -48,7 +48,7 @@ public interface TravelAgent { * @return whether the TravelAgent should create a destination portal or * not */ - public boolean getCanCreatePortal(); + boolean getCanCreatePortal(); /** * Sets whether the TravelAgent should attempt to create a destination @@ -57,7 +57,7 @@ public interface TravelAgent { * @param create Sets whether the TravelAgent should create a destination * portal or not */ - public void setCanCreatePortal(boolean create); + void setCanCreatePortal(boolean create); /** * Attempt to find a portal near the given location, if a portal is not @@ -68,7 +68,7 @@ public interface TravelAgent { * location passed to the method if unsuccessful * @see #createPortal(Location) */ - public Location findOrCreate(Location location); + Location findOrCreate(Location location); /** * Attempt to find a portal near the given location. @@ -76,7 +76,7 @@ public interface TravelAgent { * @param location the desired location of the portal * @return the location of the nearest portal to the location */ - public Location findPortal(Location location); + Location findPortal(Location location); /** * Attempt to create a portal near the given location. @@ -90,5 +90,5 @@ public interface TravelAgent { * @param location the desired location of the portal * @return true if a portal was successfully created */ - public boolean createPortal(Location location); + boolean createPortal(Location location); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/Warning.java b/TacoSpigot-API/src/main/java/org/bukkit/Warning.java index 6a2a3b0..dffde9e 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/Warning.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/Warning.java @@ -21,7 +21,7 @@ public @interface Warning { /** * This represents the states that server verbose for warnings may be. */ - public enum WarningState { + enum WarningState { /** * Indicates all warnings should be printed for deprecated items. diff --git a/TacoSpigot-API/src/main/java/org/bukkit/WeatherType.java b/TacoSpigot-API/src/main/java/org/bukkit/WeatherType.java index 36b993f..3c96c67 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/WeatherType.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/WeatherType.java @@ -13,5 +13,4 @@ public enum WeatherType { * Clear weather, clouds but no rain. */ CLEAR, - ; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/World.java b/TacoSpigot-API/src/main/java/org/bukkit/World.java index a12daa1..ef5f8b4 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/World.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/World.java @@ -32,7 +32,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @see #getBlockTypeIdAt(int, int, int) Returns the current type ID of * the block */ - public Block getBlockAt(int x, int y, int z); + Block getBlockAt(int x, int y, int z); /** * Gets the {@link Block} at the given {@link Location} @@ -42,7 +42,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @see #getBlockTypeIdAt(org.bukkit.Location) Returns the current type ID * of the block */ - public Block getBlockAt(Location location); + Block getBlockAt(Location location); /** * Gets the block type ID at the given coordinates @@ -56,7 +56,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @deprecated Magic value */ @Deprecated - public int getBlockTypeIdAt(int x, int y, int z); + int getBlockTypeIdAt(int x, int y, int z); /** * Gets the block type ID at the given {@link Location} @@ -68,7 +68,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @deprecated Magic value */ @Deprecated - public int getBlockTypeIdAt(Location location); + int getBlockTypeIdAt(Location location); /** * Gets the highest non-air coordinate at the given coordinates @@ -77,7 +77,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z-coordinate of the blocks * @return Y-coordinate of the highest non-air block */ - public int getHighestBlockYAt(int x, int z); + int getHighestBlockYAt(int x, int z); /** * Gets the highest non-air coordinate at the given {@link Location} @@ -85,7 +85,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param location Location of the blocks * @return Y-coordinate of the highest non-air block */ - public int getHighestBlockYAt(Location location); + int getHighestBlockYAt(Location location); /** * Gets the highest non-empty block at the given coordinates @@ -94,7 +94,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z-coordinate of the block * @return Highest non-empty block */ - public Block getHighestBlockAt(int x, int z); + Block getHighestBlockAt(int x, int z); /** * Gets the highest non-empty block at the given coordinates @@ -102,7 +102,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param location Coordinates to get the highest block * @return Highest non-empty block */ - public Block getHighestBlockAt(Location location); + Block getHighestBlockAt(Location location); /** * Gets the {@link Chunk} at the given coordinates @@ -111,7 +111,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z-coordinate of the chunk * @return Chunk at the given coordinates */ - public Chunk getChunkAt(int x, int z); + Chunk getChunkAt(int x, int z); /** * Gets the {@link Chunk} at the given {@link Location} @@ -119,7 +119,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param location Location of the chunk * @return Chunk at the given location */ - public Chunk getChunkAt(Location location); + Chunk getChunkAt(Location location); /** * Gets the {@link Chunk} that contains the given {@link Block} @@ -127,15 +127,15 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param block Block to get the containing chunk from * @return The chunk that contains the given block */ - public Chunk getChunkAt(Block block); + Chunk getChunkAt(Block block); // PaperSpigot start - Async chunk load API - public static interface ChunkLoadCallback { - public void onLoad(Chunk chunk); + interface ChunkLoadCallback { + void onLoad(Chunk chunk); } - public void getChunkAtAsync(int x, int z, ChunkLoadCallback cb); - public void getChunkAtAsync(Location location, ChunkLoadCallback cb); - public void getChunkAtAsync(Block block, ChunkLoadCallback cb); + void getChunkAtAsync(int x, int z, ChunkLoadCallback cb); + void getChunkAtAsync(Location location, ChunkLoadCallback cb); + void getChunkAtAsync(Block block, ChunkLoadCallback cb); // PaperSpigot end /** @@ -144,21 +144,21 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param chunk The chunk to check * @return true if the chunk is loaded, otherwise false */ - public boolean isChunkLoaded(Chunk chunk); + boolean isChunkLoaded(Chunk chunk); /** * Gets an array of all loaded {@link Chunk}s * * @return Chunk[] containing all loaded chunks */ - public Chunk[] getLoadedChunks(); + Chunk[] getLoadedChunks(); /** * Loads the specified {@link Chunk} * * @param chunk The chunk to load */ - public void loadChunk(Chunk chunk); + void loadChunk(Chunk chunk); /** * Checks if the {@link Chunk} at the specified coordinates is loaded @@ -167,7 +167,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z-coordinate of the chunk * @return true if the chunk is loaded, otherwise false */ - public boolean isChunkLoaded(int x, int z); + boolean isChunkLoaded(int x, int z); /** * Checks if the {@link Chunk} at the specified coordinates is loaded and @@ -178,7 +178,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @return true if the chunk is loaded and in use by one or more players, * otherwise false */ - public boolean isChunkInUse(int x, int z); + boolean isChunkInUse(int x, int z); /** * Loads the {@link Chunk} at the specified coordinates @@ -191,7 +191,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param x X-coordinate of the chunk * @param z Z-coordinate of the chunk */ - public void loadChunk(int x, int z); + void loadChunk(int x, int z); /** * Loads the {@link Chunk} at the specified coordinates @@ -202,7 +202,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * already exist * @return true if the chunk has loaded successfully, otherwise false */ - public boolean loadChunk(int x, int z, boolean generate); + boolean loadChunk(int x, int z, boolean generate); /** * Safely unloads and saves the {@link Chunk} at the specified coordinates @@ -213,7 +213,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param chunk the chunk to unload * @return true if the chunk has unloaded successfully, otherwise false */ - public boolean unloadChunk(Chunk chunk); + boolean unloadChunk(Chunk chunk); /** * Safely unloads and saves the {@link Chunk} at the specified coordinates @@ -225,7 +225,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z-coordinate of the chunk * @return true if the chunk has unloaded successfully, otherwise false */ - public boolean unloadChunk(int x, int z); + boolean unloadChunk(int x, int z); /** * Safely unloads and optionally saves the {@link Chunk} at the specified @@ -239,7 +239,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param save Whether or not to save the chunk * @return true if the chunk has unloaded successfully, otherwise false */ - public boolean unloadChunk(int x, int z, boolean save); + boolean unloadChunk(int x, int z, boolean save); /** * Unloads and optionally saves the {@link Chunk} at the specified @@ -252,7 +252,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * nearby * @return true if the chunk has unloaded successfully, otherwise false */ - public boolean unloadChunk(int x, int z, boolean save, boolean safe); + boolean unloadChunk(int x, int z, boolean save, boolean safe); /** * Safely queues the {@link Chunk} at the specified coordinates for @@ -265,7 +265,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z-coordinate of the chunk * @return true is the queue attempt was successful, otherwise false */ - public boolean unloadChunkRequest(int x, int z); + boolean unloadChunkRequest(int x, int z); /** * Queues the {@link Chunk} at the specified coordinates for unloading @@ -275,7 +275,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param safe Controls whether to queue the chunk when players are nearby * @return Whether the chunk was actually queued */ - public boolean unloadChunkRequest(int x, int z, boolean safe); + boolean unloadChunkRequest(int x, int z, boolean safe); /** * Regenerates the {@link Chunk} at the specified coordinates @@ -284,7 +284,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z-coordinate of the chunk * @return Whether the chunk was actually regenerated */ - public boolean regenerateChunk(int x, int z); + boolean regenerateChunk(int x, int z); /** * Resends the {@link Chunk} to all clients @@ -296,7 +296,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @deprecated This method is not guaranteed to work suitably across all client implementations. */ @Deprecated - public boolean refreshChunk(int x, int z); + boolean refreshChunk(int x, int z); /** * Drops an item at the specified {@link Location} @@ -305,7 +305,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param item ItemStack to drop * @return ItemDrop entity created as a result of this method */ - public Item dropItem(Location location, ItemStack item); + Item dropItem(Location location, ItemStack item); /** * Drops an item at the specified {@link Location} with a random offset @@ -314,7 +314,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param item ItemStack to drop * @return ItemDrop entity created as a result of this method */ - public Item dropItemNaturally(Location location, ItemStack item); + Item dropItemNaturally(Location location, ItemStack item); /** * Creates an {@link Arrow} entity at the given {@link Location} @@ -325,7 +325,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param spread Spread of the arrow. A recommend spread is 12 * @return Arrow entity spawned as a result of this method */ - public Arrow spawnArrow(Location location, Vector direction, float speed, float spread); + Arrow spawnArrow(Location location, Vector direction, float speed, float spread); /** * Creates a tree at the given {@link Location} @@ -334,7 +334,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param type Type of the tree to create * @return true if the tree was created successfully, otherwise false */ - public boolean generateTree(Location location, TreeType type); + boolean generateTree(Location location, TreeType type); /** * Creates a tree at the given {@link Location} @@ -345,7 +345,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * this method * @return true if the tree was created successfully, otherwise false */ - public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate); + boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate); /** * Creates a entity at the given {@link Location} @@ -354,7 +354,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param type The entity to spawn * @return Resulting Entity of this method, or null if it was unsuccessful */ - public Entity spawnEntity(Location loc, EntityType type); + Entity spawnEntity(Location loc, EntityType type); /** * Creates a creature at the given {@link Location} @@ -367,7 +367,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * #spawnEntity(Location, EntityType) spawnEntity} instead. */ @Deprecated - public LivingEntity spawnCreature(Location loc, EntityType type); + LivingEntity spawnCreature(Location loc, EntityType type); /** * Creates a creature at the given {@link Location} @@ -378,7 +378,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * unsuccessful */ @Deprecated - public LivingEntity spawnCreature(Location loc, CreatureType type); + LivingEntity spawnCreature(Location loc, CreatureType type); /** * Strikes lightning at the given {@link Location} @@ -386,7 +386,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param loc The location to strike lightning * @return The lightning entity. */ - public LightningStrike strikeLightning(Location loc); + LightningStrike strikeLightning(Location loc); /** * Strikes lightning at the given {@link Location} without doing damage @@ -394,21 +394,21 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param loc The location to strike lightning * @return The lightning entity. */ - public LightningStrike strikeLightningEffect(Location loc); + LightningStrike strikeLightningEffect(Location loc); /** * Get a list of all entities in this World * * @return A List of all Entities currently residing in this world */ - public List getEntities(); + List getEntities(); /** * Get a list of all living entities in this World * * @return A List of all LivingEntities currently residing in this world */ - public List getLivingEntities(); + List getLivingEntities(); /** * Get a collection of all entities in this World matching the given @@ -420,7 +420,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * match the given class/interface */ @Deprecated - public Collection getEntitiesByClass(Class... classes); + Collection getEntitiesByClass(Class... classes); /** * Get a collection of all entities in this World matching the given @@ -431,7 +431,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @return A List of all Entities currently residing in this world that * match the given class/interface */ - public Collection getEntitiesByClass(Class cls); + Collection getEntitiesByClass(Class cls); /** * Get a collection of all entities in this World matching any of the @@ -441,14 +441,14 @@ public interface World extends PluginMessageRecipient, Metadatable { * @return A List of all Entities currently residing in this world that * match one or more of the given classes/interfaces */ - public Collection getEntitiesByClasses(Class... classes); + Collection getEntitiesByClasses(Class... classes); /** * Get a list of all players in this World * * @return A list of all Players currently residing in this world */ - public List getPlayers(); + List getPlayers(); /** * Returns a list of entities within a bounding box centered around a Location. @@ -461,28 +461,28 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z 1/2 the size of the box along z axis * @return the collection of entities near location. This will always be a non-null collection. */ - public Collection getNearbyEntities(Location location, double x, double y, double z); + Collection getNearbyEntities(Location location, double x, double y, double z); /** * Gets the unique name of this world * * @return Name of this world */ - public String getName(); + String getName(); /** * Gets the Unique ID of this world * * @return Unique ID of this world. */ - public UUID getUID(); + UUID getUID(); /** * Gets the default spawn {@link Location} of this world * * @return The spawn location of this world */ - public Location getSpawnLocation(); + Location getSpawnLocation(); /** * Sets the spawn location of the world @@ -492,7 +492,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z coordinate * @return True if it was successfully set. */ - public boolean setSpawnLocation(int x, int y, int z); + boolean setSpawnLocation(int x, int y, int z); /** * Sets the spawn location of the world @@ -502,14 +502,14 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z coordinate * @return True if it was successfully set. */ - public boolean setSpawnLocation(double x, double y, double z, float yaw, float pitch); + boolean setSpawnLocation(double x, double y, double z, float yaw, float pitch); /** * Sets the spawn location of the world * * @param location Location of the spawn * @return True if it was successfully set. */ - public boolean setSpawnLocation(Location location); + boolean setSpawnLocation(Location location); /** * Gets the relative in-game time of this world. @@ -519,7 +519,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @return The current relative time * @see #getFullTime() Returns an absolute time of this world */ - public long getTime(); + long getTime(); /** * Sets the relative in-game time on the server. @@ -534,7 +534,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * hours*1000) * @see #setFullTime(long) Sets the absolute time of this world */ - public void setTime(long time); + void setTime(long time); /** * Gets the full in-game time on this world @@ -542,7 +542,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @return The current absolute time * @see #getTime() Returns a relative time of this world */ - public long getFullTime(); + long getFullTime(); /** * Sets the in-game time on the server @@ -553,14 +553,14 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param time The new absolute time to set this world to * @see #setTime(long) Sets the relative time of this world */ - public void setFullTime(long time); + void setFullTime(long time); /** * Returns whether the world has an ongoing storm. * * @return Whether there is an ongoing storm */ - public boolean hasStorm(); + boolean hasStorm(); /** * Set whether there is a storm. A duration will be set for the new @@ -568,49 +568,49 @@ public interface World extends PluginMessageRecipient, Metadatable { * * @param hasStorm Whether there is rain and snow */ - public void setStorm(boolean hasStorm); + void setStorm(boolean hasStorm); /** * Get the remaining time in ticks of the current conditions. * * @return Time in ticks */ - public int getWeatherDuration(); + int getWeatherDuration(); /** * Set the remaining time in ticks of the current conditions. * * @param duration Time in ticks */ - public void setWeatherDuration(int duration); + void setWeatherDuration(int duration); /** * Returns whether there is thunder. * * @return Whether there is thunder */ - public boolean isThundering(); + boolean isThundering(); /** * Set whether it is thundering. * * @param thundering Whether it is thundering */ - public void setThundering(boolean thundering); + void setThundering(boolean thundering); /** * Get the thundering duration. * * @return Duration in ticks */ - public int getThunderDuration(); + int getThunderDuration(); /** * Set the thundering duration. * * @param duration Duration in ticks */ - public void setThunderDuration(int duration); + void setThunderDuration(int duration); /** * Creates explosion at given coordinates with given power @@ -621,7 +621,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param power The power of explosion, where 4F is TNT * @return false if explosion was canceled, otherwise true */ - public boolean createExplosion(double x, double y, double z, float power); + boolean createExplosion(double x, double y, double z, float power); /** * Creates explosion at given coordinates with given power and optionally @@ -634,7 +634,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param setFire Whether or not to set blocks on fire * @return false if explosion was canceled, otherwise true */ - public boolean createExplosion(double x, double y, double z, float power, boolean setFire); + boolean createExplosion(double x, double y, double z, float power, boolean setFire); /** * Creates explosion at given coordinates with given power and optionally @@ -648,7 +648,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param breakBlocks Whether or not to have blocks be destroyed * @return false if explosion was canceled, otherwise true */ - public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks); + boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks); /** * Creates explosion at given coordinates with given power @@ -657,7 +657,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param power The power of explosion, where 4F is TNT * @return false if explosion was canceled, otherwise true */ - public boolean createExplosion(Location loc, float power); + boolean createExplosion(Location loc, float power); /** * Creates explosion at given coordinates with given power and optionally @@ -668,54 +668,54 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param setFire Whether or not to set blocks on fire * @return false if explosion was canceled, otherwise true */ - public boolean createExplosion(Location loc, float power, boolean setFire); + boolean createExplosion(Location loc, float power, boolean setFire); /** * Gets the {@link Environment} type of this world * * @return This worlds Environment type */ - public Environment getEnvironment(); + Environment getEnvironment(); /** * Gets the Seed for this world. * * @return This worlds Seed */ - public long getSeed(); + long getSeed(); /** * Gets the current PVP setting for this world. * * @return True if PVP is enabled */ - public boolean getPVP(); + boolean getPVP(); /** * Sets the PVP setting for this world. * * @param pvp True/False whether PVP should be Enabled. */ - public void setPVP(boolean pvp); + void setPVP(boolean pvp); /** * Gets the chunk generator for this world * * @return ChunkGenerator associated with this world */ - public ChunkGenerator getGenerator(); + ChunkGenerator getGenerator(); /** * Saves world to disk */ - public void save(); + void save(); /** * Gets a list of all applied {@link BlockPopulator}s for this World * * @return List containing any or none BlockPopulators */ - public List getPopulators(); + List getPopulators(); /** * Spawn an entity of a specific class at the given {@link Location} @@ -727,7 +727,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @throws IllegalArgumentException if either parameter is null or the * {@link Entity} requested cannot be spawned */ - public T spawn(Location location, Class clazz) throws IllegalArgumentException; + T spawn(Location location, Class clazz) throws IllegalArgumentException; /** * Spawn a {@link FallingBlock} entity at the given {@link Location} of @@ -746,7 +746,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @deprecated Magic value */ @Deprecated - public FallingBlock spawnFallingBlock(Location location, Material material, byte data) throws IllegalArgumentException; + FallingBlock spawnFallingBlock(Location location, Material material, byte data) throws IllegalArgumentException; /** * Spawn a {@link FallingBlock} entity at the given {@link Location} of @@ -762,7 +762,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @deprecated Magic value */ @Deprecated - public FallingBlock spawnFallingBlock(Location location, int blockId, byte blockData) throws IllegalArgumentException; + FallingBlock spawnFallingBlock(Location location, int blockId, byte blockData) throws IllegalArgumentException; /** * Plays an effect to all players within a default radius around a given @@ -773,7 +773,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param effect the {@link Effect} * @param data a data bit needed for some effects */ - public void playEffect(Location location, Effect effect, int data); + void playEffect(Location location, Effect effect, int data); /** * Plays an effect to all players within a given radius around a location. @@ -784,7 +784,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param data a data bit needed for some effects * @param radius the radius around the location */ - public void playEffect(Location location, Effect effect, int data, int radius); + void playEffect(Location location, Effect effect, int data, int radius); /** * Plays an effect to all players within a default radius around a given @@ -796,7 +796,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param effect the {@link Effect} * @param data a data bit needed for some effects */ - public void playEffect(Location location, Effect effect, T data); + void playEffect(Location location, Effect effect, T data); /** * Plays an effect to all players within a given radius around a location. @@ -808,7 +808,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param data a data bit needed for some effects * @param radius the radius around the location */ - public void playEffect(Location location, Effect effect, T data, int radius); + void playEffect(Location location, Effect effect, T data, int radius); /** * Get empty chunk snapshot (equivalent to all air blocks), optionally @@ -823,7 +823,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * raw biome temperature and rainfall * @return The empty snapshot. */ - public ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain); + ChunkSnapshot getEmptyChunkSnapshot(int x, int z, boolean includeBiome, boolean includeBiomeTempRain); /** * Sets the spawn flags for this. @@ -833,21 +833,21 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param allowAnimals - if true, animals are allowed to spawn in this * world. */ - public void setSpawnFlags(boolean allowMonsters, boolean allowAnimals); + void setSpawnFlags(boolean allowMonsters, boolean allowAnimals); /** * Gets whether animals can spawn in this world. * * @return whether animals can spawn in this world. */ - public boolean getAllowAnimals(); + boolean getAllowAnimals(); /** * Gets whether monsters can spawn in this world. * * @return whether monsters can spawn in this world. */ - public boolean getAllowMonsters(); + boolean getAllowMonsters(); /** * Gets the biome for the given block coordinates. @@ -877,7 +877,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z coordinate of the block * @return Temperature of the requested block */ - public double getTemperature(int x, int z); + double getTemperature(int x, int z); /** * Gets the humidity for the given block coordinates. @@ -889,7 +889,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param z Z coordinate of the block * @return Humidity of the requested block */ - public double getHumidity(int x, int z); + double getHumidity(int x, int z); /** * Gets the maximum height of this world. @@ -898,7 +898,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * * @return Maximum height of the world */ - public int getMaxHeight(); + int getMaxHeight(); /** * Gets the sea level for this world. @@ -907,7 +907,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * * @return Sea level */ - public int getSeaLevel(); + int getSeaLevel(); /** * Gets whether the world's spawn area should be kept loaded into memory @@ -915,7 +915,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * * @return true if the world's spawn area will be kept loaded into memory. */ - public boolean getKeepSpawnInMemory(); + boolean getKeepSpawnInMemory(); /** * Sets whether the world's spawn area should be kept loaded into memory @@ -924,14 +924,14 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param keepLoaded if true then the world's spawn area will be kept * loaded into memory. */ - public void setKeepSpawnInMemory(boolean keepLoaded); + void setKeepSpawnInMemory(boolean keepLoaded); /** * Gets whether or not the world will automatically save * * @return true if the world will automatically save, otherwise false */ - public boolean isAutoSave(); + boolean isAutoSave(); /** * Sets whether or not the world will automatically save @@ -939,42 +939,42 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param value true if the world should automatically save, otherwise * false */ - public void setAutoSave(boolean value); + void setAutoSave(boolean value); /** * Sets the Difficulty of the world. * * @param difficulty the new difficulty you want to set the world to */ - public void setDifficulty(Difficulty difficulty); + void setDifficulty(Difficulty difficulty); /** * Gets the Difficulty of the world. * * @return The difficulty of the world. */ - public Difficulty getDifficulty(); + Difficulty getDifficulty(); /** * Gets the folder of this world on disk. * * @return The folder of this world. */ - public File getWorldFolder(); + File getWorldFolder(); /** * Gets the type of this world. * * @return Type of this world. */ - public WorldType getWorldType(); + WorldType getWorldType(); /** * Gets whether or not structures are being generated. * * @return True if structures are being generated. */ - public boolean canGenerateStructures(); + boolean canGenerateStructures(); /** * Gets the world's ticks per animal spawns value @@ -1000,7 +1000,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * * @return The world's ticks per animal spawns value */ - public long getTicksPerAnimalSpawns(); + long getTicksPerAnimalSpawns(); /** * Sets the world's ticks per animal spawns value @@ -1027,7 +1027,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param ticksPerAnimalSpawns the ticks per animal spawns value you want * to set the world to */ - public void setTicksPerAnimalSpawns(int ticksPerAnimalSpawns); + void setTicksPerAnimalSpawns(int ticksPerAnimalSpawns); /** * Gets the world's ticks per monster spawns value @@ -1053,7 +1053,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * * @return The world's ticks per monster spawns value */ - public long getTicksPerMonsterSpawns(); + long getTicksPerMonsterSpawns(); /** * Sets the world's ticks per monster spawns value @@ -1080,7 +1080,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param ticksPerMonsterSpawns the ticks per monster spawns value you * want to set the world to */ - public void setTicksPerMonsterSpawns(int ticksPerMonsterSpawns); + void setTicksPerMonsterSpawns(int ticksPerMonsterSpawns); /** * Gets limit for number of monsters that can spawn in a chunk in this @@ -1175,7 +1175,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * * @return An array of rules */ - public String[] getGameRules(); + String[] getGameRules(); /** * Gets the current state of the specified rule @@ -1185,7 +1185,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param rule Rule to look up value of * @return String value of rule */ - public String getGameRuleValue(String rule); + String getGameRuleValue(String rule); /** * Set the specified gamerule to specified value. @@ -1199,7 +1199,7 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param value Value to set rule to * @return True if rule was set */ - public boolean setGameRuleValue(String rule, String value); + boolean setGameRuleValue(String rule, String value); /** * Checks if string is a valid game rule @@ -1207,10 +1207,10 @@ public interface World extends PluginMessageRecipient, Metadatable { * @param rule Rule to check * @return True if rule exists */ - public boolean isGameRule(String rule); + boolean isGameRule(String rule); // Spigot start - public class Spigot + class Spigot { /** @@ -1288,12 +1288,12 @@ public interface World extends PluginMessageRecipient, Metadatable { * * @return The world border for this world. */ - public WorldBorder getWorldBorder(); + WorldBorder getWorldBorder(); /** * Represents various map environment types that a world may be */ - public enum Environment { + enum Environment { /** * Represents the "normal"/"surface world" map @@ -1309,7 +1309,7 @@ public interface World extends PluginMessageRecipient, Metadatable { THE_END(1); private final int id; - private static final Map lookup = new HashMap(); + private static final Map lookup = new HashMap<>(); private Environment(int id) { this.id = id; diff --git a/TacoSpigot-API/src/main/java/org/bukkit/WorldBorder.java b/TacoSpigot-API/src/main/java/org/bukkit/WorldBorder.java index 55c8983..291282c 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/WorldBorder.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/WorldBorder.java @@ -5,21 +5,21 @@ public interface WorldBorder { /** * Resets the border to default values. */ - public void reset(); + void reset(); /** * Gets the current side length of the border. * * @return The current side length of the border. */ - public double getSize(); + double getSize(); /** * Sets the border to a square region with the specified side length in blocks. * * @param newSize The new size of the border. */ - public void setSize(double newSize); + void setSize(double newSize); /** * Sets the border to a square region with the specified side length in blocks. @@ -27,14 +27,14 @@ public interface WorldBorder { * @param newSize The new side length of the border. * @param seconds The time in seconds in which the border grows or shrinks from the previous size to that being set. */ - public void setSize(double newSize, long seconds); + void setSize(double newSize, long seconds); /** * Gets the current border center. * * @return The current border center. */ - public Location getCenter(); + Location getCenter(); /** * Sets the new border center. @@ -42,68 +42,68 @@ public interface WorldBorder { * @param x The new center x-coordinate. * @param z The new center z-coordinate. */ - public void setCenter(double x, double z); + void setCenter(double x, double z); /** * Sets the new border center. * * @param location The new location of the border center. (Only x/z used) */ - public void setCenter(Location location); + void setCenter(Location location); /** * Gets the current border damage buffer. * * @return The current border damage buffer. */ - public double getDamageBuffer(); + double getDamageBuffer(); /** * Sets the amount of blocks a player may safely be outside the border before taking damage. * * @param blocks The amount of blocks. (The default is 5 blocks.) */ - public void setDamageBuffer(double blocks); + void setDamageBuffer(double blocks); /** * Gets the current border damage amount. * * @return The current border damage amount. */ - public double getDamageAmount(); + double getDamageAmount(); /** * Sets the amount of damage a player takes when outside the border plus the border buffer. * * @param damage The amount of damage. (The default is 0.2 damage per second per block.) */ - public void setDamageAmount(double damage); + void setDamageAmount(double damage); /** * Gets the current border warning time in seconds. * * @return The current border warning time in seconds. */ - public int getWarningTime(); + int getWarningTime(); /** * Sets the warning time that causes the screen to be tinted red when a contracting border will reach the player within the specified time. * * @param seconds The amount of time in seconds. (The default is 15 seconds.) */ - public void setWarningTime(int seconds); + void setWarningTime(int seconds); /** * Gets the current border warning distance. * * @return The current border warning distance. */ - public int getWarningDistance(); + int getWarningDistance(); /** * Sets the warning distance that causes the screen to be tinted red when the player is within the specified number of blocks from the border. * * @param distance The distance in blocks. (The default is 5 blocks.) */ - public void setWarningDistance(int distance); + void setWarningDistance(int distance); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/BlockState.java b/TacoSpigot-API/src/main/java/org/bukkit/block/BlockState.java index 866a73d..03e636a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/BlockState.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/BlockState.java @@ -184,14 +184,14 @@ public interface BlockState extends Metadatable { * @deprecated Magic value */ @Deprecated - public byte getRawData(); + byte getRawData(); /** * @param data The new data value for the block. * @deprecated Magic value */ @Deprecated - public void setRawData(byte data); + void setRawData(byte data); /** * Returns whether this state is placed in the world. diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/BrewingStand.java b/TacoSpigot-API/src/main/java/org/bukkit/block/BrewingStand.java index c66a51c..3f6ab6a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/BrewingStand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/BrewingStand.java @@ -21,5 +21,5 @@ public interface BrewingStand extends BlockState, ContainerBlock { */ void setBrewingTime(int brewTime); - public BrewerInventory getInventory(); + BrewerInventory getInventory(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/CommandBlock.java b/TacoSpigot-API/src/main/java/org/bukkit/block/CommandBlock.java index 85d5345..e53aeb7 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/CommandBlock.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/CommandBlock.java @@ -9,7 +9,7 @@ public interface CommandBlock extends BlockState { * * @return Command that this CommandBlock will run when powered. */ - public String getCommand(); + String getCommand(); /** * Sets the command that this CommandBlock will run when powered. @@ -18,7 +18,7 @@ public interface CommandBlock extends BlockState { * * @param command Command that this CommandBlock will run when powered. */ - public void setCommand(String command); + void setCommand(String command); /** * Gets the name of this CommandBlock. The name is used with commands @@ -27,7 +27,7 @@ public interface CommandBlock extends BlockState { * * @return Name of this CommandBlock. */ - public String getName(); + String getName(); /** * Sets the name of this CommandBlock. The name is used with commands @@ -36,5 +36,5 @@ public interface CommandBlock extends BlockState { * * @param name New name for this CommandBlock. */ - public void setName(String name); + void setName(String name); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/CreatureSpawner.java b/TacoSpigot-API/src/main/java/org/bukkit/block/CreatureSpawner.java index e54d997..93a1497 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/CreatureSpawner.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/CreatureSpawner.java @@ -15,21 +15,21 @@ public interface CreatureSpawner extends BlockState { * @deprecated In favour of {@link #getSpawnedType()}. */ @Deprecated - public CreatureType getCreatureType(); + CreatureType getCreatureType(); /** * Get the spawner's creature type. * * @return The creature type. */ - public EntityType getSpawnedType(); + EntityType getSpawnedType(); /** * Set the spawner's creature type. * * @param creatureType The creature type. */ - public void setSpawnedType(EntityType creatureType); + void setSpawnedType(EntityType creatureType); /** * Set the spawner creature type. @@ -38,7 +38,7 @@ public interface CreatureSpawner extends BlockState { * @deprecated In favour of {@link #setSpawnedType(EntityType)}. */ @Deprecated - public void setCreatureType(CreatureType creatureType); + void setCreatureType(CreatureType creatureType); /** * Get the spawner's creature type. @@ -47,21 +47,21 @@ public interface CreatureSpawner extends BlockState { * @deprecated Use {@link #getCreatureTypeName()}. */ @Deprecated - public String getCreatureTypeId(); + String getCreatureTypeId(); /** * Set the spawner mob type. * * @param creatureType The creature type's name. */ - public void setCreatureTypeByName(String creatureType); + void setCreatureTypeByName(String creatureType); /** * Get the spawner's creature type. * * @return The creature type's name. */ - public String getCreatureTypeName(); + String getCreatureTypeName(); /** * Set the spawner mob type. @@ -70,19 +70,19 @@ public interface CreatureSpawner extends BlockState { * @deprecated Use {@link #setCreatureTypeByName(String)}. */ @Deprecated - public void setCreatureTypeId(String creatureType); + void setCreatureTypeId(String creatureType); /** * Get the spawner's delay. * * @return The delay. */ - public int getDelay(); + int getDelay(); /** * Set the spawner's delay. * * @param delay The delay. */ - public void setDelay(int delay); + void setDelay(int delay); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Dispenser.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Dispenser.java index bba753e..e2dd08c 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/Dispenser.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Dispenser.java @@ -14,7 +14,7 @@ public interface Dispenser extends BlockState, ContainerBlock { * * @return a BlockProjectileSource if valid, otherwise null */ - public BlockProjectileSource getBlockProjectileSource(); + BlockProjectileSource getBlockProjectileSource(); /** * Attempts to dispense the contents of this block. @@ -23,5 +23,5 @@ public interface Dispenser extends BlockState, ContainerBlock { * * @return true if successful, otherwise false */ - public boolean dispense(); + boolean dispense(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Dropper.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Dropper.java index 21fbedc..ede3ec6 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/Dropper.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Dropper.java @@ -21,5 +21,5 @@ public interface Dropper extends BlockState, InventoryHolder { * ContainerBlock, the randomly selected ItemStack is dropped on * the ground in the form of an {@link org.bukkit.entity.Item Item}. */ - public void drop(); + void drop(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Furnace.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Furnace.java index 94af85e..1bf37e8 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/Furnace.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Furnace.java @@ -12,28 +12,28 @@ public interface Furnace extends BlockState, ContainerBlock { * * @return Burn time */ - public short getBurnTime(); + short getBurnTime(); /** * Set burn time. * * @param burnTime Burn time */ - public void setBurnTime(short burnTime); + void setBurnTime(short burnTime); /** * Get cook time. * * @return Cook time */ - public short getCookTime(); + short getCookTime(); /** * Set cook time. * * @param cookTime Cook time */ - public void setCookTime(short cookTime); + void setCookTime(short cookTime); - public FurnaceInventory getInventory(); + FurnaceInventory getInventory(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Jukebox.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Jukebox.java index 7b45b83..19a3705 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/Jukebox.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Jukebox.java @@ -11,26 +11,26 @@ public interface Jukebox extends BlockState { * * @return The record Material, or AIR if none is playing */ - public Material getPlaying(); + Material getPlaying(); /** * Set the record currently playing * * @param record The record Material, or null/AIR to stop playing */ - public void setPlaying(Material record); + void setPlaying(Material record); /** * Check if the jukebox is currently playing a record * * @return True if there is a record playing */ - public boolean isPlaying(); + boolean isPlaying(); /** * Stop the jukebox playing and eject the current record * * @return True if a record was ejected; false if there was none playing */ - public boolean eject(); + boolean eject(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/NoteBlock.java b/TacoSpigot-API/src/main/java/org/bukkit/block/NoteBlock.java index 8380068..bc6c536 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/NoteBlock.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/NoteBlock.java @@ -13,7 +13,7 @@ public interface NoteBlock extends BlockState { * * @return The note. */ - public Note getNote(); + Note getNote(); /** * Gets the note. @@ -22,14 +22,14 @@ public interface NoteBlock extends BlockState { * @deprecated Magic value */ @Deprecated - public byte getRawNote(); + byte getRawNote(); /** * Set the note. * * @param note The note. */ - public void setNote(Note note); + void setNote(Note note); /** * Set the note. @@ -38,7 +38,7 @@ public interface NoteBlock extends BlockState { * @deprecated Magic value */ @Deprecated - public void setRawNote(byte note); + void setRawNote(byte note); /** * Attempts to play the note at block @@ -47,7 +47,7 @@ public interface NoteBlock extends BlockState { * * @return true if successful, otherwise false */ - public boolean play(); + boolean play(); /** * Plays an arbitrary note with an arbitrary instrument @@ -58,7 +58,7 @@ public interface NoteBlock extends BlockState { * @deprecated Magic value */ @Deprecated - public boolean play(byte instrument, byte note); + boolean play(byte instrument, byte note); /** * Plays an arbitrary note with an arbitrary instrument @@ -68,5 +68,5 @@ public interface NoteBlock extends BlockState { * @return true if successful, otherwise false * @see Instrument Note */ - public boolean play(Instrument instrument, Note note); + boolean play(Instrument instrument, Note note); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/PistonMoveReaction.java b/TacoSpigot-API/src/main/java/org/bukkit/block/PistonMoveReaction.java index e5279f7..19a80d7 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/PistonMoveReaction.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/PistonMoveReaction.java @@ -19,7 +19,7 @@ public enum PistonMoveReaction { BLOCK(2); private int id; - private static Map byId = new HashMap(); + private static Map byId = new HashMap<>(); static { for (PistonMoveReaction reaction : PistonMoveReaction.values()) { byId.put(reaction.id, reaction); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Sign.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Sign.java index 5d7a633..cdd8cf8 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/Sign.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Sign.java @@ -10,7 +10,7 @@ public interface Sign extends BlockState { * * @return Array of Strings containing each line of text */ - public String[] getLines(); + String[] getLines(); /** * Gets the line of text at the specified index. @@ -21,7 +21,7 @@ public interface Sign extends BlockState { * @throws IndexOutOfBoundsException Thrown when the line does not exist * @return Text on the given line */ - public String getLine(int index) throws IndexOutOfBoundsException; + String getLine(int index) throws IndexOutOfBoundsException; /** * Sets the line of text at the specified index. @@ -33,5 +33,5 @@ public interface Sign extends BlockState { * @param line New text to set at the specified index * @throws IndexOutOfBoundsException If the index is out of the range 0..3 */ - public void setLine(int index, String line) throws IndexOutOfBoundsException; + void setLine(int index, String line) throws IndexOutOfBoundsException; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/Skull.java b/TacoSpigot-API/src/main/java/org/bukkit/block/Skull.java index 4f4896f..a5fcb2a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/Skull.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/Skull.java @@ -12,14 +12,14 @@ public interface Skull extends BlockState { * * @return true if the skull has an owner */ - public boolean hasOwner(); + boolean hasOwner(); /** * Gets the owner of the skull, if one exists * * @return the owner of the skull or null if the skull does not have an owner */ - public String getOwner(); + String getOwner(); /** * Sets the owner of the skull @@ -30,33 +30,33 @@ public interface Skull extends BlockState { * @param name the new owner of the skull * @return true if the owner was successfully set */ - public boolean setOwner(String name); + boolean setOwner(String name); /** * Gets the rotation of the skull in the world * * @return the rotation of the skull */ - public BlockFace getRotation(); + BlockFace getRotation(); /** * Sets the rotation of the skull in the world * * @param rotation the rotation of the skull */ - public void setRotation(BlockFace rotation); + void setRotation(BlockFace rotation); /** * Gets the type of skull * * @return the type of skull */ - public SkullType getSkullType(); + SkullType getSkullType(); /** * Sets the type of skull * * @param skullType the type of skull */ - public void setSkullType(SkullType skullType); + void setSkullType(SkullType skullType); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/block/banner/PatternType.java b/TacoSpigot-API/src/main/java/org/bukkit/block/banner/PatternType.java index 25543b0..1d9c369 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/block/banner/PatternType.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/block/banner/PatternType.java @@ -45,7 +45,7 @@ public enum PatternType { MOJANG("moj"); private final String identifier; - private static final Map byString = new HashMap(); + private static final Map byString = new HashMap<>(); static { for (PatternType p : values()) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/BlockCommandSender.java b/TacoSpigot-API/src/main/java/org/bukkit/command/BlockCommandSender.java index ce229d2..881912d 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/BlockCommandSender.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/BlockCommandSender.java @@ -9,5 +9,5 @@ public interface BlockCommandSender extends CommandSender { * * @return Block for the command sender */ - public Block getBlock(); + Block getBlock(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/Command.java b/TacoSpigot-API/src/main/java/org/bukkit/command/Command.java index 8558c2e..8b8c165 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/Command.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/Command.java @@ -36,7 +36,7 @@ public abstract class Command { public String getTimingName() {return getName();} // Spigot protected Command(String name) { - this(name, "", "/" + name, new ArrayList()); + this(name, "", "/" + name, new ArrayList<>()); } protected Command(String name, String description, String usageMessage, List aliases) { @@ -46,7 +46,7 @@ public abstract class Command { this.description = description; this.usageMessage = usageMessage; this.aliases = aliases; - this.activeAliases = new ArrayList(aliases); + this.activeAliases = new ArrayList<>(aliases); } /** @@ -98,7 +98,7 @@ public abstract class Command { Player senderPlayer = sender instanceof Player ? (Player) sender : null; - ArrayList matchedPlayers = new ArrayList(); + ArrayList matchedPlayers = new ArrayList<>(); for (Player player : sender.getServer().getOnlinePlayers()) { String name = player.getName(); if ((senderPlayer == null || senderPlayer.canSee(player)) && StringUtil.startsWithIgnoreCase(name, lastWord)) { @@ -106,7 +106,7 @@ public abstract class Command { } } - Collections.sort(matchedPlayers, String.CASE_INSENSITIVE_ORDER); + matchedPlayers.sort(String.CASE_INSENSITIVE_ORDER); return matchedPlayers; } @@ -289,7 +289,7 @@ public abstract class Command { public boolean unregister(CommandMap commandMap) { if (allowChangesFrom(commandMap)) { this.commandMap = null; - this.activeAliases = new ArrayList(this.aliases); + this.activeAliases = new ArrayList<>(this.aliases); this.label = this.nextLabel; return true; } @@ -359,7 +359,7 @@ public abstract class Command { public Command setAliases(List aliases) { this.aliases = aliases; if (!isRegistered()) { - this.activeAliases = new ArrayList(aliases); + this.activeAliases = new ArrayList<>(aliases); } return this; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandExecutor.java b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandExecutor.java index c75586f..b292a1b 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandExecutor.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandExecutor.java @@ -14,5 +14,5 @@ public interface CommandExecutor { * @param args Passed command arguments * @return true if a valid command, otherwise false */ - public boolean onCommand(CommandSender sender, Command command, String label, String[] args); + boolean onCommand(CommandSender sender, Command command, String label, String[] args); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandMap.java b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandMap.java index e7e20d8..6be965e 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandMap.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandMap.java @@ -19,7 +19,7 @@ public interface CommandMap { * a ':' one or more times to make the command unique * @param commands a list of commands to register */ - public void registerAll(String fallbackPrefix, List commands); + void registerAll(String fallbackPrefix, List commands); /** * Registers a command. Returns true on success; false if name is already @@ -41,7 +41,7 @@ public interface CommandMap { * otherwise, which indicates the fallbackPrefix was used one or more * times */ - public boolean register(String label, String fallbackPrefix, Command command); + boolean register(String label, String fallbackPrefix, Command command); /** * Registers a command. Returns true on success; false if name is already @@ -63,7 +63,7 @@ public interface CommandMap { * otherwise, which indicates the fallbackPrefix was used one or more * times */ - public boolean register(String fallbackPrefix, Command command); + boolean register(String fallbackPrefix, Command command); /** * Looks for the requested command and executes it if found. @@ -74,12 +74,12 @@ public interface CommandMap { * @throws CommandException Thrown when the executor for the given command * fails with an unhandled exception */ - public boolean dispatch(CommandSender sender, String cmdLine) throws CommandException; + boolean dispatch(CommandSender sender, String cmdLine) throws CommandException; /** * Clears all registered commands. */ - public void clearCommands(); + void clearCommands(); /** * Gets the command registered to the specified name @@ -88,7 +88,7 @@ public interface CommandMap { * @return Command with the specified name or null if a command with that * label doesn't exist */ - public Command getCommand(String name); + Command getCommand(String name); /** @@ -105,5 +105,5 @@ public interface CommandMap { * command fails with an unhandled exception * @throws IllegalArgumentException if either sender or cmdLine are null */ - public List tabComplete(CommandSender sender, String cmdLine) throws IllegalArgumentException; + List tabComplete(CommandSender sender, String cmdLine) throws IllegalArgumentException; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandSender.java b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandSender.java index 4ad0028..978b1cf 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/CommandSender.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/CommandSender.java @@ -10,28 +10,28 @@ public interface CommandSender extends Permissible { * * @param message Message to be displayed */ - public void sendMessage(String message); + void sendMessage(String message); /** * Sends this sender multiple messages * * @param messages An array of messages to be displayed */ - public void sendMessage(String[] messages); + void sendMessage(String[] messages); /** * Returns the server instance that this command is running on * * @return Server instance */ - public Server getServer(); + Server getServer(); /** * Gets the name of this command sender * * @return Name of the sender */ - public String getName(); + String getName(); // Paper start /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/TacoSpigot-API/src/main/java/org/bukkit/command/FormattedCommandAlias.java index f89ad07..a029d93 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/FormattedCommandAlias.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/FormattedCommandAlias.java @@ -1,13 +1,8 @@ package org.bukkit.command; import java.util.ArrayList; -import java.util.logging.Level; import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.event.player.PlayerCommandPreprocessEvent; -import org.bukkit.event.server.RemoteServerCommandEvent; -import org.bukkit.event.server.ServerCommandEvent; public class FormattedCommandAlias extends Command { private final String[] formatStrings; @@ -21,7 +16,7 @@ public class FormattedCommandAlias extends Command { @Override public boolean execute(CommandSender sender, String commandLabel, String[] args) { boolean result = false; - ArrayList commands = new ArrayList(); + ArrayList commands = new ArrayList<>(); for (String formatString : formatStrings) { try { commands.add(buildCommand(formatString, args)); @@ -73,7 +68,7 @@ public class FormattedCommandAlias extends Command { throw new IllegalArgumentException("Invalid replacement token"); } - int position = Integer.valueOf(formatString.substring(argStart, index)); + int position = Integer.parseInt(formatString.substring(argStart, index)); // Arguments are not 0 indexed if (position == 0) { @@ -108,7 +103,7 @@ public class FormattedCommandAlias extends Command { replacement.append(args[position]); } - formatString = formatString.substring(0, start) + replacement.toString() + formatString.substring(end); + formatString = formatString.substring(0, start) + replacement + formatString.substring(end); // Move index past the replaced data so we don't process it again index = start + replacement.length(); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/PluginCommandYamlParser.java b/TacoSpigot-API/src/main/java/org/bukkit/command/PluginCommandYamlParser.java index 5854583..4369f14 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/PluginCommandYamlParser.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/PluginCommandYamlParser.java @@ -11,7 +11,7 @@ import org.bukkit.plugin.Plugin; public class PluginCommandYamlParser { public static List parse(Plugin plugin) { - List pluginCmds = new ArrayList(); + List pluginCmds = new ArrayList<>(); Map> map = plugin.getDescription().getCommands(); @@ -40,19 +40,19 @@ public class PluginCommandYamlParser { } if (aliases != null) { - List aliasList = new ArrayList(); + List aliasList = new ArrayList<>(); if (aliases instanceof List) { for (Object o : (List) aliases) { if (o.toString().contains(":")) { - Bukkit.getServer().getLogger().severe("Could not load alias " + o.toString() + " for plugin " + plugin.getName() + ": Illegal Characters"); + Bukkit.getServer().getLogger().severe("Could not load alias " + o + " for plugin " + plugin.getName() + ": Illegal Characters"); continue; } aliasList.add(o.toString()); } } else { if (aliases.toString().contains(":")) { - Bukkit.getServer().getLogger().severe("Could not load alias " + aliases.toString() + " for plugin " + plugin.getName() + ": Illegal Characters"); + Bukkit.getServer().getLogger().severe("Could not load alias " + aliases + " for plugin " + plugin.getName() + ": Illegal Characters"); } else { aliasList.add(aliases.toString()); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/PluginIdentifiableCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/PluginIdentifiableCommand.java index c5e0d2c..5777b76 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/PluginIdentifiableCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/PluginIdentifiableCommand.java @@ -15,5 +15,5 @@ public interface PluginIdentifiableCommand { * * @return Plugin that owns this PluginIdentifiableCommand. */ - public Plugin getPlugin(); + Plugin getPlugin(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/SimpleCommandMap.java b/TacoSpigot-API/src/main/java/org/bukkit/command/SimpleCommandMap.java index bcb03b1..29e2d0a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -20,7 +20,7 @@ import org.bukkit.util.StringUtil; public class SimpleCommandMap implements CommandMap { private static final Pattern PATTERN_ON_SPACE = Pattern.compile(" ", Pattern.LITERAL); - protected final Map knownCommands = new HashMap(); + protected final Map knownCommands = new HashMap<>(); private final Server server; public SimpleCommandMap(final Server server) { @@ -167,8 +167,7 @@ public class SimpleCommandMap implements CommandMap { } public Command getCommand(String name) { - Command target = knownCommands.get(name.toLowerCase()); - return target; + return knownCommands.get(name.toLowerCase()); } public List tabComplete(CommandSender sender, String cmdLine) { @@ -186,7 +185,7 @@ public class SimpleCommandMap implements CommandMap { int spaceIndex = cmdLine.indexOf(' '); if (spaceIndex == -1) { - ArrayList completions = new ArrayList(); + ArrayList completions = new ArrayList<>(); Map knownCommands = this.knownCommands; final String prefix = (sender instanceof Player ? "/" : ""); @@ -205,7 +204,7 @@ public class SimpleCommandMap implements CommandMap { } } - Collections.sort(completions, String.CASE_INSENSITIVE_ORDER); + completions.sort(String.CASE_INSENSITIVE_ORDER); return completions; } @@ -248,7 +247,7 @@ public class SimpleCommandMap implements CommandMap { } String[] commandStrings = values.get(alias); - List targets = new ArrayList(); + List targets = new ArrayList<>(); StringBuilder bad = new StringBuilder(); for (String commandString : commandStrings) { @@ -272,7 +271,7 @@ public class SimpleCommandMap implements CommandMap { // We register these as commands so they have absolute priority. if (targets.size() > 0) { - knownCommands.put(alias.toLowerCase(), new FormattedCommandAlias(alias.toLowerCase(), targets.toArray(new String[targets.size()]))); + knownCommands.put(alias.toLowerCase(), new FormattedCommandAlias(alias.toLowerCase(), targets.toArray(new String[0]))); } else { knownCommands.remove(alias.toLowerCase()); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/TabCommandExecutor.java b/TacoSpigot-API/src/main/java/org/bukkit/command/TabCommandExecutor.java index d24d795..35bb34c 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/TabCommandExecutor.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/TabCommandExecutor.java @@ -11,6 +11,6 @@ import java.util.List; */ @Deprecated public interface TabCommandExecutor extends CommandExecutor { - public List onTabComplete(); + List onTabComplete(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/TabCompleter.java b/TacoSpigot-API/src/main/java/org/bukkit/command/TabCompleter.java index 2cb971c..c3ddad2 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/TabCompleter.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/TabCompleter.java @@ -20,7 +20,7 @@ public interface TabCompleter { * @return A List of possible completions for the final argument, or null * to default to the command executor */ - public List onTabComplete(CommandSender sender, Command command, String alias, String[] args); + List onTabComplete(CommandSender sender, Command command, String alias, String[] args); // PaperSpigot start - location tab-completes default List onTabComplete(CommandSender sender, Command command, String alias, String[] args, Location location) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/AchievementCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/AchievementCommand.java index c2e1795..d029a0a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/AchievementCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/AchievementCommand.java @@ -2,6 +2,7 @@ package org.bukkit.command.defaults; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.List; import org.apache.commons.lang.Validate; @@ -173,11 +174,11 @@ public class AchievementCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return Arrays.asList("give"); + return Collections.singletonList("give"); } if (args.length == 2) { - return Bukkit.getUnsafe().tabCompleteInternalStatisticOrAchievementName(args[1], new ArrayList()); + return Bukkit.getUnsafe().tabCompleteInternalStatisticOrAchievementName(args[1], new ArrayList<>()); } if (args.length == 3) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/BanListCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/BanListCommand.java index f8d32df..b2988a4 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/BanListCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/BanListCommand.java @@ -2,14 +2,12 @@ package org.bukkit.command.defaults; import java.util.ArrayList; import java.util.List; -import java.util.UUID; import org.apache.commons.lang.Validate; import org.bukkit.BanEntry; import org.bukkit.BanList; import org.bukkit.Bukkit; import org.bukkit.ChatColor; -import org.bukkit.OfflinePlayer; import org.bukkit.command.CommandSender; import org.bukkit.util.StringUtil; @@ -67,7 +65,7 @@ public class BanListCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], BANLIST_TYPES, new ArrayList(BANLIST_TYPES.size())); + return StringUtil.copyPartialMatches(args[0], BANLIST_TYPES, new ArrayList<>(BANLIST_TYPES.size())); } return ImmutableList.of(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ClearCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ClearCommand.java index 05317e1..7a84a19 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ClearCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ClearCommand.java @@ -18,7 +18,7 @@ import java.util.List; public class ClearCommand extends VanillaCommand { private static List materials; static { - ArrayList materialList = new ArrayList(); + ArrayList materialList = new ArrayList<>(); for (Material material : Material.values()) { materialList.add(material.name()); } @@ -98,7 +98,7 @@ public class ClearCommand extends VanillaCommand { String material = materials.get(i); if (StringUtil.startsWithIgnoreCase(material, arg)) { if (completion == null) { - completion = new ArrayList(); + completion = new ArrayList<>(); } completion.add(material); } else { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java index f217aea..5f9809d 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java @@ -36,7 +36,7 @@ public class DefaultGameModeCommand extends VanillaCommand { try { value = Integer.parseInt(modeArg); - } catch (NumberFormatException ex) {} + } catch (NumberFormatException ignored) {} GameMode mode = GameMode.getByValue(value); @@ -63,7 +63,7 @@ public class DefaultGameModeCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], GAMEMODE_NAMES, new ArrayList(GAMEMODE_NAMES.size())); + return StringUtil.copyPartialMatches(args[0], GAMEMODE_NAMES, new ArrayList<>(GAMEMODE_NAMES.size())); } return ImmutableList.of(); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DeopCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DeopCommand.java index 86be15e..9b0da03 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DeopCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DeopCommand.java @@ -49,7 +49,7 @@ public class DeopCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - List completions = new ArrayList(); + List completions = new ArrayList<>(); for (OfflinePlayer player : Bukkit.getOperators()) { String playerName = player.getName(); if (StringUtil.startsWithIgnoreCase(playerName, args[0])) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java index 74a8ac2..1f44648 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java @@ -74,7 +74,7 @@ public class DifficultyCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], DIFFICULTY_NAMES, new ArrayList(DIFFICULTY_NAMES.size())); + return StringUtil.copyPartialMatches(args[0], DIFFICULTY_NAMES, new ArrayList<>(DIFFICULTY_NAMES.size())); } return ImmutableList.of(); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EffectCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EffectCommand.java index de63bbe..f867b8a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EffectCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EffectCommand.java @@ -112,7 +112,7 @@ public class EffectCommand extends VanillaCommand { if (args.length == 1) { return super.tabComplete(sender, commandLabel, args); } else if (args.length == 2) { - return StringUtil.copyPartialMatches(args[1], effects, new ArrayList(effects.size())); + return StringUtil.copyPartialMatches(args[1], effects, new ArrayList<>(effects.size())); } return ImmutableList.of(); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EnchantCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EnchantCommand.java index 5f0b686..1b7d2cd 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EnchantCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/EnchantCommand.java @@ -21,7 +21,7 @@ import org.bukkit.util.StringUtil; @Deprecated public class EnchantCommand extends VanillaCommand { - private static final List ENCHANTMENT_NAMES = new ArrayList(); + private static final List ENCHANTMENT_NAMES = new ArrayList<>(); public EnchantCommand() { super("enchant"); @@ -131,7 +131,7 @@ public class EnchantCommand extends VanillaCommand { } if (args.length == 2) { - return StringUtil.copyPartialMatches(args[1], ENCHANTMENT_NAMES, new ArrayList(ENCHANTMENT_NAMES.size())); + return StringUtil.copyPartialMatches(args[1], ENCHANTMENT_NAMES, new ArrayList<>(ENCHANTMENT_NAMES.size())); } if (args.length == 3 || args.length == 4) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameModeCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameModeCommand.java index f9675a0..b041c00 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameModeCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameModeCommand.java @@ -47,7 +47,7 @@ public class GameModeCommand extends VanillaCommand { try { value = Integer.parseInt(modeArg); - } catch (NumberFormatException ex) {} + } catch (NumberFormatException ignored) {} GameMode mode = GameMode.getByValue(value); @@ -70,9 +70,9 @@ public class GameModeCommand extends VanillaCommand { sender.sendMessage("Game mode change for " + player.getName() + " failed!"); } else { if (player == sender) { - Command.broadcastCommandMessage(sender, "Set own game mode to " + mode.toString() + " mode"); + Command.broadcastCommandMessage(sender, "Set own game mode to " + mode + " mode"); } else { - Command.broadcastCommandMessage(sender, "Set " + player.getName() + "'s game mode to " + mode.toString() + " mode"); + Command.broadcastCommandMessage(sender, "Set " + player.getName() + "'s game mode to " + mode + " mode"); } } } else { @@ -92,7 +92,7 @@ public class GameModeCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], GAMEMODE_NAMES, new ArrayList(GAMEMODE_NAMES.size())); + return StringUtil.copyPartialMatches(args[0], GAMEMODE_NAMES, new ArrayList<>(GAMEMODE_NAMES.size())); } else if (args.length == 2) { return super.tabComplete(sender, alias, args); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java index 13e2589..05a8229 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java @@ -77,11 +77,11 @@ public class GameRuleCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], Arrays.asList(getGameWorld(sender).getGameRules()), new ArrayList()); + return StringUtil.copyPartialMatches(args[0], Arrays.asList(getGameWorld(sender).getGameRules()), new ArrayList<>()); } if (args.length == 2) { - return StringUtil.copyPartialMatches(args[1], GAMERULE_STATES, new ArrayList(GAMERULE_STATES.size())); + return StringUtil.copyPartialMatches(args[1], GAMERULE_STATES, new ArrayList<>(GAMERULE_STATES.size())); } return ImmutableList.of(); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GiveCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GiveCommand.java index c8b7f0f..11bd96b 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GiveCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/GiveCommand.java @@ -22,7 +22,7 @@ import com.google.common.collect.ImmutableList; public class GiveCommand extends VanillaCommand { private static List materials; static { - ArrayList materialList = new ArrayList(); + ArrayList materialList = new ArrayList<>(); for (Material material : Material.values()) { materialList.add(material.name()); } @@ -64,7 +64,7 @@ public class GiveCommand extends VanillaCommand { if (args.length >= 4) { try { data = Short.parseShort(args[3]); - } catch (NumberFormatException ex) {} + } catch (NumberFormatException ignored) {} } } @@ -104,7 +104,7 @@ public class GiveCommand extends VanillaCommand { if (args.length == 2) { final String arg = args[1]; final List materials = GiveCommand.materials; - List completion = new ArrayList(); + List completion = new ArrayList<>(); final int size = materials.size(); int i = Collections.binarySearch(materials, arg, String.CASE_INSENSITIVE_ORDER); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/HelpCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/HelpCommand.java index aa359e4..162d37f 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/HelpCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/HelpCommand.java @@ -118,7 +118,7 @@ public class HelpCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - List matchedTopics = new ArrayList(); + List matchedTopics = new ArrayList<>(); String searchString = args[0]; for (HelpTopic topic : Bukkit.getServer().getHelpMap().getHelpTopics()) { String trimmedTopic = topic.getName().startsWith("/") ? topic.getName().substring(1) : topic.getName(); @@ -134,7 +134,7 @@ public class HelpCommand extends VanillaCommand { protected HelpTopic findPossibleMatches(String searchString) { int maxDistance = (searchString.length() / 5) + 3; - Set possibleMatches = new TreeSet(HelpTopicComparator.helpTopicComparatorInstance()); + Set possibleMatches = new TreeSet<>(HelpTopicComparator.helpTopicComparatorInstance()); if (searchString.startsWith("/")) { searchString = searchString.substring(1); @@ -198,7 +198,7 @@ public class HelpCommand extends VanillaCommand { H[0][j + 1] = INF; } - Map sd = new HashMap(); + Map sd = new HashMap<>(); for (char Letter : (s1 + s2).toCharArray()) { if (!sd.containsKey(Letter)) { sd.put(Letter, 0); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ListCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ListCommand.java index ea62bee..b756be4 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ListCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ListCommand.java @@ -39,7 +39,7 @@ public class ListCommand extends VanillaCommand { online.append(player.getDisplayName()); } - sender.sendMessage("There are " + players.size() + "/" + Bukkit.getMaxPlayers() + " players online:\n" + online.toString()); + sender.sendMessage("There are " + players.size() + "/" + Bukkit.getMaxPlayers() + " players online:\n" + online); return true; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/MeCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/MeCommand.java index b0d7bf5..2a029cb 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/MeCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/MeCommand.java @@ -29,7 +29,7 @@ public class MeCommand extends VanillaCommand { message.append(arg); } - Bukkit.broadcastMessage("* " + message.toString()); + Bukkit.broadcastMessage("* " + message); return true; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/OpCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/OpCommand.java index f5bb8b1..6a3daa1 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/OpCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/OpCommand.java @@ -57,7 +57,7 @@ public class OpCommand extends VanillaCommand { Player senderPlayer = (Player) sender; - ArrayList matchedPlayers = new ArrayList(); + ArrayList matchedPlayers = new ArrayList<>(); for (Player player : sender.getServer().getOnlinePlayers()) { String name = player.getName(); if (!senderPlayer.canSee(player) || player.isOp()) { @@ -68,7 +68,7 @@ public class OpCommand extends VanillaCommand { } } - Collections.sort(matchedPlayers, String.CASE_INSENSITIVE_ORDER); + matchedPlayers.sort(String.CASE_INSENSITIVE_ORDER); return matchedPlayers; } return ImmutableList.of(); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PardonCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PardonCommand.java index 762189a..6477229 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PardonCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PardonCommand.java @@ -43,7 +43,7 @@ public class PardonCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - List completions = new ArrayList(); + List completions = new ArrayList<>(); for (OfflinePlayer player : Bukkit.getBannedPlayers()) { String name = player.getName(); if (StringUtil.startsWithIgnoreCase(name, args[0])) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PardonIpCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PardonIpCommand.java index 0f63c26..2ea3f44 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PardonIpCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PardonIpCommand.java @@ -46,7 +46,7 @@ public class PardonIpCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], Bukkit.getIPBans(), new ArrayList()); + return StringUtil.copyPartialMatches(args[0], Bukkit.getIPBans(), new ArrayList<>()); } return ImmutableList.of(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PluginsCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PluginsCommand.java index e21d167..1dc06d1 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PluginsCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/PluginsCommand.java @@ -1,6 +1,7 @@ package org.bukkit.command.defaults; import java.util.Arrays; +import java.util.Collections; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -13,7 +14,7 @@ public class PluginsCommand extends BukkitCommand { this.description = "Gets a list of plugins running on the server"; this.usageMessage = "/plugins"; this.setPermission("bukkit.command.plugins"); - this.setAliases(Arrays.asList("pl")); + this.setAliases(Collections.singletonList("pl")); } @Override @@ -38,7 +39,7 @@ public class PluginsCommand extends BukkitCommand { pluginList.append(plugin.getDescription().getName()); } - return "(" + plugins.length + "): " + pluginList.toString(); + return "(" + plugins.length + "): " + pluginList; } // Spigot Start diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ReloadCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ReloadCommand.java index c70d512..22f81af 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ReloadCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ReloadCommand.java @@ -1,6 +1,7 @@ package org.bukkit.command.defaults; import java.util.Arrays; +import java.util.Collections; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -13,7 +14,7 @@ public class ReloadCommand extends BukkitCommand { this.description = "Reloads the server configuration and plugins"; this.usageMessage = "/reload"; this.setPermission("bukkit.command.reload"); - this.setAliases(Arrays.asList("rl")); + this.setAliases(Collections.singletonList("rl")); } @Override diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ScoreboardCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ScoreboardCommand.java index 00197f7..975fef2 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ScoreboardCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/ScoreboardCommand.java @@ -365,7 +365,7 @@ public class ScoreboardCommand extends VanillaCommand { if (team == null) { sender.sendMessage(ChatColor.RED + "No team was found by the name '" + teamName + "'"); } else { - Set addedPlayers = new HashSet(); + Set addedPlayers = new HashSet<>(); if ((sender instanceof Player) && args.length == 3) { team.addPlayer((Player) sender); addedPlayers.add(sender.getName()); @@ -390,8 +390,8 @@ public class ScoreboardCommand extends VanillaCommand { sender.sendMessage(ChatColor.RED + "/scoreboard teams leave [player...]"); return false; } - Set left = new HashSet(); - Set noTeam = new HashSet(); + Set left = new HashSet<>(); + Set noTeam = new HashSet<>(); if ((sender instanceof Player) && args.length == 2) { Team team = mainScoreboard.getPlayerTeam((Player) sender); if (team != null) { @@ -485,52 +485,52 @@ public class ScoreboardCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], MAIN_CHOICES, new ArrayList()); + return StringUtil.copyPartialMatches(args[0], MAIN_CHOICES, new ArrayList<>()); } if (args.length > 1) { if (args[0].equalsIgnoreCase("objectives")) { if (args.length == 2) { - return StringUtil.copyPartialMatches(args[1], OBJECTIVES_CHOICES, new ArrayList()); + return StringUtil.copyPartialMatches(args[1], OBJECTIVES_CHOICES, new ArrayList<>()); } if (args[1].equalsIgnoreCase("add")) { if (args.length == 4) { - return StringUtil.copyPartialMatches(args[3], OBJECTIVES_CRITERIA, new ArrayList()); + return StringUtil.copyPartialMatches(args[3], OBJECTIVES_CRITERIA, new ArrayList<>()); } } else if (args[1].equalsIgnoreCase("remove")) { if (args.length == 3) { - return StringUtil.copyPartialMatches(args[2], this.getCurrentObjectives(), new ArrayList()); + return StringUtil.copyPartialMatches(args[2], this.getCurrentObjectives(), new ArrayList<>()); } } else if (args[1].equalsIgnoreCase("setdisplay")) { if (args.length == 3) { - return StringUtil.copyPartialMatches(args[2], OBJECTIVES_DISPLAYSLOT.keySet(), new ArrayList()); + return StringUtil.copyPartialMatches(args[2], OBJECTIVES_DISPLAYSLOT.keySet(), new ArrayList<>()); } if (args.length == 4) { - return StringUtil.copyPartialMatches(args[3], this.getCurrentObjectives(), new ArrayList()); + return StringUtil.copyPartialMatches(args[3], this.getCurrentObjectives(), new ArrayList<>()); } } } else if (args[0].equalsIgnoreCase("players")) { if (args.length == 2) { - return StringUtil.copyPartialMatches(args[1], PLAYERS_CHOICES, new ArrayList()); + return StringUtil.copyPartialMatches(args[1], PLAYERS_CHOICES, new ArrayList<>()); } if (args[1].equalsIgnoreCase("set") || args[1].equalsIgnoreCase("add") || args[1].equalsIgnoreCase("remove")) { if (args.length == 3) { return super.tabComplete(sender, alias, args); } if (args.length == 4) { - return StringUtil.copyPartialMatches(args[3], this.getCurrentObjectives(), new ArrayList()); + return StringUtil.copyPartialMatches(args[3], this.getCurrentObjectives(), new ArrayList<>()); } } else { if (args.length == 3) { - return StringUtil.copyPartialMatches(args[2], this.getCurrentEntries(), new ArrayList()); + return StringUtil.copyPartialMatches(args[2], this.getCurrentEntries(), new ArrayList<>()); } } } else if (args[0].equalsIgnoreCase("teams")) { if (args.length == 2) { - return StringUtil.copyPartialMatches(args[1], TEAMS_CHOICES, new ArrayList()); + return StringUtil.copyPartialMatches(args[1], TEAMS_CHOICES, new ArrayList<>()); } if (args[1].equalsIgnoreCase("join")) { if (args.length == 3) { - return StringUtil.copyPartialMatches(args[2], this.getCurrentTeams(), new ArrayList()); + return StringUtil.copyPartialMatches(args[2], this.getCurrentTeams(), new ArrayList<>()); } if (args.length >= 4) { return super.tabComplete(sender, alias, args); @@ -539,21 +539,21 @@ public class ScoreboardCommand extends VanillaCommand { return super.tabComplete(sender, alias, args); } else if (args[1].equalsIgnoreCase("option")) { if (args.length == 3) { - return StringUtil.copyPartialMatches(args[2], this.getCurrentTeams(), new ArrayList()); + return StringUtil.copyPartialMatches(args[2], this.getCurrentTeams(), new ArrayList<>()); } if (args.length == 4) { - return StringUtil.copyPartialMatches(args[3], TEAMS_OPTION_CHOICES, new ArrayList()); + return StringUtil.copyPartialMatches(args[3], TEAMS_OPTION_CHOICES, new ArrayList<>()); } if (args.length == 5) { if (args[3].equalsIgnoreCase("color")) { - return StringUtil.copyPartialMatches(args[4], TEAMS_OPTION_COLOR.keySet(), new ArrayList()); + return StringUtil.copyPartialMatches(args[4], TEAMS_OPTION_COLOR.keySet(), new ArrayList<>()); } else { - return StringUtil.copyPartialMatches(args[4], BOOLEAN, new ArrayList()); + return StringUtil.copyPartialMatches(args[4], BOOLEAN, new ArrayList<>()); } } } else { if (args.length == 3) { - return StringUtil.copyPartialMatches(args[2], this.getCurrentTeams(), new ArrayList()); + return StringUtil.copyPartialMatches(args[2], this.getCurrentTeams(), new ArrayList<>()); } } } @@ -590,29 +590,27 @@ public class ScoreboardCommand extends VanillaCommand { } private List getCurrentObjectives() { - List list = new ArrayList(); + List list = new ArrayList<>(); for (Objective objective : Bukkit.getScoreboardManager().getMainScoreboard().getObjectives()) { list.add(objective.getName()); } - Collections.sort(list, String.CASE_INSENSITIVE_ORDER); + list.sort(String.CASE_INSENSITIVE_ORDER); return list; } private List getCurrentEntries() { - List list = new ArrayList(); - for (String entry : Bukkit.getScoreboardManager().getMainScoreboard().getEntries()) { - list.add(entry); - } - Collections.sort(list, String.CASE_INSENSITIVE_ORDER); + List list = new ArrayList<>(); + list.addAll(Bukkit.getScoreboardManager().getMainScoreboard().getEntries()); + list.sort(String.CASE_INSENSITIVE_ORDER); return list; } private List getCurrentTeams() { - List list = new ArrayList(); + List list = new ArrayList<>(); for (Team team : Bukkit.getScoreboardManager().getMainScoreboard().getTeams()) { list.add(team.getName()); } - Collections.sort(list, String.CASE_INSENSITIVE_ORDER); + list.sort(String.CASE_INSENSITIVE_ORDER); return list; } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/SpreadPlayersCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/SpreadPlayersCommand.java index 489f760..e5b6b4b 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/SpreadPlayersCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/SpreadPlayersCommand.java @@ -180,11 +180,10 @@ public class SpreadPlayersCommand extends VanillaCommand { } if (!flag) { - Location[] locs = locations; int i1 = locations.length; for (j = 0; j < i1; ++j) { - loc1 = locs[j]; + loc1 = locations[j]; if (world.getHighestBlockYAt(loc1) == 0) { double x = xRangeMin >= xRangeMax ? xRangeMin : random.nextDouble() * (xRangeMax - xRangeMin) + xRangeMin; double z = zRangeMin >= zRangeMax ? zRangeMin : random.nextDouble() * (zRangeMax - zRangeMin) + zRangeMin; @@ -209,8 +208,7 @@ public class SpreadPlayersCommand extends VanillaCommand { int i = 0; Map hashmap = Maps.newHashMap(); - for (int j = 0; j < list.size(); ++j) { - Player player = list.get(j); + for (Player player : list) { Location location; if (teams) { @@ -228,9 +226,9 @@ public class SpreadPlayersCommand extends VanillaCommand { player.teleport(new Location(world, Math.floor(location.getX()) + 0.5D, world.getHighestBlockYAt((int) location.getX(), (int) location.getZ()), Math.floor(location.getZ()) + 0.5D)); double value = Double.MAX_VALUE; - for (int k = 0; k < locations.length; ++k) { - if (location != locations[k]) { - double d = location.distanceSquared(locations[k]); + for (Location item : locations) { + if (location != item) { + double d = location.distanceSquared(item); value = Math.min(d, value); } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TestForCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TestForCommand.java index e168b49..b5758a9 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TestForCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TestForCommand.java @@ -1,6 +1,5 @@ package org.bukkit.command.defaults; -import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TimeCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TimeCommand.java index edce68a..12128e3 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TimeCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TimeCommand.java @@ -80,9 +80,9 @@ public class TimeCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], TABCOMPLETE_ADD_SET, new ArrayList(TABCOMPLETE_ADD_SET.size())); + return StringUtil.copyPartialMatches(args[0], TABCOMPLETE_ADD_SET, new ArrayList<>(TABCOMPLETE_ADD_SET.size())); } else if (args.length == 2 && args[0].equalsIgnoreCase("set")) { - return StringUtil.copyPartialMatches(args[1], TABCOMPLETE_DAY_NIGHT, new ArrayList(TABCOMPLETE_DAY_NIGHT.size())); + return StringUtil.copyPartialMatches(args[1], TABCOMPLETE_DAY_NIGHT, new ArrayList<>(TABCOMPLETE_DAY_NIGHT.size())); } return ImmutableList.of(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TimingsCommand.java index 80e0b0f..b6d04d1 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TimingsCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/TimingsCommand.java @@ -20,16 +20,7 @@ import org.bukkit.util.StringUtil; import com.google.common.collect.ImmutableList; // Spigot start -import java.io.ByteArrayOutputStream; -import java.io.OutputStream; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLEncoder; -import java.util.logging.Level; -import org.bukkit.command.RemoteConsoleCommandSender; -import org.bukkit.plugin.SimplePluginManager; -import org.spigotmc.CustomTimingsHandler; // Spigot end public class TimingsCommand extends BukkitCommand { @@ -107,7 +98,7 @@ public class TimingsCommand extends BukkitCommand { } sender.sendMessage("Timings written to " + timings.getPath()); if (separate) sender.sendMessage("Names written to " + names.getPath()); - } catch (IOException e) { + } catch (IOException ignored) { } finally { if (fileTimings != null) { fileTimings.close(); @@ -130,7 +121,7 @@ public class TimingsCommand extends BukkitCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], TIMINGS_SUBCOMMANDS, new ArrayList(TIMINGS_SUBCOMMANDS.size())); + return StringUtil.copyPartialMatches(args[0], TIMINGS_SUBCOMMANDS, new ArrayList<>(TIMINGS_SUBCOMMANDS.size())); } return ImmutableList.of(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/VanillaCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/VanillaCommand.java index 9105712..3d65460 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/VanillaCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/VanillaCommand.java @@ -35,7 +35,7 @@ public abstract class VanillaCommand extends Command { int i = min; try { - i = Integer.valueOf(value); + i = Integer.parseInt(value); } catch (NumberFormatException ex) { if (Throws) { throw new NumberFormatException(String.format("%s is not a valid number", value)); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/VersionCommand.java index 4cd4a09..23e1448 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/VersionCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/VersionCommand.java @@ -35,7 +35,7 @@ public class VersionCommand extends BukkitCommand { "§3This server is running §b§leSpigot§3 by the ElevateMC development team. Version §b§l1.8.8", }; - sender.sendMessage(message);; + sender.sendMessage(message); } else { StringBuilder name = new StringBuilder(); @@ -121,7 +121,7 @@ public class VersionCommand extends BukkitCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - List completions = new ArrayList(); + List completions = new ArrayList<>(); String toComplete = args[0].toLowerCase(); for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) { if (StringUtil.startsWithIgnoreCase(plugin.getName(), toComplete)) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/WeatherCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/WeatherCommand.java index b86a508..2e99484 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/WeatherCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/WeatherCommand.java @@ -66,7 +66,7 @@ public class WeatherCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], WEATHER_TYPES, new ArrayList(WEATHER_TYPES.size())); + return StringUtil.copyPartialMatches(args[0], WEATHER_TYPES, new ArrayList<>(WEATHER_TYPES.size())); } return ImmutableList.of(); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java index 855f560..cb20012 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java @@ -60,7 +60,7 @@ public class WhitelistCommand extends VanillaCommand { result.append(player.getName()); } - sender.sendMessage("White-listed players: " + result.toString()); + sender.sendMessage("White-listed players: " + result); return true; } } else if (args.length == 2) { @@ -101,10 +101,10 @@ public class WhitelistCommand extends VanillaCommand { Validate.notNull(alias, "Alias cannot be null"); if (args.length == 1) { - return StringUtil.copyPartialMatches(args[0], WHITELIST_SUBCOMMANDS, new ArrayList(WHITELIST_SUBCOMMANDS.size())); + return StringUtil.copyPartialMatches(args[0], WHITELIST_SUBCOMMANDS, new ArrayList<>(WHITELIST_SUBCOMMANDS.size())); } else if (args.length == 2) { if (args[0].equalsIgnoreCase("add")) { - List completions = new ArrayList(); + List completions = new ArrayList<>(); for (OfflinePlayer player : Bukkit.getOnlinePlayers()) { // Spigot - well maybe sometimes you haven't turned the whitelist on just yet. String name = player.getName(); if (StringUtil.startsWithIgnoreCase(name, args[1]) && !player.isWhitelisted()) { @@ -113,7 +113,7 @@ public class WhitelistCommand extends VanillaCommand { } return completions; } else if (args[0].equalsIgnoreCase("remove")) { - List completions = new ArrayList(); + List completions = new ArrayList<>(); for (OfflinePlayer player : Bukkit.getWhitelistedPlayers()) { String name = player.getName(); if (StringUtil.startsWithIgnoreCase(name, args[1])) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/Configuration.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/Configuration.java index 52e3ac4..ff44e60 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/Configuration.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/Configuration.java @@ -20,7 +20,7 @@ public interface Configuration extends ConfigurationSection { * @param value Value to set the default to. * @throws IllegalArgumentException Thrown if path is null. */ - public void addDefault(String path, Object value); + void addDefault(String path, Object value); /** * Sets the default values of the given paths as provided. @@ -32,7 +32,7 @@ public interface Configuration extends ConfigurationSection { * @param defaults A map of Path{@literal ->}Values to add to defaults. * @throws IllegalArgumentException Thrown if defaults is null. */ - public void addDefaults(Map defaults); + void addDefaults(Map defaults); /** * Sets the default values of the given paths as provided. @@ -49,7 +49,7 @@ public interface Configuration extends ConfigurationSection { * @param defaults A configuration holding a list of defaults to copy. * @throws IllegalArgumentException Thrown if defaults is null or this. */ - public void addDefaults(Configuration defaults); + void addDefaults(Configuration defaults); /** * Sets the source of all default values for this {@link Configuration}. @@ -60,7 +60,7 @@ public interface Configuration extends ConfigurationSection { * @param defaults New source of default values for this configuration. * @throws IllegalArgumentException Thrown if defaults is null or this. */ - public void setDefaults(Configuration defaults); + void setDefaults(Configuration defaults); /** * Gets the source {@link Configuration} for this configuration. @@ -71,7 +71,7 @@ public interface Configuration extends ConfigurationSection { * * @return Configuration source for default values, or null if none exist. */ - public Configuration getDefaults(); + Configuration getDefaults(); /** * Gets the {@link ConfigurationOptions} for this {@link Configuration}. @@ -80,5 +80,5 @@ public interface Configuration extends ConfigurationSection { * * @return Options for this configuration */ - public ConfigurationOptions options(); + ConfigurationOptions options(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/ConfigurationSection.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/ConfigurationSection.java index 9afc1dc..16e4bc6 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/ConfigurationSection.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/ConfigurationSection.java @@ -27,7 +27,7 @@ public interface ConfigurationSection { * list. * @return Set of keys contained within this ConfigurationSection. */ - public Set getKeys(boolean deep); + Set getKeys(boolean deep); /** * Gets a Map containing all keys and their values for this section. @@ -43,7 +43,7 @@ public interface ConfigurationSection { * list. * @return Map of keys and values of this section. */ - public Map getValues(boolean deep); + Map getValues(boolean deep); /** * Checks if this {@link ConfigurationSection} contains the given path. @@ -56,7 +56,7 @@ public interface ConfigurationSection { * default or being set. * @throws IllegalArgumentException Thrown when path is null. */ - public boolean contains(String path); + boolean contains(String path); /** * Checks if this {@link ConfigurationSection} has a value set for the @@ -70,7 +70,7 @@ public interface ConfigurationSection { * having a default. * @throws IllegalArgumentException Thrown when path is null. */ - public boolean isSet(String path); + boolean isSet(String path); /** * Gets the path of this {@link ConfigurationSection} from its root {@link @@ -87,7 +87,7 @@ public interface ConfigurationSection { * * @return Path of this section relative to its root */ - public String getCurrentPath(); + String getCurrentPath(); /** * Gets the name of this individual {@link ConfigurationSection}, in the @@ -98,7 +98,7 @@ public interface ConfigurationSection { * * @return Name of this section */ - public String getName(); + String getName(); /** * Gets the root {@link Configuration} that contains this {@link @@ -112,7 +112,7 @@ public interface ConfigurationSection { * * @return Root configuration containing this section. */ - public Configuration getRoot(); + Configuration getRoot(); /** * Gets the parent {@link ConfigurationSection} that directly contains @@ -125,7 +125,7 @@ public interface ConfigurationSection { * * @return Parent section containing this section. */ - public ConfigurationSection getParent(); + ConfigurationSection getParent(); /** * Gets the requested Object by path. @@ -137,7 +137,7 @@ public interface ConfigurationSection { * @param path Path of the Object to get. * @return Requested Object. */ - public Object get(String path); + Object get(String path); /** * Gets the requested Object by path, returning a default value if not @@ -151,7 +151,7 @@ public interface ConfigurationSection { * @param def The default value to return if the path is not found. * @return Requested Object. */ - public Object get(String path, Object def); + Object get(String path, Object def); /** * Sets the specified path to the given value. @@ -167,7 +167,7 @@ public interface ConfigurationSection { * @param path Path of the object to set. * @param value New value to set the path to. */ - public void set(String path, Object value); + void set(String path, Object value); /** * Creates an empty {@link ConfigurationSection} at the specified path. @@ -179,7 +179,7 @@ public interface ConfigurationSection { * @param path Path to create the section at. * @return Newly created section */ - public ConfigurationSection createSection(String path); + ConfigurationSection createSection(String path); /** * Creates a {@link ConfigurationSection} at the specified path, with @@ -193,7 +193,7 @@ public interface ConfigurationSection { * @param map The values to used. * @return Newly created section */ - public ConfigurationSection createSection(String path, Map map); + ConfigurationSection createSection(String path, Map map); // Primitives /** @@ -206,7 +206,7 @@ public interface ConfigurationSection { * @param path Path of the String to get. * @return Requested String. */ - public String getString(String path); + String getString(String path); /** * Gets the requested String by path, returning a default value if not @@ -221,7 +221,7 @@ public interface ConfigurationSection { * not a String. * @return Requested String. */ - public String getString(String path, String def); + String getString(String path, String def); /** * Checks if the specified path is a String. @@ -234,7 +234,7 @@ public interface ConfigurationSection { * @param path Path of the String to check. * @return Whether or not the specified path is a String. */ - public boolean isString(String path); + boolean isString(String path); /** * Gets the requested int by path. @@ -246,7 +246,7 @@ public interface ConfigurationSection { * @param path Path of the int to get. * @return Requested int. */ - public int getInt(String path); + int getInt(String path); /** * Gets the requested int by path, returning a default value if not found. @@ -260,7 +260,7 @@ public interface ConfigurationSection { * not an int. * @return Requested int. */ - public int getInt(String path, int def); + int getInt(String path, int def); /** * Checks if the specified path is an int. @@ -273,7 +273,7 @@ public interface ConfigurationSection { * @param path Path of the int to check. * @return Whether or not the specified path is an int. */ - public boolean isInt(String path); + boolean isInt(String path); /** * Gets the requested boolean by path. @@ -285,7 +285,7 @@ public interface ConfigurationSection { * @param path Path of the boolean to get. * @return Requested boolean. */ - public boolean getBoolean(String path); + boolean getBoolean(String path); /** * Gets the requested boolean by path, returning a default value if not @@ -300,7 +300,7 @@ public interface ConfigurationSection { * not a boolean. * @return Requested boolean. */ - public boolean getBoolean(String path, boolean def); + boolean getBoolean(String path, boolean def); /** * Checks if the specified path is a boolean. @@ -313,7 +313,7 @@ public interface ConfigurationSection { * @param path Path of the boolean to check. * @return Whether or not the specified path is a boolean. */ - public boolean isBoolean(String path); + boolean isBoolean(String path); /** * Gets the requested double by path. @@ -325,7 +325,7 @@ public interface ConfigurationSection { * @param path Path of the double to get. * @return Requested double. */ - public double getDouble(String path); + double getDouble(String path); /** * Gets the requested double by path, returning a default value if not @@ -340,7 +340,7 @@ public interface ConfigurationSection { * not a double. * @return Requested double. */ - public double getDouble(String path, double def); + double getDouble(String path, double def); /** * Checks if the specified path is a double. @@ -353,7 +353,7 @@ public interface ConfigurationSection { * @param path Path of the double to check. * @return Whether or not the specified path is a double. */ - public boolean isDouble(String path); + boolean isDouble(String path); // PaperSpigot start - Add getFloat /** @@ -366,7 +366,7 @@ public interface ConfigurationSection { * @param path Path of the float to get. * @return Requested float. */ - public float getFloat(String path); + float getFloat(String path); /** * Gets the requested float by path, returning a default value if not @@ -381,7 +381,7 @@ public interface ConfigurationSection { * not a float. * @return Requested float. */ - public float getFloat(String path, float def); + float getFloat(String path, float def); /** * Checks if the specified path is a float. @@ -394,7 +394,7 @@ public interface ConfigurationSection { * @param path Path of the float to check. * @return Whether or not the specified path is a float. */ - public boolean isFloat(String path); + boolean isFloat(String path); // PaperSpigot end /** @@ -407,7 +407,7 @@ public interface ConfigurationSection { * @param path Path of the long to get. * @return Requested long. */ - public long getLong(String path); + long getLong(String path); /** * Gets the requested long by path, returning a default value if not @@ -422,7 +422,7 @@ public interface ConfigurationSection { * not a long. * @return Requested long. */ - public long getLong(String path, long def); + long getLong(String path, long def); /** * Checks if the specified path is a long. @@ -435,7 +435,7 @@ public interface ConfigurationSection { * @param path Path of the long to check. * @return Whether or not the specified path is a long. */ - public boolean isLong(String path); + boolean isLong(String path); // Java /** @@ -448,7 +448,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List. */ - public List getList(String path); + List getList(String path); /** * Gets the requested List by path, returning a default value if not @@ -463,7 +463,7 @@ public interface ConfigurationSection { * not a List. * @return Requested List. */ - public List getList(String path, List def); + List getList(String path, List def); /** * Checks if the specified path is a List. @@ -476,7 +476,7 @@ public interface ConfigurationSection { * @param path Path of the List to check. * @return Whether or not the specified path is a List. */ - public boolean isList(String path); + boolean isList(String path); /** * Gets the requested List of String by path. @@ -491,7 +491,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List of String. */ - public List getStringList(String path); + List getStringList(String path); /** * Gets the requested List of Integer by path. @@ -506,7 +506,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List of Integer. */ - public List getIntegerList(String path); + List getIntegerList(String path); /** * Gets the requested List of Boolean by path. @@ -521,7 +521,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List of Boolean. */ - public List getBooleanList(String path); + List getBooleanList(String path); /** * Gets the requested List of Double by path. @@ -536,7 +536,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List of Double. */ - public List getDoubleList(String path); + List getDoubleList(String path); /** * Gets the requested List of Float by path. @@ -551,7 +551,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List of Float. */ - public List getFloatList(String path); + List getFloatList(String path); /** * Gets the requested List of Long by path. @@ -566,7 +566,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List of Long. */ - public List getLongList(String path); + List getLongList(String path); /** * Gets the requested List of Byte by path. @@ -581,7 +581,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List of Byte. */ - public List getByteList(String path); + List getByteList(String path); /** * Gets the requested List of Character by path. @@ -596,7 +596,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List of Character. */ - public List getCharacterList(String path); + List getCharacterList(String path); /** * Gets the requested List of Short by path. @@ -611,7 +611,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List of Short. */ - public List getShortList(String path); + List getShortList(String path); /** * Gets the requested List of Maps by path. @@ -626,7 +626,7 @@ public interface ConfigurationSection { * @param path Path of the List to get. * @return Requested List of Maps. */ - public List> getMapList(String path); + List> getMapList(String path); // Bukkit /** @@ -639,7 +639,7 @@ public interface ConfigurationSection { * @param path Path of the Vector to get. * @return Requested Vector. */ - public Vector getVector(String path); + Vector getVector(String path); /** * Gets the requested {@link Vector} by path, returning a default value if @@ -654,7 +654,7 @@ public interface ConfigurationSection { * not a Vector. * @return Requested Vector. */ - public Vector getVector(String path, Vector def); + Vector getVector(String path, Vector def); /** * Checks if the specified path is a Vector. @@ -667,7 +667,7 @@ public interface ConfigurationSection { * @param path Path of the Vector to check. * @return Whether or not the specified path is a Vector. */ - public boolean isVector(String path); + boolean isVector(String path); /** * Gets the requested OfflinePlayer by path. @@ -680,7 +680,7 @@ public interface ConfigurationSection { * @param path Path of the OfflinePlayer to get. * @return Requested OfflinePlayer. */ - public OfflinePlayer getOfflinePlayer(String path); + OfflinePlayer getOfflinePlayer(String path); /** * Gets the requested {@link OfflinePlayer} by path, returning a default @@ -695,7 +695,7 @@ public interface ConfigurationSection { * not an OfflinePlayer. * @return Requested OfflinePlayer. */ - public OfflinePlayer getOfflinePlayer(String path, OfflinePlayer def); + OfflinePlayer getOfflinePlayer(String path, OfflinePlayer def); /** * Checks if the specified path is an OfflinePlayer. @@ -708,7 +708,7 @@ public interface ConfigurationSection { * @param path Path of the OfflinePlayer to check. * @return Whether or not the specified path is an OfflinePlayer. */ - public boolean isOfflinePlayer(String path); + boolean isOfflinePlayer(String path); /** * Gets the requested ItemStack by path. @@ -720,7 +720,7 @@ public interface ConfigurationSection { * @param path Path of the ItemStack to get. * @return Requested ItemStack. */ - public ItemStack getItemStack(String path); + ItemStack getItemStack(String path); /** * Gets the requested {@link ItemStack} by path, returning a default value @@ -735,7 +735,7 @@ public interface ConfigurationSection { * not an ItemStack. * @return Requested ItemStack. */ - public ItemStack getItemStack(String path, ItemStack def); + ItemStack getItemStack(String path, ItemStack def); /** * Checks if the specified path is an ItemStack. @@ -748,7 +748,7 @@ public interface ConfigurationSection { * @param path Path of the ItemStack to check. * @return Whether or not the specified path is an ItemStack. */ - public boolean isItemStack(String path); + boolean isItemStack(String path); /** * Gets the requested Color by path. @@ -760,7 +760,7 @@ public interface ConfigurationSection { * @param path Path of the Color to get. * @return Requested Color. */ - public Color getColor(String path); + Color getColor(String path); /** * Gets the requested {@link Color} by path, returning a default value if @@ -775,7 +775,7 @@ public interface ConfigurationSection { * not a Color. * @return Requested Color. */ - public Color getColor(String path, Color def); + Color getColor(String path, Color def); /** * Checks if the specified path is a Color. @@ -788,7 +788,7 @@ public interface ConfigurationSection { * @param path Path of the Color to check. * @return Whether or not the specified path is a Color. */ - public boolean isColor(String path); + boolean isColor(String path); /** * Gets the requested ConfigurationSection by path. @@ -801,7 +801,7 @@ public interface ConfigurationSection { * @param path Path of the ConfigurationSection to get. * @return Requested ConfigurationSection. */ - public ConfigurationSection getConfigurationSection(String path); + ConfigurationSection getConfigurationSection(String path); /** * Checks if the specified path is a ConfigurationSection. @@ -815,7 +815,7 @@ public interface ConfigurationSection { * @param path Path of the ConfigurationSection to check. * @return Whether or not the specified path is a ConfigurationSection. */ - public boolean isConfigurationSection(String path); + boolean isConfigurationSection(String path); /** * Gets the equivalent {@link ConfigurationSection} from the default @@ -827,7 +827,7 @@ public interface ConfigurationSection { * * @return Equivalent section in root configuration */ - public ConfigurationSection getDefaultSection(); + ConfigurationSection getDefaultSection(); /** * Sets the default value in the root at the given path as provided. @@ -847,5 +847,5 @@ public interface ConfigurationSection { * @param value Value to set the default to. * @throws IllegalArgumentException Thrown if path is null. */ - public void addDefault(String path, Object value); + void addDefault(String path, Object value); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/MemorySection.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/MemorySection.java index 0e2b26a..a3227f6 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/MemorySection.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/MemorySection.java @@ -19,7 +19,7 @@ import org.bukkit.util.Vector; * A type of {@link ConfigurationSection} that is stored in memory. */ public class MemorySection implements ConfigurationSection { - protected final Map map = new LinkedHashMap(); + protected final Map map = new LinkedHashMap<>(); private final Configuration root; private final ConfigurationSection parent; private final String path; @@ -69,7 +69,7 @@ public class MemorySection implements ConfigurationSection { } public Set getKeys(boolean deep) { - Set result = new LinkedHashSet(); + Set result = new LinkedHashSet<>(); Configuration root = getRoot(); if (root != null && root.options().copyDefaults()) { @@ -86,7 +86,7 @@ public class MemorySection implements ConfigurationSection { } public Map getValues(boolean deep) { - Map result = new LinkedHashMap(); + Map result = new LinkedHashMap<>(); Configuration root = getRoot(); if (root != null && root.options().copyDefaults()) { @@ -388,10 +388,10 @@ public class MemorySection implements ConfigurationSection { List list = getList(path); if (list == null) { - return new ArrayList(0); + return new ArrayList<>(0); } - List result = new ArrayList(); + List result = new ArrayList<>(); for (Object object : list) { if ((object instanceof String) || (isPrimitiveWrapper(object))) { @@ -406,10 +406,10 @@ public class MemorySection implements ConfigurationSection { List list = getList(path); if (list == null) { - return new ArrayList(0); + return new ArrayList<>(0); } - List result = new ArrayList(); + List result = new ArrayList<>(); for (Object object : list) { if (object instanceof Integer) { @@ -417,10 +417,10 @@ public class MemorySection implements ConfigurationSection { } else if (object instanceof String) { try { result.add(Integer.valueOf((String) object)); - } catch (Exception ex) { + } catch (Exception ignored) { } } else if (object instanceof Character) { - result.add((int) ((Character) object).charValue()); + result.add((int) (Character) object); } else if (object instanceof Number) { result.add(((Number) object).intValue()); } @@ -433,10 +433,10 @@ public class MemorySection implements ConfigurationSection { List list = getList(path); if (list == null) { - return new ArrayList(0); + return new ArrayList<>(0); } - List result = new ArrayList(); + List result = new ArrayList<>(); for (Object object : list) { if (object instanceof Boolean) { @@ -457,10 +457,10 @@ public class MemorySection implements ConfigurationSection { List list = getList(path); if (list == null) { - return new ArrayList(0); + return new ArrayList<>(0); } - List result = new ArrayList(); + List result = new ArrayList<>(); for (Object object : list) { if (object instanceof Double) { @@ -468,10 +468,10 @@ public class MemorySection implements ConfigurationSection { } else if (object instanceof String) { try { result.add(Double.valueOf((String) object)); - } catch (Exception ex) { + } catch (Exception ignored) { } } else if (object instanceof Character) { - result.add((double) ((Character) object).charValue()); + result.add((double) (Character) object); } else if (object instanceof Number) { result.add(((Number) object).doubleValue()); } @@ -484,10 +484,10 @@ public class MemorySection implements ConfigurationSection { List list = getList(path); if (list == null) { - return new ArrayList(0); + return new ArrayList<>(0); } - List result = new ArrayList(); + List result = new ArrayList<>(); for (Object object : list) { if (object instanceof Float) { @@ -495,10 +495,10 @@ public class MemorySection implements ConfigurationSection { } else if (object instanceof String) { try { result.add(Float.valueOf((String) object)); - } catch (Exception ex) { + } catch (Exception ignored) { } } else if (object instanceof Character) { - result.add((float) ((Character) object).charValue()); + result.add((float) (Character) object); } else if (object instanceof Number) { result.add(((Number) object).floatValue()); } @@ -511,10 +511,10 @@ public class MemorySection implements ConfigurationSection { List list = getList(path); if (list == null) { - return new ArrayList(0); + return new ArrayList<>(0); } - List result = new ArrayList(); + List result = new ArrayList<>(); for (Object object : list) { if (object instanceof Long) { @@ -522,10 +522,10 @@ public class MemorySection implements ConfigurationSection { } else if (object instanceof String) { try { result.add(Long.valueOf((String) object)); - } catch (Exception ex) { + } catch (Exception ignored) { } } else if (object instanceof Character) { - result.add((long) ((Character) object).charValue()); + result.add((long) (Character) object); } else if (object instanceof Number) { result.add(((Number) object).longValue()); } @@ -538,10 +538,10 @@ public class MemorySection implements ConfigurationSection { List list = getList(path); if (list == null) { - return new ArrayList(0); + return new ArrayList<>(0); } - List result = new ArrayList(); + List result = new ArrayList<>(); for (Object object : list) { if (object instanceof Byte) { @@ -549,7 +549,7 @@ public class MemorySection implements ConfigurationSection { } else if (object instanceof String) { try { result.add(Byte.valueOf((String) object)); - } catch (Exception ex) { + } catch (Exception ignored) { } } else if (object instanceof Character) { result.add((byte) ((Character) object).charValue()); @@ -565,10 +565,10 @@ public class MemorySection implements ConfigurationSection { List list = getList(path); if (list == null) { - return new ArrayList(0); + return new ArrayList<>(0); } - List result = new ArrayList(); + List result = new ArrayList<>(); for (Object object : list) { if (object instanceof Character) { @@ -591,10 +591,10 @@ public class MemorySection implements ConfigurationSection { List list = getList(path); if (list == null) { - return new ArrayList(0); + return new ArrayList<>(0); } - List result = new ArrayList(); + List result = new ArrayList<>(); for (Object object : list) { if (object instanceof Short) { @@ -602,7 +602,7 @@ public class MemorySection implements ConfigurationSection { } else if (object instanceof String) { try { result.add(Short.valueOf((String) object)); - } catch (Exception ex) { + } catch (Exception ignored) { } } else if (object instanceof Character) { result.add((short) ((Character) object).charValue()); @@ -616,7 +616,7 @@ public class MemorySection implements ConfigurationSection { public List> getMapList(String path) { List list = getList(path); - List> result = new ArrayList>(); + List> result = new ArrayList<>(); if (list == null) { return result; diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/FileConfiguration.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/FileConfiguration.java index 9cbe0ca..b6078db 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/FileConfiguration.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/FileConfiguration.java @@ -18,6 +18,7 @@ import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; import org.bukkit.configuration.Configuration; import org.bukkit.configuration.MemoryConfiguration; @@ -58,7 +59,7 @@ public abstract class FileConfiguration extends MemoryConfiguration { final Charset defaultCharset = Charset.defaultCharset(); final String resultString = new String(testBytes, defaultCharset); final boolean trueUTF = defaultCharset.name().contains("UTF"); - UTF8_OVERRIDE = !testString.equals(resultString) || defaultCharset.equals(Charset.forName("US-ASCII")); + UTF8_OVERRIDE = !testString.equals(resultString) || defaultCharset.equals(StandardCharsets.US_ASCII); SYSTEM_UTF = trueUTF || UTF8_OVERRIDE; UTF_BIG = trueUTF && UTF8_OVERRIDE; } @@ -102,12 +103,8 @@ public abstract class FileConfiguration extends MemoryConfiguration { String data = saveToString(); - Writer writer = new OutputStreamWriter(new FileOutputStream(file), UTF8_OVERRIDE && !UTF_BIG ? Charsets.UTF_8 : Charset.defaultCharset()); - - try { + try (Writer writer = new OutputStreamWriter(new FileOutputStream(file), UTF8_OVERRIDE && !UTF_BIG ? Charsets.UTF_8 : Charset.defaultCharset())) { writer.write(data); - } finally { - writer.close(); } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java index ea4c2b3..ddc2df2 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java @@ -52,7 +52,7 @@ public class YamlConfiguration extends FileConfiguration { Map input; try { - input = (Map) yaml.load(contents); + input = yaml.load(contents); } catch (YAMLException e) { throw new InvalidConfigurationException(e); } catch (ClassCastException e) { @@ -178,11 +178,9 @@ public class YamlConfiguration extends FileConfiguration { try { config.load(file); - } catch (FileNotFoundException ex) { - } catch (IOException ex) { + } catch (FileNotFoundException ignored) { + } catch (IOException | InvalidConfigurationException ex) { Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + file, ex); - } catch (InvalidConfigurationException ex) { - Bukkit.getLogger().log(Level.SEVERE, "Cannot load " + file , ex); } return config; @@ -210,9 +208,7 @@ public class YamlConfiguration extends FileConfiguration { try { config.load(stream); - } catch (IOException ex) { - Bukkit.getLogger().log(Level.SEVERE, "Cannot load configuration from stream", ex); - } catch (InvalidConfigurationException ex) { + } catch (IOException | InvalidConfigurationException ex) { Bukkit.getLogger().log(Level.SEVERE, "Cannot load configuration from stream", ex); } @@ -238,9 +234,7 @@ public class YamlConfiguration extends FileConfiguration { try { config.load(reader); - } catch (IOException ex) { - Bukkit.getLogger().log(Level.SEVERE, "Cannot load configuration from stream", ex); - } catch (InvalidConfigurationException ex) { + } catch (IOException | InvalidConfigurationException ex) { Bukkit.getLogger().log(Level.SEVERE, "Cannot load configuration from stream", ex); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConstructor.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConstructor.java index 73ad722..0e61f56 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConstructor.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConstructor.java @@ -26,7 +26,7 @@ public class YamlConstructor extends SafeConstructor { Map raw = (Map) super.construct(node); if (raw.containsKey(ConfigurationSerialization.SERIALIZED_TYPE_KEY)) { - Map typed = new LinkedHashMap(raw.size()); + Map typed = new LinkedHashMap<>(raw.size()); for (Map.Entry entry : raw.entrySet()) { typed.put(entry.getKey().toString(), entry.getValue()); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlRepresenter.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlRepresenter.java index bc9c098..a9184a9 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlRepresenter.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/file/YamlRepresenter.java @@ -28,7 +28,7 @@ public class YamlRepresenter extends Representer { @Override public Node representData(Object data) { ConfigurationSerializable serializable = (ConfigurationSerializable) data; - Map values = new LinkedHashMap(); + Map values = new LinkedHashMap<>(); values.put(ConfigurationSerialization.SERIALIZED_TYPE_KEY, ConfigurationSerialization.getAlias(serializable.getClass())); values.putAll(serializable.serialize()); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java index 74b73f9..8f7c893 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java @@ -31,5 +31,5 @@ public interface ConfigurationSerializable { * * @return Map containing the current state of this class */ - public Map serialize(); + Map serialize(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerialization.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerialization.java index e5ddef2..6897750 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerialization.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerialization.java @@ -26,7 +26,7 @@ import org.bukkit.util.Vector; public class ConfigurationSerialization { public static final String SERIALIZED_TYPE_KEY = "=="; private final Class clazz; - private static Map> aliases = new HashMap>(); + private static Map> aliases = new HashMap<>(); static { registerClass(Vector.class); @@ -55,9 +55,7 @@ public class ConfigurationSerialization { } return method; - } catch (NoSuchMethodException ex) { - return null; - } catch (SecurityException ex) { + } catch (NoSuchMethodException | SecurityException ex) { return null; } } @@ -65,9 +63,7 @@ public class ConfigurationSerialization { protected Constructor getConstructor() { try { return clazz.getConstructor(Map.class); - } catch (NoSuchMethodException ex) { - return null; - } catch (SecurityException ex) { + } catch (NoSuchMethodException | SecurityException ex) { return null; } } @@ -77,7 +73,7 @@ public class ConfigurationSerialization { ConfigurationSerializable result = (ConfigurationSerializable) method.invoke(null, args); if (result == null) { - Logger.getLogger(ConfigurationSerialization.class.getName()).log(Level.SEVERE, "Could not call method '" + method.toString() + "' of " + clazz + " for deserialization: method returned null"); + Logger.getLogger(ConfigurationSerialization.class.getName()).log(Level.SEVERE, "Could not call method '" + method + "' of " + clazz + " for deserialization: method returned null"); } else { return result; } @@ -239,7 +235,6 @@ public class ConfigurationSerialization { */ public static void unregisterClass(Class clazz) { while (aliases.values().remove(clazz)) { - ; } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/DelegateDeserialization.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/DelegateDeserialization.java index 1cfae94..559ca0a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/DelegateDeserialization.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/DelegateDeserialization.java @@ -18,5 +18,5 @@ public @interface DelegateDeserialization { * * @return Delegate class */ - public Class value(); + Class value(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/SerializableAs.java b/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/SerializableAs.java index c5ee998..721d426 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/SerializableAs.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/configuration/serialization/SerializableAs.java @@ -30,5 +30,5 @@ public @interface SerializableAs { * * @return Name to serialize the class as. */ - public String value(); + String value(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/conversations/Conversable.java b/TacoSpigot-API/src/main/java/org/bukkit/conversations/Conversable.java index 55674b5..f86b6d6 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/conversations/Conversable.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/conversations/Conversable.java @@ -1,7 +1,5 @@ package org.bukkit.conversations; -import org.bukkit.command.CommandSender; - /** * The Conversable interface is used to indicate objects that can have * conversations. @@ -14,7 +12,7 @@ public interface Conversable { * * @return True if a conversation is in progress */ - public boolean isConversing(); + boolean isConversing(); /** * Accepts input into the active conversation. If no conversation is in @@ -22,7 +20,7 @@ public interface Conversable { * * @param input The input message into the conversation */ - public void acceptConversationInput(String input); + void acceptConversationInput(String input); /** * Enters into a dialog with a Conversation object. @@ -31,14 +29,14 @@ public interface Conversable { * @return True if the conversation should proceed, false if it has been * enqueued */ - public boolean beginConversation(Conversation conversation); + boolean beginConversation(Conversation conversation); /** * Abandons an active conversation. * * @param conversation The conversation to abandon */ - public void abandonConversation(Conversation conversation); + void abandonConversation(Conversation conversation); /** * Abandons an active conversation. @@ -46,12 +44,12 @@ public interface Conversable { * @param conversation The conversation to abandon * @param details Details about why the conversation was abandoned */ - public void abandonConversation(Conversation conversation, ConversationAbandonedEvent details); + void abandonConversation(Conversation conversation, ConversationAbandonedEvent details); /** * Sends this sender a message raw * * @param message Message to be displayed */ - public void sendRawMessage(String message); + void sendRawMessage(String message); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/conversations/Conversation.java b/TacoSpigot-API/src/main/java/org/bukkit/conversations/Conversation.java index 46912c8..bbc68d3 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/conversations/Conversation.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/conversations/Conversation.java @@ -52,7 +52,7 @@ public class Conversation { * @param firstPrompt The first prompt in the conversation graph. */ public Conversation(Plugin plugin, Conversable forWhom, Prompt firstPrompt) { - this(plugin, forWhom, firstPrompt, new HashMap()); + this(plugin, forWhom, firstPrompt, new HashMap<>()); } /** @@ -70,8 +70,8 @@ public class Conversation { this.modal = true; this.localEchoEnabled = true; this.prefix = new NullConversationPrefix(); - this.cancellers = new ArrayList(); - this.abandonedListeners = new ArrayList(); + this.cancellers = new ArrayList<>(); + this.abandonedListeners = new ArrayList<>(); } /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationAbandonedListener.java b/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationAbandonedListener.java index dc046b1..406d48e 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationAbandonedListener.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationAbandonedListener.java @@ -11,5 +11,5 @@ public interface ConversationAbandonedListener extends EventListener { * @param abandonedEvent Contains details about the abandoned * conversation. */ - public void conversationAbandoned(ConversationAbandonedEvent abandonedEvent); + void conversationAbandoned(ConversationAbandonedEvent abandonedEvent); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationCanceller.java b/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationCanceller.java index db43bb1..946fc88 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationCanceller.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationCanceller.java @@ -11,7 +11,7 @@ public interface ConversationCanceller extends Cloneable { * * @param conversation A conversation. */ - public void setConversation(Conversation conversation); + void setConversation(Conversation conversation); /** * Cancels a conversation based on user input. @@ -20,7 +20,7 @@ public interface ConversationCanceller extends Cloneable { * @param input The input text from the user. * @return True to cancel the conversation, False otherwise. */ - public boolean cancelBasedOnInput(ConversationContext context, String input); + boolean cancelBasedOnInput(ConversationContext context, String input); /** * Allows the {@link ConversationFactory} to duplicate this @@ -30,5 +30,5 @@ public interface ConversationCanceller extends Cloneable { * * @return A clone. */ - public ConversationCanceller clone(); + ConversationCanceller clone(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationFactory.java b/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationFactory.java index e7cbd52..7d8bfa4 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationFactory.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationFactory.java @@ -42,10 +42,10 @@ public class ConversationFactory { localEchoEnabled = true; prefix = new NullConversationPrefix(); firstPrompt = Prompt.END_OF_CONVERSATION; - initialSessionData = new HashMap(); + initialSessionData = new HashMap<>(); playerOnlyMessage = null; - cancellers = new ArrayList(); - abandonedListeners = new ArrayList(); + cancellers = new ArrayList<>(); + abandonedListeners = new ArrayList<>(); } /** @@ -192,8 +192,7 @@ public class ConversationFactory { } //Clone any initial session data - Map copiedInitialSessionData = new HashMap(); - copiedInitialSessionData.putAll(initialSessionData); + Map copiedInitialSessionData = new HashMap<>(initialSessionData); //Build and return a conversation Conversation conversation = new Conversation(plugin, forWhom, firstPrompt, copiedInitialSessionData); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationPrefix.java b/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationPrefix.java index 9889f17..3febfa6 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationPrefix.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/conversations/ConversationPrefix.java @@ -1,7 +1,5 @@ package org.bukkit.conversations; -import org.bukkit.command.CommandSender; - /** * A ConversationPrefix implementation prepends all output from the * conversation to the player. The ConversationPrefix can be used to display diff --git a/TacoSpigot-API/src/main/java/org/bukkit/conversations/InactivityConversationCanceller.java b/TacoSpigot-API/src/main/java/org/bukkit/conversations/InactivityConversationCanceller.java index 760a518..a39f661 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/conversations/InactivityConversationCanceller.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/conversations/InactivityConversationCanceller.java @@ -1,6 +1,5 @@ package org.bukkit.conversations; -import org.bukkit.Server; import org.bukkit.plugin.Plugin; /** @@ -44,16 +43,14 @@ public class InactivityConversationCanceller implements ConversationCanceller { * Starts an inactivity timer. */ private void startTimer() { - taskId = plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() { - public void run() { - if (conversation.getState() == Conversation.ConversationState.UNSTARTED) { - startTimer(); - } else if (conversation.getState() == Conversation.ConversationState.STARTED) { - cancelling(conversation); - conversation.abandon(new ConversationAbandonedEvent(conversation, InactivityConversationCanceller.this)); - } + taskId = plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, () -> { + if (conversation.getState() == Conversation.ConversationState.UNSTARTED) { + startTimer(); + } else if (conversation.getState() == Conversation.ConversationState.STARTED) { + cancelling(conversation); + conversation.abandon(new ConversationAbandonedEvent(conversation, InactivityConversationCanceller.this)); } - }, timeoutSeconds * 20); + }, timeoutSeconds * 20L); } /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/conversations/NullConversationPrefix.java b/TacoSpigot-API/src/main/java/org/bukkit/conversations/NullConversationPrefix.java index 7d8a7d8..a462112 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/conversations/NullConversationPrefix.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/conversations/NullConversationPrefix.java @@ -1,7 +1,5 @@ package org.bukkit.conversations; -import org.bukkit.command.CommandSender; - /** * NullConversationPrefix is a {@link ConversationPrefix} implementation that * displays nothing in front of conversation output. diff --git a/TacoSpigot-API/src/main/java/org/bukkit/conversations/PluginNameConversationPrefix.java b/TacoSpigot-API/src/main/java/org/bukkit/conversations/PluginNameConversationPrefix.java index 2290979..dcb7e24 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/conversations/PluginNameConversationPrefix.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/conversations/PluginNameConversationPrefix.java @@ -1,7 +1,6 @@ package org.bukkit.conversations; import org.bukkit.ChatColor; -import org.bukkit.command.CommandSender; import org.bukkit.plugin.Plugin; /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/conversations/Prompt.java b/TacoSpigot-API/src/main/java/org/bukkit/conversations/Prompt.java index 7519c84..2b1dafe 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/conversations/Prompt.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/conversations/Prompt.java @@ -12,7 +12,7 @@ public interface Prompt extends Cloneable { /** * A convenience constant for indicating the end of a conversation. */ - static final Prompt END_OF_CONVERSATION = null; + Prompt END_OF_CONVERSATION = null; /** * Gets the text to display to the user when this prompt is first diff --git a/TacoSpigot-API/src/main/java/org/bukkit/enchantments/Enchantment.java b/TacoSpigot-API/src/main/java/org/bukkit/enchantments/Enchantment.java index c82d679..57bfe0c 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/enchantments/Enchantment.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/enchantments/Enchantment.java @@ -136,8 +136,8 @@ public abstract class Enchantment { */ public static final Enchantment LURE = new EnchantmentWrapper(62); - private static final Map byId = new HashMap(); - private static final Map byName = new HashMap(); + private static final Map byId = new HashMap<>(); + private static final Map byName = new HashMap<>(); private static boolean acceptingNew = true; private final int id; @@ -292,6 +292,6 @@ public abstract class Enchantment { * @return Array of enchantments */ public static Enchantment[] values() { - return byId.values().toArray(new Enchantment[byId.size()]); + return byId.values().toArray(new Enchantment[0]); } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Ageable.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Ageable.java index e9fccb2..cd89bb6 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Ageable.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Ageable.java @@ -9,14 +9,14 @@ public interface Ageable extends Creature { * * @return Age */ - public int getAge(); + int getAge(); /** * Sets the age of this animal. * * @param age New age */ - public void setAge(int age); + void setAge(int age); /** * Lock the age of the animal, setting this will prevent the animal from @@ -24,38 +24,38 @@ public interface Ageable extends Creature { * * @param lock new lock */ - public void setAgeLock(boolean lock); + void setAgeLock(boolean lock); /** * Gets the current agelock. * * @return the current agelock */ - public boolean getAgeLock(); + boolean getAgeLock(); /** * Sets the age of the animal to a baby */ - public void setBaby(); + void setBaby(); /** * Sets the age of the animal to an adult */ - public void setAdult(); + void setAdult(); /** * Returns true if the animal is an adult. * * @return return true if the animal is an adult */ - public boolean isAdult(); + boolean isAdult(); /** * Return the ability to breed of the animal. * * @return the ability to breed of the animal */ - public boolean canBreed(); + boolean canBreed(); /** * Set breedability of the animal, if the animal is a baby and set to @@ -63,5 +63,5 @@ public interface Ageable extends Creature { * * @param breed breedability of the animal */ - public void setBreed(boolean breed); + void setBreed(boolean breed); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/AnimalTamer.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/AnimalTamer.java index 5f74f0d..5eb87cc 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/AnimalTamer.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/AnimalTamer.java @@ -9,12 +9,12 @@ public interface AnimalTamer { * * @return The name to reference on tamed animals or null if a name cannot be obtained */ - public String getName(); + String getName(); /** * This is the UUID of the specified AnimalTamer. * * @return The UUID to reference on tamed animals */ - public UUID getUniqueId(); + UUID getUniqueId(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Arrow.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Arrow.java index e7a32f7..5edb514 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Arrow.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Arrow.java @@ -12,14 +12,14 @@ public interface Arrow extends Projectile { * * @return the knockback strength value */ - public int getKnockbackStrength(); + int getKnockbackStrength(); /** * Sets the knockback strength for an arrow. * * @param knockbackStrength the knockback strength value */ - public void setKnockbackStrength(int knockbackStrength); + void setKnockbackStrength(int knockbackStrength); /** * Gets whether this arrow is critical. @@ -31,16 +31,16 @@ public interface Arrow extends Projectile { * * @return true if it is critical */ - public boolean isCritical(); + boolean isCritical(); /** * Sets whether or not this arrow should be critical. * * @param critical whether or not it should be critical */ - public void setCritical(boolean critical); + void setCritical(boolean critical); - public class Spigot extends Entity.Spigot + class Spigot extends Entity.Spigot { public double getDamage() diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Boat.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Boat.java index ed2d178..1395cd3 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Boat.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Boat.java @@ -11,14 +11,14 @@ public interface Boat extends Vehicle { * * @return The max speed. */ - public double getMaxSpeed(); + double getMaxSpeed(); /** * Sets the maximum speed of a boat. Must be nonnegative. Default is 0.4D. * * @param speed The max speed. */ - public void setMaxSpeed(double speed); + void setMaxSpeed(double speed); /** * Gets the deceleration rate (newSpeed = curSpeed * rate) of occupied @@ -26,7 +26,7 @@ public interface Boat extends Vehicle { * * @return The rate of deceleration */ - public double getOccupiedDeceleration(); + double getOccupiedDeceleration(); /** * Sets the deceleration rate (newSpeed = curSpeed * rate) of occupied @@ -35,7 +35,7 @@ public interface Boat extends Vehicle { * * @param rate deceleration rate */ - public void setOccupiedDeceleration(double rate); + void setOccupiedDeceleration(double rate); /** * Gets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied @@ -44,7 +44,7 @@ public interface Boat extends Vehicle { * * @return The rate of deceleration */ - public double getUnoccupiedDeceleration(); + double getUnoccupiedDeceleration(); /** * Sets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied @@ -54,19 +54,19 @@ public interface Boat extends Vehicle { * * @param rate deceleration rate */ - public void setUnoccupiedDeceleration(double rate); + void setUnoccupiedDeceleration(double rate); /** * Get whether boats can work on land. * * @return whether boats can work on land */ - public boolean getWorkOnLand(); + boolean getWorkOnLand(); /** * Set whether boats can work on land. * * @param workOnLand whether boats can work on land */ - public void setWorkOnLand(boolean workOnLand); + void setWorkOnLand(boolean workOnLand); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/ComplexEntityPart.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/ComplexEntityPart.java index f4ab0bb..ced75ec 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/ComplexEntityPart.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/ComplexEntityPart.java @@ -10,5 +10,5 @@ public interface ComplexEntityPart extends Entity { * * @return Parent complex entity */ - public ComplexLivingEntity getParent(); + ComplexLivingEntity getParent(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/ComplexLivingEntity.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/ComplexLivingEntity.java index f74411c..3b3aaa7 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/ComplexLivingEntity.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/ComplexLivingEntity.java @@ -12,5 +12,5 @@ public interface ComplexLivingEntity extends LivingEntity { * * @return List of parts */ - public Set getParts(); + Set getParts(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Creature.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Creature.java index f223f55..337b7bd 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Creature.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Creature.java @@ -15,12 +15,12 @@ public interface Creature extends LivingEntity { * * @param target New LivingEntity to target, or null to clear the target */ - public void setTarget(LivingEntity target); + void setTarget(LivingEntity target); /** * Gets the current target of this Creature * * @return Current target of this creature, or null if none exists */ - public LivingEntity getTarget(); + LivingEntity getTarget(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/CreatureType.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/CreatureType.java index 127d475..16b41b4 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/CreatureType.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/CreatureType.java @@ -43,8 +43,8 @@ public enum CreatureType { private Class clazz; private short typeId; - private static final Map NAME_MAP = new HashMap(); - private static final Map ID_MAP = new HashMap(); + private static final Map NAME_MAP = new HashMap<>(); + private static final Map ID_MAP = new HashMap<>(); static { for (CreatureType type : EnumSet.allOf(CreatureType.class)) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Creeper.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Creeper.java index a2f7809..c31505a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Creeper.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Creeper.java @@ -10,12 +10,12 @@ public interface Creeper extends Monster { * * @return true if this creeper is powered */ - public boolean isPowered(); + boolean isPowered(); /** * Sets the Powered status of this Creeper * * @param value New Powered status */ - public void setPowered(boolean value); + void setPowered(boolean value); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/EnderDragonPart.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/EnderDragonPart.java index 9516f56..4b35ee7 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/EnderDragonPart.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/EnderDragonPart.java @@ -4,5 +4,5 @@ package org.bukkit.entity; * Represents an ender dragon part */ public interface EnderDragonPart extends ComplexEntityPart, Damageable { - public EnderDragon getParent(); + EnderDragon getParent(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Enderman.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Enderman.java index 0b66a92..3e286ea 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Enderman.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Enderman.java @@ -12,12 +12,12 @@ public interface Enderman extends Monster { * * @return MaterialData containing the id and data of the block */ - public MaterialData getCarriedMaterial(); + MaterialData getCarriedMaterial(); /** * Set the id and data of the block that the Enderman is carring. * * @param material data to set the carried block to */ - public void setCarriedMaterial(MaterialData material); + void setCarriedMaterial(MaterialData material); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Entity.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Entity.java index 7fb08af..87a29d1 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Entity.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Entity.java @@ -23,7 +23,7 @@ public interface Entity extends Metadatable, CommandSender { * * @return a new copy of Location containing the position of this entity */ - public Location getLocation(); + Location getLocation(); /** * Stores the entity's current position in the provided Location object. @@ -34,21 +34,21 @@ public interface Entity extends Metadatable, CommandSender { * @param loc the location to copy into * @return The Location object provided or null */ - public Location getLocation(Location loc); + Location getLocation(Location loc); /** * Sets this entity's velocity * * @param velocity New velocity to travel with */ - public void setVelocity(Vector velocity); + void setVelocity(Vector velocity); /** * Gets this entity's current velocity * * @return Current travelling velocity of this entity */ - public Vector getVelocity(); + Vector getVelocity(); /** * Returns true if the entity is supported by a block. This value is a @@ -57,14 +57,14 @@ public interface Entity extends Metadatable, CommandSender { * * @return True if entity is on ground. */ - public boolean isOnGround(); + boolean isOnGround(); /** * Gets the current world this entity resides in * * @return World */ - public World getWorld(); + World getWorld(); /** * Teleports this entity to the given location. If this entity is riding a @@ -73,7 +73,7 @@ public interface Entity extends Metadatable, CommandSender { * @param location New location to teleport this entity to * @return true if the teleport was successful */ - public boolean teleport(Location location); + boolean teleport(Location location); /** * Teleports this entity to the given location. If this entity is riding a @@ -83,7 +83,7 @@ public interface Entity extends Metadatable, CommandSender { * @param cause The cause of this teleportation * @return true if the teleport was successful */ - public boolean teleport(Location location, TeleportCause cause); + boolean teleport(Location location, TeleportCause cause); /** * Teleports this entity to the target Entity. If this entity is riding a @@ -92,7 +92,7 @@ public interface Entity extends Metadatable, CommandSender { * @param destination Entity to teleport this entity to * @return true if the teleport was successful */ - public boolean teleport(Entity destination); + boolean teleport(Entity destination); /** * Teleports this entity to the target Entity. If this entity is riding a @@ -102,7 +102,7 @@ public interface Entity extends Metadatable, CommandSender { * @param cause The cause of this teleportation * @return true if the teleport was successful */ - public boolean teleport(Entity destination, TeleportCause cause); + boolean teleport(Entity destination, TeleportCause cause); /** * Returns a list of entities within a bounding box centered around this @@ -113,14 +113,14 @@ public interface Entity extends Metadatable, CommandSender { * @param z 1/2 the size of the box along z axis * @return {@code List} List of entities nearby */ - public List getNearbyEntities(double x, double y, double z); + List getNearbyEntities(double x, double y, double z); /** * Returns a unique id for this entity * * @return Entity id */ - public int getEntityId(); + int getEntityId(); /** * Returns the entity's current fire ticks (ticks before the entity stops @@ -128,14 +128,14 @@ public interface Entity extends Metadatable, CommandSender { * * @return int fireTicks */ - public int getFireTicks(); + int getFireTicks(); /** * Returns the entity's maximum fire ticks. * * @return int maxFireTicks */ - public int getMaxFireTicks(); + int getMaxFireTicks(); /** * Sets the entity's current fire ticks (ticks before the entity stops @@ -143,19 +143,19 @@ public interface Entity extends Metadatable, CommandSender { * * @param ticks Current ticks remaining */ - public void setFireTicks(int ticks); + void setFireTicks(int ticks); /** * Mark the entity's removal. */ - public void remove(); + void remove(); /** * Returns true if this entity has been marked for removal. * * @return True if it is dead. */ - public boolean isDead(); + boolean isDead(); /** * Returns false if the entity has died or been despawned for some other @@ -163,14 +163,14 @@ public interface Entity extends Metadatable, CommandSender { * * @return True if valid. */ - public boolean isValid(); + boolean isValid(); /** * Gets the {@link Server} that contains this Entity * * @return Server instance running this Entity */ - public Server getServer(); + Server getServer(); /** * Gets the primary passenger of a vehicle. For vehicles that could have @@ -178,7 +178,7 @@ public interface Entity extends Metadatable, CommandSender { * * @return an entity */ - public abstract Entity getPassenger(); + Entity getPassenger(); /** * Set the passenger of a vehicle. @@ -186,42 +186,42 @@ public interface Entity extends Metadatable, CommandSender { * @param passenger The new passenger. * @return false if it could not be done for whatever reason */ - public abstract boolean setPassenger(Entity passenger); + boolean setPassenger(Entity passenger); /** * Check if a vehicle has passengers. * * @return True if the vehicle has no passengers. */ - public abstract boolean isEmpty(); + boolean isEmpty(); /** * Eject any passenger. * * @return True if there was a passenger. */ - public abstract boolean eject(); + boolean eject(); /** * Returns the distance this entity has fallen * * @return The distance. */ - public float getFallDistance(); + float getFallDistance(); /** * Sets the fall distance for this entity * * @param distance The new distance. */ - public void setFallDistance(float distance); + void setFallDistance(float distance); /** * Record the last {@link EntityDamageEvent} inflicted on this entity * * @param event a {@link EntityDamageEvent} */ - public void setLastDamageCause(EntityDamageEvent event); + void setLastDamageCause(EntityDamageEvent event); /** * Retrieve the last {@link EntityDamageEvent} inflicted on this entity. @@ -230,14 +230,14 @@ public interface Entity extends Metadatable, CommandSender { * @return the last known {@link EntityDamageEvent} or null if hitherto * unharmed */ - public EntityDamageEvent getLastDamageCause(); + EntityDamageEvent getLastDamageCause(); /** * Returns a unique and persistent id for this entity * * @return unique id */ - public UUID getUniqueId(); + UUID getUniqueId(); /** * Gets the amount of ticks this entity has lived for. @@ -246,7 +246,7 @@ public interface Entity extends Metadatable, CommandSender { * * @return Age of entity */ - public int getTicksLived(); + int getTicksLived(); /** * Sets the amount of ticks this entity has lived for. @@ -256,7 +256,7 @@ public interface Entity extends Metadatable, CommandSender { * * @param value Age of entity */ - public void setTicksLived(int value); + void setTicksLived(int value); /** * Performs the specified {@link EntityEffect} for this entity. @@ -265,21 +265,21 @@ public interface Entity extends Metadatable, CommandSender { * * @param type Effect to play. */ - public void playEffect(EntityEffect type); + void playEffect(EntityEffect type); /** * Get the type of the entity. * * @return The entity type. */ - public EntityType getType(); + EntityType getType(); /** * Returns whether this entity is inside a vehicle. * * @return True if the entity is in a vehicle. */ - public boolean isInsideVehicle(); + boolean isInsideVehicle(); /** * Leave the current vehicle. If the entity is currently in a vehicle (and @@ -288,7 +288,7 @@ public interface Entity extends Metadatable, CommandSender { * * @return True if the entity was in a vehicle. */ - public boolean leaveVehicle(); + boolean leaveVehicle(); /** * Get the vehicle that this player is inside. If there is no vehicle, @@ -296,7 +296,7 @@ public interface Entity extends Metadatable, CommandSender { * * @return The current vehicle. */ - public Entity getVehicle(); + Entity getVehicle(); /** * Sets a custom name on a mob. This name will be used in death messages @@ -309,7 +309,7 @@ public interface Entity extends Metadatable, CommandSender { * * @param name the name to set */ - public void setCustomName(String name); + void setCustomName(String name); /** * Gets the custom name on a mob. If there is no name this method will @@ -320,7 +320,7 @@ public interface Entity extends Metadatable, CommandSender { * * @return name of the mob or null */ - public String getCustomName(); + String getCustomName(); /** * Sets whether or not to display the mob's custom name client side. The @@ -331,7 +331,7 @@ public interface Entity extends Metadatable, CommandSender { * * @param flag custom name or not */ - public void setCustomNameVisible(boolean flag); + void setCustomNameVisible(boolean flag); /** * Gets whether or not the mob's custom name is displayed client side. @@ -341,10 +341,10 @@ public interface Entity extends Metadatable, CommandSender { * * @return if the custom name is displayed */ - public boolean isCustomNameVisible(); + boolean isCustomNameVisible(); // Spigot Start - public class Spigot + class Spigot { /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/EntityType.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/EntityType.java index ccc024b..6775633 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/EntityType.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/EntityType.java @@ -179,8 +179,8 @@ public enum EntityType { private short typeId; private boolean independent, living; - private static final Map NAME_MAP = new HashMap(); - private static final Map ID_MAP = new HashMap(); + private static final Map NAME_MAP = new HashMap<>(); + private static final Map ID_MAP = new HashMap<>(); static { for (EntityType type : values()) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/ExperienceOrb.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/ExperienceOrb.java index c286edf..b63c5b1 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/ExperienceOrb.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/ExperienceOrb.java @@ -10,12 +10,12 @@ public interface ExperienceOrb extends Entity { * * @return Amount of experience */ - public int getExperience(); + int getExperience(); /** * Sets how much experience is contained within this orb * * @param value Amount of experience */ - public void setExperience(int value); + void setExperience(int value); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Explosive.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Explosive.java index 48650f6..af92008 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Explosive.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Explosive.java @@ -10,26 +10,26 @@ public interface Explosive extends Entity { * * @param yield The explosive yield */ - public void setYield(float yield); + void setYield(float yield); /** * Return the radius or yield of this explosive's explosion * * @return the radius of blocks affected */ - public float getYield(); + float getYield(); /** * Set whether or not this explosive's explosion causes fire * * @param isIncendiary Whether it should cause fire */ - public void setIsIncendiary(boolean isIncendiary); + void setIsIncendiary(boolean isIncendiary); /** * Return whether or not this explosive creates a fire when exploding * * @return true if the explosive creates fire, false otherwise */ - public boolean isIncendiary(); + boolean isIncendiary(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Fireball.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Fireball.java index 56ed578..918dd9e 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Fireball.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Fireball.java @@ -12,13 +12,13 @@ public interface Fireball extends Projectile, Explosive { * * @param direction the direction this fireball is flying toward */ - public void setDirection(Vector direction); + void setDirection(Vector direction); /** * Retrieve the direction this fireball is heading toward * * @return the direction */ - public Vector getDirection(); + Vector getDirection(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/FishHook.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/FishHook.java index 45b7f03..a75311d 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/FishHook.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/FishHook.java @@ -12,7 +12,7 @@ public interface FishHook extends Projectile { * * @return chance the bite chance */ - public double getBiteChance(); + double getBiteChance(); /** * Sets the chance of a fish biting. @@ -24,5 +24,5 @@ public interface FishHook extends Projectile { * @throws IllegalArgumentException if the bite chance is not between 0 * and 1 */ - public void setBiteChance(double chance) throws IllegalArgumentException; + void setBiteChance(double chance) throws IllegalArgumentException; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Guardian.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Guardian.java index 31f3c6a..751300e 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Guardian.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Guardian.java @@ -7,12 +7,12 @@ public interface Guardian extends Monster { * * @return true if the Guardian is an Elder Guardian, false if not */ - public boolean isElder(); + boolean isElder(); /** * Set the Guardian to an elder Guardian or not * * @param shouldBeElder True if this Guardian should be a elder Guardian, false if not */ - public void setElder(boolean shouldBeElder); + void setElder(boolean shouldBeElder); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Hanging.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Hanging.java index 67e9b61..4c36fbb 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Hanging.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Hanging.java @@ -18,5 +18,5 @@ public interface Hanging extends Entity, Attachable { * @return False if force was false and there was no block for it to * attach to in order to face the given direction. */ - public boolean setFacingDirection(BlockFace face, boolean force); + boolean setFacingDirection(BlockFace face, boolean force); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Horse.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Horse.java index e90d318..66a194f 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Horse.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Horse.java @@ -11,7 +11,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { /** * Represents the different types of horses that may exist. */ - public enum Variant { + enum Variant { /** * A normal horse */ @@ -32,13 +32,12 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * A skeleton horse */ SKELETON_HORSE, - ; } /** * Represents the base color that the horse has. */ - public enum Color { + enum Color { /** * Snow white */ @@ -67,13 +66,12 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * Dark brown */ DARK_BROWN, - ; } /** * Represents the style, or markings, that the horse has. */ - public enum Style { + enum Style { /** * No markings */ @@ -94,7 +92,6 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * Small black dots */ BLACK_DOTS, - ; } /** @@ -106,7 +103,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @return a {@link Variant} representing the horse's variant */ - public Variant getVariant(); + Variant getVariant(); /** * Sets the horse's variant. @@ -122,7 +119,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @param variant a {@link Variant} for this horse */ - public void setVariant(Variant variant); + void setVariant(Variant variant); /** * Gets the horse's color. @@ -132,7 +129,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @return a {@link Color} representing the horse's group */ - public Color getColor(); + Color getColor(); /** * Sets the horse's color. @@ -142,7 +139,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @param color a {@link Color} for this horse */ - public void setColor(Color color); + void setColor(Color color); /** * Gets the horse's style. @@ -153,7 +150,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @return a {@link Style} representing the horse's style */ - public Style getStyle(); + Style getStyle(); /** * Sets the style of this horse. @@ -164,14 +161,14 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @param style a {@link Style} for this horse */ - public void setStyle(Style style); + void setStyle(Style style); /** * Gets whether the horse has a chest equipped. * * @return true if the horse has chest storage */ - public boolean isCarryingChest(); + boolean isCarryingChest(); /** * Sets whether the horse has a chest equipped. @@ -179,7 +176,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @param chest true if the horse should have a chest */ - public void setCarryingChest(boolean chest); + void setCarryingChest(boolean chest); /** * Gets the domestication level of this horse. @@ -190,7 +187,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @return domestication level */ - public int getDomestication(); + int getDomestication(); /** * Sets the domestication level of this horse. @@ -204,7 +201,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @param level domestication level */ - public void setDomestication(int level); + void setDomestication(int level); /** * Gets the maximum domestication level of this horse. @@ -214,7 +211,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @return the max domestication level */ - public int getMaxDomestication(); + int getMaxDomestication(); /** * Sets the maximum domestication level of this horse. @@ -227,7 +224,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @param level the max domestication level */ - public void setMaxDomestication(int level); + void setMaxDomestication(int level); /** * Gets the jump strength of this horse. @@ -237,7 +234,7 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @return the horse's jump strength */ - public double getJumpStrength(); + double getJumpStrength(); /** * Sets the jump strength of this horse. @@ -249,8 +246,8 @@ public interface Horse extends Animals, Vehicle, InventoryHolder, Tameable { * * @param strength jump strength for this horse */ - public void setJumpStrength(double strength); + void setJumpStrength(double strength); @Override - public HorseInventory getInventory(); + HorseInventory getInventory(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/HumanEntity.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/HumanEntity.java index 3f8646d..1f171a8 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/HumanEntity.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/HumanEntity.java @@ -19,7 +19,7 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv * * @return Player name */ - public String getName(); + String getName(); /** * Get the player's inventory. @@ -27,14 +27,14 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv * @return The inventory of the player, this also contains the armor * slots. */ - public PlayerInventory getInventory(); + PlayerInventory getInventory(); /** * Get the player's EnderChest inventory * * @return The EnderChest of the player */ - public Inventory getEnderChest(); + Inventory getEnderChest(); /** * If the player currently has an inventory window open, this method will @@ -44,7 +44,7 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv * @param value The value to set the property to. * @return True if the property was successfully set. */ - public boolean setWindowProperty(InventoryView.Property prop, int value); + boolean setWindowProperty(InventoryView.Property prop, int value); /** * Gets the inventory view the player is currently viewing. If they do not @@ -52,7 +52,7 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv * * @return The inventory view. */ - public InventoryView getOpenInventory(); + InventoryView getOpenInventory(); /** * Opens an inventory window with the specified inventory on the top and @@ -61,7 +61,7 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv * @param inventory The inventory to open * @return The newly opened inventory view */ - public InventoryView openInventory(Inventory inventory); + InventoryView openInventory(Inventory inventory); /** * Opens an empty workbench inventory window with the player's inventory @@ -74,7 +74,7 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv * @return The newly opened inventory view, or null if it could not be * opened. */ - public InventoryView openWorkbench(Location location, boolean force); + InventoryView openWorkbench(Location location, boolean force); /** * Opens an empty enchanting inventory window with the player's inventory @@ -87,26 +87,26 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv * @return The newly opened inventory view, or null if it could not be * opened. */ - public InventoryView openEnchanting(Location location, boolean force); + InventoryView openEnchanting(Location location, boolean force); /** * Opens an inventory window to the specified inventory view. * * @param inventory The view to open */ - public void openInventory(InventoryView inventory); + void openInventory(InventoryView inventory); /** * Force-closes the currently open inventory view for this player, if any. */ - public void closeInventory(); + void closeInventory(); /** * Returns the ItemStack currently in your hand, can be empty. * * @return The ItemStack of the item you are currently holding. */ - public ItemStack getItemInHand(); + ItemStack getItemInHand(); /** * Sets the item to the given ItemStack, this will replace whatever the @@ -114,7 +114,7 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv * * @param item The ItemStack which will end up in the hand */ - public void setItemInHand(ItemStack item); + void setItemInHand(ItemStack item); /** * Returns the ItemStack currently on your cursor, can be empty. Will @@ -122,7 +122,7 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv * * @return The ItemStack of the item you are currently moving around. */ - public ItemStack getItemOnCursor(); + ItemStack getItemOnCursor(); /** * Sets the item to the given ItemStack, this will replace whatever the @@ -131,47 +131,47 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv * * @param item The ItemStack which will end up in the hand */ - public void setItemOnCursor(ItemStack item); + void setItemOnCursor(ItemStack item); /** * Returns whether this player is slumbering. * * @return slumber state */ - public boolean isSleeping(); + boolean isSleeping(); /** * Get the sleep ticks of the player. This value may be capped. * * @return slumber ticks */ - public int getSleepTicks(); + int getSleepTicks(); /** * Gets this human's current {@link GameMode} * * @return Current game mode */ - public GameMode getGameMode(); + GameMode getGameMode(); /** * Sets this human's current {@link GameMode} * * @param mode New game mode */ - public void setGameMode(GameMode mode); + void setGameMode(GameMode mode); /** * Check if the player is currently blocking (ie with a sword). * * @return Whether they are blocking. */ - public boolean isBlocking(); + boolean isBlocking(); /** * Get the total amount of experience required for the player to level * * @return Experience required to level up */ - public int getExpToLevel(); + int getExpToLevel(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/IronGolem.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/IronGolem.java index 655e37c..1eee51a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/IronGolem.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/IronGolem.java @@ -10,7 +10,7 @@ public interface IronGolem extends Golem { * * @return Whether this iron golem was built by a player */ - public boolean isPlayerCreated(); + boolean isPlayerCreated(); /** * Sets whether this iron golem was built by a player or not. @@ -18,5 +18,5 @@ public interface IronGolem extends Golem { * @param playerCreated true if you want to set the iron golem as being * player created, false if you want it to be a natural village golem. */ - public void setPlayerCreated(boolean playerCreated); + void setPlayerCreated(boolean playerCreated); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Item.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Item.java index 90260b7..4ec2575 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Item.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Item.java @@ -12,26 +12,26 @@ public interface Item extends Entity { * * @return An item stack. */ - public ItemStack getItemStack(); + ItemStack getItemStack(); /** * Sets the item stack associated with this item drop. * * @param stack An item stack. */ - public void setItemStack(ItemStack stack); + void setItemStack(ItemStack stack); /** * Gets the delay before this Item is available to be picked up by players * * @return Remaining delay */ - public int getPickupDelay(); + int getPickupDelay(); /** * Sets the delay before this Item is available to be picked up by players * * @param delay New delay */ - public void setPickupDelay(int delay); + void setPickupDelay(int delay); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/ItemFrame.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/ItemFrame.java index 8b86815..6af5ab9 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/ItemFrame.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/ItemFrame.java @@ -13,21 +13,21 @@ public interface ItemFrame extends Hanging { * * @return a defensive copy the item in this item frame */ - public ItemStack getItem(); + ItemStack getItem(); /** * Set the item in this frame * * @param item the new item */ - public void setItem(ItemStack item); + void setItem(ItemStack item); /** * Get the rotation of the frame's item * * @return the direction */ - public Rotation getRotation(); + Rotation getRotation(); /** * Set the rotation of the frame's item @@ -35,5 +35,5 @@ public interface ItemFrame extends Hanging { * @param rotation the new rotation * @throws IllegalArgumentException if rotation is null */ - public void setRotation(Rotation rotation) throws IllegalArgumentException; + void setRotation(Rotation rotation) throws IllegalArgumentException; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/LightningStrike.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/LightningStrike.java index 1ed4ac9..0966d77 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/LightningStrike.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/LightningStrike.java @@ -10,10 +10,10 @@ public interface LightningStrike extends Weather { * * @return whether the strike is an effect */ - public boolean isEffect(); + boolean isEffect(); - public class Spigot extends Entity.Spigot + class Spigot extends Entity.Spigot { /* diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/LivingEntity.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/LivingEntity.java index 9e0c005..681917b 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/LivingEntity.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/LivingEntity.java @@ -23,7 +23,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * * @return height of the living entity's eyes above its location */ - public double getEyeHeight(); + double getEyeHeight(); /** * Gets the height of the living entity's eyes above its Location. @@ -32,14 +32,14 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * ignored * @return height of the living entity's eyes above its location */ - public double getEyeHeight(boolean ignoreSneaking); + double getEyeHeight(boolean ignoreSneaking); /** * Get a Location detailing the current eye position of the living entity. * * @return a location at the eyes of the living entity */ - public Location getEyeLocation(); + Location getEyeLocation(); /** * Gets all blocks along the living entity's line of sight. @@ -56,7 +56,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @deprecated Magic value */ @Deprecated - public List getLineOfSight(HashSet transparent, int maxDistance); + List getLineOfSight(HashSet transparent, int maxDistance); /** * Gets all blocks along the living entity's line of sight. @@ -71,7 +71,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @return list containing all blocks along the living entity's line of * sight */ - public List getLineOfSight(Set transparent, int maxDistance); + List getLineOfSight(Set transparent, int maxDistance); /** * Gets the block that the living entity has targeted. @@ -84,7 +84,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @deprecated Magic value */ @Deprecated - public Block getTargetBlock(HashSet transparent, int maxDistance); + Block getTargetBlock(HashSet transparent, int maxDistance); /** * Gets the block that the living entity has targeted. @@ -95,7 +95,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * by server by at least 100 blocks, no less) * @return block that the living entity has targeted */ - public Block getTargetBlock(Set transparent, int maxDistance); + Block getTargetBlock(Set transparent, int maxDistance); /** * Gets the last two blocks along the living entity's line of sight. @@ -111,7 +111,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @deprecated Magic value */ @Deprecated - public List getLastTwoTargetBlocks(HashSet transparent, int maxDistance); + List getLastTwoTargetBlocks(HashSet transparent, int maxDistance); /** * Gets the last two blocks along the living entity's line of sight. @@ -125,7 +125,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @return list containing the last 2 blocks along the living entity's * line of sight */ - public List getLastTwoTargetBlocks(Set transparent, int maxDistance); + List getLastTwoTargetBlocks(Set transparent, int maxDistance); /** * Throws an egg from the living entity. @@ -134,7 +134,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @return the egg thrown */ @Deprecated - public Egg throwEgg(); + Egg throwEgg(); /** * Throws a snowball from the living entity. @@ -143,7 +143,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @return the snowball thrown */ @Deprecated - public Snowball throwSnowball(); + Snowball throwSnowball(); /** * Shoots an arrow from the living entity. @@ -152,7 +152,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @return the arrow shot */ @Deprecated - public Arrow shootArrow(); + Arrow shootArrow(); /** * Returns the amount of air that the living entity has remaining, in @@ -160,28 +160,28 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * * @return amount of air remaining */ - public int getRemainingAir(); + int getRemainingAir(); /** * Sets the amount of air that the living entity has remaining, in ticks. * * @param ticks amount of air remaining */ - public void setRemainingAir(int ticks); + void setRemainingAir(int ticks); /** * Returns the maximum amount of air the living entity can have, in ticks. * * @return maximum amount of air */ - public int getMaximumAir(); + int getMaximumAir(); /** * Sets the maximum amount of air the living entity can have, in ticks. * * @param ticks maximum amount of air */ - public void setMaximumAir(int ticks); + void setMaximumAir(int ticks); /** * Returns the living entity's current maximum no damage ticks. @@ -191,14 +191,14 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * * @return maximum no damage ticks */ - public int getMaximumNoDamageTicks(); + int getMaximumNoDamageTicks(); /** * Sets the living entity's current maximum no damage ticks. * * @param ticks maximum amount of no damage ticks */ - public void setMaximumNoDamageTicks(int ticks); + void setMaximumNoDamageTicks(int ticks); /** * Returns the living entity's last damage taken in the current no damage @@ -209,7 +209,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * * @return damage taken since the last no damage ticks time period */ - public double getLastDamage(); + double getLastDamage(); /** * This method exists for legacy reasons to provide backwards @@ -219,14 +219,14 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @return damage taken since the last no damage ticks time period */ @Deprecated - public int _INVALID_getLastDamage(); + int _INVALID_getLastDamage(); /** * Sets the damage dealt within the current no damage ticks time period. * * @param damage amount of damage */ - public void setLastDamage(double damage); + void setLastDamage(double damage); /** * This method exists for legacy reasons to provide backwards @@ -236,21 +236,21 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @param damage amount of damage */ @Deprecated - public void _INVALID_setLastDamage(int damage); + void _INVALID_setLastDamage(int damage); /** * Returns the living entity's current no damage ticks. * * @return amount of no damage ticks */ - public int getNoDamageTicks(); + int getNoDamageTicks(); /** * Sets the living entity's current no damage ticks. * * @param ticks amount of no damage ticks */ - public void setNoDamageTicks(int ticks); + void setNoDamageTicks(int ticks); /** * Gets the player identified as the killer of the living entity. @@ -259,7 +259,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * * @return killer player, or null if none found */ - public Player getKiller(); + Player getKiller(); /** * Adds the given {@link PotionEffect} to the living entity. @@ -270,7 +270,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @param effect PotionEffect to be added * @return whether the effect could be added */ - public boolean addPotionEffect(PotionEffect effect); + boolean addPotionEffect(PotionEffect effect); /** * Adds the given {@link PotionEffect} to the living entity. @@ -282,7 +282,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @param force whether conflicting effects should be removed * @return whether the effect could be added */ - public boolean addPotionEffect(PotionEffect effect, boolean force); + boolean addPotionEffect(PotionEffect effect, boolean force); /** * Attempts to add all of the given {@link PotionEffect} to the living @@ -291,7 +291,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @param effects the effects to add * @return whether all of the effects could be added */ - public boolean addPotionEffects(Collection effects); + boolean addPotionEffects(Collection effects); /** * Returns whether the living entity already has an existing effect of @@ -300,14 +300,14 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @param type the potion type to check * @return whether the living entity has this potion effect active on them */ - public boolean hasPotionEffect(PotionEffectType type); + boolean hasPotionEffect(PotionEffectType type); /** * Removes any effects present of the given {@link PotionEffectType}. * * @param type the potion type to remove */ - public void removePotionEffect(PotionEffectType type); + void removePotionEffect(PotionEffectType type); /** * Returns all currently active {@link PotionEffect}s on the living @@ -315,7 +315,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * * @return a collection of {@link PotionEffect}s */ - public Collection getActivePotionEffects(); + Collection getActivePotionEffects(); /** * Checks whether the living entity has block line of sight to another. @@ -326,7 +326,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @param other the entity to determine line of sight to * @return true if there is a line of sight, false if not */ - public boolean hasLineOfSight(Entity other); + boolean hasLineOfSight(Entity other); /** * Returns if the living entity despawns when away from players or not. @@ -335,7 +335,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * * @return true if the living entity is removed when away from players */ - public boolean getRemoveWhenFarAway(); + boolean getRemoveWhenFarAway(); /** * Sets whether or not the living entity despawns when away from players @@ -343,35 +343,35 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * * @param remove the removal status */ - public void setRemoveWhenFarAway(boolean remove); + void setRemoveWhenFarAway(boolean remove); /** * Gets the inventory with the equipment worn by the living entity. * * @return the living entity's inventory */ - public EntityEquipment getEquipment(); + EntityEquipment getEquipment(); /** * Sets whether or not the living entity can pick up items. * * @param pickup whether or not the living entity can pick up items */ - public void setCanPickupItems(boolean pickup); + void setCanPickupItems(boolean pickup); /** * Gets if the living entity can pick up items. * * @return whether or not the living entity can pick up items */ - public boolean getCanPickupItems(); + boolean getCanPickupItems(); /** * Returns whether the entity is currently leashed. * * @return whether the entity is leashed */ - public boolean isLeashed(); + boolean isLeashed(); /** * Gets the entity that is currently leading this entity. @@ -379,7 +379,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @return the entity holding the leash * @throws IllegalStateException if not currently leashed */ - public Entity getLeashHolder() throws IllegalStateException; + Entity getLeashHolder() throws IllegalStateException; /** * Sets the leash on this entity to be held by the supplied entity. @@ -391,7 +391,7 @@ public interface LivingEntity extends Entity, Damageable, ProjectileSource { * @param holder the entity to leash this entity to * @return whether the operation was successful */ - public boolean setLeashHolder(Entity holder); + boolean setLeashHolder(Entity holder); // Paper start /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Minecart.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Minecart.java index ea64114..fadbbff 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Minecart.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Minecart.java @@ -1,6 +1,5 @@ package org.bukkit.entity; -import org.bukkit.Material; import org.bukkit.material.MaterialData; import org.bukkit.util.Vector; @@ -17,14 +16,14 @@ public interface Minecart extends Vehicle { * @param damage over 40 to "kill" a minecart */ @Deprecated - public void _INVALID_setDamage(int damage); + void _INVALID_setDamage(int damage); /** * Sets a minecart's damage. * * @param damage over 40 to "kill" a minecart */ - public void setDamage(double damage); + void setDamage(double damage); /** * This method exists for legacy reasons to provide backwards @@ -34,14 +33,14 @@ public interface Minecart extends Vehicle { * @return The damage */ @Deprecated - public int _INVALID_getDamage(); + int _INVALID_getDamage(); /** * Gets a minecart's damage. * * @return The damage */ - public double getDamage(); + double getDamage(); /** * Gets the maximum speed of a minecart. The speed is unrelated to the @@ -49,7 +48,7 @@ public interface Minecart extends Vehicle { * * @return The max speed */ - public double getMaxSpeed(); + double getMaxSpeed(); /** * Sets the maximum speed of a minecart. Must be nonnegative. Default is @@ -57,7 +56,7 @@ public interface Minecart extends Vehicle { * * @param speed The max speed */ - public void setMaxSpeed(double speed); + void setMaxSpeed(double speed); /** * Returns whether this minecart will slow down faster without a passenger @@ -65,7 +64,7 @@ public interface Minecart extends Vehicle { * * @return Whether it decelerates faster */ - public boolean isSlowWhenEmpty(); + boolean isSlowWhenEmpty(); /** * Sets whether this minecart will slow down faster without a passenger @@ -73,7 +72,7 @@ public interface Minecart extends Vehicle { * * @param slow Whether it will decelerate faster */ - public void setSlowWhenEmpty(boolean slow); + void setSlowWhenEmpty(boolean slow); /** * Gets the flying velocity modifier. Used for minecarts that are in @@ -82,7 +81,7 @@ public interface Minecart extends Vehicle { * * @return The vector factor */ - public Vector getFlyingVelocityMod(); + Vector getFlyingVelocityMod(); /** * Sets the flying velocity modifier. Used for minecarts that are in @@ -91,7 +90,7 @@ public interface Minecart extends Vehicle { * * @param flying velocity modifier vector */ - public void setFlyingVelocityMod(Vector flying); + void setFlyingVelocityMod(Vector flying); /** * Gets the derailed velocity modifier. Used for minecarts that are on the @@ -101,7 +100,7 @@ public interface Minecart extends Vehicle { * * @return derailed visible speed */ - public Vector getDerailedVelocityMod(); + Vector getDerailedVelocityMod(); /** * Sets the derailed velocity modifier. Used for minecarts that are on the @@ -110,7 +109,7 @@ public interface Minecart extends Vehicle { * * @param derailed visible speed */ - public void setDerailedVelocityMod(Vector derailed); + void setDerailedVelocityMod(Vector derailed); /** * Sets the display block for this minecart. @@ -118,7 +117,7 @@ public interface Minecart extends Vehicle { * * @param material the material to set as display block. */ - public void setDisplayBlock(MaterialData material); + void setDisplayBlock(MaterialData material); /** * Gets the display block for this minecart. @@ -126,19 +125,19 @@ public interface Minecart extends Vehicle { * * @return the block displayed by this minecart. */ - public MaterialData getDisplayBlock(); + MaterialData getDisplayBlock(); /** * Sets the offset of the display block. * * @param offset the block offset to set for this minecart. */ - public void setDisplayBlockOffset(int offset); + void setDisplayBlockOffset(int offset); /** * Gets the offset of the display block. * * @return the current block offset for this minecart. */ - public int getDisplayBlockOffset(); + int getDisplayBlockOffset(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Ocelot.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Ocelot.java index d5d034d..cef2209 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Ocelot.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Ocelot.java @@ -11,21 +11,21 @@ public interface Ocelot extends Animals, Tameable { * * @return Type of the cat. */ - public Type getCatType(); + Type getCatType(); /** * Sets the current type of this cat. * * @param type New type of this cat. */ - public void setCatType(Type type); + void setCatType(Type type); /** * Checks if this ocelot is sitting * * @return true if sitting */ - public boolean isSitting(); + boolean isSitting(); /** * Sets if this ocelot is sitting. Will remove any path that the ocelot @@ -33,12 +33,12 @@ public interface Ocelot extends Animals, Tameable { * * @param sitting true if sitting */ - public void setSitting(boolean sitting); + void setSitting(boolean sitting); /** * Represents the various different cat types there are. */ - public enum Type { + enum Type { WILD_OCELOT(0), BLACK_CAT(1), RED_CAT(2), diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Painting.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Painting.java index ca7a4cf..4c6d4ce 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Painting.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Painting.java @@ -13,7 +13,7 @@ public interface Painting extends Hanging { * * @return The art */ - public Art getArt(); + Art getArt(); /** * Set the art on this painting @@ -22,7 +22,7 @@ public interface Painting extends Hanging { * @return False if the new art won't fit at the painting's current * location */ - public boolean setArt(Art art); + boolean setArt(Art art); /** * Set the art on this painting @@ -35,5 +35,5 @@ public interface Painting extends Hanging { * @return False if force was false and the new art won't fit at the * painting's current location */ - public boolean setArt(Art art, boolean force); + boolean setArt(Art art, boolean force); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Pig.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Pig.java index 28f59f2..ec3d217 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Pig.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Pig.java @@ -10,12 +10,12 @@ public interface Pig extends Animals, Vehicle { * * @return if the pig has been saddled. */ - public boolean hasSaddle(); + boolean hasSaddle(); /** * Sets if the pig has a saddle or not * * @param saddled set if the pig has a saddle or not. */ - public void setSaddle(boolean saddled); + void setSaddle(boolean saddled); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Player.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Player.java index 7564452..f8103d3 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Player.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Player.java @@ -38,7 +38,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @return the friendly name */ - public String getDisplayName(); + String getDisplayName(); /** * Sets the "friendly" name to display of this player. This may include @@ -49,14 +49,14 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @param name The new display name. */ - public void setDisplayName(String name); + void setDisplayName(String name); /** * Gets the name that is shown on the player list. * * @return the player list name */ - public String getPlayerListName(); + String getPlayerListName(); /** * Sets the name that is shown on the in-game player list. @@ -79,49 +79,49 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * else * @throws IllegalArgumentException if the length of the name is too long */ - public void setPlayerListName(String name); + void setPlayerListName(String name); /** * Set the target of the player's compass. * * @param loc Location to point to */ - public void setCompassTarget(Location loc); + void setCompassTarget(Location loc); /** * Get the previously set compass target. * * @return location of the target */ - public Location getCompassTarget(); + Location getCompassTarget(); /** * Gets the socket address of this player * * @return the player's address */ - public InetSocketAddress getAddress(); + InetSocketAddress getAddress(); /** * Sends this sender a message raw * * @param message Message to be displayed */ - public void sendRawMessage(String message); + void sendRawMessage(String message); /** * Kicks player with custom kick message. * * @param message kick message */ - public void kickPlayer(String message); + void kickPlayer(String message); /** * Says a message (or runs a command). * * @param msg message to print */ - public void chat(String msg); + void chat(String msg); /** * Makes the player perform the given command @@ -129,42 +129,42 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param command Command to perform * @return true if the command was successful, otherwise false */ - public boolean performCommand(String command); + boolean performCommand(String command); /** * Returns if the player is in sneak mode * * @return true if player is in sneak mode */ - public boolean isSneaking(); + boolean isSneaking(); /** * Sets the sneak mode the player * * @param sneak true if player should appear sneaking */ - public void setSneaking(boolean sneak); + void setSneaking(boolean sneak); /** * Gets whether the player is sprinting or not. * * @return true if player is sprinting. */ - public boolean isSprinting(); + boolean isSprinting(); /** * Sets whether the player is sprinting or not. * * @param sprinting true if the player should be sprinting */ - public void setSprinting(boolean sprinting); + void setSprinting(boolean sprinting); /** * Saves the players current location, health, inventory, motion, and * other information into the username.dat file, in the world/player * folder */ - public void saveData(); + void saveData(); /** * Loads the players current location, health, inventory, motion, and @@ -174,7 +174,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * Note: This will overwrite the players current inventory, health, * motion, etc, with the state from the saved dat file. */ - public void loadData(); + void loadData(); /** * Sets whether the player is ignored as not sleeping. If everyone is @@ -184,14 +184,14 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @param isSleeping Whether to ignore. */ - public void setSleepingIgnored(boolean isSleeping); + void setSleepingIgnored(boolean isSleeping); /** * Returns whether the player is sleeping ignored. * * @return Whether player is ignoring sleep. */ - public boolean isSleepingIgnored(); + boolean isSleepingIgnored(); /** * Play a note for a player at a location. This requires a note block @@ -204,7 +204,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @deprecated Magic value */ @Deprecated - public void playNote(Location loc, byte instrument, byte note); + void playNote(Location loc, byte instrument, byte note); /** * Play a note for a player at a location. This requires a note block @@ -215,7 +215,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param instrument The instrument * @param note The note */ - public void playNote(Location loc, Instrument instrument, Note note); + void playNote(Location loc, Instrument instrument, Note note); /** @@ -228,7 +228,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param volume The volume of the sound * @param pitch The pitch of the sound */ - public void playSound(Location location, Sound sound, float volume, float pitch); + void playSound(Location location, Sound sound, float volume, float pitch); /** * Play a sound for a player at the location. @@ -242,7 +242,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param volume the volume of the sound * @param pitch the pitch of the sound */ - public void playSound(Location location, String sound, float volume, float pitch); + void playSound(Location location, String sound, float volume, float pitch); /** * Plays an effect to just this player. @@ -253,7 +253,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @deprecated Magic value */ @Deprecated - public void playEffect(Location loc, Effect effect, int data); + void playEffect(Location loc, Effect effect, int data); /** * Plays an effect to just this player. @@ -263,7 +263,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param effect the {@link Effect} * @param data a data bit needed for some effects */ - public void playEffect(Location loc, Effect effect, T data); + void playEffect(Location loc, Effect effect, T data); /** * Send a block change. This fakes a block change packet for a user at a @@ -275,7 +275,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @deprecated Magic value */ @Deprecated - public void sendBlockChange(Location loc, Material material, byte data); + void sendBlockChange(Location loc, Material material, byte data); /** * Send a chunk change. This fakes a chunk change packet for a user at a @@ -295,7 +295,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @deprecated Magic value */ @Deprecated - public boolean sendChunkChange(Location loc, int sx, int sy, int sz, byte[] data); + boolean sendChunkChange(Location loc, int sx, int sy, int sz, byte[] data); /** * Send a block change. This fakes a block change packet for a user at a @@ -307,7 +307,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @deprecated Magic value */ @Deprecated - public void sendBlockChange(Location loc, int material, byte data); + void sendBlockChange(Location loc, int material, byte data); /** * Send a sign change. This fakes a sign change packet for a user at @@ -324,7 +324,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if location is null * @throws IllegalArgumentException if lines is non-null and has a length less than 4 */ - public void sendSignChange(Location loc, String[] lines) throws IllegalArgumentException; + void sendSignChange(Location loc, String[] lines) throws IllegalArgumentException; /** * Render a map and send it to the player in its entirety. This may be @@ -332,7 +332,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @param map The map to be sent */ - public void sendMap(MapView map); + void sendMap(MapView map); // Paper start /** @@ -341,7 +341,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param component the components to send */ @Override - public void sendMessage(net.md_5.bungee.api.chat.BaseComponent component); + void sendMessage(net.md_5.bungee.api.chat.BaseComponent component); /** * Sends an array of components as a single message to the player @@ -349,7 +349,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param components the components to send */ @Override - public void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components); + void sendMessage(net.md_5.bungee.api.chat.BaseComponent... components); /** * Set the text displayed in the player list header and footer for this player @@ -357,7 +357,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param header content for the top of the player list * @param footer content for the bottom of the player list */ - public void setPlayerListHeaderFooter(net.md_5.bungee.api.chat.BaseComponent[] header, net.md_5.bungee.api.chat.BaseComponent[] footer); + void setPlayerListHeaderFooter(net.md_5.bungee.api.chat.BaseComponent[] header, net.md_5.bungee.api.chat.BaseComponent[] footer); /** * Set the text displayed in the player list header and footer for this player @@ -365,7 +365,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param header content for the top of the player list * @param footer content for the bottom of the player list */ - public void setPlayerListHeaderFooter(net.md_5.bungee.api.chat.BaseComponent header, net.md_5.bungee.api.chat.BaseComponent footer); + void setPlayerListHeaderFooter(net.md_5.bungee.api.chat.BaseComponent header, net.md_5.bungee.api.chat.BaseComponent footer); /** * Update the times for titles displayed to the player @@ -376,35 +376,35 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @deprecated Use {@link #updateTitle(Title)} */ @Deprecated - public void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks); + void setTitleTimes(int fadeInTicks, int stayTicks, int fadeOutTicks); /** * Update the subtitle of titles displayed to the player * @deprecated Use {@link #updateTitle(Title)} */ @Deprecated - public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent[] subtitle); + void setSubtitle(net.md_5.bungee.api.chat.BaseComponent[] subtitle); /** * Update the subtitle of titles displayed to the player * @deprecated Use {@link #updateTitle(Title)} */ @Deprecated - public void setSubtitle(net.md_5.bungee.api.chat.BaseComponent subtitle); + void setSubtitle(net.md_5.bungee.api.chat.BaseComponent subtitle); /** * Show the given title to the player, along with the last subtitle set, using the last set times * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} */ @Deprecated - public void showTitle(net.md_5.bungee.api.chat.BaseComponent[] title); + void showTitle(net.md_5.bungee.api.chat.BaseComponent[] title); /** * Show the given title to the player, along with the last subtitle set, using the last set times * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} */ @Deprecated - public void showTitle(net.md_5.bungee.api.chat.BaseComponent title); + void showTitle(net.md_5.bungee.api.chat.BaseComponent title); /** * Show the given title and subtitle to the player using the given times @@ -417,7 +417,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} */ @Deprecated - public void showTitle(net.md_5.bungee.api.chat.BaseComponent[] title, net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks); + void showTitle(net.md_5.bungee.api.chat.BaseComponent[] title, net.md_5.bungee.api.chat.BaseComponent[] subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks); /** * Show the given title and subtitle to the player using the given times @@ -430,7 +430,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @deprecated Use {@link #sendTitle(Title)} or {@link #updateTitle(Title)} */ @Deprecated - public void showTitle(net.md_5.bungee.api.chat.BaseComponent title, net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks); + void showTitle(net.md_5.bungee.api.chat.BaseComponent title, net.md_5.bungee.api.chat.BaseComponent subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks); /** * Show the title to the player, overriding any previously displayed title. @@ -455,7 +455,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline /** * Hide any title that is currently visible to the player */ - public void hideTitle(); + void hideTitle(); // Paper end /** @@ -463,7 +463,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * */ //@Deprecated // Spigot - undeprecate - public void updateInventory(); + void updateInventory(); /** * Awards the given achievement and any parent achievements that the @@ -472,7 +472,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param achievement Achievement to award * @throws IllegalArgumentException if achievement is null */ - public void awardAchievement(Achievement achievement); + void awardAchievement(Achievement achievement); /** * Removes the given achievement and any children achievements that the @@ -481,7 +481,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param achievement Achievement to remove * @throws IllegalArgumentException if achievement is null */ - public void removeAchievement(Achievement achievement); + void removeAchievement(Achievement achievement); /** * Gets whether this player has the given achievement. @@ -490,7 +490,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @return whether the player has the achievement * @throws IllegalArgumentException if achievement is null */ - public boolean hasAchievement(Achievement achievement); + boolean hasAchievement(Achievement achievement); /** * Increments the given statistic for this player. @@ -503,7 +503,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the statistic requires an * additional parameter */ - public void incrementStatistic(Statistic statistic) throws IllegalArgumentException; + void incrementStatistic(Statistic statistic) throws IllegalArgumentException; /** * Decrements the given statistic for this player. @@ -516,7 +516,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the statistic requires an * additional parameter */ - public void decrementStatistic(Statistic statistic) throws IllegalArgumentException; + void decrementStatistic(Statistic statistic) throws IllegalArgumentException; /** * Increments the given statistic for this player. @@ -528,7 +528,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the statistic requires an * additional parameter */ - public void incrementStatistic(Statistic statistic, int amount) throws IllegalArgumentException; + void incrementStatistic(Statistic statistic, int amount) throws IllegalArgumentException; /** * Decrements the given statistic for this player. @@ -540,7 +540,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the statistic requires an * additional parameter */ - public void decrementStatistic(Statistic statistic, int amount) throws IllegalArgumentException; + void decrementStatistic(Statistic statistic, int amount) throws IllegalArgumentException; /** * Sets the given statistic for this player. @@ -552,7 +552,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the statistic requires an * additional parameter */ - public void setStatistic(Statistic statistic, int newValue) throws IllegalArgumentException; + void setStatistic(Statistic statistic, int newValue) throws IllegalArgumentException; /** * Gets the value of the given statistic for this player. @@ -563,7 +563,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the statistic requires an * additional parameter */ - public int getStatistic(Statistic statistic) throws IllegalArgumentException; + int getStatistic(Statistic statistic) throws IllegalArgumentException; /** * Increments the given statistic for this player for the given material. @@ -578,7 +578,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public void incrementStatistic(Statistic statistic, Material material) throws IllegalArgumentException; + void incrementStatistic(Statistic statistic, Material material) throws IllegalArgumentException; /** * Decrements the given statistic for this player for the given material. @@ -593,7 +593,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public void decrementStatistic(Statistic statistic, Material material) throws IllegalArgumentException; + void decrementStatistic(Statistic statistic, Material material) throws IllegalArgumentException; /** * Gets the value of the given statistic for this player. @@ -606,7 +606,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public int getStatistic(Statistic statistic, Material material) throws IllegalArgumentException; + int getStatistic(Statistic statistic, Material material) throws IllegalArgumentException; /** * Increments the given statistic for this player for the given material. @@ -620,7 +620,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public void incrementStatistic(Statistic statistic, Material material, int amount) throws IllegalArgumentException; + void incrementStatistic(Statistic statistic, Material material, int amount) throws IllegalArgumentException; /** * Decrements the given statistic for this player for the given material. @@ -634,7 +634,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public void decrementStatistic(Statistic statistic, Material material, int amount) throws IllegalArgumentException; + void decrementStatistic(Statistic statistic, Material material, int amount) throws IllegalArgumentException; /** * Sets the given statistic for this player for the given material. @@ -648,7 +648,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public void setStatistic(Statistic statistic, Material material, int newValue) throws IllegalArgumentException; + void setStatistic(Statistic statistic, Material material, int newValue) throws IllegalArgumentException; /** * Increments the given statistic for this player for the given entity. @@ -663,7 +663,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public void incrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException; + void incrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException; /** * Decrements the given statistic for this player for the given entity. @@ -678,7 +678,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public void decrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException; + void decrementStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException; /** * Gets the value of the given statistic for this player. @@ -691,7 +691,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public int getStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException; + int getStatistic(Statistic statistic, EntityType entityType) throws IllegalArgumentException; /** * Increments the given statistic for this player for the given entity. @@ -705,7 +705,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public void incrementStatistic(Statistic statistic, EntityType entityType, int amount) throws IllegalArgumentException; + void incrementStatistic(Statistic statistic, EntityType entityType, int amount) throws IllegalArgumentException; /** * Decrements the given statistic for this player for the given entity. @@ -719,7 +719,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public void decrementStatistic(Statistic statistic, EntityType entityType, int amount); + void decrementStatistic(Statistic statistic, EntityType entityType, int amount); /** * Sets the given statistic for this player for the given entity. @@ -733,7 +733,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if the given parameter is not valid * for the statistic */ - public void setStatistic(Statistic statistic, EntityType entityType, int newValue); + void setStatistic(Statistic statistic, EntityType entityType, int newValue); /** * Sets the current time on the player's client. When relative is true the @@ -750,14 +750,14 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param relative When true the player time is kept relative to its world * time. */ - public void setPlayerTime(long time, boolean relative); + void setPlayerTime(long time, boolean relative); /** * Returns the player's current timestamp. * * @return The player's time */ - public long getPlayerTime(); + long getPlayerTime(); /** * Returns the player's current time offset relative to server time, or @@ -765,7 +765,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @return The player's time */ - public long getPlayerTimeOffset(); + long getPlayerTimeOffset(); /** * Returns true if the player's time is relative to the server time, @@ -774,7 +774,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @return true if the player's time is relative to the server time. */ - public boolean isPlayerTimeRelative(); + boolean isPlayerTimeRelative(); /** * Restores the normal condition where the player's time is synchronized @@ -782,7 +782,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline *

* Equivalent to calling setPlayerTime(0, true). */ - public void resetPlayerTime(); + void resetPlayerTime(); /** * Sets the type of weather the player will see. When used, the weather @@ -791,7 +791,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @param type The WeatherType enum type the player should experience */ - public void setPlayerWeather(WeatherType type); + void setPlayerWeather(WeatherType type); /** * Returns the type of weather the player is currently experiencing. @@ -799,20 +799,20 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @return The WeatherType that the player is currently experiencing or * null if player is seeing server weather. */ - public WeatherType getPlayerWeather(); + WeatherType getPlayerWeather(); /** * Restores the normal condition where the player's weather is controlled * by server conditions. */ - public void resetPlayerWeather(); + void resetPlayerWeather(); /** * Gives the player the amount of experience specified. * * @param amount Exp amount to give */ - public void giveExp(int amount); + void giveExp(int amount); /** * Gives the player the amount of experience levels specified. Levels can @@ -820,7 +820,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @param amount amount of experience levels to give or take */ - public void giveExpLevels(int amount); + void giveExpLevels(int amount); /** * Gets the players current experience points towards the next level. @@ -829,7 +829,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @return Current experience points */ - public float getExp(); + float getExp(); /** * Sets the players current experience points towards the next level @@ -838,35 +838,35 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @param exp New experience points */ - public void setExp(float exp); + void setExp(float exp); /** * Gets the players current experience level * * @return Current experience level */ - public int getLevel(); + int getLevel(); /** * Sets the players current experience level * * @param level New experience level */ - public void setLevel(int level); + void setLevel(int level); /** * Gets the players total experience points * * @return Current total experience points */ - public int getTotalExperience(); + int getTotalExperience(); /** * Sets the players current experience level * * @param exp New experience level */ - public void setTotalExperience(int exp); + void setTotalExperience(int exp); /** * Gets the players current exhaustion level. @@ -877,14 +877,14 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @return Exhaustion level */ - public float getExhaustion(); + float getExhaustion(); /** * Sets the players current exhaustion level * * @param value Exhaustion level */ - public void setExhaustion(float value); + void setExhaustion(float value); /** * Gets the players current saturation level. @@ -894,28 +894,28 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @return Saturation level */ - public float getSaturation(); + float getSaturation(); /** * Sets the players current saturation level * * @param value Saturation level */ - public void setSaturation(float value); + void setSaturation(float value); /** * Gets the players current food level * * @return Food level */ - public int getFoodLevel(); + int getFoodLevel(); /** * Sets the players current food level * * @param value New food level */ - public void setFoodLevel(int value); + void setFoodLevel(int value); /** * Gets the Location where the player will spawn at their bed, null if @@ -923,14 +923,14 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @return Bed Spawn Location if bed exists, otherwise null. */ - public Location getBedSpawnLocation(); + Location getBedSpawnLocation(); /** * Sets the Location where the player will spawn at their bed. * * @param location where to set the respawn location */ - public void setBedSpawnLocation(Location location); + void setBedSpawnLocation(Location location); /** * Sets the Location where the player will spawn at their bed. @@ -939,7 +939,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @param force whether to forcefully set the respawn location even if a * valid bed is not present */ - public void setBedSpawnLocation(Location location, boolean force); + void setBedSpawnLocation(Location location, boolean force); /** * Determines if the Player is allowed to fly via jump key double-tap like @@ -947,7 +947,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @return True if the player is allowed to fly. */ - public boolean getAllowFlight(); + boolean getAllowFlight(); /** * Sets if the Player is allowed to fly via jump key double-tap like in @@ -955,21 +955,21 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @param flight If flight should be allowed. */ - public void setAllowFlight(boolean flight); + void setAllowFlight(boolean flight); /** * Hides a player from this player * * @param player Player to hide */ - public void hidePlayer(Player player); + void hidePlayer(Player player); /** * Allows this player to see a player that was previously hidden * * @param player Player to show */ - public void showPlayer(Player player); + void showPlayer(Player player); /** * Checks to see if a player has been hidden from this player @@ -978,7 +978,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @return True if the provided player is not being hidden from this * player */ - public boolean canSee(Player player); + boolean canSee(Player player); /** * Checks to see if this player is currently standing on a block. This @@ -990,21 +990,21 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * org.bukkit.entity.Entity#isOnGround()} */ @Deprecated - public boolean isOnGround(); + boolean isOnGround(); /** * Checks to see if this player is currently flying or not. * * @return True if the player is flying, else false. */ - public boolean isFlying(); + boolean isFlying(); /** * Makes this player start or stop flying. * * @param value True to fly. */ - public void setFlying(boolean value); + void setFlying(boolean value); /** * Sets the speed at which a client will fly. Negative values indicate @@ -1014,7 +1014,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException If new speed is less than -1 or * greater than 1 */ - public void setFlySpeed(float value) throws IllegalArgumentException; + void setFlySpeed(float value) throws IllegalArgumentException; /** * Sets the speed at which a client will walk. Negative values indicate @@ -1024,21 +1024,21 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException If new speed is less than -1 or * greater than 1 */ - public void setWalkSpeed(float value) throws IllegalArgumentException; + void setWalkSpeed(float value) throws IllegalArgumentException; /** * Gets the current allowed speed that a client can fly. * * @return The current allowed speed, from -1 to 1 */ - public float getFlySpeed(); + float getFlySpeed(); /** * Gets the current allowed speed that a client can walk. * * @return The current allowed speed, from -1 to 1 */ - public float getWalkSpeed(); + float getWalkSpeed(); /** * Request that the player's client download and switch texture packs. @@ -1069,7 +1069,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * should use {@link #setResourcePack(String)}. */ @Deprecated - public void setTexturePack(String url); + void setTexturePack(String url); /** * Request that the player's client download and switch resource packs. @@ -1100,14 +1100,14 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @deprecated use {@link #setResourcePack(String, String)} */ @Deprecated // TacoSpigot - public void setResourcePack(String url); + void setResourcePack(String url); /** * Gets the Scoreboard displayed to this player * * @return The current scoreboard seen by this player */ - public Scoreboard getScoreboard(); + Scoreboard getScoreboard(); /** * Sets the player's visible Scoreboard. @@ -1119,7 +1119,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalStateException if this is a player that is not logged * yet or has logged out */ - public void setScoreboard(Scoreboard scoreboard) throws IllegalArgumentException, IllegalStateException; + void setScoreboard(Scoreboard scoreboard) throws IllegalArgumentException, IllegalStateException; /** * Gets if the client is displayed a 'scaled' health, that is, health on a @@ -1128,7 +1128,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @return if client health display is scaled * @see Player#setHealthScaled(boolean) */ - public boolean isHealthScaled(); + boolean isHealthScaled(); /** * Sets if the client is displayed a 'scaled' health, that is, health on a @@ -1139,7 +1139,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * * @param scale if the client health display is scaled */ - public void setHealthScaled(boolean scale); + void setHealthScaled(boolean scale); /** * Sets the number to scale health to for the client; this will also @@ -1153,7 +1153,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalArgumentException if scale is {@link Double#NaN} * @throws IllegalArgumentException if scale is too high */ - public void setHealthScale(double scale) throws IllegalArgumentException; + void setHealthScale(double scale) throws IllegalArgumentException; /** * Gets the number that health is scaled to for the client. @@ -1163,7 +1163,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @see Player#setHealthScale(double) * @see Player#setHealthScaled(boolean) */ - public double getHealthScale(); + double getHealthScale(); /** * Gets the entity which is followed by the camera when in @@ -1172,7 +1172,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @return the followed entity, or null if not in spectator mode or not * following a specific entity. */ - public Entity getSpectatorTarget(); + Entity getSpectatorTarget(); /** * Sets the entity which is followed by the camera when in @@ -1182,7 +1182,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @throws IllegalStateException if the player is not in * {@link GameMode#SPECTATOR} */ - public void setSpectatorTarget(Entity entity); + void setSpectatorTarget(Entity entity); /** * Sends a title and a subtitle message to the player. If either of these @@ -1196,13 +1196,13 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline * @deprecated API subject to change */ @Deprecated - public void sendTitle(String title, String subtitle); + void sendTitle(String title, String subtitle); /** * Resets the title displayed to the player. */ // Paper - Undeprecate - public void resetTitle(); + void resetTitle(); // KigPaper start /** @@ -1264,7 +1264,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline // TacoSpigot end // Spigot start - public class Spigot extends Entity.Spigot + class Spigot extends Entity.Spigot { /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Projectile.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Projectile.java index a5599fa..a7eaead 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Projectile.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Projectile.java @@ -15,14 +15,14 @@ public interface Projectile extends Entity { * @return the {@link LivingEntity} that shot this projectile */ @Deprecated - public LivingEntity _INVALID_getShooter(); + LivingEntity _INVALID_getShooter(); /** * Retrieve the shooter of this projectile. * * @return the {@link ProjectileSource} that shot this projectile */ - public ProjectileSource getShooter(); + ProjectileSource getShooter(); /** * This method exists for legacy reasons to provide backwards @@ -32,14 +32,14 @@ public interface Projectile extends Entity { * @param shooter the {@link LivingEntity} that shot this projectile */ @Deprecated - public void _INVALID_setShooter(LivingEntity shooter); + void _INVALID_setShooter(LivingEntity shooter); /** * Set the shooter of this projectile. * * @param source the {@link ProjectileSource} that shot this projectile */ - public void setShooter(ProjectileSource source); + void setShooter(ProjectileSource source); /** * Determine if this projectile should bounce or not when it hits. @@ -48,7 +48,7 @@ public interface Projectile extends Entity { * * @return true if it should bounce. */ - public boolean doesBounce(); + boolean doesBounce(); /** * Set whether or not this projectile should bounce or not when it hits @@ -56,5 +56,5 @@ public interface Projectile extends Entity { * * @param doesBounce whether or not it should bounce. */ - public void setBounce(boolean doesBounce); + void setBounce(boolean doesBounce); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Rabbit.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Rabbit.java index 1c8d1fc..7fa47fd 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Rabbit.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Rabbit.java @@ -5,17 +5,17 @@ public interface Rabbit extends Animals { /** * @return The type of rabbit. */ - public Type getRabbitType(); + Type getRabbitType(); /** * @param type Sets the type of rabbit for this entity. */ - public void setRabbitType(Type type); + void setRabbitType(Type type); /** * Represents the various types a Rabbit might be. */ - public enum Type { + enum Type { /** * Chocolate colored rabbit. diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Sheep.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Sheep.java index f4ce312..83f0721 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Sheep.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Sheep.java @@ -10,10 +10,10 @@ public interface Sheep extends Animals, Colorable { /** * @return Whether the sheep is sheared. */ - public boolean isSheared(); + boolean isSheared(); /** * @param flag Whether to shear the sheep */ - public void setSheared(boolean flag); + void setSheared(boolean flag); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Skeleton.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Skeleton.java index 02b76c3..67981cf 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Skeleton.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Skeleton.java @@ -10,19 +10,19 @@ public interface Skeleton extends Monster { * * @return Current type */ - public SkeletonType getSkeletonType(); + SkeletonType getSkeletonType(); /** * Sets the new type of this skeleton. * * @param type New type */ - public void setSkeletonType(SkeletonType type); + void setSkeletonType(SkeletonType type); /* * Represents the various different Skeleton types. */ - public enum SkeletonType { + enum SkeletonType { NORMAL(0), WITHER(1); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Slime.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Slime.java index cbf50c8..f11c31c 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Slime.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Slime.java @@ -8,10 +8,10 @@ public interface Slime extends LivingEntity { /** * @return The size of the slime */ - public int getSize(); + int getSize(); /** * @param sz The new size of the slime. */ - public void setSize(int sz); + void setSize(int sz); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/TNTPrimed.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/TNTPrimed.java index 7b1b6b6..48f3101 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/TNTPrimed.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/TNTPrimed.java @@ -10,7 +10,7 @@ public interface TNTPrimed extends Explosive { * * @param fuseTicks The fuse ticks */ - public void setFuseTicks(int fuseTicks); + void setFuseTicks(int fuseTicks); /** * Retrieve the number of ticks until the explosion of this TNTPrimed @@ -18,7 +18,7 @@ public interface TNTPrimed extends Explosive { * * @return the number of ticks until this TNTPrimed explodes */ - public int getFuseTicks(); + int getFuseTicks(); /** * Gets the source of this primed TNT. The source is the entity @@ -34,12 +34,12 @@ public interface TNTPrimed extends Explosive { * * @return the source of this primed TNT */ - public Entity getSource(); + Entity getSource(); /** * Gets the source block location of the primed TNT. * * @return the source block location the TNT was spawned from */ - public org.bukkit.Location getSourceLoc(); + org.bukkit.Location getSourceLoc(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Tameable.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Tameable.java index 014885d..96f6f95 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Tameable.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Tameable.java @@ -10,7 +10,7 @@ public interface Tameable { * * @return true if this has been tamed */ - public boolean isTamed(); + boolean isTamed(); /** * Sets if this has been tamed. Not necessary if the method setOwner has @@ -21,14 +21,14 @@ public interface Tameable { * * @param tame true if tame */ - public void setTamed(boolean tame); + void setTamed(boolean tame); /** * Gets the current owning AnimalTamer * * @return the owning AnimalTamer, or null if not owned */ - public AnimalTamer getOwner(); + AnimalTamer getOwner(); /** * Set this to be owned by given AnimalTamer. @@ -39,6 +39,6 @@ public interface Tameable { * * @param tamer the AnimalTamer who should own this */ - public void setOwner(AnimalTamer tamer); + void setOwner(AnimalTamer tamer); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/ThrownPotion.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/ThrownPotion.java index 8b382db..01f9a0a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/ThrownPotion.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/ThrownPotion.java @@ -15,7 +15,7 @@ public interface ThrownPotion extends Projectile { * * @return The potion effects */ - public Collection getEffects(); + Collection getEffects(); /** * Returns a copy of the ItemStack for this thrown potion. @@ -26,7 +26,7 @@ public interface ThrownPotion extends Projectile { * * @return A copy of the ItemStack for this thrown potion. */ - public ItemStack getItem(); + ItemStack getItem(); /** * Set the ItemStack for this thrown potion. @@ -35,5 +35,5 @@ public interface ThrownPotion extends Projectile { * * @param item New ItemStack */ - public void setItem(ItemStack item); + void setItem(ItemStack item); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Vehicle.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Vehicle.java index 7d7607c..d80dfde 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Vehicle.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Vehicle.java @@ -12,12 +12,12 @@ public interface Vehicle extends Entity { * * @return velocity vector */ - public Vector getVelocity(); + Vector getVelocity(); /** * Sets the vehicle's velocity. * * @param vel velocity vector */ - public void setVelocity(Vector vel); + void setVelocity(Vector vel); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Villager.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Villager.java index 51035c9..979aa73 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Villager.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Villager.java @@ -10,20 +10,20 @@ public interface Villager extends Ageable, NPC { * * @return Current profession. */ - public Profession getProfession(); + Profession getProfession(); /** * Sets the new profession of this villager. * * @param profession New profession. */ - public void setProfession(Profession profession); + void setProfession(Profession profession); /** * Represents the various different Villager professions there may be. */ - public enum Profession { + enum Profession { FARMER(0), LIBRARIAN(1), PRIEST(2), diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/WitherSkull.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/WitherSkull.java index 33d20ab..baa5e32 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/WitherSkull.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/WitherSkull.java @@ -10,12 +10,12 @@ public interface WitherSkull extends Fireball { * * @param charged whether it should be charged */ - public void setCharged(boolean charged); + void setCharged(boolean charged); /** * Gets whether or not the wither skull is charged. * * @return whether the wither skull is charged */ - public boolean isCharged(); + boolean isCharged(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Wolf.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Wolf.java index 9d5a896..53f6af9 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Wolf.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Wolf.java @@ -12,7 +12,7 @@ public interface Wolf extends Animals, Tameable { * * @return Anger true if angry */ - public boolean isAngry(); + boolean isAngry(); /** * Sets the anger of this wolf. @@ -22,14 +22,14 @@ public interface Wolf extends Animals, Tameable { * * @param angry true if angry */ - public void setAngry(boolean angry); + void setAngry(boolean angry); /** * Checks if this wolf is sitting * * @return true if sitting */ - public boolean isSitting(); + boolean isSitting(); /** * Sets if this wolf is sitting. @@ -38,19 +38,19 @@ public interface Wolf extends Animals, Tameable { * * @param sitting true if sitting */ - public void setSitting(boolean sitting); + void setSitting(boolean sitting); /** * Get the collar color of this wolf * * @return the color of the collar */ - public DyeColor getCollarColor(); + DyeColor getCollarColor(); /** * Set the collar color of this wolf * * @param color the color to apply */ - public void setCollarColor(DyeColor color); + void setCollarColor(DyeColor color); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/Zombie.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/Zombie.java index 59b52fd..e906a16 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/Zombie.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/Zombie.java @@ -10,26 +10,26 @@ public interface Zombie extends Monster { * * @return Whether the zombie is a baby */ - public boolean isBaby(); + boolean isBaby(); /** * Sets whether the zombie is a baby * * @param flag Whether the zombie is a baby */ - public void setBaby(boolean flag); + void setBaby(boolean flag); /** * Gets whether the zombie is a villager * * @return Whether the zombie is a villager */ - public boolean isVillager(); + boolean isVillager(); /** * Sets whether the zombie is a villager * * @param flag Whether the zombie is a villager */ - public void setVillager(boolean flag); + void setVillager(boolean flag); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java b/TacoSpigot-API/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java index e502680..d64d70b 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java @@ -12,7 +12,7 @@ public interface CommandMinecart extends Minecart, CommandSender { * * @return Command that this CommandMinecart will run when powered. */ - public String getCommand(); + String getCommand(); /** * Sets the command that this CommandMinecart will run when activated. @@ -22,7 +22,7 @@ public interface CommandMinecart extends Minecart, CommandSender { * @param command Command that this CommandMinecart will run when * activated. */ - public void setCommand(String command); + void setCommand(String command); /** * Sets the name of this CommandMinecart. The name is used with commands @@ -31,6 +31,6 @@ public interface CommandMinecart extends Minecart, CommandSender { * * @param name New name for this CommandMinecart. */ - public void setName(String name); + void setName(String name); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/Cancellable.java b/TacoSpigot-API/src/main/java/org/bukkit/event/Cancellable.java index 799b0b0..fb1bc05 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/Cancellable.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/Cancellable.java @@ -8,7 +8,7 @@ public interface Cancellable { * * @return true if this event is cancelled */ - public boolean isCancelled(); + boolean isCancelled(); /** * Sets the cancellation state of this event. A cancelled event will not @@ -16,5 +16,5 @@ public interface Cancellable { * * @param cancel true if you wish to cancel this event */ - public void setCancelled(boolean cancel); + void setCancelled(boolean cancel); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/Event.java b/TacoSpigot-API/src/main/java/org/bukkit/event/Event.java index 6677e1b..d7d1d2c 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/Event.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/Event.java @@ -93,6 +93,6 @@ public abstract class Event { * take place if possible, even if the server would not normally allow * the action. Some actions may not be allowed. */ - ALLOW; + ALLOW } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/HandlerList.java b/TacoSpigot-API/src/main/java/org/bukkit/event/HandlerList.java index 7d5efff..410a227 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/HandlerList.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/HandlerList.java @@ -27,7 +27,7 @@ public class HandlerList { /** * List of all HandlerLists which have been created, for use in bakeAll() */ - private static ArrayList allLists = new ArrayList(); + private static ArrayList allLists = new ArrayList<>(); /** * Bake all handler lists. Best used just after all normal event @@ -90,9 +90,9 @@ public class HandlerList { * The HandlerList is then added to meta-list for use in bakeAll() */ public HandlerList() { - handlerslots = new EnumMap>(EventPriority.class); + handlerslots = new EnumMap<>(EventPriority.class); for (EventPriority o : EventPriority.values()) { - handlerslots.put(o, new ArrayList()); + handlerslots.put(o, new ArrayList<>()); } synchronized (allLists) { allLists.add(this); @@ -174,11 +174,11 @@ public class HandlerList { */ public synchronized void bake() { if (handlers != null) return; // don't re-bake when still valid - List entries = new ArrayList(); + List entries = new ArrayList<>(); for (Entry> entry : handlerslots.entrySet()) { entries.addAll(entry.getValue()); } - handlers = entries.toArray(new RegisteredListener[entries.size()]); + handlers = entries.toArray(new RegisteredListener[0]); } /** @@ -200,7 +200,7 @@ public class HandlerList { * @return the list of registered listeners */ public static ArrayList getRegisteredListeners(Plugin plugin) { - ArrayList listeners = new ArrayList(); + ArrayList listeners = new ArrayList<>(); synchronized (allLists) { for (HandlerList h : allLists) { synchronized (h) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/block/BlockBreakEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/block/BlockBreakEvent.java index a011f61..1567503 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/block/BlockBreakEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/block/BlockBreakEvent.java @@ -3,7 +3,6 @@ package org.bukkit.event.block; import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; -import org.bukkit.event.HandlerList; /** * Called when a block is broken by a player. diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/block/BlockPistonExtendEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/block/BlockPistonExtendEvent.java index 682ce60..9862fa2 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/block/BlockPistonExtendEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/block/BlockPistonExtendEvent.java @@ -50,7 +50,7 @@ public class BlockPistonExtendEvent extends BlockPistonEvent { */ public List getBlocks() { if (blocks == null) { - ArrayList tmp = new ArrayList(); + ArrayList tmp = new ArrayList<>(); for (int i = 0; i < this.getLength(); i++) { tmp.add(block.getRelative(getDirection(), i + 1)); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/enchantment/EnchantItemEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/enchantment/EnchantItemEvent.java index de28f1d..c78534f 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/enchantment/EnchantItemEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/enchantment/EnchantItemEvent.java @@ -32,7 +32,7 @@ public class EnchantItemEvent extends InventoryEvent implements Cancellable { this.table = table; this.item = item; this.level = level; - this.enchants = new HashMap(enchants); + this.enchants = new HashMap<>(enchants); this.cancelled = false; this.button = i; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java index 9ef48c8..fd05d29 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java @@ -34,7 +34,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable { @Deprecated public EntityDamageEvent(final Entity damagee, final DamageCause cause, final double damage) { - this(damagee, cause, new EnumMap(ImmutableMap.of(DamageModifier.BASE, damage)), new EnumMap>(ImmutableMap.of(DamageModifier.BASE, ZERO))); + this(damagee, cause, new EnumMap<>(ImmutableMap.of(DamageModifier.BASE, damage)), new EnumMap>(ImmutableMap.of(DamageModifier.BASE, ZERO))); } public EntityDamageEvent(final Entity damagee, final DamageCause cause, final Map modifiers, final Map> modifierFunctions) { @@ -44,7 +44,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable { Validate.noNullElements(modifiers.values(), "Cannot have null modifier values"); Validate.isTrue(modifiers.keySet().equals(modifierFunctions.keySet()), "Must have a modifier function for each DamageModifier"); Validate.noNullElements(modifierFunctions.values(), "Cannot have null modifier function"); - this.originals = new EnumMap(modifiers); + this.originals = new EnumMap<>(modifiers); this.cause = cause; this.modifiers = modifiers; this.modifierFunctions = modifierFunctions; @@ -271,7 +271,6 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable { * effect. */ ABSORPTION, - ; } /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java index cf67251..73617e8 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java @@ -145,6 +145,6 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable { /** * A currently unknown reason for the entity changing target. */ - UNKNOWN; + UNKNOWN } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityUnleashEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityUnleashEvent.java index da7e46c..edb7ecb 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityUnleashEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/entity/EntityUnleashEvent.java @@ -47,6 +47,6 @@ public class EntityUnleashEvent extends EntityEvent { * When the entity's leashholder is more than 10 blocks away */ DISTANCE, - UNKNOWN; + UNKNOWN } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/entity/PotionSplashEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/entity/PotionSplashEvent.java index b9840de..193ea41 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/entity/PotionSplashEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/entity/PotionSplashEvent.java @@ -35,7 +35,7 @@ public class PotionSplashEvent extends ProjectileHitEvent implements Cancellable * @return The thrown potion entity */ public ThrownPotion getPotion() { - return (ThrownPotion) getEntity(); + return getEntity(); } /** @@ -44,7 +44,7 @@ public class PotionSplashEvent extends ProjectileHitEvent implements Cancellable * @return A fresh copy of the affected entity list */ public Collection getAffectedEntities() { - return new ArrayList(affectedEntities.keySet()); + return new ArrayList<>(affectedEntities.keySet()); } /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryAction.java b/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryAction.java index a7bc694..bb2a30f 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryAction.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryAction.java @@ -87,5 +87,4 @@ public enum InventoryAction { * An unrecognized ClickType. */ UNKNOWN, - ; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryInteractEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryInteractEvent.java index 8624f8d..2d57505 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryInteractEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryInteractEvent.java @@ -4,7 +4,6 @@ import org.bukkit.entity.HumanEntity; import org.bukkit.event.Cancellable; import org.bukkit.event.Event.Result; import org.bukkit.inventory.InventoryView; -import org.bukkit.inventory.ItemStack; /** * An abstract base class for events that describe an interaction between a diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryType.java b/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryType.java index c36e046..9ca94a3 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryType.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryType.java @@ -119,6 +119,6 @@ public enum InventoryType { * The fuel slot in a furnace inventory, or the ingredient slot in a * brewing stand inventory. */ - FUEL; + FUEL } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerChatEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerChatEvent.java index 1fb5cd7..18b4f7a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerChatEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerChatEvent.java @@ -32,7 +32,7 @@ public class PlayerChatEvent extends PlayerEvent implements Cancellable { super(player); this.message = message; this.format = "<%1$s> %2$s"; - this.recipients = new HashSet(player.getServer().getOnlinePlayers()); + this.recipients = new HashSet<>(player.getServer().getOnlinePlayers()); } public PlayerChatEvent(final Player player, final String message, final String format, final Set recipients) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java index 1ec8173..c543f99 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java @@ -54,7 +54,7 @@ public class PlayerCommandPreprocessEvent extends PlayerEvent implements Cancell public PlayerCommandPreprocessEvent(final Player player, final String message) { super(player); - this.recipients = new HashSet(player.getServer().getOnlinePlayers()); + this.recipients = new HashSet<>(player.getServer().getOnlinePlayers()); this.message = message; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java index a90d063..30c5f82 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerResourcePackStatusEvent.java @@ -71,6 +71,6 @@ public class PlayerResourcePackStatusEvent extends PlayerEvent { /** * The client accepted the pack and is beginning a download of it. */ - ACCEPTED; + ACCEPTED } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java index fa9c823..92a91d9 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java @@ -64,7 +64,7 @@ public class PlayerTeleportEvent extends PlayerMoveEvent { * Indicates the teleportation was caused by an event not covered by * this enum */ - UNKNOWN; + UNKNOWN } @Override diff --git a/TacoSpigot-API/src/main/java/org/bukkit/event/world/PortalCreateEvent.java b/TacoSpigot-API/src/main/java/org/bukkit/event/world/PortalCreateEvent.java index d83d7a9..998dc8a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/event/world/PortalCreateEvent.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/event/world/PortalCreateEvent.java @@ -14,7 +14,7 @@ import java.util.Collection; public class PortalCreateEvent extends WorldEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); private boolean cancel = false; - private final ArrayList blocks = new ArrayList(); + private final ArrayList blocks = new ArrayList<>(); private CreateReason reason = CreateReason.FIRE; public PortalCreateEvent(final Collection blocks, final World world, CreateReason reason) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/generator/ChunkGenerator.java b/TacoSpigot-API/src/main/java/org/bukkit/generator/ChunkGenerator.java index 5137024..a90400f 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/generator/ChunkGenerator.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/generator/ChunkGenerator.java @@ -288,7 +288,7 @@ public abstract class ChunkGenerator { * @return List containing any amount of BlockPopulators */ public List getDefaultPopulators(World world) { - return new ArrayList(); + return new ArrayList<>(); } /** @@ -308,7 +308,7 @@ public abstract class ChunkGenerator { /** * Data for a Chunk. */ - public static interface ChunkData { + public interface ChunkData { /** * Get the maximum height for the chunk. * @@ -316,7 +316,7 @@ public abstract class ChunkGenerator { * * @return the maximum height */ - public int getMaxHeight(); + int getMaxHeight(); /** * Set the block at x,y,z in the chunk data to material. @@ -328,7 +328,7 @@ public abstract class ChunkGenerator { * @param z the z location in the chunk from 0-15 inclusive * @param material the type to set the block to */ - public void setBlock(int x, int y, int z, Material material); + void setBlock(int x, int y, int z, Material material); /** * Set the block at x,y,z in the chunk data to material. @@ -340,7 +340,7 @@ public abstract class ChunkGenerator { * @param z the z location in the chunk from 0-15 inclusive * @param material the type to set the block to */ - public void setBlock(int x, int y, int z, MaterialData material); + void setBlock(int x, int y, int z, MaterialData material); /** * Set a region of this chunk from xMin, yMin, zMin (inclusive) @@ -356,7 +356,7 @@ public abstract class ChunkGenerator { * @param zMax maximum z location (exclusive) in the chunk to set * @param material the type to set the blocks to */ - public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, Material material); + void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, Material material); /** * Set a region of this chunk from xMin, yMin, zMin (inclusive) @@ -372,7 +372,7 @@ public abstract class ChunkGenerator { * @param zMax maximum z location (exclusive) in the chunk to set * @param material the type to set the blocks to */ - public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, MaterialData material); + void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, MaterialData material); /** * Get the type of the block at x, y, z. @@ -384,7 +384,7 @@ public abstract class ChunkGenerator { * @param z the z location in the chunk from 0-15 inclusive * @return the type of the block or Material.AIR if x, y or z are outside the chunk's bounds */ - public Material getType(int x, int y, int z); + Material getType(int x, int y, int z); /** * Get the type and data of the block at x, y ,z. @@ -396,7 +396,7 @@ public abstract class ChunkGenerator { * @param z the z location in the chunk from 0-15 inclusive * @return the type and data of the block or the MaterialData for air if x, y or z are outside the chunk's bounds */ - public MaterialData getTypeAndData(int x, int y, int z); + MaterialData getTypeAndData(int x, int y, int z); /** * Set a region of this chunk from xMin, yMin, zMin (inclusive) @@ -414,7 +414,7 @@ public abstract class ChunkGenerator { * @deprecated Uses magic values. */ @Deprecated - public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int blockId); + void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int blockId); /** * Set a region of this chunk from xMin, yMin, zMin (inclusive) @@ -433,7 +433,7 @@ public abstract class ChunkGenerator { * @deprecated Uses magic values. */ @Deprecated - public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int blockId, int data); + void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, int blockId, int data); /** * Set the block at x,y,z in the chunk data to blockId. @@ -447,7 +447,7 @@ public abstract class ChunkGenerator { * @deprecated Uses magic values */ @Deprecated - public void setBlock(int x, int y, int z, int blockId); + void setBlock(int x, int y, int z, int blockId); /** * Set the block at x,y,z in the chunk data to blockId. @@ -462,7 +462,7 @@ public abstract class ChunkGenerator { * @deprecated Uses magic values */ @Deprecated - public void setBlock(int x, int y, int z, int blockId, byte data); + void setBlock(int x, int y, int z, int blockId, byte data); /** * Get the blockId at x,y,z in the chunk data. @@ -476,7 +476,7 @@ public abstract class ChunkGenerator { * @deprecated Uses magic values */ @Deprecated - public int getTypeId(int x, int y, int z); + int getTypeId(int x, int y, int z); /** * Get the block data at x,y,z in the chunk data. @@ -490,6 +490,6 @@ public abstract class ChunkGenerator { * @deprecated Uses magic values */ @Deprecated - public byte getData(int x, int y, int z); + byte getData(int x, int y, int z); } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/help/GenericCommandHelpTopic.java b/TacoSpigot-API/src/main/java/org/bukkit/help/GenericCommandHelpTopic.java index 3e85e77..bd9737a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/help/GenericCommandHelpTopic.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/help/GenericCommandHelpTopic.java @@ -5,7 +5,6 @@ import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.apache.commons.lang.StringUtils; import org.bukkit.command.ConsoleCommandSender; -import org.bukkit.command.PluginCommand; import org.bukkit.command.defaults.VanillaCommand; import org.bukkit.help.HelpTopic; @@ -37,7 +36,7 @@ public class GenericCommandHelpTopic extends HelpTopic { } // Build full text - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); sb.append(ChatColor.GOLD); sb.append("Description: "); @@ -56,7 +55,7 @@ public class GenericCommandHelpTopic extends HelpTopic { sb.append(ChatColor.GOLD); sb.append("Aliases: "); sb.append(ChatColor.WHITE); - sb.append(ChatColor.WHITE + StringUtils.join(command.getAliases(), ", ")); + sb.append(ChatColor.WHITE).append(StringUtils.join(command.getAliases(), ", ")); } fullText = sb.toString(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/help/HelpMap.java b/TacoSpigot-API/src/main/java/org/bukkit/help/HelpMap.java index 43017c8..af129da 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/help/HelpMap.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/help/HelpMap.java @@ -24,27 +24,27 @@ public interface HelpMap { * @return A {@link HelpTopic} object matching the topic name or null if * none can be found. */ - public HelpTopic getHelpTopic(String topicName); + HelpTopic getHelpTopic(String topicName); /** * Returns a collection of all the registered help topics. * * @return All the registered help topics. */ - public Collection getHelpTopics(); + Collection getHelpTopics(); /** * Adds a topic to the server's help index. * * @param topic The new help topic to add. */ - public void addTopic(HelpTopic topic); + void addTopic(HelpTopic topic); /** * Clears out the contents of the help index. Normally called during * server reload. */ - public void clear(); + void clear(); /** * Associates a {@link HelpTopicFactory} object with given command base @@ -63,7 +63,7 @@ public interface HelpMap { * @throws IllegalArgumentException Thrown if {@code commandClass} does * not derive from a legal base class. */ - public void registerHelpTopicFactory(Class commandClass, HelpTopicFactory factory); + void registerHelpTopicFactory(Class commandClass, HelpTopicFactory factory); /** * Gets the list of plugins the server administrator has chosen to exclude @@ -75,5 +75,5 @@ public interface HelpMap { * * @return A list of plugins that should be excluded from the help index. */ - public List getIgnoredPlugins(); + List getIgnoredPlugins(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/help/HelpTopicFactory.java b/TacoSpigot-API/src/main/java/org/bukkit/help/HelpTopicFactory.java index 87d3697..03a2839 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/help/HelpTopicFactory.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/help/HelpTopicFactory.java @@ -38,5 +38,5 @@ public interface HelpTopicFactory { * @return A new custom help topic or {@code null} to intentionally NOT * create a topic. */ - public HelpTopic createTopic(TCommand command); + HelpTopic createTopic(TCommand command); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/inventory/Inventory.java b/TacoSpigot-API/src/main/java/org/bukkit/inventory/Inventory.java index da5d83e..0738286 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/inventory/Inventory.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/inventory/Inventory.java @@ -19,14 +19,14 @@ public interface Inventory extends Iterable { * * @return The size of the inventory */ - public int getSize(); + int getSize(); /** * Returns the maximum stack size for an ItemStack in this inventory. * * @return The maximum size for an ItemStack in this inventory. */ - public int getMaxStackSize(); + int getMaxStackSize(); /** * This method allows you to change the maximum stack size for an @@ -44,14 +44,14 @@ public interface Inventory extends Iterable { * * @param size The new maximum stack size for items in this inventory. */ - public void setMaxStackSize(int size); + void setMaxStackSize(int size); /** * Returns the name of the inventory * * @return The String with the name of the inventory */ - public String getName(); + String getName(); /** * Returns the ItemStack found in the slot at the given index @@ -59,7 +59,7 @@ public interface Inventory extends Iterable { * @param index The index of the Slot's ItemStack to return * @return The ItemStack in the slot */ - public ItemStack getItem(int index); + ItemStack getItem(int index); /** * Stores the ItemStack at the given index of the inventory. @@ -67,7 +67,7 @@ public interface Inventory extends Iterable { * @param index The index where to put the ItemStack * @param item The ItemStack to set */ - public void setItem(int index, ItemStack item); + void setItem(int index, ItemStack item); /** * Stores the given ItemStacks in the inventory. This will try to fill @@ -89,7 +89,7 @@ public interface Inventory extends Iterable { * @return A HashMap containing items that didn't fit. * @throws IllegalArgumentException if items or any element in it is null */ - public HashMap addItem(ItemStack... items) throws IllegalArgumentException; + HashMap addItem(ItemStack... items) throws IllegalArgumentException; /** * Removes the given ItemStacks from the inventory. @@ -106,14 +106,14 @@ public interface Inventory extends Iterable { * @return A HashMap containing items that couldn't be removed. * @throws IllegalArgumentException if items is null */ - public HashMap removeItem(ItemStack... items) throws IllegalArgumentException; + HashMap removeItem(ItemStack... items) throws IllegalArgumentException; /** * Returns all ItemStacks from the inventory * * @return An array of ItemStacks from the inventory. */ - public ItemStack[] getContents(); + ItemStack[] getContents(); /** * Completely replaces the inventory's contents. Removes all existing @@ -124,7 +124,7 @@ public interface Inventory extends Iterable { * @throws IllegalArgumentException If the array has more items than the * inventory. */ - public void setContents(ItemStack[] items) throws IllegalArgumentException; + void setContents(ItemStack[] items) throws IllegalArgumentException; /** * Checks if the inventory contains any ItemStacks with the given @@ -135,7 +135,7 @@ public interface Inventory extends Iterable { * @deprecated Magic value */ @Deprecated - public boolean contains(int materialId); + boolean contains(int materialId); /** * Checks if the inventory contains any ItemStacks with the given @@ -145,7 +145,7 @@ public interface Inventory extends Iterable { * @return true if an ItemStack is found with the given Material * @throws IllegalArgumentException if material is null */ - public boolean contains(Material material) throws IllegalArgumentException; + boolean contains(Material material) throws IllegalArgumentException; /** * Checks if the inventory contains any ItemStacks matching the given @@ -158,7 +158,7 @@ public interface Inventory extends Iterable { * @return false if item is null, true if any exactly matching ItemStacks * were found */ - public boolean contains(ItemStack item); + boolean contains(ItemStack item); /** * Checks if the inventory contains any ItemStacks with the given @@ -171,7 +171,7 @@ public interface Inventory extends Iterable { * @deprecated Magic value */ @Deprecated - public boolean contains(int materialId, int amount); + boolean contains(int materialId, int amount); /** * Checks if the inventory contains any ItemStacks with the given @@ -183,7 +183,7 @@ public interface Inventory extends Iterable { * found to add to the given amount * @throws IllegalArgumentException if material is null */ - public boolean contains(Material material, int amount) throws IllegalArgumentException; + boolean contains(Material material, int amount) throws IllegalArgumentException; /** * Checks if the inventory contains at least the minimum amount specified @@ -198,7 +198,7 @@ public interface Inventory extends Iterable { * amount of exactly matching ItemStacks were found * @see #containsAtLeast(ItemStack, int) */ - public boolean contains(ItemStack item, int amount); + boolean contains(ItemStack item, int amount); /** * Checks if the inventory contains ItemStacks matching the given @@ -209,7 +209,7 @@ public interface Inventory extends Iterable { * @return false if item is null, true if amount less than 1, true if * enough ItemStacks were found to add to the given amount */ - public boolean containsAtLeast(ItemStack item, int amount); + boolean containsAtLeast(ItemStack item, int amount); /** * Returns a HashMap with all slots and ItemStacks in the inventory with @@ -224,7 +224,7 @@ public interface Inventory extends Iterable { * @deprecated Magic value */ @Deprecated - public HashMap all(int materialId); + HashMap all(int materialId); /** * Returns a HashMap with all slots and ItemStacks in the inventory with @@ -238,7 +238,7 @@ public interface Inventory extends Iterable { * @return A HashMap containing the slot index, ItemStack pairs * @throws IllegalArgumentException if material is null */ - public HashMap all(Material material) throws IllegalArgumentException; + HashMap all(Material material) throws IllegalArgumentException; /** * Finds all slots in the inventory containing any ItemStacks with the @@ -252,7 +252,7 @@ public interface Inventory extends Iterable { * @param item The ItemStack to match against * @return A map from slot indexes to item at index */ - public HashMap all(ItemStack item); + HashMap all(ItemStack item); /** * Finds the first slot in the inventory containing an ItemStack with the @@ -263,7 +263,7 @@ public interface Inventory extends Iterable { * @deprecated Magic value */ @Deprecated - public int first(int materialId); + int first(int materialId); /** * Finds the first slot in the inventory containing an ItemStack with the @@ -273,7 +273,7 @@ public interface Inventory extends Iterable { * @return The slot index of the given Material or -1 if not found * @throws IllegalArgumentException if material is null */ - public int first(Material material) throws IllegalArgumentException; + int first(Material material) throws IllegalArgumentException; /** * Returns the first slot in the inventory containing an ItemStack with @@ -283,14 +283,14 @@ public interface Inventory extends Iterable { * @param item The ItemStack to match against * @return The slot index of the given ItemStack or -1 if not found */ - public int first(ItemStack item); + int first(ItemStack item); /** * Returns the first empty Slot. * * @return The first empty Slot found, or -1 if no empty slots. */ - public int firstEmpty(); + int firstEmpty(); /** * Removes all stacks in the inventory matching the given materialId. @@ -299,7 +299,7 @@ public interface Inventory extends Iterable { * @deprecated Magic value */ @Deprecated - public void remove(int materialId); + void remove(int materialId); /** * Removes all stacks in the inventory matching the given material. @@ -307,7 +307,7 @@ public interface Inventory extends Iterable { * @param material The material to remove * @throws IllegalArgumentException if material is null */ - public void remove(Material material) throws IllegalArgumentException; + void remove(Material material) throws IllegalArgumentException; /** * Removes all stacks in the inventory matching the given stack. @@ -317,19 +317,19 @@ public interface Inventory extends Iterable { * * @param item The ItemStack to match against */ - public void remove(ItemStack item); + void remove(ItemStack item); /** * Clears out a particular slot in the index. * * @param index The index to empty. */ - public void clear(int index); + void clear(int index); /** * Clears out the whole Inventory. */ - public void clear(); + void clear(); /** * Gets a list of players viewing the inventory. Note that a player is @@ -342,31 +342,31 @@ public interface Inventory extends Iterable { * * @return A list of HumanEntities who are viewing this Inventory. */ - public List getViewers(); + List getViewers(); /** * Returns the title of this inventory. * * @return A String with the title. */ - public String getTitle(); + String getTitle(); /** * Returns what type of inventory this is. * * @return The InventoryType representing the type of inventory. */ - public InventoryType getType(); + InventoryType getType(); /** * Gets the block or entity belonging to the open inventory * * @return The holder of the inventory; null if it has no holder. */ - public InventoryHolder getHolder(); + InventoryHolder getHolder(); @Override - public ListIterator iterator(); + ListIterator iterator(); /** * Returns an iterator starting at the given index. If the index is @@ -377,5 +377,5 @@ public interface Inventory extends Iterable { * @param index The index. * @return An iterator. */ - public ListIterator iterator(int index); + ListIterator iterator(int index); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/inventory/InventoryHolder.java b/TacoSpigot-API/src/main/java/org/bukkit/inventory/InventoryHolder.java index 9c06a3d..5a32b59 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/inventory/InventoryHolder.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/inventory/InventoryHolder.java @@ -7,5 +7,5 @@ public interface InventoryHolder { * * @return The inventory. */ - public Inventory getInventory(); + Inventory getInventory(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/inventory/ItemFlag.java b/TacoSpigot-API/src/main/java/org/bukkit/inventory/ItemFlag.java index 2a8af7b..b5540ae 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/inventory/ItemFlag.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/inventory/ItemFlag.java @@ -28,5 +28,5 @@ public enum ItemFlag { /** * Setting to show/hide potion effects on this ItemStack */ - HIDE_POTION_EFFECTS; + HIDE_POTION_EFFECTS } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/inventory/ItemStack.java b/TacoSpigot-API/src/main/java/org/bukkit/inventory/ItemStack.java index d9cff5b..40c43cc 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/inventory/ItemStack.java @@ -335,7 +335,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { if (stack == this) { return true; } - return getTypeId() == stack.getTypeId() && getDurability() == stack.getDurability() && hasItemMeta() == stack.hasItemMeta() && (hasItemMeta() ? Bukkit.getItemFactory().equals(getItemMeta(), stack.getItemMeta()) : true); + return getTypeId() == stack.getTypeId() && getDurability() == stack.getDurability() && hasItemMeta() == stack.hasItemMeta() && (!hasItemMeta() || Bukkit.getItemFactory().equals(getItemMeta(), stack.getItemMeta())); } @Override @@ -377,7 +377,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { * @return True if this has the given enchantment */ public boolean containsEnchantment(Enchantment ench) { - return meta == null ? false : meta.hasEnchant(ench); + return meta != null && meta.hasEnchant(ench); } /** @@ -493,7 +493,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { @Utility public Map serialize() { - Map result = new LinkedHashMap(); + Map result = new LinkedHashMap<>(); result.put("type", getType().name()); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/inventory/PlayerInventory.java b/TacoSpigot-API/src/main/java/org/bukkit/inventory/PlayerInventory.java index b79a4f0..2f0e843 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/inventory/PlayerInventory.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/inventory/PlayerInventory.java @@ -12,35 +12,35 @@ public interface PlayerInventory extends Inventory { * * @return All the ItemStacks from the armor slots */ - public ItemStack[] getArmorContents(); + ItemStack[] getArmorContents(); /** * Return the ItemStack from the helmet slot * * @return The ItemStack in the helmet slot */ - public ItemStack getHelmet(); + ItemStack getHelmet(); /** * Return the ItemStack from the chestplate slot * * @return The ItemStack in the chestplate slot */ - public ItemStack getChestplate(); + ItemStack getChestplate(); /** * Return the ItemStack from the leg slot * * @return The ItemStack in the leg slot */ - public ItemStack getLeggings(); + ItemStack getLeggings(); /** * Return the ItemStack from the boots slot * * @return The ItemStack in the boots slot */ - public ItemStack getBoots(); + ItemStack getBoots(); /** * Stores the ItemStack at the given index of the inventory. @@ -64,14 +64,14 @@ public interface PlayerInventory extends Inventory { * @see #setLeggings(ItemStack) */ @Override - public void setItem(int index, ItemStack item); + void setItem(int index, ItemStack item); /** * Put the given ItemStacks into the armor slots * * @param items The ItemStacks to use as armour */ - public void setArmorContents(ItemStack[] items); + void setArmorContents(ItemStack[] items); /** * Put the given ItemStack into the helmet slot. This does not check if @@ -79,7 +79,7 @@ public interface PlayerInventory extends Inventory { * * @param helmet The ItemStack to use as helmet */ - public void setHelmet(ItemStack helmet); + void setHelmet(ItemStack helmet); /** * Put the given ItemStack into the chestplate slot. This does not check @@ -87,7 +87,7 @@ public interface PlayerInventory extends Inventory { * * @param chestplate The ItemStack to use as chestplate */ - public void setChestplate(ItemStack chestplate); + void setChestplate(ItemStack chestplate); /** * Put the given ItemStack into the leg slot. This does not check if the @@ -95,7 +95,7 @@ public interface PlayerInventory extends Inventory { * * @param leggings The ItemStack to use as leggings */ - public void setLeggings(ItemStack leggings); + void setLeggings(ItemStack leggings); /** * Put the given ItemStack into the boots slot. This does not check if the @@ -103,28 +103,28 @@ public interface PlayerInventory extends Inventory { * * @param boots The ItemStack to use as boots */ - public void setBoots(ItemStack boots); + void setBoots(ItemStack boots); /** * Returns the ItemStack currently hold * * @return The currently held ItemStack */ - public ItemStack getItemInHand(); + ItemStack getItemInHand(); /** * Sets the item in hand * * @param stack Stack to set */ - public void setItemInHand(ItemStack stack); + void setItemInHand(ItemStack stack); /** * Get the slot number of the currently held item * * @return Held item slot number */ - public int getHeldItemSlot(); + int getHeldItemSlot(); /** * Set the slot number of the currently held item. @@ -135,7 +135,7 @@ public interface PlayerInventory extends Inventory { * @throws IllegalArgumentException Thrown if slot is not between 0 and 8 * inclusive */ - public void setHeldItemSlot(int slot); + void setHeldItemSlot(int slot); /** * Clears all matching items from the inventory. Setting either value to @@ -148,7 +148,7 @@ public interface PlayerInventory extends Inventory { * @deprecated Magic value */ @Deprecated - public int clear(int id, int data); + int clear(int id, int data); - public HumanEntity getHolder(); + HumanEntity getHolder(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/inventory/ShapedRecipe.java b/TacoSpigot-API/src/main/java/org/bukkit/inventory/ShapedRecipe.java index 2796473..6e5e821 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/inventory/ShapedRecipe.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/inventory/ShapedRecipe.java @@ -14,7 +14,7 @@ import org.bukkit.material.MaterialData; public class ShapedRecipe implements Recipe { private ItemStack output; private String[] rows; - private Map ingredients = new HashMap(); + private Map ingredients = new HashMap<>(); /** * Create a shaped recipe to craft the specified ItemStack. The @@ -51,12 +51,10 @@ public class ShapedRecipe implements Recipe { Validate.isTrue(row.length() > 0 && row.length() < 4, "Crafting rows should be 1, 2, or 3 characters, not ", row.length()); } this.rows = new String[shape.length]; - for (int i = 0; i < shape.length; i++) { - this.rows[i] = shape[i]; - } + System.arraycopy(shape, 0, this.rows, 0, shape.length); // Remove character mappings for characters that no longer exist in the shape - HashMap newIngredients = new HashMap(); + HashMap newIngredients = new HashMap<>(); for (String row : shape) { for (Character c : row.toCharArray()) { newIngredients.put(c, ingredients.get(c)); @@ -117,7 +115,7 @@ public class ShapedRecipe implements Recipe { * @return The mapping of character to ingredients. */ public Map getIngredientMap() { - HashMap result = new HashMap(); + HashMap result = new HashMap<>(); for (Map.Entry ingredient : ingredients.entrySet()) { if (ingredient.getValue() == null) { result.put(ingredient.getKey(), null); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/inventory/ShapelessRecipe.java b/TacoSpigot-API/src/main/java/org/bukkit/inventory/ShapelessRecipe.java index a718086..5a00452 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/inventory/ShapelessRecipe.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/inventory/ShapelessRecipe.java @@ -15,7 +15,7 @@ import org.bukkit.material.MaterialData; */ public class ShapelessRecipe implements Recipe { private ItemStack output; - private List ingredients = new ArrayList(); + private List ingredients = new ArrayList<>(); /** * Create a shapeless recipe to craft the specified ItemStack. The @@ -217,7 +217,7 @@ public class ShapelessRecipe implements Recipe { * @return The input list */ public List getIngredientList() { - ArrayList result = new ArrayList(ingredients.size()); + ArrayList result = new ArrayList<>(ingredients.size()); for (ItemStack ingredient : ingredients) { result.add(ingredient.clone()); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/TacoSpigot-API/src/main/java/org/bukkit/inventory/meta/ItemMeta.java index d8cc821..87d24d2 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/inventory/meta/ItemMeta.java @@ -159,7 +159,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable { ItemMeta clone(); // Spigot start - public class Spigot + class Spigot { /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/map/MapCanvas.java b/TacoSpigot-API/src/main/java/org/bukkit/map/MapCanvas.java index d68bb17..a7943ea 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/map/MapCanvas.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/map/MapCanvas.java @@ -14,14 +14,14 @@ public interface MapCanvas { * * @return The MapView this canvas is attached to. */ - public MapView getMapView(); + MapView getMapView(); /** * Get the cursor collection associated with this canvas. * * @return The MapCursorCollection associated with this canvas. */ - public MapCursorCollection getCursors(); + MapCursorCollection getCursors(); /** * Set the cursor collection associated with this canvas. This does not @@ -30,7 +30,7 @@ public interface MapCanvas { * * @param cursors The MapCursorCollection to associate with this canvas. */ - public void setCursors(MapCursorCollection cursors); + void setCursors(MapCursorCollection cursors); /** * Draw a pixel to the canvas. @@ -39,7 +39,7 @@ public interface MapCanvas { * @param y The y coordinate, from 0 to 127. * @param color The color. See {@link MapPalette}. */ - public void setPixel(int x, int y, byte color); + void setPixel(int x, int y, byte color); /** * Get a pixel from the canvas. @@ -48,7 +48,7 @@ public interface MapCanvas { * @param y The y coordinate, from 0 to 127. * @return The color. See {@link MapPalette}. */ - public byte getPixel(int x, int y); + byte getPixel(int x, int y); /** * Get a pixel from the layers below this canvas. @@ -57,7 +57,7 @@ public interface MapCanvas { * @param y The y coordinate, from 0 to 127. * @return The color. See {@link MapPalette}. */ - public byte getBasePixel(int x, int y); + byte getBasePixel(int x, int y); /** * Draw an image to the map. The image will be clipped if necessary. @@ -66,7 +66,7 @@ public interface MapCanvas { * @param y The y coordinate of the image. * @param image The Image to draw. */ - public void drawImage(int x, int y, Image image); + void drawImage(int x, int y, Image image); /** * Render text to the map using fancy formatting. Newline (\n) characters @@ -79,6 +79,6 @@ public interface MapCanvas { * @param font The font to use. * @param text The formatted text to render. */ - public void drawText(int x, int y, MapFont font, String text); + void drawText(int x, int y, MapFont font, String text); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/map/MapCursorCollection.java b/TacoSpigot-API/src/main/java/org/bukkit/map/MapCursorCollection.java index 1dc9025..fce68d3 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/map/MapCursorCollection.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/map/MapCursorCollection.java @@ -8,7 +8,7 @@ import java.util.List; * MapCursorCollection is linked to a specific {@link MapRenderer}. */ public final class MapCursorCollection { - private List cursors = new ArrayList(); + private List cursors = new ArrayList<>(); /** * Get the amount of cursors in this collection. diff --git a/TacoSpigot-API/src/main/java/org/bukkit/map/MapFont.java b/TacoSpigot-API/src/main/java/org/bukkit/map/MapFont.java index ea8f0ea..b577d8f 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/map/MapFont.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/map/MapFont.java @@ -7,7 +7,7 @@ import java.util.HashMap; */ public class MapFont { - private final HashMap chars = new HashMap(); + private final HashMap chars = new HashMap<>(); private int height = 0; protected boolean malleable = true; diff --git a/TacoSpigot-API/src/main/java/org/bukkit/map/MapView.java b/TacoSpigot-API/src/main/java/org/bukkit/map/MapView.java index 65c4159..41c007c 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/map/MapView.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/map/MapView.java @@ -11,7 +11,7 @@ public interface MapView { /** * An enum representing all possible scales a map can be set to. */ - public static enum Scale { + enum Scale { CLOSEST(0), CLOSE(1), NORMAL(2), @@ -63,7 +63,7 @@ public interface MapView { * @deprecated Magic value */ @Deprecated - public short getId(); + short getId(); /** * Check whether this map is virtual. A map is virtual if its lowermost @@ -71,49 +71,49 @@ public interface MapView { * * @return Whether the map is virtual. */ - public boolean isVirtual(); + boolean isVirtual(); /** * Get the scale of this map. * * @return The scale of the map. */ - public Scale getScale(); + Scale getScale(); /** * Set the scale of this map. * * @param scale The scale to set. */ - public void setScale(Scale scale); + void setScale(Scale scale); /** * Get the center X position of this map. * * @return The center X position. */ - public int getCenterX(); + int getCenterX(); /** * Get the center Z position of this map. * * @return The center Z position. */ - public int getCenterZ(); + int getCenterZ(); /** * Set the center X position of this map. * * @param x The center X position. */ - public void setCenterX(int x); + void setCenterX(int x); /** * Set the center Z position of this map. * * @param z The center Z position. */ - public void setCenterZ(int z); + void setCenterZ(int z); /** * Get the world that this map is associated with. Primarily used by the @@ -122,7 +122,7 @@ public interface MapView { * * @return The World this map is associated with. */ - public World getWorld(); + World getWorld(); /** * Set the world that this map is associated with. The world is used by @@ -130,21 +130,21 @@ public interface MapView { * * @param world The World to associate this map with. */ - public void setWorld(World world); + void setWorld(World world); /** * Get a list of MapRenderers currently in effect. * * @return A {@code List} containing each map renderer. */ - public List getRenderers(); + List getRenderers(); /** * Add a renderer to this map. * * @param renderer The MapRenderer to add. */ - public void addRenderer(MapRenderer renderer); + void addRenderer(MapRenderer renderer); /** * Remove a renderer from this map. @@ -152,6 +152,6 @@ public interface MapView { * @param renderer The MapRenderer to remove. * @return True if the renderer was successfully removed. */ - public boolean removeRenderer(MapRenderer renderer); + boolean removeRenderer(MapRenderer renderer); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/material/Attachable.java b/TacoSpigot-API/src/main/java/org/bukkit/material/Attachable.java index 1d3f107..e9b95ae 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/material/Attachable.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/material/Attachable.java @@ -12,5 +12,5 @@ public interface Attachable extends Directional { * * @return BlockFace attached to */ - public BlockFace getAttachedFace(); + BlockFace getAttachedFace(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/material/Colorable.java b/TacoSpigot-API/src/main/java/org/bukkit/material/Colorable.java index 3b91b24..2fe9e77 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/material/Colorable.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/material/Colorable.java @@ -12,13 +12,13 @@ public interface Colorable { * * @return The DyeColor of this object. */ - public DyeColor getColor(); + DyeColor getColor(); /** * Sets the color of this object to the specified DyeColor. * * @param color The color of the object, as a DyeColor. */ - public void setColor(DyeColor color); + void setColor(DyeColor color); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/material/Directional.java b/TacoSpigot-API/src/main/java/org/bukkit/material/Directional.java index 25624d2..2ad9bbc 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/material/Directional.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/material/Directional.java @@ -9,12 +9,12 @@ public interface Directional { * * @param face The facing direction */ - public void setFacingDirection(BlockFace face); + void setFacingDirection(BlockFace face); /** * Gets the direction this block is facing * * @return the direction this block is facing */ - public BlockFace getFacing(); + BlockFace getFacing(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/material/MonsterEggs.java b/TacoSpigot-API/src/main/java/org/bukkit/material/MonsterEggs.java index a6897b7..35833a9 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/material/MonsterEggs.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/material/MonsterEggs.java @@ -10,7 +10,7 @@ import org.bukkit.Material; */ public class MonsterEggs extends TexturedMaterial { - private static final List textures = new ArrayList(); + private static final List textures = new ArrayList<>(); static { textures.add(Material.STONE); textures.add(Material.COBBLESTONE); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/material/PressureSensor.java b/TacoSpigot-API/src/main/java/org/bukkit/material/PressureSensor.java index de20bd3..43d5b55 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/material/PressureSensor.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/material/PressureSensor.java @@ -1,5 +1,5 @@ package org.bukkit.material; public interface PressureSensor { - public boolean isPressed(); + boolean isPressed(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/material/Redstone.java b/TacoSpigot-API/src/main/java/org/bukkit/material/Redstone.java index 3e46603..ccf8e6f 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/material/Redstone.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/material/Redstone.java @@ -11,5 +11,5 @@ public interface Redstone { * * @return true if powered, otherwise false */ - public boolean isPowered(); + boolean isPowered(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/material/SmoothBrick.java b/TacoSpigot-API/src/main/java/org/bukkit/material/SmoothBrick.java index a6d8931..3f1680f 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/material/SmoothBrick.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/material/SmoothBrick.java @@ -10,7 +10,7 @@ import org.bukkit.Material; */ public class SmoothBrick extends TexturedMaterial { - private static final List textures = new ArrayList(); + private static final List textures = new ArrayList<>(); static { textures.add(Material.STONE); textures.add(Material.MOSSY_COBBLESTONE); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/material/Step.java b/TacoSpigot-API/src/main/java/org/bukkit/material/Step.java index c2ccfce..34e9ff6 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/material/Step.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/material/Step.java @@ -9,7 +9,7 @@ import org.bukkit.Material; * Represents the different types of steps. */ public class Step extends TexturedMaterial { - private static final List textures = new ArrayList(); + private static final List textures = new ArrayList<>(); static { textures.add(Material.STONE); textures.add(Material.SANDSTONE); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/material/Vine.java b/TacoSpigot-API/src/main/java/org/bukkit/material/Vine.java index 5a09667..c667619 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/material/Vine.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/material/Vine.java @@ -139,7 +139,7 @@ public class Vine extends MaterialData { case UP: break; default: - throw new IllegalArgumentException("Vines can't go on face " + face.toString()); + throw new IllegalArgumentException("Vines can't go on face " + face); } } @@ -181,7 +181,7 @@ public class Vine extends MaterialData { case UP: break; default: - throw new IllegalArgumentException("Vines can't go on face " + face.toString()); + throw new IllegalArgumentException("Vines can't go on face " + face); } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/metadata/FixedMetadataValue.java b/TacoSpigot-API/src/main/java/org/bukkit/metadata/FixedMetadataValue.java index bce6f00..5f48573 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/metadata/FixedMetadataValue.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/metadata/FixedMetadataValue.java @@ -2,8 +2,6 @@ package org.bukkit.metadata; import org.bukkit.plugin.Plugin; -import java.util.concurrent.Callable; - /** * A FixedMetadataValue is a special case metadata item that contains the same * value forever after initialization. Invalidating a FixedMetadataValue has diff --git a/TacoSpigot-API/src/main/java/org/bukkit/metadata/LazyMetadataValue.java b/TacoSpigot-API/src/main/java/org/bukkit/metadata/LazyMetadataValue.java index 564d0fa..e24f042 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/metadata/LazyMetadataValue.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/metadata/LazyMetadataValue.java @@ -48,7 +48,7 @@ public class LazyMetadataValue extends MetadataValueAdapter implements MetadataV super(owningPlugin); Validate.notNull(cacheStrategy, "cacheStrategy cannot be null"); Validate.notNull(lazyValue, "lazyValue cannot be null"); - this.internalValue = new SoftReference(null); + this.internalValue = new SoftReference<>(null); this.lazyValue = lazyValue; this.cacheStrategy = cacheStrategy; } @@ -85,7 +85,7 @@ public class LazyMetadataValue extends MetadataValueAdapter implements MetadataV if (value == null) { value = ACTUALLY_NULL; } - internalValue = new SoftReference(value); + internalValue = new SoftReference<>(value); } catch (Exception e) { throw new MetadataEvaluationException(e); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataStore.java b/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataStore.java index 700d0bf..c2570d8 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataStore.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataStore.java @@ -14,7 +14,7 @@ public interface MetadataStore { * @throws IllegalArgumentException If value is null, or the owning plugin * is null */ - public void setMetadata(T subject, String metadataKey, MetadataValue newMetadataValue); + void setMetadata(T subject, String metadataKey, MetadataValue newMetadataValue); /** * Returns all metadata values attached to an object. If multiple plugins @@ -25,7 +25,7 @@ public interface MetadataStore { * @return A list of values, one for each plugin that has set the * requested value. */ - public List getMetadata(T subject, String metadataKey); + List getMetadata(T subject, String metadataKey); /** * Tests to see if a metadata attribute has been set on an object. @@ -35,7 +35,7 @@ public interface MetadataStore { * @param metadataKey the unique metadata key being queried. * @return the existence of the metadataKey within subject. */ - public boolean hasMetadata(T subject, String metadataKey); + boolean hasMetadata(T subject, String metadataKey); /** * Removes a metadata item owned by a plugin from a subject. @@ -46,7 +46,7 @@ public interface MetadataStore { * @param owningPlugin the plugin attempting to remove a metadata item. * @throws IllegalArgumentException If plugin is null */ - public void removeMetadata(T subject, String metadataKey, Plugin owningPlugin); + void removeMetadata(T subject, String metadataKey, Plugin owningPlugin); /** * Invalidates all metadata in the metadata store that originates from the @@ -56,5 +56,5 @@ public interface MetadataStore { * @param owningPlugin the plugin requesting the invalidation. * @throws IllegalArgumentException If plugin is null */ - public void invalidateAll(Plugin owningPlugin); + void invalidateAll(Plugin owningPlugin); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataStoreBase.java b/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataStoreBase.java index 093c144..738c8a9 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataStoreBase.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataStoreBase.java @@ -6,7 +6,7 @@ import org.bukkit.plugin.Plugin; import java.util.*; public abstract class MetadataStoreBase { - private Map> metadataMap = new HashMap>(); + private Map> metadataMap = new HashMap<>(); /** * Adds a metadata value to an object. Each metadata value is owned by a @@ -37,7 +37,7 @@ public abstract class MetadataStoreBase { String key = disambiguate(subject, metadataKey); Map entry = metadataMap.get(key); if (entry == null) { - entry = new WeakHashMap(1); + entry = new WeakHashMap<>(1); metadataMap.put(key, entry); } entry.put(owningPlugin, newMetadataValue); @@ -57,7 +57,7 @@ public abstract class MetadataStoreBase { String key = disambiguate(subject, metadataKey); if (metadataMap.containsKey(key)) { Collection values = metadataMap.get(key).values(); - return Collections.unmodifiableList(new ArrayList(values)); + return Collections.unmodifiableList(new ArrayList<>(values)); } else { return Collections.emptyList(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataValue.java b/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataValue.java index eded8c0..f091e4c 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataValue.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataValue.java @@ -9,63 +9,63 @@ public interface MetadataValue { * * @return the metadata value. */ - public Object value(); + Object value(); /** * Attempts to convert the value of this metadata item into an int. * * @return the value as an int. */ - public int asInt(); + int asInt(); /** * Attempts to convert the value of this metadata item into a float. * * @return the value as a float. */ - public float asFloat(); + float asFloat(); /** * Attempts to convert the value of this metadata item into a double. * * @return the value as a double. */ - public double asDouble(); + double asDouble(); /** * Attempts to convert the value of this metadata item into a long. * * @return the value as a long. */ - public long asLong(); + long asLong(); /** * Attempts to convert the value of this metadata item into a short. * * @return the value as a short. */ - public short asShort(); + short asShort(); /** * Attempts to convert the value of this metadata item into a byte. * * @return the value as a byte. */ - public byte asByte(); + byte asByte(); /** * Attempts to convert the value of this metadata item into a boolean. * * @return the value as a boolean. */ - public boolean asBoolean(); + boolean asBoolean(); /** * Attempts to convert the value of this metadata item into a string. * * @return the value as a string. */ - public String asString(); + String asString(); /** * Returns the {@link Plugin} that created this metadata item. @@ -73,11 +73,11 @@ public interface MetadataValue { * @return the plugin that owns this metadata value. This should never be * null. */ - public Plugin getOwningPlugin(); + Plugin getOwningPlugin(); /** * Invalidates this metadata item, forcing it to recompute when next * accessed. */ - public void invalidate(); + void invalidate(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataValueAdapter.java b/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataValueAdapter.java index bbc3da8..a5d89f5 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataValueAdapter.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/metadata/MetadataValueAdapter.java @@ -18,7 +18,7 @@ public abstract class MetadataValueAdapter implements MetadataValue { protected MetadataValueAdapter(Plugin owningPlugin) { Validate.notNull(owningPlugin, "owningPlugin cannot be null"); - this.owningPlugin = new WeakReference(owningPlugin); + this.owningPlugin = new WeakReference<>(owningPlugin); } public Plugin getOwningPlugin() { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/metadata/Metadatable.java b/TacoSpigot-API/src/main/java/org/bukkit/metadata/Metadatable.java index b47cf2b..193d56e 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/metadata/Metadatable.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/metadata/Metadatable.java @@ -17,7 +17,7 @@ public interface Metadatable { * @throws IllegalArgumentException If value is null, or the owning plugin * is null */ - public void setMetadata(String metadataKey, MetadataValue newMetadataValue); + void setMetadata(String metadataKey, MetadataValue newMetadataValue); /** * Returns a list of previously set metadata values from the implementing @@ -27,7 +27,7 @@ public interface Metadatable { * @return A list of values, one for each plugin that has set the * requested value. */ - public List getMetadata(String metadataKey); + List getMetadata(String metadataKey); /** * Tests to see whether the implementing object contains the given @@ -36,7 +36,7 @@ public interface Metadatable { * @param metadataKey the unique metadata key being queried. * @return the existence of the metadataKey within subject. */ - public boolean hasMetadata(String metadataKey); + boolean hasMetadata(String metadataKey); /** * Removes the given metadata value from the implementing object's @@ -48,5 +48,5 @@ public interface Metadatable { * other values will be left untouched. * @throws IllegalArgumentException If plugin is null */ - public void removeMetadata(String metadataKey, Plugin owningPlugin); + void removeMetadata(String metadataKey, Plugin owningPlugin); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/permissions/Permissible.java b/TacoSpigot-API/src/main/java/org/bukkit/permissions/Permissible.java index 5cd3cff..471aaee 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/permissions/Permissible.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/permissions/Permissible.java @@ -15,7 +15,7 @@ public interface Permissible extends ServerOperator { * @param name Name of the permission * @return true if the permission is set, otherwise false */ - public boolean isPermissionSet(String name); + boolean isPermissionSet(String name); /** * Checks if this object contains an override for the specified {@link @@ -24,7 +24,7 @@ public interface Permissible extends ServerOperator { * @param perm Permission to check * @return true if the permission is set, otherwise false */ - public boolean isPermissionSet(Permission perm); + boolean isPermissionSet(Permission perm); /** * Gets the value of the specified permission, if set. @@ -35,7 +35,7 @@ public interface Permissible extends ServerOperator { * @param name Name of the permission * @return Value of the permission */ - public boolean hasPermission(String name); + boolean hasPermission(String name); /** * Gets the value of the specified permission, if set. @@ -46,7 +46,7 @@ public interface Permissible extends ServerOperator { * @param perm Permission to get * @return Value of the permission */ - public boolean hasPermission(Permission perm); + boolean hasPermission(Permission perm); /** * Adds a new {@link PermissionAttachment} with a single permission by @@ -58,7 +58,7 @@ public interface Permissible extends ServerOperator { * @param value Value of the permission * @return The PermissionAttachment that was just created */ - public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value); + PermissionAttachment addAttachment(Plugin plugin, String name, boolean value); /** * Adds a new empty {@link PermissionAttachment} to this object @@ -67,7 +67,7 @@ public interface Permissible extends ServerOperator { * or disabled * @return The PermissionAttachment that was just created */ - public PermissionAttachment addAttachment(Plugin plugin); + PermissionAttachment addAttachment(Plugin plugin); /** * Temporarily adds a new {@link PermissionAttachment} with a single @@ -81,7 +81,7 @@ public interface Permissible extends ServerOperator { * after * @return The PermissionAttachment that was just created */ - public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks); + PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks); /** * Temporarily adds a new empty {@link PermissionAttachment} to this @@ -93,7 +93,7 @@ public interface Permissible extends ServerOperator { * after * @return The PermissionAttachment that was just created */ - public PermissionAttachment addAttachment(Plugin plugin, int ticks); + PermissionAttachment addAttachment(Plugin plugin, int ticks); /** * Removes the given {@link PermissionAttachment} from this object @@ -102,7 +102,7 @@ public interface Permissible extends ServerOperator { * @throws IllegalArgumentException Thrown when the specified attachment * isn't part of this object */ - public void removeAttachment(PermissionAttachment attachment); + void removeAttachment(PermissionAttachment attachment); /** * Recalculates the permissions for this object, if the attachments have @@ -110,7 +110,7 @@ public interface Permissible extends ServerOperator { *

* This should very rarely need to be called from a plugin. */ - public void recalculatePermissions(); + void recalculatePermissions(); /** * Gets a set containing all of the permissions currently in effect by @@ -118,5 +118,5 @@ public interface Permissible extends ServerOperator { * * @return Set of currently effective permissions */ - public Set getEffectivePermissions(); + Set getEffectivePermissions(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissibleBase.java b/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissibleBase.java index 3b95061..56fbee3 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissibleBase.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissibleBase.java @@ -16,8 +16,8 @@ import org.bukkit.plugin.Plugin; public class PermissibleBase implements Permissible { private ServerOperator opable = null; private Permissible parent = this; - private final List attachments = new LinkedList(); - private final Map permissions = new HashMap(); + private final List attachments = new LinkedList<>(); + private final Map permissions = new HashMap<>(); public PermissibleBase(ServerOperator opable) { this.opable = opable; @@ -229,7 +229,7 @@ public class PermissibleBase implements Permissible { } public Set getEffectivePermissions() { - return new HashSet(permissions.values()); + return new HashSet<>(permissions.values()); } private class RemoveAttachmentRunnable implements Runnable { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/permissions/Permission.java b/TacoSpigot-API/src/main/java/org/bukkit/permissions/Permission.java index 0184f47..92acfa8 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/permissions/Permission.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/permissions/Permission.java @@ -19,7 +19,7 @@ public class Permission { public static final PermissionDefault DEFAULT_PERMISSION = PermissionDefault.OP; private final String name; - private final Map children = new LinkedHashMap(); + private final Map children = new LinkedHashMap<>(); private PermissionDefault defaultValue = DEFAULT_PERMISSION; private String description; @@ -226,7 +226,7 @@ public class Permission { * @return Permission object */ public static List loadPermissions(Map data, String error, PermissionDefault def) { - List result = new ArrayList(); + List result = new ArrayList<>(); for (Map.Entry entry : data.entrySet()) { try { @@ -298,7 +298,7 @@ public class Permission { if (data.get("children") != null) { Object childrenNode = data.get("children"); if (childrenNode instanceof Iterable) { - children = new LinkedHashMap(); + children = new LinkedHashMap<>(); for (Object child : (Iterable) childrenNode) { if (child != null) { children.put(child.toString(), Boolean.TRUE); @@ -319,7 +319,7 @@ public class Permission { } private static Map extractChildren(Map input, String name, PermissionDefault def, List output) { - Map children = new LinkedHashMap(); + Map children = new LinkedHashMap<>(); for (Map.Entry entry : input.entrySet()) { if ((entry.getValue() instanceof Boolean)) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionAttachment.java b/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionAttachment.java index b2a44d5..377ae22 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionAttachment.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionAttachment.java @@ -10,7 +10,7 @@ import org.bukkit.plugin.Plugin; */ public class PermissionAttachment { private PermissionRemovedExecutor removed; - private final Map permissions = new LinkedHashMap(); + private final Map permissions = new LinkedHashMap<>(); private final Permissible permissible; private final Plugin plugin; @@ -73,7 +73,7 @@ public class PermissionAttachment { * @return Copy of all permissions and values expressed by this attachment */ public Map getPermissions() { - return new LinkedHashMap(permissions); + return new LinkedHashMap<>(permissions); } /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionDefault.java b/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionDefault.java index 045e733..4a0ee4b 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionDefault.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionDefault.java @@ -13,7 +13,7 @@ public enum PermissionDefault { NOT_OP("!op", "notop", "!operator", "notoperator", "!admin", "notadmin"); private final String[] names; - private final static Map lookup = new HashMap(); + private final static Map lookup = new HashMap<>(); private PermissionDefault(String... names) { this.names = names; diff --git a/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionRemovedExecutor.java b/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionRemovedExecutor.java index b13d008..f08ad96 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionRemovedExecutor.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/permissions/PermissionRemovedExecutor.java @@ -12,5 +12,5 @@ public interface PermissionRemovedExecutor { * * @param attachment Attachment which was removed */ - public void attachmentRemoved(PermissionAttachment attachment); + void attachmentRemoved(PermissionAttachment attachment); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/permissions/ServerOperator.java b/TacoSpigot-API/src/main/java/org/bukkit/permissions/ServerOperator.java index 26ed243..cb40479 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/permissions/ServerOperator.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/permissions/ServerOperator.java @@ -13,12 +13,12 @@ public interface ServerOperator { * * @return true if this is an operator, otherwise false */ - public boolean isOp(); + boolean isOp(); /** * Sets the operator status of this object * * @param value New operator value */ - public void setOp(boolean value); + void setOp(boolean value); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/EventExecutor.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/EventExecutor.java index 3b2c99e..250d621 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/EventExecutor.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/EventExecutor.java @@ -8,5 +8,5 @@ import org.bukkit.event.Listener; * Interface which defines the class for event call backs to plugins */ public interface EventExecutor { - public void execute(Listener listener, Event event) throws EventException; + void execute(Listener listener, Event event) throws EventException; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/Plugin.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/Plugin.java index 7bdc809..5be9638 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/Plugin.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/Plugin.java @@ -23,14 +23,14 @@ public interface Plugin extends TabExecutor { * * @return The folder */ - public File getDataFolder(); + File getDataFolder(); /** * Returns the plugin.yaml file containing the details for this plugin * * @return Contents of the plugin.yaml file */ - public PluginDescriptionFile getDescription(); + PluginDescriptionFile getDescription(); /** * Gets a {@link FileConfiguration} for this plugin, read through @@ -41,7 +41,7 @@ public interface Plugin extends TabExecutor { * * @return Plugin configuration */ - public FileConfiguration getConfig(); + FileConfiguration getConfig(); /** * Gets an embedded resource in this plugin @@ -49,12 +49,12 @@ public interface Plugin extends TabExecutor { * @param filename Filename of the resource * @return File if found, otherwise null */ - public InputStream getResource(String filename); + InputStream getResource(String filename); /** * Saves the {@link FileConfiguration} retrievable by {@link #getConfig()}. */ - public void saveConfig(); + void saveConfig(); /** * Saves the raw contents of the default config.yml file to the location @@ -62,7 +62,7 @@ public interface Plugin extends TabExecutor { * embedded in the plugin, an empty config.yml file is saved. This should * fail silently if the config.yml already exists. */ - public void saveDefaultConfig(); + void saveDefaultConfig(); /** * Saves the raw contents of any resource embedded with a plugin's .jar @@ -78,26 +78,26 @@ public interface Plugin extends TabExecutor { * @throws IllegalArgumentException if the resource path is null, empty, * or points to a nonexistent resource. */ - public void saveResource(String resourcePath, boolean replace); + void saveResource(String resourcePath, boolean replace); /** * Discards any data in {@link #getConfig()} and reloads from disk. */ - public void reloadConfig(); + void reloadConfig(); /** * Gets the associated PluginLoader responsible for this plugin * * @return PluginLoader that controls this plugin */ - public PluginLoader getPluginLoader(); + PluginLoader getPluginLoader(); /** * Returns the Server instance currently running this plugin * * @return Server running this plugin */ - public Server getServer(); + Server getServer(); /** * Returns a value indicating whether or not this plugin is currently @@ -105,12 +105,12 @@ public interface Plugin extends TabExecutor { * * @return true if this plugin is enabled, otherwise false */ - public boolean isEnabled(); + boolean isEnabled(); /** * Called when this plugin is disabled */ - public void onDisable(); + void onDisable(); /** * Called after a plugin is loaded but before it has been enabled. @@ -118,26 +118,26 @@ public interface Plugin extends TabExecutor { * When mulitple plugins are loaded, the onLoad() for all plugins is * called before any onEnable() is called. */ - public void onLoad(); + void onLoad(); /** * Called when this plugin is enabled */ - public void onEnable(); + void onEnable(); /** * Simple boolean if we can still nag to the logs about things * * @return boolean whether we can nag */ - public boolean isNaggable(); + boolean isNaggable(); /** * Set naggable state * * @param canNag is this plugin still naggable? */ - public void setNaggable(boolean canNag); + void setNaggable(boolean canNag); /** * Gets the {@link EbeanServer} tied to this plugin. This will only be @@ -155,7 +155,7 @@ public interface Plugin extends TabExecutor { * * @return ebean server instance or null if not enabled */ - public EbeanServer getDatabase(); + EbeanServer getDatabase(); /** * Gets a {@link ChunkGenerator} for use in a default world, as specified @@ -166,7 +166,7 @@ public interface Plugin extends TabExecutor { * generator was requested * @return ChunkGenerator for use in the default world generation */ - public ChunkGenerator getDefaultWorldGenerator(String worldName, String id); + ChunkGenerator getDefaultWorldGenerator(String worldName, String id); /** * Returns the plugin logger associated with this server's logger. The @@ -175,7 +175,7 @@ public interface Plugin extends TabExecutor { * * @return Logger associated with this plugin */ - public Logger getLogger(); + Logger getLogger(); /** * Returns the name of the plugin. @@ -185,5 +185,5 @@ public interface Plugin extends TabExecutor { * * @return name of the plugin */ - public String getName(); + String getName(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginAwareness.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginAwareness.java index ddb47b7..e427d49 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginAwareness.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginAwareness.java @@ -16,7 +16,7 @@ public interface PluginAwareness { * be checked by using {@link PluginDescriptionFile#getAwareness()}.{@link * Set#contains(Object) contains(flag)}. */ - public enum Flags implements PluginAwareness { + enum Flags implements PluginAwareness { /** * This specifies that all (text) resources stored in a plugin's jar * use UTF-8 encoding. @@ -24,6 +24,5 @@ public interface PluginAwareness { * @see JavaPlugin#getTextResource(String) */ UTF8, - ; } } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java index c82928e..76fbf8d 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java @@ -175,39 +175,34 @@ import com.google.common.collect.ImmutableSet; * */ public final class PluginDescriptionFile { - private static final ThreadLocal YAML = new ThreadLocal() { - @Override - protected Yaml initialValue() { - return new Yaml(new SafeConstructor() { - { - yamlConstructors.put(null, new AbstractConstruct() { - @Override - public Object construct(final Node node) { - if (!node.getTag().startsWith("!@")) { - // Unknown tag - will fail - return SafeConstructor.undefinedConstructor.construct(node); - } - // Unknown awareness - provide a graceful substitution - return new PluginAwareness() { - @Override - public String toString() { - return node.toString(); - } - }; - } - }); - for (final PluginAwareness.Flags flag : PluginAwareness.Flags.values()) { - yamlConstructors.put(new Tag("!@" + flag.name()), new AbstractConstruct() { - @Override - public PluginAwareness.Flags construct(final Node node) { - return flag; - } - }); + private static final ThreadLocal YAML = ThreadLocal.withInitial(() -> new Yaml(new SafeConstructor() { + { + yamlConstructors.put(null, new AbstractConstruct() { + @Override + public Object construct(final Node node) { + if (!node.getTag().startsWith("!@")) { + // Unknown tag - will fail + return SafeConstructor.undefinedConstructor.construct(node); } + // Unknown awareness - provide a graceful substitution + return new PluginAwareness() { + @Override + public String toString() { + return node.toString(); + } + }; } }); + for (final PluginAwareness.Flags flag : PluginAwareness.Flags.values()) { + yamlConstructors.put(new Tag("!@" + flag.name()), new AbstractConstruct() { + @Override + public PluginAwareness.Flags construct(final Node node) { + return flag; + } + }); + } } - }; + })); String rawName = null; private String name = null; private String main = null; @@ -1014,7 +1009,7 @@ public final class PluginDescriptionFile { } if (map.get("awareness") instanceof Iterable) { - Set awareness = new HashSet(); + Set awareness = new HashSet<>(); try { for (Object o : (Iterable) map.get("awareness")) { awareness.add((PluginAwareness) o); @@ -1056,7 +1051,7 @@ public final class PluginDescriptionFile { } private Map saveMap() { - Map map = new HashMap(); + Map map = new HashMap<>(); map.put("name", name); map.put("main", main); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginLoader.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginLoader.java index e7981a1..5c95d59 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginLoader.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginLoader.java @@ -25,7 +25,7 @@ public interface PluginLoader { * @throws UnknownDependencyException If a required dependency could not * be found */ - public Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException; + Plugin loadPlugin(File file) throws InvalidPluginException, UnknownDependencyException; /** * Loads a PluginDescriptionFile from the specified file @@ -36,14 +36,14 @@ public interface PluginLoader { * @throws InvalidDescriptionException If the plugin description file * could not be created */ - public PluginDescriptionFile getPluginDescription(File file) throws InvalidDescriptionException; + PluginDescriptionFile getPluginDescription(File file) throws InvalidDescriptionException; /** * Returns a list of all filename filters expected by this PluginLoader * * @return The filters */ - public Pattern[] getPluginFileFilters(); + Pattern[] getPluginFileFilters(); /** * Creates and returns registered listeners for the event classes used in @@ -53,7 +53,7 @@ public interface PluginLoader { * @param plugin The plugin to use when creating registered listeners * @return The registered listeners. */ - public Map, Set> createRegisteredListeners(Listener listener, Plugin plugin); + Map, Set> createRegisteredListeners(Listener listener, Plugin plugin); /** * Enables the specified plugin @@ -63,7 +63,7 @@ public interface PluginLoader { * * @param plugin Plugin to enable */ - public void enablePlugin(Plugin plugin); + void enablePlugin(Plugin plugin); /** * Disables the specified plugin @@ -72,5 +72,5 @@ public interface PluginLoader { * * @param plugin Plugin to disable */ - public void disablePlugin(Plugin plugin); + void disablePlugin(Plugin plugin); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginManager.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginManager.java index e5638d5..9200465 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginManager.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/PluginManager.java @@ -21,7 +21,7 @@ public interface PluginManager { * @throws IllegalArgumentException Thrown when the given Class is not a * valid PluginLoader */ - public void registerInterface(Class loader) throws IllegalArgumentException; + void registerInterface(Class loader) throws IllegalArgumentException; /** * Checks if the given plugin is loaded and returns it when applicable @@ -31,14 +31,14 @@ public interface PluginManager { * @param name Name of the plugin to check * @return Plugin if it exists, otherwise null */ - public Plugin getPlugin(String name); + Plugin getPlugin(String name); /** * Gets a list of all currently loaded plugins * * @return Array of Plugins */ - public Plugin[] getPlugins(); + Plugin[] getPlugins(); /** * Checks if the given plugin is enabled or not @@ -48,7 +48,7 @@ public interface PluginManager { * @param name Name of the plugin to check * @return true if the plugin is enabled, otherwise false */ - public boolean isPluginEnabled(String name); + boolean isPluginEnabled(String name); /** * Checks if the given plugin is enabled or not @@ -56,7 +56,7 @@ public interface PluginManager { * @param plugin Plugin to check * @return true if the plugin is enabled, otherwise false */ - public boolean isPluginEnabled(Plugin plugin); + boolean isPluginEnabled(Plugin plugin); /** * Loads the plugin in the specified file @@ -72,7 +72,7 @@ public interface PluginManager { * @throws UnknownDependencyException If a required dependency could not * be resolved */ - public Plugin loadPlugin(File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException; + Plugin loadPlugin(File file) throws InvalidPluginException, InvalidDescriptionException, UnknownDependencyException; /** * Loads the plugins contained within the specified directory @@ -80,17 +80,17 @@ public interface PluginManager { * @param directory Directory to check for plugins * @return A list of all plugins loaded */ - public Plugin[] loadPlugins(File directory); + Plugin[] loadPlugins(File directory); /** * Disables all the loaded plugins */ - public void disablePlugins(); + void disablePlugins(); /** * Disables and removes all plugins */ - public void clearPlugins(); + void clearPlugins(); /** * Calls an event with the given details @@ -102,7 +102,7 @@ public interface PluginManager { * Note: This is best-effort basis, and should not be used to test * synchronized state. This is an indicator for flawed flow logic. */ - public void callEvent(Event event) throws IllegalStateException; + void callEvent(Event event) throws IllegalStateException; /** * Registers all the events in the given listener class @@ -110,7 +110,7 @@ public interface PluginManager { * @param listener Listener to register * @param plugin Plugin to register */ - public void registerEvents(Listener listener, Plugin plugin); + void registerEvents(Listener listener, Plugin plugin); /** * Registers the specified executor to the given event class @@ -121,7 +121,7 @@ public interface PluginManager { * @param executor EventExecutor to register * @param plugin Plugin to register */ - public void registerEvent(Class event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin); + void registerEvent(Class event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin); /** * Registers the specified executor to the given event class @@ -133,7 +133,7 @@ public interface PluginManager { * @param plugin Plugin to register * @param ignoreCancelled Whether to pass cancelled events or not */ - public void registerEvent(Class event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin, boolean ignoreCancelled); + void registerEvent(Class event, Listener listener, EventPriority priority, EventExecutor executor, Plugin plugin, boolean ignoreCancelled); /** * Enables the specified plugin @@ -143,7 +143,7 @@ public interface PluginManager { * * @param plugin Plugin to enable */ - public void enablePlugin(Plugin plugin); + void enablePlugin(Plugin plugin); /** * Disables the specified plugin @@ -152,7 +152,7 @@ public interface PluginManager { * * @param plugin Plugin to disable */ - public void disablePlugin(Plugin plugin); + void disablePlugin(Plugin plugin); /** * Gets a {@link Permission} from its fully qualified name @@ -160,7 +160,7 @@ public interface PluginManager { * @param name Name of the permission * @return Permission, or null if none */ - public Permission getPermission(String name); + Permission getPermission(String name); /** * Adds a {@link Permission} to this plugin manager. @@ -172,7 +172,7 @@ public interface PluginManager { * @throws IllegalArgumentException Thrown when a permission with the same * name already exists */ - public void addPermission(Permission perm); + void addPermission(Permission perm); /** * Removes a {@link Permission} registration from this plugin manager. @@ -185,7 +185,7 @@ public interface PluginManager { * * @param perm Permission to remove */ - public void removePermission(Permission perm); + void removePermission(Permission perm); /** * Removes a {@link Permission} registration from this plugin manager. @@ -198,7 +198,7 @@ public interface PluginManager { * * @param name Permission to remove */ - public void removePermission(String name); + void removePermission(String name); /** * Gets the default permissions for the given op status @@ -206,7 +206,7 @@ public interface PluginManager { * @param op Which set of default permissions to get * @return The default permissions */ - public Set getDefaultPermissions(boolean op); + Set getDefaultPermissions(boolean op); /** * Recalculates the defaults for the given {@link Permission}. @@ -216,7 +216,7 @@ public interface PluginManager { * * @param perm Permission to recalculate */ - public void recalculatePermissionDefaults(Permission perm); + void recalculatePermissionDefaults(Permission perm); /** * Subscribes the given Permissible for information about the requested @@ -228,7 +228,7 @@ public interface PluginManager { * @param permission Permission to subscribe to * @param permissible Permissible subscribing */ - public void subscribeToPermission(String permission, Permissible permissible); + void subscribeToPermission(String permission, Permissible permissible); /** * Unsubscribes the given Permissible for information about the requested @@ -237,7 +237,7 @@ public interface PluginManager { * @param permission Permission to unsubscribe from * @param permissible Permissible subscribing */ - public void unsubscribeFromPermission(String permission, Permissible permissible); + void unsubscribeFromPermission(String permission, Permissible permissible); /** * Gets a set containing all subscribed {@link Permissible}s to the given @@ -246,7 +246,7 @@ public interface PluginManager { * @param permission Permission to query for * @return Set containing all subscribed permissions */ - public Set getPermissionSubscriptions(String permission); + Set getPermissionSubscriptions(String permission); /** * Subscribes to the given Default permissions by operator status @@ -257,7 +257,7 @@ public interface PluginManager { * @param op Default list to subscribe to * @param permissible Permissible subscribing */ - public void subscribeToDefaultPerms(boolean op, Permissible permissible); + void subscribeToDefaultPerms(boolean op, Permissible permissible); /** * Unsubscribes from the given Default permissions by operator status @@ -265,7 +265,7 @@ public interface PluginManager { * @param op Default list to unsubscribe from * @param permissible Permissible subscribing */ - public void unsubscribeFromDefaultPerms(boolean op, Permissible permissible); + void unsubscribeFromDefaultPerms(boolean op, Permissible permissible); /** * Gets a set containing all subscribed {@link Permissible}s to the given @@ -274,7 +274,7 @@ public interface PluginManager { * @param op Default list to query for * @return Set containing all subscribed permissions */ - public Set getDefaultPermSubscriptions(boolean op); + Set getDefaultPermSubscriptions(boolean op); /** * Gets a set of all registered permissions. @@ -283,12 +283,12 @@ public interface PluginManager { * * @return Set containing all current registered permissions */ - public Set getPermissions(); + Set getPermissions(); /** * Returns whether or not timing code should be used for event calls * * @return True if event timings are to be used */ - public boolean useTimings(); + boolean useTimings(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/ServicesManager.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/ServicesManager.java index 5d45ffb..5b29794 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/ServicesManager.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/ServicesManager.java @@ -22,14 +22,14 @@ public interface ServicesManager { * @param plugin plugin with the provider * @param priority priority of the provider */ - public void register(Class service, T provider, Plugin plugin, ServicePriority priority); + void register(Class service, T provider, Plugin plugin, ServicePriority priority); /** * Unregister all the providers registered by a particular plugin. * * @param plugin The plugin */ - public void unregisterAll(Plugin plugin); + void unregisterAll(Plugin plugin); /** * Unregister a particular provider for a particular service. @@ -37,14 +37,14 @@ public interface ServicesManager { * @param service The service interface * @param provider The service provider implementation */ - public void unregister(Class service, Object provider); + void unregister(Class service, Object provider); /** * Unregister a particular provider. * * @param provider The service provider implementation */ - public void unregister(Object provider); + void unregister(Object provider); /** * Queries for a provider. This may return if no provider has been @@ -54,7 +54,7 @@ public interface ServicesManager { * @param service The service interface * @return provider or null */ - public T load(Class service); + T load(Class service); /** * Queries for a provider registration. This may return if no provider @@ -64,7 +64,7 @@ public interface ServicesManager { * @param service The service interface * @return provider registration or null */ - public RegisteredServiceProvider getRegistration(Class service); + RegisteredServiceProvider getRegistration(Class service); /** * Get registrations of providers for a plugin. @@ -72,7 +72,7 @@ public interface ServicesManager { * @param plugin The plugin * @return provider registration or null */ - public List> getRegistrations(Plugin plugin); + List> getRegistrations(Plugin plugin); /** * Get registrations of providers for a service. The returned list is @@ -82,7 +82,7 @@ public interface ServicesManager { * @param service The service interface * @return list of registrations */ - public Collection> getRegistrations(Class service); + Collection> getRegistrations(Class service); /** * Get a list of known services. A service is known if it has registered @@ -90,7 +90,7 @@ public interface ServicesManager { * * @return list of known services */ - public Collection> getKnownServices(); + Collection> getKnownServices(); /** * Returns whether a provider has been registered for a service. Do not @@ -101,6 +101,6 @@ public interface ServicesManager { * @param service service to check * @return whether there has been a registered provider */ - public boolean isProvidedFor(Class service); + boolean isProvidedFor(Class service); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/SimplePluginManager.java index 1325b03..c6c5fe7 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -39,23 +39,23 @@ import com.google.common.collect.ImmutableSet; */ public final class SimplePluginManager implements PluginManager { private final Server server; - private final Map fileAssociations = new HashMap(); - private final List plugins = new ArrayList(); - private final Map lookupNames = new HashMap(); + private final Map fileAssociations = new HashMap<>(); + private final List plugins = new ArrayList<>(); + private final Map lookupNames = new HashMap<>(); private static File updateDirectory = null; private final SimpleCommandMap commandMap; - private final Map permissions = new HashMap(); - private final Map> defaultPerms = new LinkedHashMap>(); - private final Map> permSubs = new HashMap>(); - private final Map> defSubs = new HashMap>(); + private final Map permissions = new HashMap<>(); + private final Map> defaultPerms = new LinkedHashMap<>(); + private final Map> permSubs = new HashMap<>(); + private final Map> defSubs = new HashMap<>(); private boolean useTimings = false; public SimplePluginManager(Server instance, SimpleCommandMap commandMap) { server = instance; this.commandMap = commandMap; - defaultPerms.put(true, new HashSet()); - defaultPerms.put(false, new HashSet()); + defaultPerms.put(true, new HashSet<>()); + defaultPerms.put(false, new HashSet<>()); } /** @@ -104,17 +104,17 @@ public final class SimplePluginManager implements PluginManager { Validate.notNull(directory, "Directory cannot be null"); Validate.isTrue(directory.isDirectory(), "Directory must be a directory"); - List result = new ArrayList(); + List result = new ArrayList<>(); Set filters = fileAssociations.keySet(); if (!(server.getUpdateFolder().equals(""))) { updateDirectory = new File(directory, server.getUpdateFolder()); } - Map plugins = new HashMap(); - Set loadedPlugins = new HashSet(); - Map> dependencies = new HashMap>(); - Map> softDependencies = new HashMap>(); + Map plugins = new HashMap<>(); + Set loadedPlugins = new HashSet<>(); + Map> dependencies = new HashMap<>(); + Map> softDependencies = new HashMap<>(); // This is where it figures out all possible plugins for (File file : directory.listFiles()) { @@ -164,13 +164,13 @@ public final class SimplePluginManager implements PluginManager { // Duplicates do not matter, they will be removed together if applicable softDependencies.get(description.getName()).addAll(softDependencySet); } else { - softDependencies.put(description.getName(), new LinkedList(softDependencySet)); + softDependencies.put(description.getName(), new LinkedList<>(softDependencySet)); } } Collection dependencySet = description.getDepend(); if (dependencySet != null && !dependencySet.isEmpty()) { - dependencies.put(description.getName(), new LinkedList(dependencySet)); + dependencies.put(description.getName(), new LinkedList<>(dependencySet)); } Collection loadBeforeSet = description.getLoadBefore(); @@ -180,7 +180,7 @@ public final class SimplePluginManager implements PluginManager { softDependencies.get(loadBeforeTarget).add(description.getName()); } else { // softDependencies is never iterated, so 'ghost' plugins aren't an issue - Collection shortSoftDependency = new LinkedList(); + Collection shortSoftDependency = new LinkedList<>(); shortSoftDependency.add(description.getName()); softDependencies.put(loadBeforeTarget, shortSoftDependency); } @@ -295,7 +295,7 @@ public final class SimplePluginManager implements PluginManager { } } - return result.toArray(new Plugin[result.size()]); + return result.toArray(new Plugin[0]); } /** @@ -648,7 +648,7 @@ public final class SimplePluginManager implements PluginManager { Map map = permSubs.get(name); if (map == null) { - map = new WeakHashMap(); + map = new WeakHashMap<>(); permSubs.put(name, map); } @@ -683,7 +683,7 @@ public final class SimplePluginManager implements PluginManager { Map map = defSubs.get(op); if (map == null) { - map = new WeakHashMap(); + map = new WeakHashMap<>(); defSubs.put(op, map); } @@ -713,7 +713,7 @@ public final class SimplePluginManager implements PluginManager { } public Set getPermissions() { - return new HashSet(permissions.values()); + return new HashSet<>(permissions.values()); } public boolean useTimings() { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/SimpleServicesManager.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/SimpleServicesManager.java index 4e17711..5a4d39e 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/SimpleServicesManager.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/SimpleServicesManager.java @@ -24,7 +24,7 @@ public class SimpleServicesManager implements ServicesManager { /** * Map of providers. */ - private final Map, List>> providers = new HashMap, List>>(); + private final Map, List>> providers = new HashMap<>(); /** * Register a provider of a service. @@ -40,11 +40,11 @@ public class SimpleServicesManager implements ServicesManager { synchronized (providers) { List> registered = providers.get(service); if (registered == null) { - registered = new ArrayList>(); + registered = new ArrayList<>(); providers.put(service, registered); } - registeredProvider = new RegisteredServiceProvider(service, provider, priority, plugin); + registeredProvider = new RegisteredServiceProvider<>(service, provider, priority, plugin); // Insert the provider into the collection, much more efficient big O than sort int position = Collections.binarySearch(registered, registeredProvider); @@ -64,7 +64,7 @@ public class SimpleServicesManager implements ServicesManager { * @param plugin The plugin */ public void unregisterAll(Plugin plugin) { - ArrayList unregisteredEvents = new ArrayList(); + ArrayList unregisteredEvents = new ArrayList<>(); synchronized (providers) { Iterator, List>>> it = providers.entrySet().iterator(); @@ -92,7 +92,7 @@ public class SimpleServicesManager implements ServicesManager { it.remove(); } } - } catch (NoSuchElementException e) {} + } catch (NoSuchElementException ignored) {} } for (ServiceUnregisterEvent event : unregisteredEvents) { Bukkit.getServer().getPluginManager().callEvent(event); @@ -106,7 +106,7 @@ public class SimpleServicesManager implements ServicesManager { * @param provider The service provider implementation */ public void unregister(Class service, Object provider) { - ArrayList unregisteredEvents = new ArrayList(); + ArrayList unregisteredEvents = new ArrayList<>(); synchronized (providers) { Iterator, List>>> it = providers.entrySet().iterator(); @@ -140,7 +140,7 @@ public class SimpleServicesManager implements ServicesManager { it.remove(); } } - } catch (NoSuchElementException e) {} + } catch (NoSuchElementException ignored) {} } for (ServiceUnregisterEvent event : unregisteredEvents) { Bukkit.getServer().getPluginManager().callEvent(event); @@ -153,7 +153,7 @@ public class SimpleServicesManager implements ServicesManager { * @param provider The service provider implementation */ public void unregister(Object provider) { - ArrayList unregisteredEvents = new ArrayList(); + ArrayList unregisteredEvents = new ArrayList<>(); synchronized (providers) { Iterator, List>>> it = providers.entrySet().iterator(); @@ -181,7 +181,7 @@ public class SimpleServicesManager implements ServicesManager { it.remove(); } } - } catch (NoSuchElementException e) {} + } catch (NoSuchElementException ignored) {} } for (ServiceUnregisterEvent event : unregisteredEvents) { Bukkit.getServer().getPluginManager().callEvent(event); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/JavaPlugin.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/JavaPlugin.java index c961b18..663eb93 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/JavaPlugin.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/JavaPlugin.java @@ -381,7 +381,7 @@ public abstract class JavaPlugin extends PluginBase { * @return List of Classes that are Ebeans */ public List> getDatabaseClasses() { - return new ArrayList>(); + return new ArrayList<>(); } private String replaceDatabaseString(String input) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index b057b05..9903c7e 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -47,8 +47,8 @@ import org.yaml.snakeyaml.error.YAMLException; public final class JavaPluginLoader implements PluginLoader { final Server server; private final Pattern[] fileFilters = new Pattern[] { Pattern.compile("\\.jar$"), }; - private final Map> classes = new java.util.concurrent.ConcurrentHashMap>(); // Spigot - private final Map loaders = new LinkedHashMap(); + private final Map> classes = new java.util.concurrent.ConcurrentHashMap<>(); // Spigot + private final Map loaders = new LinkedHashMap<>(); /** * This class was not meant to be constructed explicitly @@ -156,21 +156,19 @@ public final class JavaPluginLoader implements PluginLoader { return new PluginDescriptionFile(stream); - } catch (IOException ex) { - throw new InvalidDescriptionException(ex); - } catch (YAMLException ex) { + } catch (IOException | YAMLException ex) { throw new InvalidDescriptionException(ex); } finally { if (jar != null) { try { jar.close(); - } catch (IOException e) { + } catch (IOException ignored) { } } if (stream != null) { try { stream.close(); - } catch (IOException e) { + } catch (IOException ignored) { } } } @@ -191,7 +189,7 @@ public final class JavaPluginLoader implements PluginLoader { try { cachedClass = loader.findClass(name, false); - } catch (ClassNotFoundException cnfe) {} + } catch (ClassNotFoundException ignored) {} if (cachedClass != null) { return cachedClass; } @@ -230,18 +228,14 @@ public final class JavaPluginLoader implements PluginLoader { Validate.notNull(listener, "Listener can not be null"); boolean useTimings = server.getPluginManager().useTimings(); - Map, Set> ret = new HashMap, Set>(); + Map, Set> ret = new HashMap<>(); Set methods; try { Method[] publicMethods = listener.getClass().getMethods(); Method[] privateMethods = listener.getClass().getDeclaredMethods(); - methods = new HashSet(publicMethods.length + privateMethods.length, 1.0f); - for (Method method : publicMethods) { - methods.add(method); - } - for (Method method : privateMethods) { - methods.add(method); - } + methods = new HashSet<>(publicMethods.length + privateMethods.length, 1.0f); + methods.addAll(Arrays.asList(publicMethods)); + methods.addAll(Arrays.asList(privateMethods)); } catch (NoClassDefFoundError e) { plugin.getLogger().severe("Plugin " + plugin.getDescription().getFullName() + " has failed to register events for " + listener.getClass() + " because " + e.getMessage() + " does not exist."); return ret; @@ -264,7 +258,7 @@ public final class JavaPluginLoader implements PluginLoader { method.setAccessible(true); Set eventSet = ret.get(eventClass); if (eventSet == null) { - eventSet = new HashSet(); + eventSet = new HashSet<>(); ret.put(eventClass, eventSet); } @@ -291,18 +285,17 @@ public final class JavaPluginLoader implements PluginLoader { } } - EventExecutor executor = new co.aikar.timings.TimedEventExecutor(new EventExecutor() { // Spigot - public void execute(Listener listener, Event event) throws EventException { - try { - if (!eventClass.isAssignableFrom(event.getClass())) { - return; - } - method.invoke(listener, event); - } catch (InvocationTargetException ex) { - throw new EventException(ex.getCause()); - } catch (Throwable t) { - throw new EventException(t); + // Spigot + EventExecutor executor = new co.aikar.timings.TimedEventExecutor((listener1, event) -> { + try { + if (!eventClass.isAssignableFrom(event.getClass())) { + return; } + method.invoke(listener1, event); + } catch (InvocationTargetException ex) { + throw new EventException(ex.getCause()); + } catch (Throwable t) { + throw new EventException(t); } }, plugin, method, eventClass); // Spigot if (false) { // Spigot - RL handles useTimings check now diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java index b2cbf9e..98ec947 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -4,7 +4,6 @@ import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; -import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -18,7 +17,7 @@ import org.bukkit.plugin.PluginDescriptionFile; public final class PluginClassLoader extends URLClassLoader { // Spigot public JavaPlugin getPlugin() { return plugin; } // Spigot private final JavaPluginLoader loader; - private final Map> classes = new java.util.concurrent.ConcurrentHashMap>(); // Spigot + private final Map> classes = new java.util.concurrent.ConcurrentHashMap<>(); // Spigot private final PluginDescriptionFile description; private final File dataFolder; private final File file; diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/Messenger.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/Messenger.java index 655afaf..6ebb6aa 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/Messenger.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/Messenger.java @@ -13,12 +13,12 @@ public interface Messenger { /** * Represents the largest size that an individual Plugin Message may be. */ - public static final int MAX_MESSAGE_SIZE = 32766; + int MAX_MESSAGE_SIZE = 32766; /** * Represents the largest size that a Plugin Channel may be. */ - public static final int MAX_CHANNEL_SIZE = 20; + int MAX_CHANNEL_SIZE = 20; /** * Checks if the specified channel is a reserved name. @@ -27,7 +27,7 @@ public interface Messenger { * @return True if the channel is reserved, otherwise false. * @throws IllegalArgumentException Thrown if channel is null. */ - public boolean isReservedChannel(String channel); + boolean isReservedChannel(String channel); /** * Registers the specific plugin to the requested outgoing plugin channel, @@ -37,7 +37,7 @@ public interface Messenger { * @param channel Channel to register. * @throws IllegalArgumentException Thrown if plugin or channel is null. */ - public void registerOutgoingPluginChannel(Plugin plugin, String channel); + void registerOutgoingPluginChannel(Plugin plugin, String channel); /** * Unregisters the specific plugin from the requested outgoing plugin @@ -49,7 +49,7 @@ public interface Messenger { * @param channel Channel to unregister. * @throws IllegalArgumentException Thrown if plugin or channel is null. */ - public void unregisterOutgoingPluginChannel(Plugin plugin, String channel); + void unregisterOutgoingPluginChannel(Plugin plugin, String channel); /** * Unregisters the specific plugin from all outgoing plugin channels, no @@ -58,7 +58,7 @@ public interface Messenger { * @param plugin Plugin that no longer wishes to send plugin messages. * @throws IllegalArgumentException Thrown if plugin is null. */ - public void unregisterOutgoingPluginChannel(Plugin plugin); + void unregisterOutgoingPluginChannel(Plugin plugin); /** * Registers the specific plugin for listening on the requested incoming @@ -72,7 +72,7 @@ public interface Messenger { * @throws IllegalArgumentException Thrown if plugin, channel or listener * is null, or the listener is already registered for this channel. */ - public PluginMessageListenerRegistration registerIncomingPluginChannel(Plugin plugin, String channel, PluginMessageListener listener); + PluginMessageListenerRegistration registerIncomingPluginChannel(Plugin plugin, String channel, PluginMessageListener listener); /** * Unregisters the specific plugin's listener from listening on the @@ -85,7 +85,7 @@ public interface Messenger { * @throws IllegalArgumentException Thrown if plugin, channel or listener * is null. */ - public void unregisterIncomingPluginChannel(Plugin plugin, String channel, PluginMessageListener listener); + void unregisterIncomingPluginChannel(Plugin plugin, String channel, PluginMessageListener listener); /** * Unregisters the specific plugin from listening on the requested @@ -96,7 +96,7 @@ public interface Messenger { * @param channel Channel to unregister. * @throws IllegalArgumentException Thrown if plugin or channel is null. */ - public void unregisterIncomingPluginChannel(Plugin plugin, String channel); + void unregisterIncomingPluginChannel(Plugin plugin, String channel); /** * Unregisters the specific plugin from listening on all plugin channels @@ -105,14 +105,14 @@ public interface Messenger { * @param plugin Plugin that wishes to unregister from this channel. * @throws IllegalArgumentException Thrown if plugin is null. */ - public void unregisterIncomingPluginChannel(Plugin plugin); + void unregisterIncomingPluginChannel(Plugin plugin); /** * Gets a set containing all the outgoing plugin channels. * * @return List of all registered outgoing plugin channels. */ - public Set getOutgoingChannels(); + Set getOutgoingChannels(); /** * Gets a set containing all the outgoing plugin channels that the @@ -123,14 +123,14 @@ public interface Messenger { * is registered to. * @throws IllegalArgumentException Thrown if plugin is null. */ - public Set getOutgoingChannels(Plugin plugin); + Set getOutgoingChannels(Plugin plugin); /** * Gets a set containing all the incoming plugin channels. * * @return List of all registered incoming plugin channels. */ - public Set getIncomingChannels(); + Set getIncomingChannels(); /** * Gets a set containing all the incoming plugin channels that the @@ -141,7 +141,7 @@ public interface Messenger { * is registered for. * @throws IllegalArgumentException Thrown if plugin is null. */ - public Set getIncomingChannels(Plugin plugin); + Set getIncomingChannels(Plugin plugin); /** * Gets a set containing all the incoming plugin channel registrations @@ -151,7 +151,7 @@ public interface Messenger { * @return List of all registrations that the plugin has. * @throws IllegalArgumentException Thrown if plugin is null. */ - public Set getIncomingChannelRegistrations(Plugin plugin); + Set getIncomingChannelRegistrations(Plugin plugin); /** * Gets a set containing all the incoming plugin channel registrations @@ -161,7 +161,7 @@ public interface Messenger { * @return List of all registrations that are on the channel. * @throws IllegalArgumentException Thrown if channel is null. */ - public Set getIncomingChannelRegistrations(String channel); + Set getIncomingChannelRegistrations(String channel); /** * Gets a set containing all the incoming plugin channel registrations @@ -172,7 +172,7 @@ public interface Messenger { * @return List of all registrations that the plugin has. * @throws IllegalArgumentException Thrown if plugin or channel is null. */ - public Set getIncomingChannelRegistrations(Plugin plugin, String channel); + Set getIncomingChannelRegistrations(Plugin plugin, String channel); /** * Checks if the specified plugin message listener registration is valid. @@ -183,7 +183,7 @@ public interface Messenger { * @param registration Registration to check. * @return True if the registration is valid, otherwise false. */ - public boolean isRegistrationValid(PluginMessageListenerRegistration registration); + boolean isRegistrationValid(PluginMessageListenerRegistration registration); /** * Checks if the specified plugin has registered to receive incoming @@ -193,7 +193,7 @@ public interface Messenger { * @param channel Channel to test for. * @return True if the channel is registered, else false. */ - public boolean isIncomingChannelRegistered(Plugin plugin, String channel); + boolean isIncomingChannelRegistered(Plugin plugin, String channel); /** * Checks if the specified plugin has registered to send outgoing messages @@ -203,7 +203,7 @@ public interface Messenger { * @param channel Channel to test for. * @return True if the channel is registered, else false. */ - public boolean isOutgoingChannelRegistered(Plugin plugin, String channel); + boolean isOutgoingChannelRegistered(Plugin plugin, String channel); /** * Dispatches the specified incoming message to any registered listeners. @@ -212,5 +212,5 @@ public interface Messenger { * @param channel Channel that the message was sent by. * @param message Raw payload of the message. */ - public void dispatchIncomingMessage(Player source, String channel, byte[] message); + void dispatchIncomingMessage(Player source, String channel, byte[] message); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageListener.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageListener.java index f1aa080..a0978cb 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageListener.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageListener.java @@ -16,5 +16,5 @@ public interface PluginMessageListener { * @param player Source of the message. * @param message The raw message that was sent. */ - public void onPluginMessageReceived(String channel, Player player, byte[] message); + void onPluginMessageReceived(String channel, Player player, byte[] message); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageListenerRegistration.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageListenerRegistration.java index 29929bf..3460655 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageListenerRegistration.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageListenerRegistration.java @@ -2,6 +2,8 @@ package org.bukkit.plugin.messaging; import org.bukkit.plugin.Plugin; +import java.util.Objects; + /** * Contains information about a {@link Plugin}s registration to a plugin * channel. @@ -77,16 +79,16 @@ public final class PluginMessageListenerRegistration { return false; } final PluginMessageListenerRegistration other = (PluginMessageListenerRegistration) obj; - if (this.messenger != other.messenger && (this.messenger == null || !this.messenger.equals(other.messenger))) { + if (!Objects.equals(this.messenger, other.messenger)) { return false; } - if (this.plugin != other.plugin && (this.plugin == null || !this.plugin.equals(other.plugin))) { + if (!Objects.equals(this.plugin, other.plugin)) { return false; } - if ((this.channel == null) ? (other.channel != null) : !this.channel.equals(other.channel)) { + if (!Objects.equals(this.channel, other.channel)) { return false; } - if (this.listener != other.listener && (this.listener == null || !this.listener.equals(other.listener))) { + if (!Objects.equals(this.listener, other.listener)) { return false; } return true; diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageRecipient.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageRecipient.java index e5c5916..366d794 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageRecipient.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageRecipient.java @@ -26,7 +26,7 @@ public interface PluginMessageRecipient { * @throws ChannelNotRegisteredException Thrown if the channel is not * registered for this plugin. */ - public void sendPluginMessage(Plugin source, String channel, byte[] message); + void sendPluginMessage(Plugin source, String channel, byte[] message); /** * Gets a set containing all the Plugin Channels that this client is @@ -34,5 +34,5 @@ public interface PluginMessageRecipient { * * @return Set containing all the channels that this client may accept. */ - public Set getListeningPluginChannels(); + Set getListeningPluginChannels(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java b/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java index 4c171e8..9ee5ca8 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java @@ -13,10 +13,10 @@ import org.bukkit.plugin.Plugin; * Standard implementation to {@link Messenger} */ public class StandardMessenger implements Messenger { - private final Map> incomingByChannel = new HashMap>(); - private final Map> incomingByPlugin = new HashMap>(); - private final Map> outgoingByChannel = new HashMap>(); - private final Map> outgoingByPlugin = new HashMap>(); + private final Map> incomingByChannel = new HashMap<>(); + private final Map> incomingByPlugin = new HashMap<>(); + private final Map> outgoingByChannel = new HashMap<>(); + private final Map> outgoingByPlugin = new HashMap<>(); private final Object incomingLock = new Object(); private final Object outgoingLock = new Object(); @@ -26,12 +26,12 @@ public class StandardMessenger implements Messenger { Set channels = outgoingByPlugin.get(plugin); if (plugins == null) { - plugins = new HashSet(); + plugins = new HashSet<>(); outgoingByChannel.put(channel, plugins); } if (channels == null) { - channels = new HashSet(); + channels = new HashSet<>(); outgoingByPlugin.put(plugin, channels); } @@ -84,7 +84,7 @@ public class StandardMessenger implements Messenger { Set registrations = incomingByChannel.get(registration.getChannel()); if (registrations == null) { - registrations = new HashSet(); + registrations = new HashSet<>(); incomingByChannel.put(registration.getChannel(), registrations); } else { if (registrations.contains(registration)) { @@ -97,7 +97,7 @@ public class StandardMessenger implements Messenger { registrations = incomingByPlugin.get(registration.getPlugin()); if (registrations == null) { - registrations = new HashSet(); + registrations = new HashSet<>(); incomingByPlugin.put(registration.getPlugin(), registrations); } else { if (registrations.contains(registration)) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionBrewer.java b/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionBrewer.java index 5275517..681b779 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionBrewer.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionBrewer.java @@ -16,7 +16,7 @@ public interface PotionBrewer { * @param amplifier The amplifier of the effect * @return The resulting potion effect */ - public PotionEffect createEffect(PotionEffectType potion, int duration, int amplifier); + PotionEffect createEffect(PotionEffectType potion, int duration, int amplifier); /** * Returns a collection of {@link PotionEffect} that would be applied from @@ -27,5 +27,5 @@ public interface PotionBrewer { * @deprecated Magic value */ @Deprecated - public Collection getEffectsFromDamage(int damage); + Collection getEffectsFromDamage(int damage); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionEffectType.java b/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionEffectType.java index 4919d59..a65f6d0 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionEffectType.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionEffectType.java @@ -203,7 +203,7 @@ public abstract class PotionEffectType { } private static final PotionEffectType[] byId = new PotionEffectType[24]; - private static final Map byName = new HashMap(); + private static final Map byName = new HashMap<>(); // will break on updates. private static boolean acceptingNew = true; diff --git a/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionType.java b/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionType.java index 6ad9a91..5b97365 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionType.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/potion/PotionType.java @@ -45,7 +45,7 @@ public enum PotionType { } public boolean isInstant() { - return effect == null ? true : effect.isInstant(); + return effect == null || effect.isInstant(); } /** diff --git a/TacoSpigot-API/src/main/java/org/bukkit/projectiles/BlockProjectileSource.java b/TacoSpigot-API/src/main/java/org/bukkit/projectiles/BlockProjectileSource.java index e713c0d..8381336 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/projectiles/BlockProjectileSource.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/projectiles/BlockProjectileSource.java @@ -9,5 +9,5 @@ public interface BlockProjectileSource extends ProjectileSource { * * @return Block for the projectile source */ - public Block getBlock(); + Block getBlock(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/projectiles/ProjectileSource.java b/TacoSpigot-API/src/main/java/org/bukkit/projectiles/ProjectileSource.java index cf90946..b52c02a 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/projectiles/ProjectileSource.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/projectiles/ProjectileSource.java @@ -15,7 +15,7 @@ public interface ProjectileSource { * @param projectile class of the projectile to launch * @return the launched projectile */ - public T launchProjectile(Class projectile); + T launchProjectile(Class projectile); /** * Launches a {@link Projectile} from the ProjectileSource with an @@ -26,5 +26,5 @@ public interface ProjectileSource { * @param velocity the velocity with which to launch * @return the launched projectile */ - public T launchProjectile(Class projectile, Vector velocity); + T launchProjectile(Class projectile, Vector velocity); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitScheduler.java b/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitScheduler.java index 6e28205..bf5472d 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitScheduler.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitScheduler.java @@ -17,7 +17,7 @@ public interface BukkitScheduler { * @param delay Delay in server ticks before executing task * @return Task id number (-1 if scheduling failed) */ - public int scheduleSyncDelayedTask(Plugin plugin, Runnable task, long delay); + int scheduleSyncDelayedTask(Plugin plugin, Runnable task, long delay); /** * @deprecated Use {@link BukkitRunnable#runTaskLater(Plugin, long)} @@ -27,7 +27,7 @@ public interface BukkitScheduler { * @return Task id number (-1 if scheduling failed) */ @Deprecated - public int scheduleSyncDelayedTask(Plugin plugin, BukkitRunnable task, long delay); + int scheduleSyncDelayedTask(Plugin plugin, BukkitRunnable task, long delay); /** * Schedules a once off task to occur as soon as possible. @@ -38,7 +38,7 @@ public interface BukkitScheduler { * @param task Task to be executed * @return Task id number (-1 if scheduling failed) */ - public int scheduleSyncDelayedTask(Plugin plugin, Runnable task); + int scheduleSyncDelayedTask(Plugin plugin, Runnable task); /** * @deprecated Use {@link BukkitRunnable#runTask(Plugin)} @@ -47,7 +47,7 @@ public interface BukkitScheduler { * @return Task id number (-1 if scheduling failed) */ @Deprecated - public int scheduleSyncDelayedTask(Plugin plugin, BukkitRunnable task); + int scheduleSyncDelayedTask(Plugin plugin, BukkitRunnable task); /** * Schedules a repeating task. @@ -60,7 +60,7 @@ public interface BukkitScheduler { * @param period Period in server ticks of the task * @return Task id number (-1 if scheduling failed) */ - public int scheduleSyncRepeatingTask(Plugin plugin, Runnable task, long delay, long period); + int scheduleSyncRepeatingTask(Plugin plugin, Runnable task, long delay, long period); /** * @deprecated Use {@link BukkitRunnable#runTaskTimer(Plugin, long, long)} * @@ -71,7 +71,7 @@ public interface BukkitScheduler { * @return Task id number (-1 if scheduling failed) */ @Deprecated - public int scheduleSyncRepeatingTask(Plugin plugin, BukkitRunnable task, long delay, long period); + int scheduleSyncRepeatingTask(Plugin plugin, BukkitRunnable task, long delay, long period); /** * Asynchronous tasks should never access any API in Bukkit. Great care @@ -88,7 +88,7 @@ public interface BukkitScheduler { * task, but rather, "an async" task */ @Deprecated - public int scheduleAsyncDelayedTask(Plugin plugin, Runnable task, long delay); + int scheduleAsyncDelayedTask(Plugin plugin, Runnable task, long delay); /** * Asynchronous tasks should never access any API in Bukkit. Great care @@ -104,7 +104,7 @@ public interface BukkitScheduler { * task, but rather, "an async" task */ @Deprecated - public int scheduleAsyncDelayedTask(Plugin plugin, Runnable task); + int scheduleAsyncDelayedTask(Plugin plugin, Runnable task); /** * Asynchronous tasks should never access any API in Bukkit. Great care @@ -122,7 +122,7 @@ public interface BukkitScheduler { * task, but rather, "an async" task */ @Deprecated - public int scheduleAsyncRepeatingTask(Plugin plugin, Runnable task, long delay, long period); + int scheduleAsyncRepeatingTask(Plugin plugin, Runnable task, long delay, long period); /** * Calls a method on the main thread and returns a Future object. This @@ -138,14 +138,14 @@ public interface BukkitScheduler { * @param task Task to be executed * @return Future Future object related to the task */ - public Future callSyncMethod(Plugin plugin, Callable task); + Future callSyncMethod(Plugin plugin, Callable task); /** * Removes task from scheduler. * * @param taskId Id number of task to be removed */ - public void cancelTask(int taskId); + void cancelTask(int taskId); /** * Removes all tasks associated with a particular plugin from the @@ -153,12 +153,12 @@ public interface BukkitScheduler { * * @param plugin Owner of tasks to be removed */ - public void cancelTasks(Plugin plugin); + void cancelTasks(Plugin plugin); /** * Removes all tasks from the scheduler. */ - public void cancelAllTasks(); + void cancelAllTasks(); /** * Check if the task currently running. @@ -174,7 +174,7 @@ public interface BukkitScheduler { *

* @return If the task is currently running. */ - public boolean isCurrentlyRunning(int taskId); + boolean isCurrentlyRunning(int taskId); /** * Check if the task queued to be run later. @@ -187,7 +187,7 @@ public interface BukkitScheduler { *

* @return If the task is queued to be run. */ - public boolean isQueued(int taskId); + boolean isQueued(int taskId); /** * Returns a list of all active workers. @@ -197,7 +197,7 @@ public interface BukkitScheduler { * * @return Active workers */ - public List getActiveWorkers(); + List getActiveWorkers(); /** * Returns a list of all pending tasks. The ordering of the tasks is not @@ -205,7 +205,7 @@ public interface BukkitScheduler { * * @return Active workers */ - public List getPendingTasks(); + List getPendingTasks(); /** * Returns a task that will run on the next server tick. @@ -216,7 +216,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if plugin is null * @throws IllegalArgumentException if task is null */ - public BukkitTask runTask(Plugin plugin, Runnable task) throws IllegalArgumentException; + BukkitTask runTask(Plugin plugin, Runnable task) throws IllegalArgumentException; /** * @deprecated Use {@link BukkitRunnable#runTask(Plugin)} @@ -228,7 +228,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if task is null */ @Deprecated - public BukkitTask runTask(Plugin plugin, BukkitRunnable task) throws IllegalArgumentException; + BukkitTask runTask(Plugin plugin, BukkitRunnable task) throws IllegalArgumentException; /** * Asynchronous tasks should never access any API in Bukkit. Great care @@ -242,7 +242,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if plugin is null * @throws IllegalArgumentException if task is null */ - public BukkitTask runTaskAsynchronously(Plugin plugin, Runnable task) throws IllegalArgumentException; + BukkitTask runTaskAsynchronously(Plugin plugin, Runnable task) throws IllegalArgumentException; /** * @deprecated Use {@link BukkitRunnable#runTaskAsynchronously(Plugin)} @@ -253,7 +253,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if task is null */ @Deprecated - public BukkitTask runTaskAsynchronously(Plugin plugin, BukkitRunnable task) throws IllegalArgumentException; + BukkitTask runTaskAsynchronously(Plugin plugin, BukkitRunnable task) throws IllegalArgumentException; /** * Returns a task that will run after the specified number of server @@ -266,7 +266,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if plugin is null * @throws IllegalArgumentException if task is null */ - public BukkitTask runTaskLater(Plugin plugin, Runnable task, long delay) throws IllegalArgumentException; + BukkitTask runTaskLater(Plugin plugin, Runnable task, long delay) throws IllegalArgumentException; /** * @deprecated Use {@link BukkitRunnable#runTaskLater(Plugin, long)} @@ -278,7 +278,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if task is null */ @Deprecated - public BukkitTask runTaskLater(Plugin plugin, BukkitRunnable task, long delay) throws IllegalArgumentException; + BukkitTask runTaskLater(Plugin plugin, BukkitRunnable task, long delay) throws IllegalArgumentException; /** * Asynchronous tasks should never access any API in Bukkit. Great care @@ -294,7 +294,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if plugin is null * @throws IllegalArgumentException if task is null */ - public BukkitTask runTaskLaterAsynchronously(Plugin plugin, Runnable task, long delay) throws IllegalArgumentException; + BukkitTask runTaskLaterAsynchronously(Plugin plugin, Runnable task, long delay) throws IllegalArgumentException; /** * @deprecated Use {@link BukkitRunnable#runTaskLaterAsynchronously(Plugin, long)} @@ -306,7 +306,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if task is null */ @Deprecated - public BukkitTask runTaskLaterAsynchronously(Plugin plugin, BukkitRunnable task, long delay) throws IllegalArgumentException; + BukkitTask runTaskLaterAsynchronously(Plugin plugin, BukkitRunnable task, long delay) throws IllegalArgumentException; /** * Returns a task that will repeatedly run until cancelled, starting after @@ -320,7 +320,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if plugin is null * @throws IllegalArgumentException if task is null */ - public BukkitTask runTaskTimer(Plugin plugin, Runnable task, long delay, long period) throws IllegalArgumentException; + BukkitTask runTaskTimer(Plugin plugin, Runnable task, long delay, long period) throws IllegalArgumentException; /** * @deprecated Use {@link BukkitRunnable#runTaskTimer(Plugin, long, long)} @@ -333,7 +333,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if task is null */ @Deprecated - public BukkitTask runTaskTimer(Plugin plugin, BukkitRunnable task, long delay, long period) throws IllegalArgumentException; + BukkitTask runTaskTimer(Plugin plugin, BukkitRunnable task, long delay, long period) throws IllegalArgumentException; /** * Asynchronous tasks should never access any API in Bukkit. Great care @@ -351,7 +351,7 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if plugin is null * @throws IllegalArgumentException if task is null */ - public BukkitTask runTaskTimerAsynchronously(Plugin plugin, Runnable task, long delay, long period) throws IllegalArgumentException; + BukkitTask runTaskTimerAsynchronously(Plugin plugin, Runnable task, long delay, long period) throws IllegalArgumentException; /** * @deprecated Use {@link BukkitRunnable#runTaskTimerAsynchronously(Plugin, long, long)} @@ -365,5 +365,5 @@ public interface BukkitScheduler { * @throws IllegalArgumentException if task is null */ @Deprecated - public BukkitTask runTaskTimerAsynchronously(Plugin plugin, BukkitRunnable task, long delay, long period) throws IllegalArgumentException; + BukkitTask runTaskTimerAsynchronously(Plugin plugin, BukkitRunnable task, long delay, long period) throws IllegalArgumentException; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitTask.java b/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitTask.java index e447e64..dc9bf0e 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitTask.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitTask.java @@ -12,24 +12,24 @@ public interface BukkitTask { * * @return Task id number */ - public int getTaskId(); + int getTaskId(); /** * Returns the Plugin that owns this task. * * @return The Plugin that owns the task */ - public Plugin getOwner(); + Plugin getOwner(); /** * Returns true if the Task is a sync task. * * @return true if the task is run by main thread */ - public boolean isSync(); + boolean isSync(); /** * Will attempt to cancel this task. */ - public void cancel(); + void cancel(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitWorker.java b/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitWorker.java index fe1afbd..1058d8d 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitWorker.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/scheduler/BukkitWorker.java @@ -15,20 +15,20 @@ public interface BukkitWorker { * * @return Task id number */ - public int getTaskId(); + int getTaskId(); /** * Returns the Plugin that owns this task. * * @return The Plugin that owns the task */ - public Plugin getOwner(); + Plugin getOwner(); /** * Returns the thread for the worker. * * @return The Thread object for the worker */ - public Thread getThread(); + Thread getThread(); } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/scoreboard/DisplaySlot.java b/TacoSpigot-API/src/main/java/org/bukkit/scoreboard/DisplaySlot.java index 5d58a18..ee69e66 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/scoreboard/DisplaySlot.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/scoreboard/DisplaySlot.java @@ -6,5 +6,5 @@ package org.bukkit.scoreboard; public enum DisplaySlot { BELOW_NAME, PLAYER_LIST, - SIDEBAR; + SIDEBAR } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/scoreboard/NameTagVisibility.java b/TacoSpigot-API/src/main/java/org/bukkit/scoreboard/NameTagVisibility.java index 3137bf6..e425787 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/scoreboard/NameTagVisibility.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/scoreboard/NameTagVisibility.java @@ -17,5 +17,5 @@ public enum NameTagVisibility { /** * Show the player's nametag only to members of other teams. */ - HIDE_FOR_OWN_TEAM; + HIDE_FOR_OWN_TEAM } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/util/CachedServerIcon.java b/TacoSpigot-API/src/main/java/org/bukkit/util/CachedServerIcon.java index 0480470..1c9a8fc 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/util/CachedServerIcon.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/util/CachedServerIcon.java @@ -13,5 +13,5 @@ import org.bukkit.event.server.ServerListPingEvent; * @see ServerListPingEvent#setServerIcon(CachedServerIcon) */ public interface CachedServerIcon { - public String getData(); // Spigot + String getData(); // Spigot } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/util/ChatPaginator.java b/TacoSpigot-API/src/main/java/org/bukkit/util/ChatPaginator.java index 24802d1..170cf75 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/util/ChatPaginator.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/util/ChatPaginator.java @@ -2,6 +2,7 @@ package org.bukkit.util; import org.bukkit.ChatColor; +import java.util.Arrays; import java.util.LinkedList; import java.util.List; @@ -73,7 +74,7 @@ public class ChatPaginator { char[] rawChars = (rawString + ' ').toCharArray(); // add a trailing space to trigger pagination StringBuilder word = new StringBuilder(); StringBuilder line = new StringBuilder(); - List lines = new LinkedList(); + List lines = new LinkedList<>(); int lineColorChars = 0; for (int i = 0; i < rawChars.length; i++) { @@ -89,9 +90,7 @@ public class ChatPaginator { if (c == ' ' || c == '\n') { if (line.length() == 0 && word.length() > lineLength) { // special case: extremely long word begins a line - for (String partialWord : word.toString().split("(?<=\\G.{" + lineLength + "})")) { - lines.add(partialWord); - } + lines.addAll(Arrays.asList(word.toString().split("(?<=\\G.{" + lineLength + "})"))); } else if (line.length() + word.length() - lineColorChars == lineLength) { // Line exactly the correct length...newline line.append(word); lines.add(line.toString()); @@ -138,7 +137,7 @@ public class ChatPaginator { } } - return lines.toArray(new String[lines.size()]); + return lines.toArray(new String[0]); } public static class ChatPage { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/util/NumberConversions.java b/TacoSpigot-API/src/main/java/org/bukkit/util/NumberConversions.java index e6af9ec..5336bb5 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/util/NumberConversions.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/util/NumberConversions.java @@ -30,9 +30,8 @@ public final class NumberConversions { } try { - return Integer.valueOf(object.toString()); - } catch (NumberFormatException e) { - } catch (NullPointerException e) { + return Integer.parseInt(object.toString()); + } catch (NumberFormatException | NullPointerException ignored) { } return 0; } @@ -43,9 +42,8 @@ public final class NumberConversions { } try { - return Float.valueOf(object.toString()); - } catch (NumberFormatException e) { - } catch (NullPointerException e) { + return Float.parseFloat(object.toString()); + } catch (NumberFormatException | NullPointerException ignored) { } return 0; } @@ -56,9 +54,8 @@ public final class NumberConversions { } try { - return Double.valueOf(object.toString()); - } catch (NumberFormatException e) { - } catch (NullPointerException e) { + return Double.parseDouble(object.toString()); + } catch (NumberFormatException | NullPointerException ignored) { } return 0; } @@ -69,9 +66,8 @@ public final class NumberConversions { } try { - return Long.valueOf(object.toString()); - } catch (NumberFormatException e) { - } catch (NullPointerException e) { + return Long.parseLong(object.toString()); + } catch (NumberFormatException | NullPointerException ignored) { } return 0; } @@ -82,9 +78,8 @@ public final class NumberConversions { } try { - return Short.valueOf(object.toString()); - } catch (NumberFormatException e) { - } catch (NullPointerException e) { + return Short.parseShort(object.toString()); + } catch (NumberFormatException | NullPointerException ignored) { } return 0; } @@ -95,9 +90,8 @@ public final class NumberConversions { } try { - return Byte.valueOf(object.toString()); - } catch (NumberFormatException e) { - } catch (NullPointerException e) { + return Byte.parseByte(object.toString()); + } catch (NumberFormatException | NullPointerException ignored) { } return 0; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/util/Vector.java b/TacoSpigot-API/src/main/java/org/bukkit/util/Vector.java index 685148e..5a55f31 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/util/Vector.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/util/Vector.java @@ -7,7 +7,6 @@ import org.bukkit.Location; import org.bukkit.World; import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.configuration.serialization.SerializableAs; -import static org.bukkit.util.NumberConversions.checkFinite; /** * Represents a mutable vector. Because the components of Vectors are mutable, @@ -639,7 +638,7 @@ public class Vector implements Cloneable, ConfigurationSerializable { } public Map serialize() { - Map result = new LinkedHashMap(); + Map result = new LinkedHashMap<>(); result.put("x", getX()); result.put("y", getY()); diff --git a/TacoSpigot-API/src/main/java/org/bukkit/util/io/Wrapper.java b/TacoSpigot-API/src/main/java/org/bukkit/util/io/Wrapper.java index e45605b..0e9473d 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/util/io/Wrapper.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/util/io/Wrapper.java @@ -14,7 +14,7 @@ class Wrapper & Serializable> implements Serializable { final T map; static Wrapper> newWrapper(ConfigurationSerializable obj) { - return new Wrapper>(ImmutableMap.builder().put(ConfigurationSerialization.SERIALIZED_TYPE_KEY, ConfigurationSerialization.getAlias(obj.getClass())).putAll(obj.serialize()).build()); + return new Wrapper<>(ImmutableMap.builder().put(ConfigurationSerialization.SERIALIZED_TYPE_KEY, ConfigurationSerialization.getAlias(obj.getClass())).putAll(obj.serialize()).build()); } private Wrapper(T map) { diff --git a/TacoSpigot-API/src/main/java/org/bukkit/util/noise/NoiseGenerator.java b/TacoSpigot-API/src/main/java/org/bukkit/util/noise/NoiseGenerator.java index 72c92f3..16f7532 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/util/noise/NoiseGenerator.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/util/noise/NoiseGenerator.java @@ -4,7 +4,7 @@ package org.bukkit.util.noise; * Base class for all noise generators */ public abstract class NoiseGenerator { - protected final int perm[] = new int[512]; + protected final int[] perm = new int[512]; protected double offsetX; protected double offsetY; protected double offsetZ; diff --git a/TacoSpigot-API/src/main/java/org/bukkit/util/noise/PerlinNoiseGenerator.java b/TacoSpigot-API/src/main/java/org/bukkit/util/noise/PerlinNoiseGenerator.java index 5e034c1..822bde7 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/util/noise/PerlinNoiseGenerator.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/util/noise/PerlinNoiseGenerator.java @@ -10,13 +10,13 @@ import org.bukkit.World; * different results */ public class PerlinNoiseGenerator extends NoiseGenerator { - protected static final int grad3[][] = {{1, 1, 0}, {-1, 1, 0}, {1, -1, 0}, {-1, -1, 0}, + protected static final int[][] grad3 = {{1, 1, 0}, {-1, 1, 0}, {1, -1, 0}, {-1, -1, 0}, {1, 0, 1}, {-1, 0, 1}, {1, 0, -1}, {-1, 0, -1}, {0, 1, 1}, {0, -1, 1}, {0, 1, -1}, {0, -1, -1}}; private static final PerlinNoiseGenerator instance = new PerlinNoiseGenerator(); protected PerlinNoiseGenerator() { - int p[] = {151, 160, 137, 91, 90, 15, 131, 13, 201, + int[] p = {151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, 21, 10, 23, 190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33, 88, 237, 149, 56, diff --git a/TacoSpigot-API/src/main/java/org/bukkit/util/noise/SimplexNoiseGenerator.java b/TacoSpigot-API/src/main/java/org/bukkit/util/noise/SimplexNoiseGenerator.java index b052f3c..8677e03 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/util/noise/SimplexNoiseGenerator.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/util/noise/SimplexNoiseGenerator.java @@ -24,7 +24,7 @@ public class SimplexNoiseGenerator extends PerlinNoiseGenerator { protected static final double G42 = G4 * 2.0; protected static final double G43 = G4 * 3.0; protected static final double G44 = G4 * 4.0 - 1.0; - protected static final int grad4[][] = {{0, 1, 1, 1}, {0, 1, 1, -1}, {0, 1, -1, 1}, {0, 1, -1, -1}, + protected static final int[][] grad4 = {{0, 1, 1, 1}, {0, 1, 1, -1}, {0, 1, -1, 1}, {0, 1, -1, -1}, {0, -1, 1, 1}, {0, -1, 1, -1}, {0, -1, -1, 1}, {0, -1, -1, -1}, {1, 0, 1, 1}, {1, 0, 1, -1}, {1, 0, -1, 1}, {1, 0, -1, -1}, {-1, 0, 1, 1}, {-1, 0, 1, -1}, {-1, 0, -1, 1}, {-1, 0, -1, -1}, @@ -32,7 +32,7 @@ public class SimplexNoiseGenerator extends PerlinNoiseGenerator { {-1, 1, 0, 1}, {-1, 1, 0, -1}, {-1, -1, 0, 1}, {-1, -1, 0, -1}, {1, 1, 1, 0}, {1, 1, -1, 0}, {1, -1, 1, 0}, {1, -1, -1, 0}, {-1, 1, 1, 0}, {-1, 1, -1, 0}, {-1, -1, 1, 0}, {-1, -1, -1, 0}}; - protected static final int simplex[][] = { + protected static final int[][] simplex = { {0, 1, 2, 3}, {0, 1, 3, 2}, {0, 0, 0, 0}, {0, 2, 3, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {1, 2, 3, 0}, {0, 2, 1, 3}, {0, 0, 0, 0}, {0, 3, 1, 2}, {0, 3, 2, 1}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {1, 3, 2, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, @@ -76,15 +76,15 @@ public class SimplexNoiseGenerator extends PerlinNoiseGenerator { offsetW = rand.nextDouble() * 256; } - protected static double dot(int g[], double x, double y) { + protected static double dot(int[] g, double x, double y) { return g[0] * x + g[1] * y; } - protected static double dot(int g[], double x, double y, double z) { + protected static double dot(int[] g, double x, double y, double z) { return g[0] * x + g[1] * y + g[2] * z; } - protected static double dot(int g[], double x, double y, double z, double w) { + protected static double dot(int[] g, double x, double y, double z, double w) { return g[0] * x + g[1] * y + g[2] * z + g[3] * w; } diff --git a/TacoSpigot-API/src/main/java/org/bukkit/util/permissions/DefaultPermissions.java b/TacoSpigot-API/src/main/java/org/bukkit/util/permissions/DefaultPermissions.java index 8c0df8e..fbeb143 100644 --- a/TacoSpigot-API/src/main/java/org/bukkit/util/permissions/DefaultPermissions.java +++ b/TacoSpigot-API/src/main/java/org/bukkit/util/permissions/DefaultPermissions.java @@ -39,8 +39,7 @@ public final class DefaultPermissions { } public static Permission registerPermission(String name, String desc) { - Permission perm = registerPermission(new Permission(name, desc)); - return perm; + return registerPermission(new Permission(name, desc)); } public static Permission registerPermission(String name, String desc, Permission parent) { @@ -50,8 +49,7 @@ public final class DefaultPermissions { } public static Permission registerPermission(String name, String desc, PermissionDefault def) { - Permission perm = registerPermission(new Permission(name, desc, def)); - return perm; + return registerPermission(new Permission(name, desc, def)); } public static Permission registerPermission(String name, String desc, PermissionDefault def, Permission parent) { @@ -61,8 +59,7 @@ public final class DefaultPermissions { } public static Permission registerPermission(String name, String desc, PermissionDefault def, Map children) { - Permission perm = registerPermission(new Permission(name, desc, def, children)); - return perm; + return registerPermission(new Permission(name, desc, def, children)); } public static Permission registerPermission(String name, String desc, PermissionDefault def, Map children, Permission parent) { diff --git a/TacoSpigot-API/src/main/java/org/spigotmc/CustomTimingsHandler.java b/TacoSpigot-API/src/main/java/org/spigotmc/CustomTimingsHandler.java index 7e89b97..0f5ae56 100644 --- a/TacoSpigot-API/src/main/java/org/spigotmc/CustomTimingsHandler.java +++ b/TacoSpigot-API/src/main/java/org/spigotmc/CustomTimingsHandler.java @@ -26,7 +26,6 @@ package org.spigotmc; import org.bukkit.Bukkit; import org.bukkit.plugin.AuthorNagException; import org.bukkit.plugin.Plugin; -import co.aikar.timings.NullTimingHandler; import co.aikar.timings.Timing; import co.aikar.timings.Timings; import co.aikar.timings.TimingsManager; diff --git a/TacoSpigot-API/src/main/java/org/spigotmc/event/player/PlayerSpawnLocationEvent.java b/TacoSpigot-API/src/main/java/org/spigotmc/event/player/PlayerSpawnLocationEvent.java index dd3f58c..783d696 100644 --- a/TacoSpigot-API/src/main/java/org/spigotmc/event/player/PlayerSpawnLocationEvent.java +++ b/TacoSpigot-API/src/main/java/org/spigotmc/event/player/PlayerSpawnLocationEvent.java @@ -1,7 +1,6 @@ package org.spigotmc.event.player; import org.bukkit.Location; -import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.bukkit.event.player.PlayerEvent; diff --git a/TacoSpigot-API/src/test/java/org/bukkit/BukkitMirrorTest.java b/TacoSpigot-API/src/test/java/org/bukkit/BukkitMirrorTest.java index 219788f..4b1aee0 100644 --- a/TacoSpigot-API/src/test/java/org/bukkit/BukkitMirrorTest.java +++ b/TacoSpigot-API/src/test/java/org/bukkit/BukkitMirrorTest.java @@ -23,15 +23,10 @@ public class BukkitMirrorTest { @Parameters(name="{index}: {1}") public static List data() { - return Lists.transform(Arrays.asList(Server.class.getDeclaredMethods()), new Function() { - @Override - public Object[] apply(Method input) { - return new Object[] { - input, - input.toGenericString().substring("public abstract ".length()).replace("(", "{").replace(")", "}") - }; - } - }); + return Lists.transform(Arrays.asList(Server.class.getDeclaredMethods()), input -> new Object[] { + input, + input.toGenericString().substring("public abstract ".length()).replace("(", "{").replace(")", "}") + }); } @Parameter(0) diff --git a/TacoSpigot-API/src/test/java/org/bukkit/ChatColorTest.java b/TacoSpigot-API/src/test/java/org/bukkit/ChatColorTest.java index 80108a5..3b3c57d 100644 --- a/TacoSpigot-API/src/test/java/org/bukkit/ChatColorTest.java +++ b/TacoSpigot-API/src/test/java/org/bukkit/ChatColorTest.java @@ -17,7 +17,7 @@ public class ChatColorTest { @Test(expected = IllegalArgumentException.class) public void getByStringWithNull() { - ChatColor.getByChar((String) null); + ChatColor.getByChar(null); } @Test(expected = IllegalArgumentException.class) diff --git a/TacoSpigot-API/src/test/java/org/bukkit/ChatPaginatorTest.java b/TacoSpigot-API/src/test/java/org/bukkit/ChatPaginatorTest.java index 0a8acae..3ddba20 100644 --- a/TacoSpigot-API/src/test/java/org/bukkit/ChatPaginatorTest.java +++ b/TacoSpigot-API/src/test/java/org/bukkit/ChatPaginatorTest.java @@ -4,7 +4,6 @@ import org.bukkit.util.ChatPaginator; import org.junit.Test; import static org.hamcrest.CoreMatchers.is; -import static org.hamcrest.CoreMatchers.nullValue; import static org.junit.Assert.assertThat; /** @@ -17,7 +16,7 @@ public class ChatPaginatorTest { assertThat(lines.length, is(2)); assertThat(lines[0], is(ChatColor.RED + "123456789 123456789")); - assertThat(lines[1], is(ChatColor.RED.toString() + "123456789")); + assertThat(lines[1], is(ChatColor.RED + "123456789")); } @Test @@ -26,8 +25,8 @@ public class ChatPaginatorTest { String[] lines = ChatPaginator.wordWrap(rawString, 22); assertThat(lines.length, is(2)); - assertThat(lines[0], is(ChatColor.WHITE.toString() + "123456789 123456789")); - assertThat(lines[1], is(ChatColor.WHITE.toString() + "123456789")); + assertThat(lines[0], is(ChatColor.WHITE + "123456789 123456789")); + assertThat(lines[1], is(ChatColor.WHITE + "123456789")); } @Test @@ -47,8 +46,8 @@ public class ChatPaginatorTest { String[] lines = ChatPaginator.wordWrap(rawString, 19); assertThat(lines.length, is(2)); - assertThat(lines[0], is(ChatColor.WHITE.toString() + "123456789 123456789")); - assertThat(lines[1], is(ChatColor.WHITE.toString() + "123456789 12345")); + assertThat(lines[0], is(ChatColor.WHITE + "123456789 123456789")); + assertThat(lines[1], is(ChatColor.WHITE + "123456789 12345")); } @Test @@ -57,8 +56,8 @@ public class ChatPaginatorTest { String[] lines = ChatPaginator.wordWrap(rawString, 19); assertThat(lines.length, is(2)); - assertThat(lines[0], is(ChatColor.WHITE.toString() + "123456789")); - assertThat(lines[1], is(ChatColor.WHITE.toString() + "123456789 123456789")); + assertThat(lines[0], is(ChatColor.WHITE + "123456789")); + assertThat(lines[1], is(ChatColor.WHITE + "123456789 123456789")); } @Test @@ -67,8 +66,8 @@ public class ChatPaginatorTest { String[] lines = ChatPaginator.wordWrap(rawString, 19); assertThat(lines.length, is(2)); - assertThat(lines[0], is(ChatColor.WHITE.toString() + "12345678 23456789")); - assertThat(lines[1], is(ChatColor.WHITE.toString() + "123456789")); + assertThat(lines[0], is(ChatColor.WHITE + "12345678 23456789")); + assertThat(lines[1], is(ChatColor.WHITE + "123456789")); } @Test @@ -77,8 +76,8 @@ public class ChatPaginatorTest { String[] lines = ChatPaginator.wordWrap(rawString, 19); assertThat(lines.length, is(2)); - assertThat(lines[0], is(ChatColor.WHITE.toString() + "12345678 23456789")); - assertThat(lines[1], is(ChatColor.WHITE.toString() + "123456789")); + assertThat(lines[0], is(ChatColor.WHITE + "12345678 23456789")); + assertThat(lines[1], is(ChatColor.WHITE + "123456789")); } @Test @@ -87,12 +86,12 @@ public class ChatPaginatorTest { String[] lines = ChatPaginator.wordWrap(rawString, 6); assertThat(lines.length, is(6)); - assertThat(lines[0], is(ChatColor.WHITE.toString() + "123456")); - assertThat(lines[1], is(ChatColor.WHITE.toString() + "789")); - assertThat(lines[2], is(ChatColor.WHITE.toString() + "123456")); - assertThat(lines[3], is(ChatColor.WHITE.toString() + "789")); - assertThat(lines[4], is(ChatColor.WHITE.toString() + "123456")); - assertThat(lines[5], is(ChatColor.WHITE.toString() + "789")); + assertThat(lines[0], is(ChatColor.WHITE + "123456")); + assertThat(lines[1], is(ChatColor.WHITE + "789")); + assertThat(lines[2], is(ChatColor.WHITE + "123456")); + assertThat(lines[3], is(ChatColor.WHITE + "789")); + assertThat(lines[4], is(ChatColor.WHITE + "123456")); + assertThat(lines[5], is(ChatColor.WHITE + "789")); } @Test @@ -101,13 +100,13 @@ public class ChatPaginatorTest { String[] lines = ChatPaginator.wordWrap(rawString, 6); assertThat(lines.length, is(7)); - assertThat(lines[0], is(ChatColor.WHITE.toString() + "1234")); - assertThat(lines[1], is(ChatColor.WHITE.toString() + "123456")); - assertThat(lines[2], is(ChatColor.WHITE.toString() + "789")); - assertThat(lines[3], is(ChatColor.WHITE.toString() + "123456")); - assertThat(lines[4], is(ChatColor.WHITE.toString() + "789")); - assertThat(lines[5], is(ChatColor.WHITE.toString() + "123456")); - assertThat(lines[6], is(ChatColor.WHITE.toString() + "789")); + assertThat(lines[0], is(ChatColor.WHITE + "1234")); + assertThat(lines[1], is(ChatColor.WHITE + "123456")); + assertThat(lines[2], is(ChatColor.WHITE + "789")); + assertThat(lines[3], is(ChatColor.WHITE + "123456")); + assertThat(lines[4], is(ChatColor.WHITE + "789")); + assertThat(lines[5], is(ChatColor.WHITE + "123456")); + assertThat(lines[6], is(ChatColor.WHITE + "789")); } @Test @@ -116,8 +115,8 @@ public class ChatPaginatorTest { String[] lines = ChatPaginator.wordWrap(rawString, 19); assertThat(lines.length, is(2)); - assertThat(lines[0], is(ChatColor.WHITE.toString() + "123456789")); - assertThat(lines[1], is(ChatColor.WHITE.toString() + "123456789")); + assertThat(lines[0], is(ChatColor.WHITE + "123456789")); + assertThat(lines[1], is(ChatColor.WHITE + "123456789")); } @Test @@ -137,8 +136,8 @@ public class ChatPaginatorTest { assertThat(page.getPageNumber(), is(1)); assertThat(page.getTotalPages(), is(4)); assertThat(page.getLines().length, is(2)); - assertThat(page.getLines()[0], is(ChatColor.WHITE.toString() + "1234")); - assertThat(page.getLines()[1], is(ChatColor.WHITE.toString() + "123456")); + assertThat(page.getLines()[0], is(ChatColor.WHITE + "1234")); + assertThat(page.getLines()[1], is(ChatColor.WHITE + "123456")); } @Test @@ -149,8 +148,8 @@ public class ChatPaginatorTest { assertThat(page.getPageNumber(), is(2)); assertThat(page.getTotalPages(), is(4)); assertThat(page.getLines().length, is(2)); - assertThat(page.getLines()[0], is(ChatColor.WHITE.toString() + "789")); - assertThat(page.getLines()[1], is(ChatColor.WHITE.toString() + "123456")); + assertThat(page.getLines()[0], is(ChatColor.WHITE + "789")); + assertThat(page.getLines()[1], is(ChatColor.WHITE + "123456")); } @Test @@ -161,6 +160,6 @@ public class ChatPaginatorTest { assertThat(page.getPageNumber(), is(4)); assertThat(page.getTotalPages(), is(4)); assertThat(page.getLines().length, is(1)); - assertThat(page.getLines()[0], is(ChatColor.WHITE.toString() + "789")); + assertThat(page.getLines()[0], is(ChatColor.WHITE + "789")); } } diff --git a/TacoSpigot-API/src/test/java/org/bukkit/DyeColorTest.java b/TacoSpigot-API/src/test/java/org/bukkit/DyeColorTest.java index 3a82df7..b563204 100644 --- a/TacoSpigot-API/src/test/java/org/bukkit/DyeColorTest.java +++ b/TacoSpigot-API/src/test/java/org/bukkit/DyeColorTest.java @@ -20,7 +20,7 @@ public class DyeColorTest { @Parameters(name= "{index}: {0}") public static List data() { - List list = new ArrayList(); + List list = new ArrayList<>(); for (DyeColor dye : DyeColor.values()) { list.add(new Object[] {dye}); } diff --git a/TacoSpigot-API/src/test/java/org/bukkit/LocationTest.java b/TacoSpigot-API/src/test/java/org/bukkit/LocationTest.java index fa24776..15b97ae 100644 --- a/TacoSpigot-API/src/test/java/org/bukkit/LocationTest.java +++ b/TacoSpigot-API/src/test/java/org/bukkit/LocationTest.java @@ -17,7 +17,7 @@ import com.google.common.collect.ImmutableList; @RunWith(Parameterized.class) public class LocationTest { - private static final double δ = 1.0 / 1000000; + private static final double error = 1.0 / 1000000; /** *

      * a² + b² = c², a = b
@@ -166,17 +166,17 @@ public class LocationTest {
     public void testExpectedPitchYaw() {
         Location location = getEmptyLocation().setDirection(getVector());
 
-        assertThat((double) location.getYaw(), is(closeTo(yaw, δ)));
-        assertThat((double) location.getPitch(), is(closeTo(pitch, δ)));
+        assertThat((double) location.getYaw(), is(closeTo(yaw, error)));
+        assertThat((double) location.getPitch(), is(closeTo(pitch, error)));
     }
 
     @Test
     public void testExpectedXYZ() {
         Vector vector = getLocation().getDirection();
 
-        assertThat(vector.getX(), is(closeTo(x, δ)));
-        assertThat(vector.getY(), is(closeTo(y, δ)));
-        assertThat(vector.getZ(), is(closeTo(z, δ)));
+        assertThat(vector.getX(), is(closeTo(x, error)));
+        assertThat(vector.getY(), is(closeTo(y, error)));
+        assertThat(vector.getZ(), is(closeTo(z, error)));
     }
 
     private Vector getVector() {
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/MaterialTest.java b/TacoSpigot-API/src/test/java/org/bukkit/MaterialTest.java
index cbca840..7343a92 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/MaterialTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/MaterialTest.java
@@ -29,7 +29,7 @@ public class MaterialTest {
         for (Material material : Material.values()) {
             if (material.getId() > 255) continue;
 
-            assertTrue(String.format("[%d] %s", material.getId(), material.toString()), material.isBlock());
+            assertTrue(String.format("[%d] %s", material.getId(), material), material.isBlock());
         }
     }
 
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/TestServer.java b/TacoSpigot-API/src/test/java/org/bukkit/TestServer.java
index 2d84032..656dd43 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/TestServer.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/TestServer.java
@@ -13,7 +13,7 @@ import org.bukkit.plugin.SimplePluginManager;
 import com.google.common.collect.ImmutableMap;
 
 public class TestServer implements InvocationHandler {
-    private static interface MethodHandler {
+    private interface MethodHandler {
         Object handle(TestServer server, Object[] args);
     }
 
@@ -24,20 +24,12 @@ public class TestServer implements InvocationHandler {
             ImmutableMap.Builder methodMap = ImmutableMap.builder();
             methodMap.put(
                     Server.class.getMethod("isPrimaryThread"),
-                    new MethodHandler() {
-                        public Object handle(TestServer server, Object[] args) {
-                            return Thread.currentThread().equals(server.creatingThread);
-                        }
-                    }
-                );
+                    (server, args) -> Thread.currentThread().equals(server.creatingThread)
+            );
             methodMap.put(
                     Server.class.getMethod("getPluginManager"),
-                    new MethodHandler() {
-                        public Object handle(TestServer server, Object[] args) {
-                            return server.pluginManager;
-                        }
-                    }
-                );
+                    (server, args) -> server.pluginManager
+            );
             methodMap.put(
                     Server.class.getMethod("getLogger"),
                     new MethodHandler() {
@@ -49,28 +41,16 @@ public class TestServer implements InvocationHandler {
                 );
             methodMap.put(
                     Server.class.getMethod("getName"),
-                    new MethodHandler() {
-                        public Object handle(TestServer server, Object[] args) {
-                            return TestServer.class.getSimpleName();
-                        }
-                    }
-                );
+                    (server, args) -> TestServer.class.getSimpleName()
+            );
             methodMap.put(
                     Server.class.getMethod("getVersion"),
-                    new MethodHandler() {
-                        public Object handle(TestServer server, Object[] args) {
-                            return "Version_" + TestServer.class.getPackage().getImplementationVersion();
-                        }
-                    }
-                );
+                    (server, args) -> "Version_" + TestServer.class.getPackage().getImplementationVersion()
+            );
             methodMap.put(
                     Server.class.getMethod("getBukkitVersion"),
-                    new MethodHandler() {
-                        public Object handle(TestServer server, Object[] args) {
-                            return "BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion();
-                        }
-                    }
-                );
+                    (server, args) -> "BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion()
+            );
             methods = methodMap.build();
 
             TestServer server = new TestServer();
@@ -84,7 +64,7 @@ public class TestServer implements InvocationHandler {
 
     private Thread creatingThread = Thread.currentThread();
     private PluginManager pluginManager;
-    private TestServer() {};
+    private TestServer() {}
 
     public static Server getInstance() {
         return Bukkit.getServer();
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java b/TacoSpigot-API/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java
index 6dab477..fcb1cb7 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java
@@ -186,7 +186,7 @@ public abstract class ConfigurationSectionTest {
     @Test
     public void testSectionMap() {
         ConfigurationSection config = getConfigurationSection();
-        Map testMap = new LinkedHashMap();
+        Map testMap = new LinkedHashMap<>();
 
         testMap.put("string", "Hello World");
         testMap.put("integer", 15);
@@ -397,7 +397,7 @@ public abstract class ConfigurationSectionTest {
     public void testGetList_String() {
         ConfigurationSection section = getConfigurationSection();
         String key = "exists";
-        Map map = new HashMap();
+        Map map = new HashMap<>();
 
         map.put("one", 1);
         map.put("two", "two");
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/configuration/ConfigurationTest.java b/TacoSpigot-API/src/test/java/org/bukkit/configuration/ConfigurationTest.java
index e187d15..bde88d5 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/configuration/ConfigurationTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/configuration/ConfigurationTest.java
@@ -14,7 +14,7 @@ public abstract class ConfigurationTest {
     public abstract Configuration getConfig();
 
     public Map getTestValues() {
-        HashMap result = new LinkedHashMap();
+        HashMap result = new LinkedHashMap<>();
 
         result.put("integer", Integer.MIN_VALUE);
         result.put("string", "String Value");
@@ -129,7 +129,7 @@ public abstract class ConfigurationTest {
     public void testCreateSection() {
         Configuration config = getConfig();
 
-        Set set = new HashSet();
+        Set set = new HashSet<>();
         set.add("this");
         set.add("this.test.sub");
         set.add("this.test");
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/conversations/ConversationContextTest.java b/TacoSpigot-API/src/test/java/org/bukkit/conversations/ConversationContextTest.java
index dfc462b..bd875cc 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/conversations/ConversationContextTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/conversations/ConversationContextTest.java
@@ -12,14 +12,14 @@ public class ConversationContextTest {
     @Test
     public void TestFromWhom() {
         Conversable conversable = new FakeConversable();
-        ConversationContext context = new ConversationContext(null, conversable, new HashMap());
+        ConversationContext context = new ConversationContext(null, conversable, new HashMap<>());
         assertEquals(conversable, context.getForWhom());
     }
 
     @Test
     public void TestPlugin() {
         Conversable conversable = new FakeConversable();
-        ConversationContext context = new ConversationContext(null, conversable, new HashMap());
+        ConversationContext context = new ConversationContext(null, conversable, new HashMap<>());
         assertEquals(null, context.getPlugin());
     }
 
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/metadata/FixedMetadataValueTest.java b/TacoSpigot-API/src/test/java/org/bukkit/metadata/FixedMetadataValueTest.java
index 5583b27..677a551 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/metadata/FixedMetadataValueTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/metadata/FixedMetadataValueTest.java
@@ -13,15 +13,15 @@ public class FixedMetadataValueTest {
 
     @Test
     public void testBasic() {
-        subject = new FixedMetadataValue(plugin, new Integer(50));
+        subject = new FixedMetadataValue(plugin, 50);
         assertSame(plugin, subject.getOwningPlugin());
-        assertEquals(new Integer(50), subject.value());
+        assertEquals(50, subject.value());
     }
 
     @Test
     public void testNumberTypes() {
-        subject = new FixedMetadataValue(plugin, new Integer(5));
-        assertEquals(new Integer(5), subject.value());
+        subject = new FixedMetadataValue(plugin, 5);
+        assertEquals(5, subject.value());
         assertEquals(5, subject.asInt());
         assertEquals(true, subject.asBoolean());
         assertEquals(5, subject.asByte());
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/metadata/LazyMetadataValueTest.java b/TacoSpigot-API/src/test/java/org/bukkit/metadata/LazyMetadataValueTest.java
index a3172db..2da470e 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/metadata/LazyMetadataValueTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/metadata/LazyMetadataValueTest.java
@@ -45,10 +45,8 @@ public class LazyMetadataValueTest {
 
     @Test(expected=MetadataEvaluationException.class)
     public void testEvalException() {
-        subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.CACHE_AFTER_FIRST_EVAL, new Callable() {
-            public Object call() throws Exception {
-                throw new RuntimeException("Gotcha!");
-            }
+        subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.CACHE_AFTER_FIRST_EVAL, () -> {
+            throw new RuntimeException("Gotcha!");
         });
         subject.value();
     }
@@ -57,11 +55,9 @@ public class LazyMetadataValueTest {
     public void testCacheStrategyCacheAfterFirstEval() {
         final Counter counter = new Counter();
         final int value = 10;
-        subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.CACHE_AFTER_FIRST_EVAL, new Callable() {
-            public Object call() throws Exception {
-                counter.increment();
-                return value;
-            }
+        subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.CACHE_AFTER_FIRST_EVAL, () -> {
+            counter.increment();
+            return value;
         });
 
         subject.value();
@@ -78,11 +74,9 @@ public class LazyMetadataValueTest {
     public void testCacheStrategyNeverCache() {
         final Counter counter = new Counter();
         final int value = 10;
-        subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.NEVER_CACHE, new Callable() {
-            public Object call() throws Exception {
-                counter.increment();
-                return value;
-            }
+        subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.NEVER_CACHE, () -> {
+            counter.increment();
+            return value;
         });
 
         subject.value();
@@ -95,11 +89,9 @@ public class LazyMetadataValueTest {
     public void testCacheStrategyEternally() {
         final Counter counter = new Counter();
         final int value = 10;
-        subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.CACHE_ETERNALLY, new Callable() {
-            public Object call() throws Exception {
-                counter.increment();
-                return value;
-            }
+        subject = new LazyMetadataValue(plugin, LazyMetadataValue.CacheStrategy.CACHE_ETERNALLY, () -> {
+            counter.increment();
+            return value;
         });
 
         subject.value();
@@ -114,11 +106,7 @@ public class LazyMetadataValueTest {
     }
 
     private LazyMetadataValue makeSimpleCallable(final Object value) {
-        return new LazyMetadataValue(plugin, new Callable() {
-            public Object call() throws Exception {
-                return value;
-            }
-        });
+        return new LazyMetadataValue(plugin, () -> value);
     }
 
     private class Counter {
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/metadata/MetadataStoreTest.java b/TacoSpigot-API/src/test/java/org/bukkit/metadata/MetadataStoreTest.java
index 30f0368..d9bfa97 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/metadata/MetadataStoreTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/metadata/MetadataStoreTest.java
@@ -37,11 +37,9 @@ public class MetadataStoreTest {
     public void testInvalidateAll() {
         final Counter counter = new Counter();
 
-        subject.setMetadata("subject", "key", new LazyMetadataValue(pluginX, new Callable() {
-            public Object call() throws Exception {
-                counter.increment();
-                return 10;
-            }
+        subject.setMetadata("subject", "key", new LazyMetadataValue(pluginX, () -> {
+            counter.increment();
+            return 10;
         }));
 
         assertTrue(subject.hasMetadata("subject", "key"));
@@ -55,11 +53,9 @@ public class MetadataStoreTest {
     public void testInvalidateAllButActuallyNothing() {
         final Counter counter = new Counter();
 
-        subject.setMetadata("subject", "key", new LazyMetadataValue(pluginX, new Callable() {
-            public Object call() throws Exception {
-                counter.increment();
-                return 10;
-            }
+        subject.setMetadata("subject", "key", new LazyMetadataValue(pluginX, () -> {
+            counter.increment();
+            return 10;
         }));
 
         assertTrue(subject.hasMetadata("subject", "key"));
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/metadata/MetadataValueAdapterTest.java b/TacoSpigot-API/src/test/java/org/bukkit/metadata/MetadataValueAdapterTest.java
index 7d8a17f..6bb9e5a 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/metadata/MetadataValueAdapterTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/metadata/MetadataValueAdapterTest.java
@@ -16,10 +16,10 @@ public class MetadataValueAdapterTest {
         assertEquals(mv.getOwningPlugin(), this.plugin);
 
         // Check value-getting and invalidation.
-        assertEquals(new Integer(1), mv.value());
-        assertEquals(new Integer(2), mv.value());
+        assertEquals(1, mv.value());
+        assertEquals(2, mv.value());
         mv.invalidate();
-        assertEquals(new Integer(1), mv.value());
+        assertEquals(1, mv.value());
     }
 
     @Test
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/plugin/PluginManagerTest.java b/TacoSpigot-API/src/test/java/org/bukkit/plugin/PluginManagerTest.java
index 6b86128..f762085 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/plugin/PluginManagerTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/plugin/PluginManagerTest.java
@@ -42,8 +42,7 @@ public class PluginManagerTest {
     public void testAsyncLocked() throws InterruptedException {
         final Event event = new TestEvent(true);
         Thread secondThread = new Thread(
-            new Runnable() {
-                public void run() {
+                () -> {
                     try {
                         synchronized (pm) {
                             pm.callEvent(event);
@@ -52,7 +51,6 @@ public class PluginManagerTest {
                         store.value = ex;
                     }
                 }
-            }
         );
         secondThread.start();
         secondThread.join();
@@ -64,14 +62,13 @@ public class PluginManagerTest {
     public void testAsyncUnlocked() throws InterruptedException {
         final Event event = new TestEvent(true);
         Thread secondThread = new Thread(
-            new Runnable() {
-                public void run() {
+                () -> {
                     try {
                         pm.callEvent(event);
                     } catch (Throwable ex) {
                         store.value = ex;
                     }
-                }});
+                });
         secondThread.start();
         secondThread.join();
         if (store.value != null) {
@@ -83,15 +80,13 @@ public class PluginManagerTest {
     public void testSyncUnlocked() throws InterruptedException {
         final Event event = new TestEvent(false);
         Thread secondThread = new Thread(
-            new Runnable() {
-                public void run() {
+                () -> {
                     try {
                         pm.callEvent(event);
                     } catch (Throwable ex) {
                         store.value = ex;
                     }
                 }
-            }
         );
         secondThread.start();
         secondThread.join();
@@ -104,8 +99,7 @@ public class PluginManagerTest {
     public void testSyncLocked() throws InterruptedException {
         final Event event = new TestEvent(false);
         Thread secondThread = new Thread(
-            new Runnable() {
-                public void run() {
+                () -> {
                     try {
                         synchronized (pm) {
                             pm.callEvent(event);
@@ -114,7 +108,6 @@ public class PluginManagerTest {
                         store.value = ex;
                     }
                 }
-            }
         );
         secondThread.start();
         secondThread.join();
@@ -138,6 +131,7 @@ public class PluginManagerTest {
         this.testRemovePermissionByName("CaMeL");
     }
 
+    @Test
     public void testRemovePermissionByPermissionLower() {
         this.testRemovePermissionByPermission("lower");
     }
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/plugin/TimedRegisteredListenerTest.java b/TacoSpigot-API/src/test/java/org/bukkit/plugin/TimedRegisteredListenerTest.java
index b206b1f..e52f27c 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/plugin/TimedRegisteredListenerTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/plugin/TimedRegisteredListenerTest.java
@@ -18,9 +18,7 @@ public class TimedRegisteredListenerTest {
     @Test
     public void testEventClass() throws EventException {
         Listener listener = new Listener() {};
-        EventExecutor executor = new EventExecutor() {
-            public void execute(Listener listener, Event event) {}
-        };
+        EventExecutor executor = (listener1, event) -> {};
         TestPlugin plugin = new TestPlugin("Test");
 
         PlayerInteractEvent interactEvent = new PlayerInteractEvent(null, null, null, null, null);
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java b/TacoSpigot-API/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java
index 71f59c5..64d2403 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java
@@ -10,11 +10,11 @@ import org.bukkit.entity.Player;
 
 
 public class TestPlayer implements InvocationHandler {
-    private static interface MethodHandler {
+    private interface MethodHandler {
         Object handle(TestPlayer server, Object[] args);
     }
     private static final Constructor constructor;
-    private static final HashMap methods = new HashMap();
+    private static final HashMap methods = new HashMap<>();
     static {
         try {
             /*
@@ -30,7 +30,7 @@ public class TestPlayer implements InvocationHandler {
         }
     }
 
-    private TestPlayer() {};
+    private TestPlayer() {}
 
     public static Player getInstance() {
         try {
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/util/StringUtilTest.java b/TacoSpigot-API/src/test/java/org/bukkit/util/StringUtilTest.java
index 9c8444c..ff1c3fd 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/util/StringUtilTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/util/StringUtilTest.java
@@ -30,12 +30,12 @@ public class StringUtilTest {
 
     @Test(expected=IllegalArgumentException.class)
     public void nullIterableTest() {
-        StringUtil.copyPartialMatches("Token", null, new ArrayList());
+        StringUtil.copyPartialMatches("Token", null, new ArrayList<>());
     }
 
     @Test(expected=IllegalArgumentException.class)
     public void nullTokenTest() {
-        StringUtil.copyPartialMatches(null, ImmutableList.of(), new ArrayList());
+        StringUtil.copyPartialMatches(null, ImmutableList.of(), new ArrayList<>());
     }
 
     @Test
@@ -43,7 +43,7 @@ public class StringUtilTest {
         String token = "ab";
         Iterable original = ImmutableList.of("ab12", "aC561", "AB5195", "Ab76", "", "a");
         List expected =     ImmutableList.of("ab12",          "AB5195", "Ab76"         );
-        List list = new ArrayList();
+        List list = new ArrayList<>();
         assertThat(StringUtil.copyPartialMatches(token, original, list), is(expected));
         assertThat(StringUtil.copyPartialMatches(token, original, list), is(sameInstance(list)));
         assertThat(list.size(), is(expected.size() * 2));
@@ -56,6 +56,6 @@ public class StringUtilTest {
 
     @Test(expected=IllegalArgumentException.class)
     public void copyNullTest() {
-        StringUtil.copyPartialMatches("token", Arrays.asList("token1", "token2", null), new ArrayList());
+        StringUtil.copyPartialMatches("token", Arrays.asList("token1", "token2", null), new ArrayList<>());
     }
 }
diff --git a/TacoSpigot-API/src/test/java/org/bukkit/util/io/BukkitObjectStreamTest.java b/TacoSpigot-API/src/test/java/org/bukkit/util/io/BukkitObjectStreamTest.java
index d0af4a0..b201fe3 100644
--- a/TacoSpigot-API/src/test/java/org/bukkit/util/io/BukkitObjectStreamTest.java
+++ b/TacoSpigot-API/src/test/java/org/bukkit/util/io/BukkitObjectStreamTest.java
@@ -89,17 +89,8 @@ public class BukkitObjectStreamTest {
         // If this test fails, you may start your trek to debug by commenting the '@Ignore' on the next method
         // (and of course, you would read those comments too)
         final ByteArrayOutputStream out = new ByteArrayOutputStream();
-        ObjectOutputStream oos = null;
-        try {
-            oos = new BukkitObjectOutputStream(out);
+        try (ObjectOutputStream oos = new BukkitObjectOutputStream(out)) {
             oos.writeObject(object);
-        } finally {
-            if (oos != null) {
-                try {
-                    oos.close();
-                } catch (IOException e) {
-                }
-            }
         }
 
         final byte[] preEncodedArray = Base64Coder.decode(preEncoded);
@@ -121,13 +112,13 @@ public class BukkitObjectStreamTest {
             if (ois != null) {
                 try {
                     ois.close();
-                } catch (IOException ex) {
+                } catch (IOException ignored) {
                 }
             }
             if (preois != null) {
                 try {
                     preois.close();
-                } catch (IOException ex) {
+                } catch (IOException ignored) {
                 }
             }
         }
@@ -148,18 +139,9 @@ public class BukkitObjectStreamTest {
         // The entire reason the pre-encoded string was added is to make a build (test) fail if someone accidentally makes it not backward-compatible
 
         final ByteArrayOutputStream out = new ByteArrayOutputStream();
-        ObjectOutputStream oos = null;
-        try {
-            oos = new BukkitObjectOutputStream(out);
+        try (ObjectOutputStream oos = new BukkitObjectOutputStream(out)) {
             oos.writeObject(object);
             oos.flush();
-        } finally {
-            if (oos != null) {
-                try {
-                    oos.close();
-                } catch (IOException e) {
-                }
-            }
         }
 
         final String string = new String(Base64Coder.encode(out.toByteArray()));
diff --git a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/command/TicksPerSecondCommand.java b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/command/TicksPerSecondCommand.java
index 59b0576..cd1829f 100644
--- a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/command/TicksPerSecondCommand.java
+++ b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/command/TicksPerSecondCommand.java
@@ -3,6 +3,8 @@ package com.elevatemc.spigot.command;
 import com.elevatemc.spigot.util.DateUtil;
 import com.velocitypowered.natives.util.Natives;
 import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.WorldServer;
+import org.apache.commons.lang.StringUtils;
 import org.bukkit.Bukkit;
 import org.bukkit.ChatColor;
 import org.bukkit.World;
@@ -26,95 +28,70 @@ public class TicksPerSecondCommand extends Command {
         this.setPermission("bukkit.command.tps");
     }
 
-
     @Override
     public boolean execute(CommandSender sender, String currentAlias, String[] args) {
         if (!testPermission(sender)) {
             return true;
         }
 
-        double[] tps = Bukkit.spigot().getTPS();
+        double[] tps = org.bukkit.Bukkit.spigot().getTPS();
         String[] tpsAvg = new String[tps.length];
 
         for (int i = 0; i < tps.length; i++) {
-            tpsAvg[i] = format(tps[i]);
+            tpsAvg[i] = formatTps(tps[i]);
         }
 
-        int lag = (int) Math.round(100.0 - Bukkit.spigot().getTPS()[0] * 5.0);
-        String bar = getProgressBar(lag, 100, 20, "|", "&c", "&a");
+        StringBuilder sb = new StringBuilder();
 
+        final Runtime runtime = Runtime.getRuntime();
 
-        float totalEntities = 0;
-        float activeEntities = 0;
-        for(World world : Bukkit.getWorlds()) {
-            totalEntities += world.getEntities().size();
+        double usedMemory = runtime.totalMemory() - runtime.freeMemory();
+        double maxMemory = runtime.maxMemory();
+        double freeMemory = maxMemory - usedMemory;
 
-            for(Entity entity : world.getEntities()) {
-                if(ActivationRange.checkIfActive(((CraftEntity)entity).getHandle())) {
-                    activeEntities++;
-                }
-            }
+        int totalPlayers = 0;
+        int totalEntities = 0;
+        int totalChunks = 0;
+
+        for (WorldServer server : MinecraftServer.getServer().worlds) {
+            totalPlayers += server.players.size();
+            totalChunks += server.chunkProviderServer.chunks.size();
+            totalEntities += server.entityList.size();
         }
 
-        final long usedMemory = ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 2) / 1048576L;
-        final long allocatedMemory = Runtime.getRuntime().totalMemory() / 1048576L;
+        sb.append(ChatColor.WHITE).append("TPS from last 5s, 1m, 5m, 15m: ")
+                .append(StringUtils.join(tpsAvg, ", ")).append("\n");
+        sb.append(ChatColor.WHITE).append("Full Tick: ")
+                .append(formatMs(MinecraftServer.getLastTickTime())).append(" ms").append("\n");
+        sb.append(ChatColor.WHITE)
+                .append("Online Players: ").append(ChatColor.AQUA).append(totalPlayers).append(ChatColor.WHITE)
+                .append(" ❘ Total Entities: ").append(ChatColor.AQUA).append(totalEntities).append(ChatColor.WHITE)
+                .append(" ❘ Chunks: ").append(ChatColor.AQUA).append(totalChunks).append("\n");
+        sb.append(ChatColor.WHITE).append("Active Threads: ").append(ChatColor.AQUA).append(Thread.activeCount())
+                .append(ChatColor.WHITE).append(" ❘ Daemon Threads: ").append(ChatColor.AQUA)
+                .append(Thread.getAllStackTraces().keySet().stream().filter(Thread::isDaemon).count())
+                .append("\n");
+        sb.append(ChatColor.WHITE).append("Memory Usage: ").append(ChatColor.AQUA)
+                .append(formatMem(usedMemory)).append("/").append(formatMem(maxMemory))
+                .append(" MB ").append("(").append(formatMem(freeMemory))
+                .append(" MB free)");
 
-        sender.sendMessage("" + ChatColor.GRAY + ChatColor.STRIKETHROUGH + "----------------------------------------------");
-        sender.sendMessage(ChatColor.DARK_AQUA + "TPS (1m, 5m, 15m): " + ChatColor.GREEN + org.apache.commons.lang.StringUtils.join(tpsAvg, ", "));
-        sender.sendMessage(ChatColor.DARK_AQUA + "Lag: " + bar + ChatColor.GRAY + "(" + ChatColor.RED + lag + "%" + ChatColor.GRAY + ")");
-        sender.sendMessage(ChatColor.DARK_AQUA + "Last tick: " + ChatColor.GREEN +  (System.currentTimeMillis() - Math.round(MinecraftServer.getLastTickTime() / 10 * 6) + "ms"));
-        sender.sendMessage(ChatColor.DARK_AQUA + "Uptime: " + ChatColor.AQUA + DateUtil.formatDateDiff(ManagementFactory.getRuntimeMXBean().getStartTime()));
-        sender.sendMessage(ChatColor.DARK_AQUA + "Timings: " + (Bukkit.getPluginManager().useTimings() ? ChatColor.GREEN + "Enabled" : ChatColor.RED + "Disabled"));
-        sender.sendMessage(ChatColor.DARK_AQUA + "Online: " + ChatColor.AQUA + Bukkit.getOnlinePlayers().size() + ChatColor.GRAY + "/" + ChatColor.AQUA + Bukkit.getMaxPlayers());
-
-        sender.sendMessage(ChatColor.DARK_AQUA + "Entities: " + ChatColor.AQUA + activeEntities + ChatColor.GRAY + "/" + ChatColor.AQUA
-                + totalEntities + ChatColor.DARK_AQUA + " (" + ChatColor.GREEN + this.round(100 * (activeEntities / totalEntities)) + "%" + ChatColor.DARK_AQUA + ")");
-
-        sender.sendMessage(ChatColor.DARK_AQUA + "Active workers: " + ChatColor.AQUA + Bukkit.getScheduler().getActiveWorkers().size() + ChatColor.DARK_AQUA + " - Pending tasks: " + ChatColor.AQUA
-                + Bukkit.getScheduler().getPendingTasks().size());
-
-        sender.sendMessage(ChatColor.DARK_AQUA + "Alive threads: " + ChatColor.AQUA + Thread.getAllStackTraces().keySet().parallelStream().filter(Thread::isAlive).count()
-                + ChatColor.DARK_AQUA + " - Daemon threads: " + ChatColor.AQUA + Thread.getAllStackTraces().keySet().parallelStream().filter(Thread::isDaemon).count());
-
-        sender.sendMessage(ChatColor.DARK_AQUA + "Interrupted threads: " + ChatColor.AQUA + Thread.getAllStackTraces().keySet().parallelStream().filter(Thread::isInterrupted).count()
-                + ChatColor.DARK_AQUA + " - Processors: " + ChatColor.AQUA + Runtime.getRuntime().availableProcessors());
-        sender.sendMessage(ChatColor.DARK_AQUA + "Compression: " + ChatColor.AQUA + Natives.compress.getLoadedVariant() + ChatColor.DARK_AQUA + " Cipher: " + ChatColor.AQUA + Natives.cipher.getLoadedVariant());
-
-        sender.sendMessage(ChatColor.DARK_AQUA + "Memory usage: " + ChatColor.AQUA + usedMemory + ChatColor.GRAY + "/" + ChatColor.AQUA + allocatedMemory + ChatColor.DARK_AQUA + "MB");
-        sender.sendMessage("" + ChatColor.GRAY + ChatColor.STRIKETHROUGH + "----------------------------------------------");
+        sender.sendMessage(sb.toString());
         return true;
     }
 
-    private static String format(double tps) {
-        DecimalFormat format = new DecimalFormat("##.##");
-        format.setRoundingMode(RoundingMode.CEILING);
-
-        String s = format.format(tps);
-        return (tps < 10.0) ? ("" + ChatColor.RED + s) : ((tps < 15.0) ? ("" + ChatColor.AQUA + s) : ((tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0));
+    private static String formatTps(double tps) // PaperSpigot - made static
+    {
+        return String.format("%s%s%s", (tps > 18.0 ? ChatColor.AQUA : tps > 16.0 ? ChatColor.YELLOW : ChatColor.RED), tps > 20.0 ? "*" : "", Math.min(Math.round(tps * 100.0) / 100.0, 20.0));
     }
 
-    private float round(float value) {
-        return (float) (Math.round(value * 100.0) / 100.0);
+    private static String formatMs(double time) {
+
+        time = time / 1000000D;
+        return String.format("%s%.1f", ((time < 15) ? ChatColor.AQUA : (time < 30) ? ChatColor.YELLOW : ChatColor.RED), time);
     }
 
-
-    private String getProgressBar(int current, int max, int totalBars, String symbol, String completedColor, String notCompletedColor){
-
-        float percent = (float) current / max;
-
-        int progressBars = (int) (totalBars * percent);
-
-        int leftOver = (totalBars - progressBars);
-
-        StringBuilder sb = new StringBuilder();
-        sb.append(ChatColor.translateAlternateColorCodes('&', completedColor));
-        for (int i = 0; i < progressBars; i++) {
-            sb.append(symbol);
-        }
-        sb.append(ChatColor.translateAlternateColorCodes('&', notCompletedColor));
-        for (int i = 0; i < leftOver; i++) {
-            sb.append(symbol);
-        }
-        return sb.toString();
+    private static String formatMem(double mem) {
+        return ChatColor.AQUA.toString().toString() + Math.round(mem / 1024 / 1024);
     }
 }
\ No newline at end of file
diff --git a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/eSpigot.java b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/eSpigot.java
index 6a8ed0f..fbcfdd9 100644
--- a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/eSpigot.java
+++ b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/eSpigot.java
@@ -6,8 +6,6 @@ import com.elevatemc.spigot.handler.MovementHandler;
 import com.elevatemc.spigot.handler.PacketHandler;
 import com.elevatemc.spigot.util.YamlConfig;
 import net.minecraft.server.MinecraftServer;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
 import org.bukkit.Bukkit;
 import org.bukkit.command.Command;
 import com.elevatemc.spigot.knockback.KnockbackHandler;
@@ -15,7 +13,6 @@ import org.bukkit.craftbukkit.CraftServer;
 
 import java.util.Arrays;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Set;
 import java.util.concurrent.*;
 
diff --git a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/AsyncNavigation.java b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/AsyncNavigation.java
index 08c28af..8a276b1 100644
--- a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/AsyncNavigation.java
+++ b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/AsyncNavigation.java
@@ -80,7 +80,7 @@ public class AsyncNavigation extends Navigation {
 
     @Override
     public boolean a(PositionPathSearchType type, double d0, double d1, double d2, double d3) {
-        PathEntity pathentity = this.a(type, (double) MathHelper.floor(d0), (double) ((int) d1), (double) MathHelper.floor(d2));
+        PathEntity pathentity = this.a(type, MathHelper.floor(d0), (int) d1, MathHelper.floor(d2));
         return this.a(pathentity, d3);
     }
 
diff --git a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/PathSearchThrottlerThread.java b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/PathSearchThrottlerThread.java
index ad2cb8c..39fad56 100644
--- a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/PathSearchThrottlerThread.java
+++ b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/PathSearchThrottlerThread.java
@@ -17,7 +17,7 @@ public class PathSearchThrottlerThread extends ThreadPoolExecutor {
     private static PathSearchThrottlerThread instance;
 
     public PathSearchThrottlerThread(int poolSize) {
-        super(poolSize, poolSize, 1L, TimeUnit.MINUTES, new LinkedBlockingQueue(), new NamePriorityThreadFactory(Thread.MIN_PRIORITY, "eSpigot_PathFinder"));
+        super(poolSize, poolSize, 1L, TimeUnit.MINUTES, new LinkedBlockingQueue<>(), new NamePriorityThreadFactory(Thread.MIN_PRIORITY, "eSpigot_PathFinder"));
         instance = this;
         adjustPoolSize(poolSize);
         this.filter = new LinkedHashMap<>();
@@ -74,8 +74,8 @@ public class PathSearchThrottlerThread extends ThreadPoolExecutor {
             PathSearchJob job = null;
             try {
                 job = task.get();
-            } catch (InterruptedException e) {
-            } catch (ExecutionException e) {
+            } catch (InterruptedException ignored) {
+            } catch (ExecutionException ignored) {
             }
             if(job != null) {
                 synchronized(this.filter) {
diff --git a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/PositionPathSearchType.java b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/PositionPathSearchType.java
index e78c211..7519a3a 100644
--- a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/PositionPathSearchType.java
+++ b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/pathsearch/PositionPathSearchType.java
@@ -14,5 +14,5 @@ public enum PositionPathSearchType {
     PANIC,
     PLAY,
     RANDOMSTROLL,
-    TAME;
+    TAME
 }
diff --git a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/threading/NamePriorityThreadFactory.java b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/threading/NamePriorityThreadFactory.java
index a666cfd..0f3e219 100644
--- a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/threading/NamePriorityThreadFactory.java
+++ b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/threading/NamePriorityThreadFactory.java
@@ -39,7 +39,7 @@ public class NamePriorityThreadFactory implements ThreadFactory {
     public NamePriorityThreadFactory setLogThreads(boolean log) {
         if (log) {
             if (this.createdThreadList == null) {
-                this.createdThreadList = new ConcurrentLinkedQueue>();
+                this.createdThreadList = new ConcurrentLinkedQueue<>();
             }
         } else {
             this.createdThreadList = null;
diff --git a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/threading/ThreadingManager.java b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/threading/ThreadingManager.java
index 7720faa..9a2672c 100644
--- a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/threading/ThreadingManager.java
+++ b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/threading/ThreadingManager.java
@@ -54,7 +54,7 @@ public class ThreadingManager {
             try {
                 this.cachedThreadPool.awaitTermination(10, TimeUnit.SECONDS);
                 log.warn("eSpigot is still waiting for NBT files to be written to disk. " + this.nbtFiles.getTaskCount() + " to go...");
-            } catch(InterruptedException e) {}
+            } catch(InterruptedException ignored) {}
         }
         if(!this.cachedThreadPool.isTerminated()) {
             this.cachedThreadPool.shutdownNow();
@@ -78,7 +78,7 @@ public class ThreadingManager {
                         iter.remove();
                     } else if (t.isAlive()) {
                         StackTraceElement[] e = t.getStackTrace();
-                        System.out.println(t.getName() + " - " + t.getState().toString());
+                        System.out.println(t.getName() + " - " + t.getState());
                         for(StackTraceElement et: e) {
                             System.out.println(et.toString());
                         }
@@ -108,18 +108,10 @@ public class ThreadingManager {
         }
 
         public void run() {
-            FileOutputStream fileoutputstream = null;
-            try {
-                fileoutputstream = new FileOutputStream(this.file);
+            try (FileOutputStream fileoutputstream = new FileOutputStream(this.file)) {
                 NBTCompressedStreamTools.a(this.compound, fileoutputstream);
             } catch (Exception e) {
                 e.printStackTrace();
-            } finally {
-                if(fileoutputstream != null) {
-                    try {
-                        fileoutputstream.close();
-                    } catch (IOException e) {}
-                }
             }
             this.compound = null;
             this.file = null;
diff --git a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/world/AutoSaveJob.java b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/world/AutoSaveJob.java
index 82d5fe9..6924380 100644
--- a/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/world/AutoSaveJob.java
+++ b/TacoSpigot-Server/src/main/java/com/elevatemc/spigot/world/AutoSaveJob.java
@@ -36,7 +36,7 @@ public class AutoSaveJob {
         if(this.isJob(JobDetail.WORLD_SAVE) && this.worldserver != null) {
             SpigotTimings.worldSaveTimer.startTiming();
             MinecraftServer.getServer().info("[AutoSave] Saving world " + this.worldserver.getWorld().getName());
-            this.worldserver.save(true, (IProgressUpdate) null);
+            this.worldserver.save(true, null);
             FileIOThread.a().setNoDelay(true);
             SpigotTimings.worldSaveTimer.stopTiming();
         } else if(this.isJob(JobDetail.WORLD_SAVEEVENT) && this.worldserver != null) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BaseBlockPosition.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BaseBlockPosition.java
index 578c49d..54f9c32 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -29,7 +29,7 @@ public class BaseBlockPosition implements Comparable {
         } else {
             BaseBlockPosition baseblockposition = (BaseBlockPosition) object;
 
-            return this.getX() != baseblockposition.getX() ? false : (this.getY() != baseblockposition.getY() ? false : this.getZ() == baseblockposition.getZ());
+            return this.getX() == baseblockposition.getX() && (this.getY() == baseblockposition.getY() && this.getZ() == baseblockposition.getZ());
         }
     }
 
@@ -76,7 +76,7 @@ public class BaseBlockPosition implements Comparable {
     }
 
     public double i(BaseBlockPosition baseblockposition) {
-        return this.c((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ());
+        return this.c(baseblockposition.getX(), baseblockposition.getY(), baseblockposition.getZ());
     }
 
     public String toString() {
@@ -85,6 +85,6 @@ public class BaseBlockPosition implements Comparable {
 
     // Paperspigot - Signature change, Object -> BaseBlockPosition
     public int compareTo(BaseBlockPosition object) {
-        return this.g((BaseBlockPosition) object);
+        return this.g(object);
     }
 }
\ No newline at end of file
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BiomeBase.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BiomeBase.java
index 28da136..3242f97 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BiomeBase.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BiomeBase.java
@@ -159,7 +159,7 @@ public abstract class BiomeBase {
     }
 
     public WorldGenTreeAbstract a(Random random) {
-        return (WorldGenTreeAbstract) (random.nextInt(10) == 0 ? this.aB : this.aA);
+        return random.nextInt(10) == 0 ? this.aB : this.aA;
     }
 
     public WorldGenerator b(Random random) {
@@ -230,7 +230,7 @@ public abstract class BiomeBase {
     }
 
     public boolean e() {
-        return this.j() ? false : this.ay;
+        return !this.j() && this.ay;
     }
 
     public boolean f() {
@@ -296,7 +296,7 @@ public abstract class BiomeBase {
                         }
 
                         if (l1 < k && (iblockdata == null || iblockdata.getBlock().getMaterial() == Material.AIR)) {
-                            if (this.a((BlockPosition) blockposition_mutableblockposition.c(i, l1, j)) < 0.15F) {
+                            if (this.a(blockposition_mutableblockposition.c(i, l1, j)) < 0.15F) {
                                 iblockdata = Blocks.ICE.getBlockData();
                             } else {
                                 iblockdata = Blocks.WATER.getBlockData();
@@ -340,7 +340,7 @@ public abstract class BiomeBase {
     }
 
     public boolean a(BiomeBase biomebase) {
-        return biomebase == this ? true : (biomebase == null ? false : this.l() == biomebase.l());
+        return biomebase == this || (biomebase != null && this.l() == biomebase.l());
     }
 
     public EnumTemperature m() {
@@ -352,7 +352,7 @@ public abstract class BiomeBase {
     }
 
     public static BiomeBase getBiome(int i) {
-        return getBiome(i, (BiomeBase) null);
+        return getBiome(i, null);
     }
 
     public static BiomeBase getBiome(int i, BiomeBase biomebase) {
@@ -391,12 +391,10 @@ public abstract class BiomeBase {
         BiomeBase[] abiomebase = BiomeBase.biomes;
         int i = abiomebase.length;
 
-        for (int j = 0; j < i; ++j) {
-            BiomeBase biomebase = abiomebase[j];
-
+        for (BiomeBase biomebase : abiomebase) {
             if (biomebase != null) {
                 if (BiomeBase.o.containsKey(biomebase.ah)) {
-                    throw new Error("Biome \"" + biomebase.ah + "\" is defined as both ID " + ((BiomeBase) BiomeBase.o.get(biomebase.ah)).id + " and " + biomebase.id);
+                    throw new Error("Biome \"" + biomebase.ah + "\" is defined as both ID " + BiomeBase.o.get(biomebase.ah).id + " and " + biomebase.id);
                 }
 
                 BiomeBase.o.put(biomebase.ah, biomebase);
@@ -422,26 +420,22 @@ public abstract class BiomeBase {
         static {
             try {
                 SyntheticClass_1.switchMap[EnumCreatureType.MONSTER.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 SyntheticClass_1.switchMap[EnumCreatureType.CREATURE.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 SyntheticClass_1.switchMap[EnumCreatureType.WATER_CREATURE.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 SyntheticClass_1.switchMap[EnumCreatureType.AMBIENT.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/Block.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/Block.java
index 4e1c6a0..3c5a4f1 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/Block.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/Block.java
@@ -108,7 +108,7 @@ public class Block {
     }
 
     public static Block getById(int i) {
-        return (Block) Block.REGISTRY.a(i);
+        return Block.REGISTRY.a(i);
     }
 
     public static IBlockData getByCombinedId(int i) {
@@ -126,10 +126,10 @@ public class Block {
         MinecraftKey minecraftkey = new MinecraftKey(s);
 
         if (Block.REGISTRY.d(minecraftkey)) {
-            return (Block) Block.REGISTRY.get(minecraftkey);
+            return Block.REGISTRY.get(minecraftkey);
         } else {
             try {
-                return (Block) Block.REGISTRY.a(Integer.parseInt(s));
+                return Block.REGISTRY.a(Integer.parseInt(s));
             } catch (NumberFormatException numberformatexception) {
                 return null;
             }
@@ -275,12 +275,12 @@ public class Block {
     }
 
     protected final void a(float f, float f1, float f2, float f3, float f4, float f5) {
-        this.minX = (double) f;
-        this.minY = (double) f1;
-        this.minZ = (double) f2;
-        this.maxX = (double) f3;
-        this.maxY = (double) f4;
-        this.maxZ = (double) f5;
+        this.minX = f;
+        this.minY = f1;
+        this.minZ = f2;
+        this.maxX = f3;
+        this.maxY = f4;
+        this.maxZ = f5;
     }
 
     public boolean b(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) {
@@ -428,8 +428,8 @@ public class Block {
 
     public MovingObjectPosition a(World world, BlockPosition blockposition, Vec3D vec3d, Vec3D vec3d1) {
         this.updateShape(world, blockposition);
-        vec3d = vec3d.add((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()));
-        vec3d1 = vec3d1.add((double) (-blockposition.getX()), (double) (-blockposition.getY()), (double) (-blockposition.getZ()));
+        vec3d = vec3d.add(-blockposition.getX(), -blockposition.getY(), -blockposition.getZ());
+        vec3d1 = vec3d1.add(-blockposition.getX(), -blockposition.getY(), -blockposition.getZ());
         Vec3D vec3d2 = vec3d.a(vec3d1, this.minX);
         Vec3D vec3d3 = vec3d.a(vec3d1, this.maxX);
         Vec3D vec3d4 = vec3d.b(vec3d1, this.minY);
@@ -516,20 +516,20 @@ public class Block {
                 enumdirection = EnumDirection.SOUTH;
             }
 
-            return new MovingObjectPosition(vec3d8.add((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ()), enumdirection, blockposition);
+            return new MovingObjectPosition(vec3d8.add(blockposition.getX(), blockposition.getY(), blockposition.getZ()), enumdirection, blockposition);
         }
     }
 
     private boolean a(Vec3D vec3d) {
-        return vec3d == null ? false : vec3d.b >= this.minY && vec3d.b <= this.maxY && vec3d.c >= this.minZ && vec3d.c <= this.maxZ;
+        return vec3d != null && vec3d.b >= this.minY && vec3d.b <= this.maxY && vec3d.c >= this.minZ && vec3d.c <= this.maxZ;
     }
 
     private boolean b(Vec3D vec3d) {
-        return vec3d == null ? false : vec3d.a >= this.minX && vec3d.a <= this.maxX && vec3d.c >= this.minZ && vec3d.c <= this.maxZ;
+        return vec3d != null && vec3d.a >= this.minX && vec3d.a <= this.maxX && vec3d.c >= this.minZ && vec3d.c <= this.maxZ;
     }
 
     private boolean c(Vec3D vec3d) {
-        return vec3d == null ? false : vec3d.a >= this.minX && vec3d.a <= this.maxX && vec3d.b >= this.minY && vec3d.b <= this.maxY;
+        return vec3d != null && vec3d.a >= this.minX && vec3d.a <= this.maxX && vec3d.b >= this.minY && vec3d.b <= this.maxY;
     }
 
     public void wasExploded(World world, BlockPosition blockposition, Explosion explosion) {}
@@ -710,7 +710,7 @@ public class Block {
     }
 
     public static boolean a(Block block, Block block1) {
-        return block != null && block1 != null ? (block == block1 ? true : block.b(block1)) : false;
+        return block != null && block1 != null && (block == block1 || block.b(block1));
     }
 
     public boolean isComplexRedstone() {
@@ -995,10 +995,8 @@ public class Block {
 
         while (iterator.hasNext()) {
             block13 = (Block) iterator.next();
-            Iterator iterator1 = block13.P().a().iterator();
 
-            while (iterator1.hasNext()) {
-                IBlockData iblockdata = (IBlockData) iterator1.next();
+            for (IBlockData iblockdata : block13.P().a()) {
                 int i = Block.REGISTRY.b(block13) << 4 | block13.toLegacyData(iblockdata);
                 // TacoSpigot start
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockAnvil.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockAnvil.java
index 43b1d00..e8aea4b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockAnvil.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockAnvil.java
@@ -4,12 +4,12 @@ import com.google.common.base.Predicate;
 
 public class BlockAnvil extends BlockFalling {
 
-    public static final BlockStateDirection FACING = BlockStateDirection.of("facing", (Predicate) EnumDirection.EnumDirectionLimit.HORIZONTAL);
+    public static final BlockStateDirection FACING = BlockStateDirection.of("facing", EnumDirection.EnumDirectionLimit.HORIZONTAL);
     public static final BlockStateInteger DAMAGE = BlockStateInteger.of("damage", 0, 2);
 
     protected BlockAnvil() {
         super(Material.HEAVY);
-        this.j(this.blockStateList.getBlockData().set(BlockAnvil.FACING, EnumDirection.NORTH).set(BlockAnvil.DAMAGE, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockAnvil.FACING, EnumDirection.NORTH).set(BlockAnvil.DAMAGE, 0));
         this.e(0);
         this.a(CreativeModeTab.c);
     }
@@ -25,7 +25,7 @@ public class BlockAnvil extends BlockFalling {
     public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) {
         EnumDirection enumdirection1 = entityliving.getDirection().e();
 
-        return super.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityliving).set(BlockAnvil.FACING, enumdirection1).set(BlockAnvil.DAMAGE, Integer.valueOf(i >> 2));
+        return super.getPlacedState(world, blockposition, enumdirection, f, f1, f2, i, entityliving).set(BlockAnvil.FACING, enumdirection1).set(BlockAnvil.DAMAGE, i >> 2);
     }
 
     public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumDirection enumdirection, float f, float f1, float f2) {
@@ -37,11 +37,11 @@ public class BlockAnvil extends BlockFalling {
     }
 
     public int getDropData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockAnvil.DAMAGE)).intValue();
+        return iblockdata.get(BlockAnvil.DAMAGE);
     }
 
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
-        EnumDirection enumdirection = (EnumDirection) iblockaccess.getType(blockposition).get(BlockAnvil.FACING);
+        EnumDirection enumdirection = iblockaccess.getType(blockposition).get(BlockAnvil.FACING);
 
         if (enumdirection.k() == EnumDirection.EnumAxis.X) {
             this.a(0.0F, 0.0F, 0.125F, 1.0F, 1.0F, 0.875F);
@@ -60,14 +60,14 @@ public class BlockAnvil extends BlockFalling {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockAnvil.FACING, EnumDirection.fromType2(i & 3)).set(BlockAnvil.DAMAGE, Integer.valueOf((i & 15) >> 2));
+        return this.getBlockData().set(BlockAnvil.FACING, EnumDirection.fromType2(i & 3)).set(BlockAnvil.DAMAGE, (i & 15) >> 2);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((EnumDirection) iblockdata.get(BlockAnvil.FACING)).b();
+        int i = b0 | iblockdata.get(BlockAnvil.FACING).b();
 
-        i |= ((Integer) iblockdata.get(BlockAnvil.DAMAGE)).intValue() << 2;
+        i |= iblockdata.get(BlockAnvil.DAMAGE) << 2;
         return i;
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockBrewingStand.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockBrewingStand.java
index 0bb2b50..2933292 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockBrewingStand.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockBrewingStand.java
@@ -9,7 +9,7 @@ public class BlockBrewingStand extends BlockContainer {
 
     public BlockBrewingStand() {
         super(Material.ORE);
-        this.j(this.blockStateList.getBlockData().set(BlockBrewingStand.HAS_BOTTLE[0], Boolean.valueOf(false)).set(BlockBrewingStand.HAS_BOTTLE[1], Boolean.valueOf(false)).set(BlockBrewingStand.HAS_BOTTLE[2], Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockBrewingStand.HAS_BOTTLE[0], Boolean.FALSE).set(BlockBrewingStand.HAS_BOTTLE[1], Boolean.FALSE).set(BlockBrewingStand.HAS_BOTTLE[2], Boolean.FALSE));
     }
 
     public String getName() {
@@ -95,7 +95,7 @@ public class BlockBrewingStand extends BlockContainer {
         IBlockData iblockdata = this.getBlockData();
 
         for (int j = 0; j < 3; ++j) {
-            iblockdata = iblockdata.set(BlockBrewingStand.HAS_BOTTLE[j], Boolean.valueOf((i & 1 << j) > 0));
+            iblockdata = iblockdata.set(BlockBrewingStand.HAS_BOTTLE[j], (i & 1 << j) > 0);
         }
 
         return iblockdata;
@@ -105,7 +105,7 @@ public class BlockBrewingStand extends BlockContainer {
         int i = 0;
 
         for (int j = 0; j < 3; ++j) {
-            if (((Boolean) iblockdata.get(BlockBrewingStand.HAS_BOTTLE[j])).booleanValue()) {
+            if (iblockdata.get(BlockBrewingStand.HAS_BOTTLE[j])) {
                 i |= 1 << j;
             }
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockButtonAbstract.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockButtonAbstract.java
index 0cccb53..c3b25fc 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockButtonAbstract.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockButtonAbstract.java
@@ -16,7 +16,7 @@ public abstract class BlockButtonAbstract extends Block {
 
     protected BlockButtonAbstract(boolean flag) {
         super(Material.ORIENTABLE);
-        this.j(this.blockStateList.getBlockData().set(BlockButtonAbstract.FACING, EnumDirection.NORTH).set(BlockButtonAbstract.POWERED, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockButtonAbstract.FACING, EnumDirection.NORTH).set(BlockButtonAbstract.POWERED, Boolean.FALSE));
         this.a(true);
         this.a(CreativeModeTab.d);
         this.N = flag;
@@ -46,9 +46,7 @@ public abstract class BlockButtonAbstract extends Block {
         EnumDirection[] aenumdirection = EnumDirection.values();
         int i = aenumdirection.length;
 
-        for (int j = 0; j < i; ++j) {
-            EnumDirection enumdirection = aenumdirection[j];
-
+        for (EnumDirection enumdirection : aenumdirection) {
             if (a(world, blockposition, enumdirection)) {
                 return true;
             }
@@ -60,15 +58,15 @@ public abstract class BlockButtonAbstract extends Block {
     protected static boolean a(World world, BlockPosition blockposition, EnumDirection enumdirection) {
         BlockPosition blockposition1 = blockposition.shift(enumdirection);
 
-        return enumdirection == EnumDirection.DOWN ? World.a((IBlockAccess) world, blockposition1) : world.getType(blockposition1).getBlock().isOccluding();
+        return enumdirection == EnumDirection.DOWN ? World.a(world, blockposition1) : world.getType(blockposition1).getBlock().isOccluding();
     }
 
     public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) {
-        return a(world, blockposition, enumdirection.opposite()) ? this.getBlockData().set(BlockButtonAbstract.FACING, enumdirection).set(BlockButtonAbstract.POWERED, Boolean.valueOf(false)) : this.getBlockData().set(BlockButtonAbstract.FACING, EnumDirection.DOWN).set(BlockButtonAbstract.POWERED, Boolean.valueOf(false));
+        return a(world, blockposition, enumdirection.opposite()) ? this.getBlockData().set(BlockButtonAbstract.FACING, enumdirection).set(BlockButtonAbstract.POWERED, Boolean.FALSE) : this.getBlockData().set(BlockButtonAbstract.FACING, EnumDirection.DOWN).set(BlockButtonAbstract.POWERED, Boolean.FALSE);
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
-        if (this.e(world, blockposition, iblockdata) && !a(world, blockposition, ((EnumDirection) iblockdata.get(BlockButtonAbstract.FACING)).opposite())) {
+        if (this.e(world, blockposition, iblockdata) && !a(world, blockposition, iblockdata.get(BlockButtonAbstract.FACING).opposite())) {
             this.b(world, blockposition, iblockdata, 0);
             world.setAir(blockposition);
         }
@@ -90,8 +88,8 @@ public abstract class BlockButtonAbstract extends Block {
     }
 
     private void d(IBlockData iblockdata) {
-        EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockButtonAbstract.FACING);
-        boolean flag = ((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue();
+        EnumDirection enumdirection = iblockdata.get(BlockButtonAbstract.FACING);
+        boolean flag = iblockdata.get(BlockButtonAbstract.POWERED);
         float f = 0.25F;
         float f1 = 0.375F;
         float f2 = (float) (flag ? 1 : 2) / 16.0F;
@@ -126,11 +124,11 @@ public abstract class BlockButtonAbstract extends Block {
     }
 
     public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumDirection enumdirection, float f, float f1, float f2) {
-        if (((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue()) {
+        if (iblockdata.get(BlockButtonAbstract.POWERED)) {
             return true;
         } else {
             // CraftBukkit start
-            boolean powered = ((Boolean) iblockdata.get(POWERED));
+            boolean powered = iblockdata.get(POWERED);
             org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
             int old = (powered) ? 15 : 0;
             int current = (!powered) ? 15 : 0;
@@ -138,33 +136,33 @@ public abstract class BlockButtonAbstract extends Block {
             BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
             world.getServer().getPluginManager().callEvent(eventRedstone);
 
-            if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
+            if ((eventRedstone.getNewCurrent() > 0) == (powered)) {
                 return true;
             }
             // CraftBukkit end
-            world.setTypeAndData(blockposition, iblockdata.set(BlockButtonAbstract.POWERED, Boolean.valueOf(true)), 3);
+            world.setTypeAndData(blockposition, iblockdata.set(BlockButtonAbstract.POWERED, Boolean.TRUE), 3);
             world.b(blockposition, blockposition);
             world.makeSound((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, "random.click", 0.3F, 0.6F);
-            this.c(world, blockposition, (EnumDirection) iblockdata.get(BlockButtonAbstract.FACING));
-            world.a(blockposition, (Block) this, this.a(world));
+            this.c(world, blockposition, iblockdata.get(BlockButtonAbstract.FACING));
+            world.a(blockposition, this, this.a(world));
             return true;
         }
     }
 
     public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        if (((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue()) {
-            this.c(world, blockposition, (EnumDirection) iblockdata.get(BlockButtonAbstract.FACING));
+        if (iblockdata.get(BlockButtonAbstract.POWERED)) {
+            this.c(world, blockposition, iblockdata.get(BlockButtonAbstract.FACING));
         }
 
         super.remove(world, blockposition, iblockdata);
     }
 
     public int a(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection) {
-        return ((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue() ? 15 : 0;
+        return iblockdata.get(BlockButtonAbstract.POWERED) ? 15 : 0;
     }
 
     public int b(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection) {
-        return !((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue() ? 0 : (iblockdata.get(BlockButtonAbstract.FACING) == enumdirection ? 15 : 0);
+        return !(Boolean) iblockdata.get(BlockButtonAbstract.POWERED) ? 0 : (iblockdata.get(BlockButtonAbstract.FACING) == enumdirection ? 15 : 0);
     }
 
     public boolean isPowerSource() {
@@ -175,7 +173,7 @@ public abstract class BlockButtonAbstract extends Block {
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
         if (!world.isClientSide) {
-            if (((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue()) {
+            if (iblockdata.get(BlockButtonAbstract.POWERED)) {
                 if (this.N) {
                     this.f(world, blockposition, iblockdata);
                 } else {
@@ -189,8 +187,8 @@ public abstract class BlockButtonAbstract extends Block {
                         return;
                     }
                     // CraftBukkit end
-                    world.setTypeUpdate(blockposition, iblockdata.set(BlockButtonAbstract.POWERED, Boolean.valueOf(false)));
-                    this.c(world, blockposition, (EnumDirection) iblockdata.get(BlockButtonAbstract.FACING));
+                    world.setTypeUpdate(blockposition, iblockdata.set(BlockButtonAbstract.POWERED, Boolean.FALSE));
+                    this.c(world, blockposition, iblockdata.get(BlockButtonAbstract.FACING));
                     world.makeSound((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, "random.click", 0.3F, 0.5F);
                     world.b(blockposition, blockposition);
                 }
@@ -210,7 +208,7 @@ public abstract class BlockButtonAbstract extends Block {
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
         if (!world.isClientSide) {
             if (this.N) {
-                if (!((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue()) {
+                if (!(Boolean) iblockdata.get(BlockButtonAbstract.POWERED)) {
                     this.f(world, blockposition, iblockdata);
                 }
             }
@@ -221,7 +219,7 @@ public abstract class BlockButtonAbstract extends Block {
         this.d(iblockdata);
         List list = world.a(EntityArrow.class, new AxisAlignedBB((double) blockposition.getX() + this.minX, (double) blockposition.getY() + this.minY, (double) blockposition.getZ() + this.minZ, (double) blockposition.getX() + this.maxX, (double) blockposition.getY() + this.maxY, (double) blockposition.getZ() + this.maxZ));
         boolean flag = !list.isEmpty();
-        boolean flag1 = ((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue();
+        boolean flag1 = iblockdata.get(BlockButtonAbstract.POWERED);
 
         // CraftBukkit start - Call interact event when arrows turn on wooden buttons
         if (flag1 != flag && flag) {
@@ -258,8 +256,8 @@ public abstract class BlockButtonAbstract extends Block {
                 return;
             }
             // CraftBukkit end
-            world.setTypeUpdate(blockposition, iblockdata.set(BlockButtonAbstract.POWERED, Boolean.valueOf(true)));
-            this.c(world, blockposition, (EnumDirection) iblockdata.get(BlockButtonAbstract.FACING));
+            world.setTypeUpdate(blockposition, iblockdata.set(BlockButtonAbstract.POWERED, Boolean.TRUE));
+            this.c(world, blockposition, iblockdata.get(BlockButtonAbstract.FACING));
             world.b(blockposition, blockposition);
             world.makeSound((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, "random.click", 0.3F, 0.6F);
         }
@@ -275,14 +273,14 @@ public abstract class BlockButtonAbstract extends Block {
                 return;
             }
             // CraftBukkit end
-            world.setTypeUpdate(blockposition, iblockdata.set(BlockButtonAbstract.POWERED, Boolean.valueOf(false)));
-            this.c(world, blockposition, (EnumDirection) iblockdata.get(BlockButtonAbstract.FACING));
+            world.setTypeUpdate(blockposition, iblockdata.set(BlockButtonAbstract.POWERED, Boolean.FALSE));
+            this.c(world, blockposition, iblockdata.get(BlockButtonAbstract.FACING));
             world.b(blockposition, blockposition);
             world.makeSound((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, "random.click", 0.3F, 0.5F);
         }
 
         if (flag) {
-            world.a(blockposition, (Block) this, this.a(world));
+            world.a(blockposition, this, this.a(world));
         }
 
     }
@@ -321,13 +319,13 @@ public abstract class BlockButtonAbstract extends Block {
             enumdirection = EnumDirection.UP;
         }
 
-        return this.getBlockData().set(BlockButtonAbstract.FACING, enumdirection).set(BlockButtonAbstract.POWERED, Boolean.valueOf((i & 8) > 0));
+        return this.getBlockData().set(BlockButtonAbstract.FACING, enumdirection).set(BlockButtonAbstract.POWERED, (i & 8) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         int i;
 
-        switch (BlockButtonAbstract.SyntheticClass_1.a[((EnumDirection) iblockdata.get(BlockButtonAbstract.FACING)).ordinal()]) {
+        switch (BlockButtonAbstract.SyntheticClass_1.a[iblockdata.get(BlockButtonAbstract.FACING).ordinal()]) {
         case 1:
             i = 1;
             break;
@@ -353,7 +351,7 @@ public abstract class BlockButtonAbstract extends Block {
             i = 0;
         }
 
-        if (((Boolean) iblockdata.get(BlockButtonAbstract.POWERED)).booleanValue()) {
+        if (iblockdata.get(BlockButtonAbstract.POWERED)) {
             i |= 8;
         }
 
@@ -371,38 +369,32 @@ public abstract class BlockButtonAbstract extends Block {
         static {
             try {
                 BlockButtonAbstract.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockButtonAbstract.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 2;
             } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
             }
 
             try {
                 BlockButtonAbstract.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockButtonAbstract.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockButtonAbstract.SyntheticClass_1.a[EnumDirection.UP.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockButtonAbstract.SyntheticClass_1.a[EnumDirection.DOWN.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror5) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCactus.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCactus.java
index 845b964..2758fd8 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCactus.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCactus.java
@@ -12,7 +12,7 @@ public class BlockCactus extends Block {
 
     protected BlockCactus() {
         super(Material.CACTUS);
-        this.j(this.blockStateList.getBlockData().set(BlockCactus.AGE, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockCactus.AGE, 0));
         this.a(true);
         this.a(CreativeModeTab.c);
     }
@@ -24,21 +24,20 @@ public class BlockCactus extends Block {
             int i;
 
             for (i = 1; world.getType(blockposition.down(i)).getBlock() == this; ++i) {
-                ;
             }
 
             if (i < world.paperSpigotConfig.cactusMaxHeight) { // PaperSpigot - Configurable max growth height for cactus blocks) {
-                int j = ((Integer) iblockdata.get(BlockCactus.AGE)).intValue();
+                int j = iblockdata.get(BlockCactus.AGE);
 
                 if (j >= (byte) range(3, (world.growthOdds / world.spigotConfig.cactusModifier * 15) + 0.5F, 15)) { // Spigot
                     // world.setTypeUpdate(blockposition1, this.getBlockData()); // CraftBukkit
-                    IBlockData iblockdata1 = iblockdata.set(BlockCactus.AGE, Integer.valueOf(0));
+                    IBlockData iblockdata1 = iblockdata.set(BlockCactus.AGE, 0);
 
                     CraftEventFactory.handleBlockGrowEvent(world, blockposition1.getX(), blockposition1.getY(), blockposition1.getZ(), this, 0); // CraftBukkit
                     world.setTypeAndData(blockposition, iblockdata1, 4);
                     this.doPhysics(world, blockposition1, iblockdata1, this);
                 } else {
-                    world.setTypeAndData(blockposition, iblockdata.set(BlockCactus.AGE, Integer.valueOf(j + 1)), 4);
+                    world.setTypeAndData(blockposition, iblockdata.set(BlockCactus.AGE, j + 1), 4);
                 }
 
             }
@@ -48,7 +47,7 @@ public class BlockCactus extends Block {
     public AxisAlignedBB a(World world, BlockPosition blockposition, IBlockData iblockdata) {
         float f = 0.0625F;
 
-        return new AxisAlignedBB((double) ((float) blockposition.getX() + f), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + f), (double) ((float) (blockposition.getX() + 1) - f), (double) ((float) (blockposition.getY() + 1) - f), (double) ((float) (blockposition.getZ() + 1) - f));
+        return new AxisAlignedBB((float) blockposition.getX() + f, blockposition.getY(), (float) blockposition.getZ() + f, (float) (blockposition.getX() + 1) - f, (float) (blockposition.getY() + 1) - f, (float) (blockposition.getZ() + 1) - f);
     }
 
     public boolean d() {
@@ -60,7 +59,7 @@ public class BlockCactus extends Block {
     }
 
     public boolean canPlace(World world, BlockPosition blockposition) {
-        return super.canPlace(world, blockposition) ? this.e(world, blockposition) : false;
+        return super.canPlace(world, blockposition) && this.e(world, blockposition);
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
@@ -74,11 +73,8 @@ public class BlockCactus extends Block {
     }
 
     public boolean e(World world, BlockPosition blockposition) {
-        Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
-
-        while (iterator.hasNext()) {
-            EnumDirection enumdirection = (EnumDirection) iterator.next();
 
+        for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
             if (world.getType(blockposition.shift(enumdirection)).getBlock().getMaterial().isBuildable()) {
                 return false;
             }
@@ -96,11 +92,11 @@ public class BlockCactus extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockCactus.AGE, Integer.valueOf(i));
+        return this.getBlockData().set(BlockCactus.AGE, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockCactus.AGE)).intValue();
+        return iblockdata.get(BlockCactus.AGE);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCake.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCake.java
index 11a7eaf..06bfaf7 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCake.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCake.java
@@ -8,13 +8,13 @@ public class BlockCake extends Block {
 
     protected BlockCake() {
         super(Material.CAKE);
-        this.j(this.blockStateList.getBlockData().set(BlockCake.BITES, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockCake.BITES, 0));
         this.a(true);
     }
 
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
         float f = 0.0625F;
-        float f1 = (float) (1 + ((Integer) iblockaccess.getType(blockposition).get(BlockCake.BITES)).intValue() * 2) / 16.0F;
+        float f1 = (float) (1 + iblockaccess.getType(blockposition).get(BlockCake.BITES) * 2) / 16.0F;
         float f2 = 0.5F;
 
         this.a(f1, 0.0F, f, 1.0F - f, f2, 1.0F - f);
@@ -29,10 +29,10 @@ public class BlockCake extends Block {
 
     public AxisAlignedBB a(World world, BlockPosition blockposition, IBlockData iblockdata) {
         float f = 0.0625F;
-        float f1 = (float) (1 + ((Integer) iblockdata.get(BlockCake.BITES)).intValue() * 2) / 16.0F;
+        float f1 = (float) (1 + iblockdata.get(BlockCake.BITES) * 2) / 16.0F;
         float f2 = 0.5F;
 
-        return new AxisAlignedBB((double) ((float) blockposition.getX() + f1), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + f), (double) ((float) (blockposition.getX() + 1) - f), (double) ((float) blockposition.getY() + f2), (double) ((float) (blockposition.getZ() + 1) - f));
+        return new AxisAlignedBB((float) blockposition.getX() + f1, blockposition.getY(), (float) blockposition.getZ() + f, (float) (blockposition.getX() + 1) - f, (float) blockposition.getY() + f2, (float) (blockposition.getZ() + 1) - f);
     }
 
     public boolean d() {
@@ -67,10 +67,10 @@ public class BlockCake extends Block {
 
             ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutUpdateHealth(((EntityPlayer) entityhuman).getBukkitEntity().getScaledHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel));
             // CraftBukkit end
-            int i = ((Integer) iblockdata.get(BlockCake.BITES)).intValue();
+            int i = iblockdata.get(BlockCake.BITES);
 
             if (i < 6) {
-                world.setTypeAndData(blockposition, iblockdata.set(BlockCake.BITES, Integer.valueOf(i + 1)), 3);
+                world.setTypeAndData(blockposition, iblockdata.set(BlockCake.BITES, i + 1), 3);
             } else {
                 world.setAir(blockposition);
             }
@@ -79,7 +79,7 @@ public class BlockCake extends Block {
     }
 
     public boolean canPlace(World world, BlockPosition blockposition) {
-        return super.canPlace(world, blockposition) ? this.e(world, blockposition) : false;
+        return super.canPlace(world, blockposition) && this.e(world, blockposition);
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
@@ -102,11 +102,11 @@ public class BlockCake extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockCake.BITES, Integer.valueOf(i));
+        return this.getBlockData().set(BlockCake.BITES, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockCake.BITES)).intValue();
+        return iblockdata.get(BlockCake.BITES);
     }
 
     protected BlockStateList getStateList() {
@@ -114,7 +114,7 @@ public class BlockCake extends Block {
     }
 
     public int l(World world, BlockPosition blockposition) {
-        return (7 - ((Integer) world.getType(blockposition).get(BlockCake.BITES)).intValue()) * 2;
+        return (7 - world.getType(blockposition).get(BlockCake.BITES)) * 2;
     }
 
     public boolean isComplexRedstone() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockChest.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockChest.java
index 8a0f881..b1bd620 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockChest.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockChest.java
@@ -5,7 +5,7 @@ import java.util.Iterator;
 
 public class BlockChest extends BlockContainer {
 
-    public static final BlockStateDirection FACING = BlockStateDirection.of("facing", (Predicate) EnumDirection.EnumDirectionLimit.HORIZONTAL);
+    public static final BlockStateDirection FACING = BlockStateDirection.of("facing", EnumDirection.EnumDirectionLimit.HORIZONTAL);
     public final int b;
 
     protected BlockChest(int i) {
@@ -45,10 +45,8 @@ public class BlockChest extends BlockContainer {
 
     public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
         this.e(world, blockposition, iblockdata);
-        Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
 
-        while (iterator.hasNext()) {
-            EnumDirection enumdirection = (EnumDirection) iterator.next();
+        for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
             BlockPosition blockposition1 = blockposition.shift(enumdirection);
             IBlockData iblockdata1 = world.getType(blockposition1);
 
@@ -114,7 +112,7 @@ public class BlockChest extends BlockContainer {
             IBlockData iblockdata2 = world.getType(blockposition.south());
             IBlockData iblockdata3 = world.getType(blockposition.west());
             IBlockData iblockdata4 = world.getType(blockposition.east());
-            EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockChest.FACING);
+            EnumDirection enumdirection = iblockdata.get(BlockChest.FACING);
             Block block = iblockdata1.getBlock();
             Block block1 = iblockdata2.getBlock();
             Block block2 = iblockdata3.getBlock();
@@ -133,9 +131,9 @@ public class BlockChest extends BlockContainer {
                     EnumDirection enumdirection1;
 
                     if (block2 == this) {
-                        enumdirection1 = (EnumDirection) iblockdata3.get(BlockChest.FACING);
+                        enumdirection1 = iblockdata3.get(BlockChest.FACING);
                     } else {
-                        enumdirection1 = (EnumDirection) iblockdata4.get(BlockChest.FACING);
+                        enumdirection1 = iblockdata4.get(BlockChest.FACING);
                     }
 
                     if (enumdirection1 == EnumDirection.NORTH) {
@@ -162,9 +160,9 @@ public class BlockChest extends BlockContainer {
                 EnumDirection enumdirection2;
 
                 if (block == this) {
-                    enumdirection2 = (EnumDirection) iblockdata1.get(BlockChest.FACING);
+                    enumdirection2 = iblockdata1.get(BlockChest.FACING);
                 } else {
-                    enumdirection2 = (EnumDirection) iblockdata2.get(BlockChest.FACING);
+                    enumdirection2 = iblockdata2.get(BlockChest.FACING);
                 }
 
                 if (enumdirection2 == EnumDirection.WEST) {
@@ -191,10 +189,8 @@ public class BlockChest extends BlockContainer {
 
     public IBlockData f(World world, BlockPosition blockposition, IBlockData iblockdata) {
         EnumDirection enumdirection = null;
-        Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
 
-        while (iterator.hasNext()) {
-            EnumDirection enumdirection1 = (EnumDirection) iterator.next();
+        for (EnumDirection enumdirection1 : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
             IBlockData iblockdata1 = world.getType(blockposition.shift(enumdirection1));
 
             if (iblockdata1.getBlock() == this) {
@@ -214,7 +210,7 @@ public class BlockChest extends BlockContainer {
         if (enumdirection != null) {
             return iblockdata.set(BlockChest.FACING, enumdirection.opposite());
         } else {
-            EnumDirection enumdirection2 = (EnumDirection) iblockdata.get(BlockChest.FACING);
+            EnumDirection enumdirection2 = iblockdata.get(BlockChest.FACING);
 
             if (world.getType(blockposition.shift(enumdirection2)).getBlock().o()) {
                 enumdirection2 = enumdirection2.opposite();
@@ -340,15 +336,13 @@ public class BlockChest extends BlockContainer {
         if (!(tileentity instanceof TileEntityChest)) {
             return null;
         } else {
-            Object object = (TileEntityChest) tileentity;
+            Object object = tileentity;
 
             if (this.n(world, blockposition)) {
                 return null;
             } else {
-                Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
 
-                while (iterator.hasNext()) {
-                    EnumDirection enumdirection = (EnumDirection) iterator.next();
+                for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
                     BlockPosition blockposition1 = blockposition.shift(enumdirection);
                     Block block = world.getType(blockposition1).getBlock();
 
@@ -415,7 +409,7 @@ public class BlockChest extends BlockContainer {
             return false;
         }
         // PaperSpigot end
-        Iterator iterator = world.a(EntityOcelot.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1))).iterator();
+        Iterator iterator = world.a(EntityOcelot.class, new AxisAlignedBB(blockposition.getX(), blockposition.getY() + 1, blockposition.getZ(), blockposition.getX() + 1, blockposition.getY() + 2, blockposition.getZ() + 1)).iterator();
 
         EntityOcelot entityocelot;
 
@@ -437,7 +431,7 @@ public class BlockChest extends BlockContainer {
     }
 
     public int l(World world, BlockPosition blockposition) {
-        return Container.b((IInventory) this.f(world, blockposition));
+        return Container.b(this.f(world, blockposition));
     }
 
     public IBlockData fromLegacyData(int i) {
@@ -451,7 +445,7 @@ public class BlockChest extends BlockContainer {
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((EnumDirection) iblockdata.get(BlockChest.FACING)).a();
+        return iblockdata.get(BlockChest.FACING).a();
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCocoa.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCocoa.java
index 8eb1beb..fbb24a1 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCocoa.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCocoa.java
@@ -10,7 +10,7 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
 
     public BlockCocoa() {
         super(Material.PLANT);
-        this.j(this.blockStateList.getBlockData().set(BlockCocoa.FACING, EnumDirection.NORTH).set(BlockCocoa.AGE, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockCocoa.FACING, EnumDirection.NORTH).set(BlockCocoa.AGE, 0));
         this.a(true);
     }
 
@@ -18,11 +18,11 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
         if (!this.e(world, blockposition, iblockdata)) {
             this.f(world, blockposition, iblockdata);
         } else if (world.random.nextInt(5) == 0) {
-            int i = ((Integer) iblockdata.get(BlockCocoa.AGE)).intValue();
+            int i = iblockdata.get(BlockCocoa.AGE);
 
             if (i < 2) {
                 // CraftBukkit start
-                IBlockData data = iblockdata.set(AGE, Integer.valueOf(i + 1));
+                IBlockData data = iblockdata.set(AGE, i + 1);
                 CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(data));
                 // CraftBukkit end
             }
@@ -31,7 +31,7 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
     }
 
     public boolean e(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        blockposition = blockposition.shift((EnumDirection) iblockdata.get(BlockCocoa.FACING));
+        blockposition = blockposition.shift(iblockdata.get(BlockCocoa.FACING));
         IBlockData iblockdata1 = world.getType(blockposition);
 
         return iblockdata1.getBlock() == Blocks.LOG && iblockdata1.get(BlockWood.VARIANT) == BlockWood.EnumLogVariant.JUNGLE;
@@ -52,8 +52,8 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
 
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
         IBlockData iblockdata = iblockaccess.getType(blockposition);
-        EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockCocoa.FACING);
-        int i = ((Integer) iblockdata.get(BlockCocoa.AGE)).intValue();
+        EnumDirection enumdirection = iblockdata.get(BlockCocoa.FACING);
+        int i = iblockdata.get(BlockCocoa.AGE);
         int j = 4 + i * 2;
         int k = 5 + i * 2;
         float f = (float) j / 2.0F;
@@ -78,7 +78,7 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
     }
 
     public void postPlace(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving, ItemStack itemstack) {
-        EnumDirection enumdirection = EnumDirection.fromAngle((double) entityliving.yaw);
+        EnumDirection enumdirection = EnumDirection.fromAngle(entityliving.yaw);
 
         world.setTypeAndData(blockposition, iblockdata.set(BlockCocoa.FACING, enumdirection), 2);
     }
@@ -88,7 +88,7 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
             enumdirection = EnumDirection.NORTH;
         }
 
-        return this.getBlockData().set(BlockCocoa.FACING, enumdirection.opposite()).set(BlockCocoa.AGE, Integer.valueOf(0));
+        return this.getBlockData().set(BlockCocoa.FACING, enumdirection.opposite()).set(BlockCocoa.AGE, 0);
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
@@ -104,7 +104,7 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
     }
 
     public void dropNaturally(World world, BlockPosition blockposition, IBlockData iblockdata, float f, int i) {
-        int j = ((Integer) iblockdata.get(BlockCocoa.AGE)).intValue();
+        int j = iblockdata.get(BlockCocoa.AGE);
         byte b0 = 1;
 
         if (j >= 2) {
@@ -122,7 +122,7 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
     }
 
     public boolean a(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag) {
-        return ((Integer) iblockdata.get(BlockCocoa.AGE)).intValue() < 2;
+        return iblockdata.get(BlockCocoa.AGE) < 2;
     }
 
     public boolean a(World world, Random random, BlockPosition blockposition, IBlockData iblockdata) {
@@ -131,20 +131,20 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
 
     public void b(World world, Random random, BlockPosition blockposition, IBlockData iblockdata) {
         // CraftBukkit start
-        IBlockData data = iblockdata.set(AGE, Integer.valueOf(((Integer) iblockdata.get(AGE)).intValue() + 1));
+        IBlockData data = iblockdata.set(AGE, iblockdata.get(AGE).intValue() + 1);
         CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(data));
         // CraftBukkit end
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockCocoa.FACING, EnumDirection.fromType2(i)).set(BlockCocoa.AGE, Integer.valueOf((i & 15) >> 2));
+        return this.getBlockData().set(BlockCocoa.FACING, EnumDirection.fromType2(i)).set(BlockCocoa.AGE, (i & 15) >> 2);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((EnumDirection) iblockdata.get(BlockCocoa.FACING)).b();
+        int i = b0 | iblockdata.get(BlockCocoa.FACING).b();
 
-        i |= ((Integer) iblockdata.get(BlockCocoa.AGE)).intValue() << 2;
+        i |= iblockdata.get(BlockCocoa.AGE) << 2;
         return i;
     }
 
@@ -159,26 +159,22 @@ public class BlockCocoa extends BlockDirectional implements IBlockFragilePlantEl
         static {
             try {
                 BlockCocoa.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockCocoa.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockCocoa.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockCocoa.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCommand.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCommand.java
index 2630616..b34bd51 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCommand.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCommand.java
@@ -10,7 +10,7 @@ public class BlockCommand extends BlockContainer {
 
     public BlockCommand() {
         super(Material.ORE, MaterialMapColor.q);
-        this.j(this.blockStateList.getBlockData().set(BlockCommand.TRIGGERED, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockCommand.TRIGGERED, Boolean.FALSE));
     }
 
     public TileEntity a(World world, int i) {
@@ -20,7 +20,7 @@ public class BlockCommand extends BlockContainer {
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
         if (!world.isClientSide) {
             boolean flag = world.isBlockIndirectlyPowered(blockposition);
-            boolean flag1 = ((Boolean) iblockdata.get(BlockCommand.TRIGGERED)).booleanValue();
+            boolean flag1 = iblockdata.get(BlockCommand.TRIGGERED);
 
             // CraftBukkit start
             org.bukkit.block.Block bukkitBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
@@ -32,10 +32,10 @@ public class BlockCommand extends BlockContainer {
             // CraftBukkit end
 
             if (eventRedstone.getNewCurrent() > 0 && !(eventRedstone.getOldCurrent() > 0)) { // CraftBukkit
-                world.setTypeAndData(blockposition, iblockdata.set(BlockCommand.TRIGGERED, Boolean.valueOf(true)), 4);
-                world.a(blockposition, (Block) this, this.a(world));
+                world.setTypeAndData(blockposition, iblockdata.set(BlockCommand.TRIGGERED, Boolean.TRUE), 4);
+                world.a(blockposition, this, this.a(world));
             } else if (!(eventRedstone.getNewCurrent() > 0) && eventRedstone.getOldCurrent() > 0) { // CraftBukkit
-                world.setTypeAndData(blockposition, iblockdata.set(BlockCommand.TRIGGERED, Boolean.valueOf(false)), 4);
+                world.setTypeAndData(blockposition, iblockdata.set(BlockCommand.TRIGGERED, Boolean.FALSE), 4);
             }
         }
 
@@ -58,7 +58,7 @@ public class BlockCommand extends BlockContainer {
     public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumDirection enumdirection, float f, float f1, float f2) {
         TileEntity tileentity = world.getTileEntity(blockposition);
 
-        return tileentity instanceof TileEntityCommand ? ((TileEntityCommand) tileentity).getCommandBlock().a(entityhuman) : false;
+        return tileentity instanceof TileEntityCommand && ((TileEntityCommand) tileentity).getCommandBlock().a(entityhuman);
     }
 
     public boolean isComplexRedstone() {
@@ -97,13 +97,13 @@ public class BlockCommand extends BlockContainer {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockCommand.TRIGGERED, Boolean.valueOf((i & 1) > 0));
+        return this.getBlockData().set(BlockCommand.TRIGGERED, (i & 1) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         int i = 0;
 
-        if (((Boolean) iblockdata.get(BlockCommand.TRIGGERED)).booleanValue()) {
+        if (iblockdata.get(BlockCommand.TRIGGERED)) {
             i |= 1;
         }
 
@@ -115,6 +115,6 @@ public class BlockCommand extends BlockContainer {
     }
 
     public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) {
-        return this.getBlockData().set(BlockCommand.TRIGGERED, Boolean.valueOf(false));
+        return this.getBlockData().set(BlockCommand.TRIGGERED, Boolean.FALSE);
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCrops.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCrops.java
index f698996..daf8402 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCrops.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockCrops.java
@@ -9,7 +9,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
     public static final BlockStateInteger AGE = BlockStateInteger.of("age", 0, 7);
 
     protected BlockCrops() {
-        this.j(this.blockStateList.getBlockData().set(BlockCrops.AGE, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockCrops.AGE, 0));
         this.a(true);
         float f = 0.5F;
 
@@ -27,13 +27,13 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
         super.b(world, blockposition, iblockdata, random);
         if (world.isLightLevel(blockposition.up(), 9)) { // Paper
-            int i = ((Integer) iblockdata.get(BlockCrops.AGE)).intValue();
+            int i = iblockdata.get(BlockCrops.AGE);
 
             if (i < 7) {
-                float f = a((Block) this, world, blockposition);
+                float f = a(this, world, blockposition);
 
                 if (random.nextInt((int) (world.growthOdds / world.spigotConfig.wheatModifier * (25.0F / f)) + 1) == 0) { // Spigot                    // CraftBukkit start
-                    IBlockData data = iblockdata.set(AGE, Integer.valueOf(i + 1));
+                    IBlockData data = iblockdata.set(AGE, i + 1);
                     CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(data));
                     // CraftBukkit end
                 }
@@ -43,14 +43,14 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
     }
 
     public void g(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        int i = ((Integer) iblockdata.get(BlockCrops.AGE)).intValue() + MathHelper.nextInt(world.random, 2, 5);
+        int i = iblockdata.get(BlockCrops.AGE) + MathHelper.nextInt(world.random, 2, 5);
 
         if (i > 7) {
             i = 7;
         }
 
         // CraftBukkit start
-        IBlockData data = iblockdata.set(AGE, Integer.valueOf(i));
+        IBlockData data = iblockdata.set(AGE, i);
         CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(data));
         // CraftBukkit end
     }
@@ -66,7 +66,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
 
                 if (iblockdata.getBlock() == Blocks.FARMLAND) {
                     f1 = 1.0F;
-                    if (((Integer) iblockdata.get(BlockSoil.MOISTURE)).intValue() > 0) {
+                    if (iblockdata.get(BlockSoil.MOISTURE) > 0) {
                         f1 = 3.0F;
                     }
                 }
@@ -114,7 +114,7 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
     public void dropNaturally(World world, BlockPosition blockposition, IBlockData iblockdata, float f, int i) {
         super.dropNaturally(world, blockposition, iblockdata, f, 0);
         if (!world.isClientSide) {
-            int j = ((Integer) iblockdata.get(BlockCrops.AGE)).intValue();
+            int j = iblockdata.get(BlockCrops.AGE);
 
             if (j >= 7) {
                 int k = 3 + i;
@@ -130,11 +130,11 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
     }
 
     public Item getDropType(IBlockData iblockdata, Random random, int i) {
-        return ((Integer) iblockdata.get(BlockCrops.AGE)).intValue() == 7 ? this.n() : this.l();
+        return iblockdata.get(BlockCrops.AGE) == 7 ? this.n() : this.l();
     }
 
     public boolean a(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag) {
-        return ((Integer) iblockdata.get(BlockCrops.AGE)).intValue() < 7;
+        return iblockdata.get(BlockCrops.AGE) < 7;
     }
 
     public boolean a(World world, Random random, BlockPosition blockposition, IBlockData iblockdata) {
@@ -146,11 +146,11 @@ public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockCrops.AGE, Integer.valueOf(i));
+        return this.getBlockData().set(BlockCrops.AGE, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockCrops.AGE)).intValue();
+        return iblockdata.get(BlockCrops.AGE);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDaylightDetector.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDaylightDetector.java
index 45df7c9..6613828 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDaylightDetector.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDaylightDetector.java
@@ -10,7 +10,7 @@ public class BlockDaylightDetector extends BlockContainer {
     public BlockDaylightDetector(boolean flag) {
         super(Material.WOOD);
         this.b = flag;
-        this.j(this.blockStateList.getBlockData().set(BlockDaylightDetector.POWER, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockDaylightDetector.POWER, 0));
         this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.375F, 1.0F);
         this.a(CreativeModeTab.d);
         this.c(0.2F);
@@ -23,7 +23,7 @@ public class BlockDaylightDetector extends BlockContainer {
     }
 
     public int a(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection) {
-        return ((Integer) iblockdata.get(BlockDaylightDetector.POWER)).intValue();
+        return iblockdata.get(BlockDaylightDetector.POWER);
     }
 
     public void f(World world, BlockPosition blockposition) {
@@ -40,9 +40,9 @@ public class BlockDaylightDetector extends BlockContainer {
                 i = 15 - i;
             }
 
-            if (((Integer) iblockdata.get(BlockDaylightDetector.POWER)).intValue() != i) {
-                i = org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), ((Integer) iblockdata.get(POWER)), i).getNewCurrent(); // CraftBukkit - Call BlockRedstoneEvent
-                world.setTypeAndData(blockposition, iblockdata.set(BlockDaylightDetector.POWER, Integer.valueOf(i)), 3);
+            if (iblockdata.get(BlockDaylightDetector.POWER) != i) {
+                i = org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), iblockdata.get(POWER), i).getNewCurrent(); // CraftBukkit - Call BlockRedstoneEvent
+                world.setTypeAndData(blockposition, iblockdata.set(BlockDaylightDetector.POWER, i), 3);
             }
 
         }
@@ -93,11 +93,11 @@ public class BlockDaylightDetector extends BlockContainer {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockDaylightDetector.POWER, Integer.valueOf(i));
+        return this.getBlockData().set(BlockDaylightDetector.POWER, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockDaylightDetector.POWER)).intValue();
+        return iblockdata.get(BlockDaylightDetector.POWER);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDiodeAbstract.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDiodeAbstract.java
index 065fa3e..a84d324 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDiodeAbstract.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDiodeAbstract.java
@@ -20,11 +20,11 @@ public abstract class BlockDiodeAbstract extends BlockDirectional {
     }
 
     public boolean canPlace(World world, BlockPosition blockposition) {
-        return World.a((IBlockAccess) world, blockposition.down()) ? super.canPlace(world, blockposition) : false;
+        return World.a(world, blockposition.down()) && super.canPlace(world, blockposition);
     }
 
     public boolean e(World world, BlockPosition blockposition) {
-        return World.a((IBlockAccess) world, blockposition.down());
+        return World.a(world, blockposition.down());
     }
 
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {}
@@ -86,9 +86,7 @@ public abstract class BlockDiodeAbstract extends BlockDirectional {
             // PaperSpigot end
             int i = aenumdirection.length;
 
-            for (int j = 0; j < i; ++j) {
-                EnumDirection enumdirection = aenumdirection[j];
-
+            for (EnumDirection enumdirection : aenumdirection) {
                 world.applyPhysics(blockposition.shift(enumdirection), this);
             }
 
@@ -99,7 +97,7 @@ public abstract class BlockDiodeAbstract extends BlockDirectional {
         if (!this.b(world, blockposition, iblockdata)) {
             boolean flag = this.e(world, blockposition, iblockdata);
 
-            if ((this.N && !flag || !this.N && flag) && !world.a(blockposition, (Block) this)) {
+            if ((this.N && !flag || !this.N && flag) && !world.a(blockposition, this)) {
                 byte b0 = -1;
 
                 if (this.i(world, blockposition, iblockdata)) {
@@ -123,7 +121,7 @@ public abstract class BlockDiodeAbstract extends BlockDirectional {
     }
 
     protected int f(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockDiodeAbstract.FACING);
+        EnumDirection enumdirection = iblockdata.get(BlockDiodeAbstract.FACING);
         BlockPosition blockposition1 = blockposition.shift(enumdirection);
         int i = world.getBlockFacePower(blockposition1, enumdirection);
 
@@ -132,12 +130,12 @@ public abstract class BlockDiodeAbstract extends BlockDirectional {
         } else {
             IBlockData iblockdata1 = world.getType(blockposition1);
 
-            return Math.max(i, iblockdata1.getBlock() == Blocks.REDSTONE_WIRE ? ((Integer) iblockdata1.get(BlockRedstoneWire.POWER)).intValue() : 0);
+            return Math.max(i, iblockdata1.getBlock() == Blocks.REDSTONE_WIRE ? iblockdata1.get(BlockRedstoneWire.POWER) : 0);
         }
     }
 
     protected int c(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata) {
-        EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockDiodeAbstract.FACING);
+        EnumDirection enumdirection = iblockdata.get(BlockDiodeAbstract.FACING);
         EnumDirection enumdirection1 = enumdirection.e();
         EnumDirection enumdirection2 = enumdirection.f();
 
@@ -148,7 +146,7 @@ public abstract class BlockDiodeAbstract extends BlockDirectional {
         IBlockData iblockdata = iblockaccess.getType(blockposition);
         Block block = iblockdata.getBlock();
 
-        return this.c(block) ? (block == Blocks.REDSTONE_WIRE ? ((Integer) iblockdata.get(BlockRedstoneWire.POWER)).intValue() : iblockaccess.getBlockPower(blockposition, enumdirection)) : 0;
+        return this.c(block) ? (block == Blocks.REDSTONE_WIRE ? iblockdata.get(BlockRedstoneWire.POWER) : iblockaccess.getBlockPower(blockposition, enumdirection)) : 0;
     }
 
     public boolean isPowerSource() {
@@ -161,7 +159,7 @@ public abstract class BlockDiodeAbstract extends BlockDirectional {
 
     public void postPlace(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving, ItemStack itemstack) {
         if (this.e(world, blockposition, iblockdata)) {
-            world.a(blockposition, (Block) this, 1);
+            world.a(blockposition, this, 1);
         }
 
     }
@@ -171,11 +169,11 @@ public abstract class BlockDiodeAbstract extends BlockDirectional {
     }
 
     protected void h(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockDiodeAbstract.FACING);
+        EnumDirection enumdirection = iblockdata.get(BlockDiodeAbstract.FACING);
         BlockPosition blockposition1 = blockposition.shift(enumdirection.opposite());
 
         world.d(blockposition1, this);
-        world.a(blockposition1, (Block) this, enumdirection);
+        world.a(blockposition1, this, enumdirection);
     }
 
     public void postBreak(World world, BlockPosition blockposition, IBlockData iblockdata) {
@@ -193,9 +191,7 @@ public abstract class BlockDiodeAbstract extends BlockDirectional {
             // PaperSpigot end
             int i = aenumdirection.length;
 
-            for (int j = 0; j < i; ++j) {
-                EnumDirection enumdirection = aenumdirection[j];
-
+            for (EnumDirection enumdirection : aenumdirection) {
                 world.applyPhysics(blockposition.shift(enumdirection), this);
             }
         }
@@ -224,10 +220,10 @@ public abstract class BlockDiodeAbstract extends BlockDirectional {
     }
 
     public boolean i(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        EnumDirection enumdirection = ((EnumDirection) iblockdata.get(BlockDiodeAbstract.FACING)).opposite();
+        EnumDirection enumdirection = iblockdata.get(BlockDiodeAbstract.FACING).opposite();
         BlockPosition blockposition1 = blockposition.shift(enumdirection);
 
-        return d(world.getType(blockposition1).getBlock()) ? world.getType(blockposition1).get(BlockDiodeAbstract.FACING) != enumdirection : false;
+        return d(world.getType(blockposition1).getBlock()) && world.getType(blockposition1).get(BlockDiodeAbstract.FACING) != enumdirection;
     }
 
     protected int m(IBlockData iblockdata) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDispenser.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDispenser.java
index 010d7c6..4f10902 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDispenser.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDispenser.java
@@ -12,7 +12,7 @@ public class BlockDispenser extends BlockContainer {
 
     protected BlockDispenser() {
         super(Material.STONE);
-        this.j(this.blockStateList.getBlockData().set(BlockDispenser.FACING, EnumDirection.NORTH).set(BlockDispenser.TRIGGERED, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockDispenser.FACING, EnumDirection.NORTH).set(BlockDispenser.TRIGGERED, Boolean.FALSE));
         this.a(CreativeModeTab.d);
     }
 
@@ -27,7 +27,7 @@ public class BlockDispenser extends BlockContainer {
 
     private void e(World world, BlockPosition blockposition, IBlockData iblockdata) {
         if (!world.isClientSide) {
-            EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockDispenser.FACING);
+            EnumDirection enumdirection = iblockdata.get(BlockDispenser.FACING);
             boolean flag = world.getType(blockposition.north()).getBlock().o();
             boolean flag1 = world.getType(blockposition.south()).getBlock().o();
 
@@ -46,7 +46,7 @@ public class BlockDispenser extends BlockContainer {
                 }
             }
 
-            world.setTypeAndData(blockposition, iblockdata.set(BlockDispenser.FACING, enumdirection).set(BlockDispenser.TRIGGERED, Boolean.valueOf(false)), 2);
+            world.setTypeAndData(blockposition, iblockdata.set(BlockDispenser.FACING, enumdirection).set(BlockDispenser.TRIGGERED, Boolean.FALSE), 2);
         }
     }
 
@@ -71,7 +71,7 @@ public class BlockDispenser extends BlockContainer {
 
     public void dispense(World world, BlockPosition blockposition) {
         SourceBlock sourceblock = new SourceBlock(world, blockposition);
-        TileEntityDispenser tileentitydispenser = (TileEntityDispenser) sourceblock.getTileEntity();
+        TileEntityDispenser tileentitydispenser = sourceblock.getTileEntity();
 
         if (tileentitydispenser != null) {
             int i = tileentitydispenser.m();
@@ -94,18 +94,18 @@ public class BlockDispenser extends BlockContainer {
     }
 
     protected IDispenseBehavior a(ItemStack itemstack) {
-        return (IDispenseBehavior) BlockDispenser.REGISTRY.get(itemstack == null ? null : itemstack.getItem());
+        return BlockDispenser.REGISTRY.get(itemstack == null ? null : itemstack.getItem());
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
         boolean flag = world.isBlockIndirectlyPowered(blockposition) || world.isBlockIndirectlyPowered(blockposition.up());
-        boolean flag1 = ((Boolean) iblockdata.get(BlockDispenser.TRIGGERED)).booleanValue();
+        boolean flag1 = iblockdata.get(BlockDispenser.TRIGGERED);
 
         if (flag && !flag1) {
-            world.a(blockposition, (Block) this, this.a(world));
-            world.setTypeAndData(blockposition, iblockdata.set(BlockDispenser.TRIGGERED, Boolean.valueOf(true)), 4);
+            world.a(blockposition, this, this.a(world));
+            world.setTypeAndData(blockposition, iblockdata.set(BlockDispenser.TRIGGERED, Boolean.TRUE), 4);
         } else if (!flag && flag1) {
-            world.setTypeAndData(blockposition, iblockdata.set(BlockDispenser.TRIGGERED, Boolean.valueOf(false)), 4);
+            world.setTypeAndData(blockposition, iblockdata.set(BlockDispenser.TRIGGERED, Boolean.FALSE), 4);
         }
 
     }
@@ -122,7 +122,7 @@ public class BlockDispenser extends BlockContainer {
     }
 
     public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) {
-        return this.getBlockData().set(BlockDispenser.FACING, BlockPiston.a(world, blockposition, entityliving)).set(BlockDispenser.TRIGGERED, Boolean.valueOf(false));
+        return this.getBlockData().set(BlockDispenser.FACING, BlockPiston.a(world, blockposition, entityliving)).set(BlockDispenser.TRIGGERED, Boolean.FALSE);
     }
 
     public void postPlace(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving, ItemStack itemstack) {
@@ -174,14 +174,14 @@ public class BlockDispenser extends BlockContainer {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockDispenser.FACING, b(i)).set(BlockDispenser.TRIGGERED, Boolean.valueOf((i & 8) > 0));
+        return this.getBlockData().set(BlockDispenser.FACING, b(i)).set(BlockDispenser.TRIGGERED, (i & 8) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((EnumDirection) iblockdata.get(BlockDispenser.FACING)).a();
+        int i = b0 | iblockdata.get(BlockDispenser.FACING).a();
 
-        if (((Boolean) iblockdata.get(BlockDispenser.TRIGGERED)).booleanValue()) {
+        if (iblockdata.get(BlockDispenser.TRIGGERED)) {
             i |= 8;
         }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDoor.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDoor.java
index bbaa2b5..c9ca283 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDoor.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDoor.java
@@ -7,7 +7,7 @@ import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
 
 public class BlockDoor extends Block {
 
-    public static final BlockStateDirection FACING = BlockStateDirection.of("facing", (Predicate) EnumDirection.EnumDirectionLimit.HORIZONTAL);
+    public static final BlockStateDirection FACING = BlockStateDirection.of("facing", EnumDirection.EnumDirectionLimit.HORIZONTAL);
     public static final BlockStateBoolean OPEN = BlockStateBoolean.of("open");
     public static final BlockStateEnum HINGE = BlockStateEnum.of("hinge", BlockDoor.EnumDoorHinge.class);
     public static final BlockStateBoolean POWERED = BlockStateBoolean.of("powered");
@@ -15,7 +15,7 @@ public class BlockDoor extends Block {
 
     protected BlockDoor(Material material) {
         super(material);
-        this.j(this.blockStateList.getBlockData().set(BlockDoor.FACING, EnumDirection.NORTH).set(BlockDoor.OPEN, Boolean.valueOf(false)).set(BlockDoor.HINGE, BlockDoor.EnumDoorHinge.LEFT).set(BlockDoor.POWERED, Boolean.valueOf(false)).set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER));
+        this.j(this.blockStateList.getBlockData().set(BlockDoor.FACING, EnumDirection.NORTH).set(BlockDoor.OPEN, Boolean.FALSE).set(BlockDoor.HINGE, BlockDoor.EnumDoorHinge.LEFT).set(BlockDoor.POWERED, Boolean.FALSE).set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER));
     }
 
     public String getName() {
@@ -102,7 +102,7 @@ public class BlockDoor extends Block {
                 iblockdata = iblockdata1.a(BlockDoor.OPEN);
                 world.setTypeAndData(blockposition1, iblockdata, 2);
                 world.b(blockposition1, blockposition);
-                world.a(entityhuman, ((Boolean) iblockdata.get(BlockDoor.OPEN)).booleanValue() ? 1003 : 1006, blockposition, 0);
+                world.a(entityhuman, iblockdata.get(BlockDoor.OPEN) ? 1003 : 1006, blockposition, 0);
                 return true;
             }
         }
@@ -115,10 +115,10 @@ public class BlockDoor extends Block {
             BlockPosition blockposition1 = iblockdata.get(BlockDoor.HALF) == BlockDoor.EnumDoorHalf.LOWER ? blockposition : blockposition.down();
             IBlockData iblockdata1 = blockposition == blockposition1 ? iblockdata : world.getType(blockposition1);
 
-            if (iblockdata1.getBlock() == this && ((Boolean) iblockdata1.get(BlockDoor.OPEN)).booleanValue() != flag) {
-                world.setTypeAndData(blockposition1, iblockdata1.set(BlockDoor.OPEN, Boolean.valueOf(flag)), 2);
+            if (iblockdata1.getBlock() == this && iblockdata1.get(BlockDoor.OPEN) != flag) {
+                world.setTypeAndData(blockposition1, iblockdata1.set(BlockDoor.OPEN, flag), 2);
                 world.b(blockposition1, blockposition);
-                world.a((EntityHuman) null, flag ? 1003 : 1006, blockposition, 0);
+                world.a(null, flag ? 1003 : 1006, blockposition, 0);
             }
 
         }
@@ -144,7 +144,7 @@ public class BlockDoor extends Block {
                 flag = true;
             }
 
-            if (!World.a((IBlockAccess) world, blockposition.down())) {
+            if (!World.a(world, blockposition.down())) {
                 world.setAir(blockposition);
                 flag = true;
                 if (iblockdata2.getBlock() == this) {
@@ -166,18 +166,18 @@ public class BlockDoor extends Block {
                 int power = bukkitBlock.getBlockPower();
                 int powerTop = blockTop.getBlockPower();
                 if (powerTop > power) power = powerTop;
-                int oldPower = (Boolean)iblockdata2.get(POWERED) ? 15 : 0;
+                int oldPower = iblockdata2.get(POWERED) ? 15 : 0;
 
                 if (oldPower == 0 ^ power == 0) {
                     BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bukkitBlock, oldPower, power);
                     world.getServer().getPluginManager().callEvent(eventRedstone);
 
                     boolean flag1 = eventRedstone.getNewCurrent() > 0;
-                    world.setTypeAndData(blockposition2, iblockdata2.set(BlockDoor.POWERED, Boolean.valueOf(flag1)), 2);
-                    if (flag1 != ((Boolean) iblockdata.get(BlockDoor.OPEN)).booleanValue()) {
-                        world.setTypeAndData(blockposition, iblockdata.set(BlockDoor.OPEN, Boolean.valueOf(flag1)), 2);
+                    world.setTypeAndData(blockposition2, iblockdata2.set(BlockDoor.POWERED, flag1), 2);
+                    if (flag1 != iblockdata.get(BlockDoor.OPEN)) {
+                        world.setTypeAndData(blockposition, iblockdata.set(BlockDoor.OPEN, flag1), 2);
                         world.b(blockposition, blockposition);
-                        world.a((EntityHuman) null, flag1 ? 1003 : 1006, blockposition, 0);
+                        world.a(null, flag1 ? 1003 : 1006, blockposition, 0);
                     }
                 }
                 // CraftBukkit end
@@ -196,7 +196,7 @@ public class BlockDoor extends Block {
     }
 
     public boolean canPlace(World world, BlockPosition blockposition) {
-        return blockposition.getY() >= 255 ? false : World.a((IBlockAccess) world, blockposition.down()) && super.canPlace(world, blockposition) && super.canPlace(world, blockposition.up());
+        return blockposition.getY() < 255 && World.a(world, blockposition.down()) && super.canPlace(world, blockposition) && super.canPlace(world, blockposition.up());
     }
 
     public int k() {
@@ -251,7 +251,7 @@ public class BlockDoor extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return (i & 8) > 0 ? this.getBlockData().set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER).set(BlockDoor.HINGE, (i & 1) > 0 ? BlockDoor.EnumDoorHinge.RIGHT : BlockDoor.EnumDoorHinge.LEFT).set(BlockDoor.POWERED, Boolean.valueOf((i & 2) > 0)) : this.getBlockData().set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER).set(BlockDoor.FACING, EnumDirection.fromType2(i & 3).f()).set(BlockDoor.OPEN, Boolean.valueOf((i & 4) > 0));
+        return (i & 8) > 0 ? this.getBlockData().set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.UPPER).set(BlockDoor.HINGE, (i & 1) > 0 ? BlockDoor.EnumDoorHinge.RIGHT : BlockDoor.EnumDoorHinge.LEFT).set(BlockDoor.POWERED, (i & 2) > 0) : this.getBlockData().set(BlockDoor.HALF, BlockDoor.EnumDoorHalf.LOWER).set(BlockDoor.FACING, EnumDirection.fromType2(i & 3).f()).set(BlockDoor.OPEN, (i & 4) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
@@ -264,12 +264,12 @@ public class BlockDoor extends Block {
                 i |= 1;
             }
 
-            if (((Boolean) iblockdata.get(BlockDoor.POWERED)).booleanValue()) {
+            if (iblockdata.get(BlockDoor.POWERED)) {
                 i |= 2;
             }
         } else {
-            i = b0 | ((EnumDirection) iblockdata.get(BlockDoor.FACING)).e().b();
-            if (((Boolean) iblockdata.get(BlockDoor.OPEN)).booleanValue()) {
+            i = b0 | iblockdata.get(BlockDoor.FACING).e().b();
+            if (iblockdata.get(BlockDoor.OPEN)) {
                 i |= 4;
             }
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDragonEgg.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDragonEgg.java
index 76a6272..4b81020 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDragonEgg.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDragonEgg.java
@@ -12,11 +12,11 @@ public class BlockDragonEgg extends Block {
     }
 
     public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        world.a(blockposition, (Block) this, this.a(world));
+        world.a(blockposition, this, this.a(world));
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
-        world.a(blockposition, (Block) this, this.a(world));
+        world.a(blockposition, this, this.a(world));
     }
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
@@ -29,8 +29,8 @@ public class BlockDragonEgg extends Block {
 
             if (!BlockFalling.instaFall && world.areChunksLoadedBetween(blockposition.a(-b0, -b0, -b0), blockposition.a(b0, b0, b0))) {
                 // PaperSpigot start - Add FallingBlock source location API
-                org.bukkit.Location loc = new org.bukkit.Location(world.getWorld(), (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F));
-                world.addEntity(new EntityFallingBlock(loc, world, (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F), this.getBlockData()));
+                org.bukkit.Location loc = new org.bukkit.Location(world.getWorld(), (float) blockposition.getX() + 0.5F, blockposition.getY(), (float) blockposition.getZ() + 0.5F);
+                world.addEntity(new EntityFallingBlock(loc, world, (float) blockposition.getX() + 0.5F, blockposition.getY(), (float) blockposition.getZ() + 0.5F, this.getBlockData()));
                 // PaperSpigot end
             } else {
                 world.setAir(blockposition);
@@ -38,7 +38,6 @@ public class BlockDragonEgg extends Block {
                 BlockPosition blockposition1;
 
                 for (blockposition1 = blockposition; BlockFalling.canFall(world, blockposition1) && blockposition1.getY() > 0; blockposition1 = blockposition1.down()) {
-                    ;
                 }
 
                 if (blockposition1.getY() > 0) {
@@ -88,7 +87,7 @@ public class BlockDragonEgg extends Block {
                             double d2 = (double) blockposition1.getY() + (double) (blockposition.getY() - blockposition1.getY()) * d0 + world.random.nextDouble() * 1.0D - 0.5D;
                             double d3 = (double) blockposition1.getZ() + (double) (blockposition.getZ() - blockposition1.getZ()) * d0 + (world.random.nextDouble() - 0.5D) * 1.0D + 0.5D;
 
-                            world.addParticle(EnumParticle.PORTAL, d1, d2, d3, (double) f, (double) f1, (double) f2, new int[0]);
+                            world.addParticle(EnumParticle.PORTAL, d1, d2, d3, f, f1, f2, new int[0]);
                         }
                     } else {
                         world.setTypeAndData(blockposition1, iblockdata, 2);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDropper.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDropper.java
index f3e1e72..d3531cf 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDropper.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockDropper.java
@@ -21,7 +21,7 @@ public class BlockDropper extends BlockDispenser {
 
     public void dispense(World world, BlockPosition blockposition) {
         SourceBlock sourceblock = new SourceBlock(world, blockposition);
-        TileEntityDispenser tileentitydispenser = (TileEntityDispenser) sourceblock.getTileEntity();
+        TileEntityDispenser tileentitydispenser = sourceblock.getTileEntity();
 
         if (tileentitydispenser != null) {
             int i = tileentitydispenser.m();
@@ -32,9 +32,9 @@ public class BlockDropper extends BlockDispenser {
                 ItemStack itemstack = tileentitydispenser.getItem(i);
 
                 if (itemstack != null) {
-                    EnumDirection enumdirection = (EnumDirection) world.getType(blockposition).get(BlockDropper.FACING);
+                    EnumDirection enumdirection = world.getType(blockposition).get(BlockDropper.FACING);
                     BlockPosition blockposition1 = blockposition.shift(enumdirection);
-                    IInventory iinventory = TileEntityHopper.b(world, (double) blockposition1.getX(), (double) blockposition1.getY(), (double) blockposition1.getZ());
+                    IInventory iinventory = TileEntityHopper.b(world, blockposition1.getX(), blockposition1.getY(), blockposition1.getZ());
                     ItemStack itemstack1;
 
                     if (iinventory == null) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFalling.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFalling.java
index 1d952b8..e8e679e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFalling.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFalling.java
@@ -16,11 +16,11 @@ public class BlockFalling extends Block {
     }
 
     public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        world.a(blockposition, (Block) this, this.a(world));
+        world.a(blockposition, this, this.a(world));
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
-        world.a(blockposition, (Block) this, this.a(world));
+        world.a(blockposition, this, this.a(world));
     }
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
@@ -37,8 +37,8 @@ public class BlockFalling extends Block {
             if (!BlockFalling.instaFall && world.areChunksLoadedBetween(blockposition.a(-b0, -b0, -b0), blockposition.a(b0, b0, b0))) {
                 if (!world.isClientSide) {
                     // PaperSpigot start - Add FallingBlock source location API
-                    org.bukkit.Location loc = new org.bukkit.Location(world.getWorld(), (double) ((float) blockposition.getX() + 0.5F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.5F));
-                    EntityFallingBlock entityfallingblock = new EntityFallingBlock(loc, world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, world.getType(blockposition));
+                    org.bukkit.Location loc = new org.bukkit.Location(world.getWorld(), (float) blockposition.getX() + 0.5F, blockposition.getY(), (float) blockposition.getZ() + 0.5F);
+                    EntityFallingBlock entityfallingblock = new EntityFallingBlock(loc, world, (double) blockposition.getX() + 0.5D, blockposition.getY(), (double) blockposition.getZ() + 0.5D, world.getType(blockposition));
                     // PaperSpigot end
 
                     this.a(entityfallingblock);
@@ -50,7 +50,6 @@ public class BlockFalling extends Block {
                 BlockPosition blockposition1;
 
                 for (blockposition1 = blockposition.down(); canFall(world, blockposition1) && blockposition1.getY() > 0; blockposition1 = blockposition1.down()) {
-                    ;
                 }
 
                 if (blockposition1.getY() > 0) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFire.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFire.java
index 76cd512..a1747f2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFire.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFire.java
@@ -37,7 +37,7 @@ public class BlockFire extends Block {
                 l = flag ? 1 : 2;
             }
 
-            return iblockdata.set(BlockFire.NORTH, Boolean.valueOf(this.e(iblockaccess, blockposition.north()))).set(BlockFire.EAST, Boolean.valueOf(this.e(iblockaccess, blockposition.east()))).set(BlockFire.SOUTH, Boolean.valueOf(this.e(iblockaccess, blockposition.south()))).set(BlockFire.WEST, Boolean.valueOf(this.e(iblockaccess, blockposition.west()))).set(BlockFire.UPPER, Integer.valueOf(l)).set(BlockFire.FLIP, Boolean.valueOf(flag1)).set(BlockFire.ALT, Boolean.valueOf(flag));
+            return iblockdata.set(BlockFire.NORTH, this.e(iblockaccess, blockposition.north())).set(BlockFire.EAST, this.e(iblockaccess, blockposition.east())).set(BlockFire.SOUTH, this.e(iblockaccess, blockposition.south())).set(BlockFire.WEST, this.e(iblockaccess, blockposition.west())).set(BlockFire.UPPER, l).set(BlockFire.FLIP, flag1).set(BlockFire.ALT, flag);
         } else {
             return this.getBlockData();
         }
@@ -45,7 +45,7 @@ public class BlockFire extends Block {
 
     protected BlockFire() {
         super(Material.FIRE);
-        this.j(this.blockStateList.getBlockData().set(BlockFire.AGE, Integer.valueOf(0)).set(BlockFire.FLIP, Boolean.valueOf(false)).set(BlockFire.ALT, Boolean.valueOf(false)).set(BlockFire.NORTH, Boolean.valueOf(false)).set(BlockFire.EAST, Boolean.valueOf(false)).set(BlockFire.SOUTH, Boolean.valueOf(false)).set(BlockFire.WEST, Boolean.valueOf(false)).set(BlockFire.UPPER, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockFire.AGE, 0).set(BlockFire.FLIP, Boolean.FALSE).set(BlockFire.ALT, Boolean.FALSE).set(BlockFire.NORTH, Boolean.FALSE).set(BlockFire.EAST, Boolean.FALSE).set(BlockFire.SOUTH, Boolean.FALSE).set(BlockFire.WEST, Boolean.FALSE).set(BlockFire.UPPER, 0));
         this.a(true);
     }
 
@@ -88,8 +88,8 @@ public class BlockFire extends Block {
     }
 
     public void a(Block block, int i, int j) {
-        this.flameChances.put(block, Integer.valueOf(i));
-        this.U.put(block, Integer.valueOf(j));
+        this.flameChances.put(block, i);
+        this.U.put(block, j);
     }
 
     public AxisAlignedBB a(World world, BlockPosition blockposition, IBlockData iblockdata) {
@@ -128,17 +128,17 @@ public class BlockFire extends Block {
             if (!flag && world.S() && this.e(world, blockposition)) {
                 fireExtinguished(world, blockposition); // CraftBukkit - extinguished by rain
             } else {
-                int i = ((Integer) iblockdata.get(BlockFire.AGE)).intValue();
+                int i = iblockdata.get(BlockFire.AGE);
 
                 if (i < 15) {
-                    iblockdata = iblockdata.set(BlockFire.AGE, Integer.valueOf(i + random.nextInt(3) / 2));
+                    iblockdata = iblockdata.set(BlockFire.AGE, i + random.nextInt(3) / 2);
                     world.setTypeAndData(blockposition, iblockdata, 4);
                 }
 
-                world.a(blockposition, (Block) this, this.a(world) + random.nextInt(10));
+                world.a(blockposition, this, this.a(world) + random.nextInt(10));
                 if (!flag) {
                     if (!this.f(world, blockposition)) {
-                        if (!World.a((IBlockAccess) world, blockposition.down()) || i > 3) {
+                        if (!World.a(world, blockposition.down()) || i > 3) {
                             fireExtinguished(world, blockposition); // CraftBukkit
                         }
 
@@ -232,15 +232,15 @@ public class BlockFire extends Block {
     }
 
     private int c(Block block) {
-        Integer integer = (Integer) this.U.get(block);
+        Integer integer = this.U.get(block);
 
-        return integer == null ? 0 : integer.intValue();
+        return integer == null ? 0 : integer;
     }
 
     private int d(Block block) {
-        Integer integer = (Integer) this.flameChances.get(block);
+        Integer integer = this.flameChances.get(block);
 
-        return integer == null ? 0 : integer.intValue();
+        return integer == null ? 0 : integer;
     }
 
     private void a(World world, BlockPosition blockposition, int i, Random random, int j) {
@@ -267,13 +267,13 @@ public class BlockFire extends Block {
                     l = 15;
                 }
 
-                world.setTypeAndData(blockposition, this.getBlockData().set(BlockFire.AGE, Integer.valueOf(l)), 3);
+                world.setTypeAndData(blockposition, this.getBlockData().set(BlockFire.AGE, l), 3);
             } else {
                 fireExtinguished(world, blockposition); // CraftBukkit
             }
 
             if (iblockdata.getBlock() == Blocks.TNT) {
-                Blocks.TNT.postBreak(world, blockposition, iblockdata.set(BlockTNT.EXPLODE, Boolean.valueOf(true)));
+                Blocks.TNT.postBreak(world, blockposition, iblockdata.set(BlockTNT.EXPLODE, Boolean.TRUE));
             }
         }
 
@@ -283,9 +283,7 @@ public class BlockFire extends Block {
         EnumDirection[] aenumdirection = EnumDirection.values();
         int i = aenumdirection.length;
 
-        for (int j = 0; j < i; ++j) {
-            EnumDirection enumdirection = aenumdirection[j];
-
+        for (EnumDirection enumdirection : aenumdirection) {
             if (this.e((IBlockAccess) world, blockposition.shift(enumdirection))) {
                 return true;
             }
@@ -302,9 +300,7 @@ public class BlockFire extends Block {
             EnumDirection[] aenumdirection = EnumDirection.values();
             int j = aenumdirection.length;
 
-            for (int k = 0; k < j; ++k) {
-                EnumDirection enumdirection = aenumdirection[k];
-
+            for (EnumDirection enumdirection : aenumdirection) {
                 i = Math.max(this.d(world.getType(blockposition.shift(enumdirection)).getBlock()), i);
             }
 
@@ -321,11 +317,11 @@ public class BlockFire extends Block {
     }
 
     public boolean canPlace(World world, BlockPosition blockposition) {
-        return World.a((IBlockAccess) world, blockposition.down()) || this.f(world, blockposition);
+        return World.a(world, blockposition.down()) || this.f(world, blockposition);
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
-        if (!World.a((IBlockAccess) world, blockposition.down()) && !this.f(world, blockposition)) {
+        if (!World.a(world, blockposition.down()) && !this.f(world, blockposition)) {
             fireExtinguished(world, blockposition); // CraftBukkit - fuel block gone
         }
 
@@ -333,10 +329,10 @@ public class BlockFire extends Block {
 
     public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
         if (world.worldProvider.getDimension() > 0 || !Blocks.PORTAL.e(world, blockposition)) {
-            if (!World.a((IBlockAccess) world, blockposition.down()) && !this.f(world, blockposition)) {
+            if (!World.a(world, blockposition.down()) && !this.f(world, blockposition)) {
                 fireExtinguished(world, blockposition); // CraftBukkit - fuel block broke
             } else {
-                world.a(blockposition, (Block) this, this.a(world) + world.random.nextInt(10));
+                world.a(blockposition, this, this.a(world) + world.random.nextInt(10));
             }
         }
     }
@@ -346,11 +342,11 @@ public class BlockFire extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockFire.AGE, Integer.valueOf(i));
+        return this.getBlockData().set(BlockFire.AGE, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockFire.AGE)).intValue();
+        return iblockdata.get(BlockFire.AGE);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFlowerPot.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFlowerPot.java
index ce46138..cca949c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFlowerPot.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFlowerPot.java
@@ -9,7 +9,7 @@ public class BlockFlowerPot extends BlockContainer {
 
     public BlockFlowerPot() {
         super(Material.ORIENTABLE);
-        this.j(this.blockStateList.getBlockData().set(BlockFlowerPot.CONTENTS, BlockFlowerPot.EnumFlowerPotContents.EMPTY).set(BlockFlowerPot.LEGACY_DATA, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockFlowerPot.CONTENTS, BlockFlowerPot.EnumFlowerPotContents.EMPTY).set(BlockFlowerPot.LEGACY_DATA, 0));
         this.j();
     }
 
@@ -57,7 +57,7 @@ public class BlockFlowerPot extends BlockContainer {
                     world.notify(blockposition);
                     entityhuman.b(StatisticList.T);
                     if (!entityhuman.abilities.canInstantlyBuild && --itemstack.count <= 0) {
-                        entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                        entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
                     }
 
                     return true;
@@ -69,7 +69,7 @@ public class BlockFlowerPot extends BlockContainer {
     }
 
     private boolean a(Block block, int i) {
-        return block != Blocks.YELLOW_FLOWER && block != Blocks.RED_FLOWER && block != Blocks.CACTUS && block != Blocks.BROWN_MUSHROOM && block != Blocks.RED_MUSHROOM && block != Blocks.SAPLING && block != Blocks.DEADBUSH ? block == Blocks.TALLGRASS && i == BlockLongGrass.EnumTallGrassType.FERN.a() : true;
+        return block == Blocks.YELLOW_FLOWER || block == Blocks.RED_FLOWER || block == Blocks.CACTUS || block == Blocks.BROWN_MUSHROOM || block == Blocks.RED_MUSHROOM || block == Blocks.SAPLING || block == Blocks.DEADBUSH || block == Blocks.TALLGRASS && i == BlockLongGrass.EnumTallGrassType.FERN.a();
     }
 
     public int getDropData(World world, BlockPosition blockposition) {
@@ -79,11 +79,11 @@ public class BlockFlowerPot extends BlockContainer {
     }
 
     public boolean canPlace(World world, BlockPosition blockposition) {
-        return super.canPlace(world, blockposition) && World.a((IBlockAccess) world, blockposition.down());
+        return super.canPlace(world, blockposition) && World.a(world, blockposition.down());
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
-        if (!World.a((IBlockAccess) world, blockposition.down())) {
+        if (!World.a(world, blockposition.down())) {
             this.b(world, blockposition, iblockdata, 0);
             world.setAir(blockposition);
         }
@@ -107,7 +107,7 @@ public class BlockFlowerPot extends BlockContainer {
             TileEntityFlowerPot tileentityflowerpot = this.f(world, blockposition);
 
             if (tileentityflowerpot != null) {
-                tileentityflowerpot.a((Item) null, 0);
+                tileentityflowerpot.a(null, 0);
             }
         }
 
@@ -196,7 +196,7 @@ public class BlockFlowerPot extends BlockContainer {
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockFlowerPot.LEGACY_DATA)).intValue();
+        return iblockdata.get(BlockFlowerPot.LEGACY_DATA);
     }
 
     public IBlockData updateState(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition) {
@@ -319,94 +319,79 @@ public class BlockFlowerPot extends BlockContainer {
         static {
             try {
                 BlockFlowerPot.SyntheticClass_1.b[BlockFlowers.EnumFlowerVarient.POPPY.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.b[BlockFlowers.EnumFlowerVarient.BLUE_ORCHID.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.b[BlockFlowers.EnumFlowerVarient.ALLIUM.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.b[BlockFlowers.EnumFlowerVarient.HOUSTONIA.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.b[BlockFlowers.EnumFlowerVarient.RED_TULIP.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.b[BlockFlowers.EnumFlowerVarient.ORANGE_TULIP.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror5) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.b[BlockFlowers.EnumFlowerVarient.WHITE_TULIP.ordinal()] = 7;
-            } catch (NoSuchFieldError nosuchfielderror6) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.b[BlockFlowers.EnumFlowerVarient.PINK_TULIP.ordinal()] = 8;
-            } catch (NoSuchFieldError nosuchfielderror7) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.b[BlockFlowers.EnumFlowerVarient.OXEYE_DAISY.ordinal()] = 9;
-            } catch (NoSuchFieldError nosuchfielderror8) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             a = new int[BlockWood.EnumLogVariant.values().length];
 
             try {
                 BlockFlowerPot.SyntheticClass_1.a[BlockWood.EnumLogVariant.OAK.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror9) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.a[BlockWood.EnumLogVariant.SPRUCE.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror10) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.a[BlockWood.EnumLogVariant.BIRCH.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror11) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.a[BlockWood.EnumLogVariant.JUNGLE.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror12) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.a[BlockWood.EnumLogVariant.ACACIA.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror13) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockFlowerPot.SyntheticClass_1.a[BlockWood.EnumLogVariant.DARK_OAK.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror14) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFlowing.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFlowing.java
index 23130ba..e154f4e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -28,7 +28,7 @@ public class BlockFlowing extends BlockFluids {
         org.bukkit.Server server = world.getServer();
         org.bukkit.block.Block source = bworld == null ? null : bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
         // CraftBukkit end
-        int i = ((Integer) iblockdata.get(BlockFlowing.LEVEL)).intValue();
+        int i = iblockdata.get(BlockFlowing.LEVEL);
         byte b0 = 1;
 
         if (this.material == Material.LAVA && !world.worldProvider.n()) {
@@ -69,7 +69,7 @@ public class BlockFlowing extends BlockFluids {
 
                 if (iblockdata1.getBlock().getMaterial().isBuildable()) {
                     i1 = 0;
-                } else if (iblockdata1.getBlock().getMaterial() == this.material && ((Integer) iblockdata1.get(BlockFlowing.LEVEL)).intValue() == 0) {
+                } else if (iblockdata1.getBlock().getMaterial() == this.material && iblockdata1.get(BlockFlowing.LEVEL) == 0) {
                     i1 = 0;
                 }
             }
@@ -85,9 +85,9 @@ public class BlockFlowing extends BlockFluids {
                 if (i1 < 0 || canFastDrain(world, blockposition)) { // PaperSpigot - Fast draining
                     world.setAir(blockposition);
                 } else {
-                    iblockdata = iblockdata.set(BlockFlowing.LEVEL, Integer.valueOf(i1));
+                    iblockdata = iblockdata.set(BlockFlowing.LEVEL, i1);
                     world.setTypeAndData(blockposition, iblockdata, 2);
-                    world.a(blockposition, (Block) this, j);
+                    world.a(blockposition, this, j);
                     // PaperSpigot start - Optimize draining
                     world.d(blockposition.west(), this);
                     world.d(blockposition.east(), this);
@@ -137,10 +137,8 @@ public class BlockFlowing extends BlockFluids {
                 return;
             }
 
-            Iterator iterator1 = set.iterator();
-
-            while (iterator1.hasNext()) {
-                EnumDirection enumdirection1 = (EnumDirection) iterator1.next();
+            for (Object value : set) {
+                EnumDirection enumdirection1 = (EnumDirection) value;
 
                 // CraftBukkit start
                 BlockFromToEvent event = new BlockFromToEvent(source, org.bukkit.craftbukkit.block.CraftBlock.notchToBlockFace(enumdirection1));
@@ -167,23 +165,20 @@ public class BlockFlowing extends BlockFluids {
                 }
             }
 
-            world.setTypeAndData(blockposition, this.getBlockData().set(BlockFlowing.LEVEL, Integer.valueOf(i)), 3);
+            world.setTypeAndData(blockposition, this.getBlockData().set(BlockFlowing.LEVEL, i), 3);
         }
 
     }
 
     private int a(World world, BlockPosition blockposition, int i, EnumDirection enumdirection) {
         int j = 1000;
-        Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
-
-        while (iterator.hasNext()) {
-            EnumDirection enumdirection1 = (EnumDirection) iterator.next();
 
+        for (EnumDirection enumdirection1 : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
             if (enumdirection1 != enumdirection) {
                 BlockPosition blockposition1 = blockposition.shift(enumdirection1);
                 IBlockData iblockdata = world.getType(blockposition1);
 
-                if (!this.g(world, blockposition1, iblockdata) && (iblockdata.getBlock().getMaterial() != this.material || ((Integer) iblockdata.get(BlockFlowing.LEVEL)).intValue() > 0)) {
+                if (!this.g(world, blockposition1, iblockdata) && (iblockdata.getBlock().getMaterial() != this.material || iblockdata.get(BlockFlowing.LEVEL) > 0)) {
                     if (!this.g(world, blockposition1.down(), iblockdata)) {
                         return i;
                     }
@@ -205,14 +200,12 @@ public class BlockFlowing extends BlockFluids {
     private Set f(World world, BlockPosition blockposition) {
         int i = 1000;
         EnumSet enumset = EnumSet.noneOf(EnumDirection.class);
-        Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
 
-        while (iterator.hasNext()) {
-            EnumDirection enumdirection = (EnumDirection) iterator.next();
+        for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
             BlockPosition blockposition1 = blockposition.shift(enumdirection);
             IBlockData iblockdata = world.getType(blockposition1);
 
-            if (!this.g(world, blockposition1, iblockdata) && (iblockdata.getBlock().getMaterial() != this.material || ((Integer) iblockdata.get(BlockFlowing.LEVEL)).intValue() > 0)) {
+            if (!this.g(world, blockposition1, iblockdata) && (iblockdata.getBlock().getMaterial() != this.material || iblockdata.get(BlockFlowing.LEVEL) > 0)) {
                 int j;
 
                 if (this.g(world, blockposition1.down(), world.getType(blockposition1.down()))) {
@@ -238,7 +231,7 @@ public class BlockFlowing extends BlockFluids {
     private boolean g(World world, BlockPosition blockposition, IBlockData iblockdata) {
         Block block = world.getType(blockposition).getBlock();
 
-        return !(block instanceof BlockDoor) && block != Blocks.STANDING_SIGN && block != Blocks.LADDER && block != Blocks.REEDS ? (block.material == Material.PORTAL ? true : block.material.isSolid()) : true;
+        return block instanceof BlockDoor || block == Blocks.STANDING_SIGN || block == Blocks.LADDER || block == Blocks.REEDS || (block.material == Material.PORTAL || block.material.isSolid());
     }
 
     protected int a(World world, BlockPosition blockposition, int i) {
@@ -267,7 +260,7 @@ public class BlockFlowing extends BlockFluids {
 
     public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
         if (!this.e(world, blockposition, iblockdata)) {
-            world.a(blockposition, (Block) this, this.getFlowSpeed(world, blockposition)); // PaperSpigot
+            world.a(blockposition, this, this.getFlowSpeed(world, blockposition)); // PaperSpigot
         }
 
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFluids.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFluids.java
index f5d7ae2..29b1cc8 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFluids.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockFluids.java
@@ -10,7 +10,7 @@ public abstract class BlockFluids extends Block {
 
     protected BlockFluids(Material material) {
         super(material);
-        this.j(this.blockStateList.getBlockData().set(BlockFluids.LEVEL, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockFluids.LEVEL, 0));
         this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
         this.a(true);
     }
@@ -28,7 +28,7 @@ public abstract class BlockFluids extends Block {
     }
 
     protected int e(IBlockAccess iblockaccess, BlockPosition blockposition) {
-        return iblockaccess.getType(blockposition).getBlock().getMaterial() == this.material ? ((Integer) iblockaccess.getType(blockposition).get(BlockFluids.LEVEL)).intValue() : -1;
+        return iblockaccess.getType(blockposition).getBlock().getMaterial() == this.material ? iblockaccess.getType(blockposition).get(BlockFluids.LEVEL) : -1;
     }
 
     protected int f(IBlockAccess iblockaccess, BlockPosition blockposition) {
@@ -46,13 +46,13 @@ public abstract class BlockFluids extends Block {
     }
 
     public boolean a(IBlockData iblockdata, boolean flag) {
-        return flag && ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue() == 0;
+        return flag && iblockdata.get(BlockFluids.LEVEL) == 0;
     }
 
     public boolean b(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) {
         Material material = iblockaccess.getType(blockposition).getBlock().getMaterial();
 
-        return material == this.material ? false : (enumdirection == EnumDirection.UP ? true : (material == Material.ICE ? false : super.b(iblockaccess, blockposition, enumdirection)));
+        return material != this.material && (enumdirection == EnumDirection.UP || (material != Material.ICE && super.b(iblockaccess, blockposition, enumdirection)));
     }
 
     public AxisAlignedBB a(World world, BlockPosition blockposition, IBlockData iblockdata) {
@@ -90,16 +90,16 @@ public abstract class BlockFluids extends Block {
                     j = this.f(iblockaccess, blockposition1.down());
                     if (j >= 0) {
                         k = j - (i - 8);
-                        vec3d = vec3d.add((double) ((blockposition1.getX() - blockposition.getX()) * k), (double) ((blockposition1.getY() - blockposition.getY()) * k), (double) ((blockposition1.getZ() - blockposition.getZ()) * k));
+                        vec3d = vec3d.add((blockposition1.getX() - blockposition.getX()) * k, (blockposition1.getY() - blockposition.getY()) * k, (blockposition1.getZ() - blockposition.getZ()) * k);
                     }
                 }
             } else if (j >= 0) {
                 k = j - i;
-                vec3d = vec3d.add((double) ((blockposition1.getX() - blockposition.getX()) * k), (double) ((blockposition1.getY() - blockposition.getY()) * k), (double) ((blockposition1.getZ() - blockposition.getZ()) * k));
+                vec3d = vec3d.add((blockposition1.getX() - blockposition.getX()) * k, (blockposition1.getY() - blockposition.getY()) * k, (blockposition1.getZ() - blockposition.getZ()) * k);
             }
         }
 
-        if (((Integer) iblockaccess.getType(blockposition).get(BlockFluids.LEVEL)).intValue() >= 8) {
+        if (iblockaccess.getType(blockposition).get(BlockFluids.LEVEL) >= 8) {
             iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
 
             while (iterator.hasNext()) {
@@ -136,9 +136,7 @@ public abstract class BlockFluids extends Block {
             boolean flag = false;
             int i = aenumdirection.length;
 
-            for (int j = 0; j < i; ++j) {
-                EnumDirection enumdirection = aenumdirection[j];
-
+            for (EnumDirection enumdirection : aenumdirection) {
                 if (enumdirection != EnumDirection.DOWN && world.getType(blockposition.shift(enumdirection)).getBlock().getMaterial() == Material.WATER) {
                     flag = true;
                     break;
@@ -146,15 +144,15 @@ public abstract class BlockFluids extends Block {
             }
 
             if (flag) {
-                Integer integer = (Integer) iblockdata.get(BlockFluids.LEVEL);
+                Integer integer = iblockdata.get(BlockFluids.LEVEL);
 
-                if (integer.intValue() == 0) {
+                if (integer == 0) {
                     world.setTypeUpdate(blockposition, Blocks.OBSIDIAN.getBlockData());
                     this.fizz(world, blockposition);
                     return true;
                 }
 
-                if (integer.intValue() > 0) { // PaperSpigot
+                if (integer > 0) { // PaperSpigot
                     world.setTypeUpdate(blockposition, Blocks.COBBLESTONE.getBlockData());
                     this.fizz(world, blockposition);
                     return true;
@@ -166,9 +164,9 @@ public abstract class BlockFluids extends Block {
     }
 
     protected void fizz(World world, BlockPosition blockposition) {
-        double d0 = (double) blockposition.getX();
-        double d1 = (double) blockposition.getY();
-        double d2 = (double) blockposition.getZ();
+        double d0 = blockposition.getX();
+        double d1 = blockposition.getY();
+        double d2 = blockposition.getZ();
 
         world.makeSound(d0 + 0.5D, d1 + 0.5D, d2 + 0.5D, "random.fizz", 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
 
@@ -179,11 +177,11 @@ public abstract class BlockFluids extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockFluids.LEVEL, Integer.valueOf(i));
+        return this.getBlockData().set(BlockFluids.LEVEL, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue();
+        return iblockdata.get(BlockFluids.LEVEL);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockGrass.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockGrass.java
index 557e357..0d0f241 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockGrass.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockGrass.java
@@ -16,7 +16,7 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
 
     protected BlockGrass() {
         super(Material.GRASS);
-        this.j(this.blockStateList.getBlockData().set(BlockGrass.SNOWY, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockGrass.SNOWY, Boolean.FALSE));
         this.a(true);
         this.a(CreativeModeTab.b);
     }
@@ -24,7 +24,7 @@ public class BlockGrass extends Block implements IBlockFragilePlantElement {
     public IBlockData updateState(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition) {
         Block block = iblockaccess.getType(blockposition.up()).getBlock();
 
-        return iblockdata.set(BlockGrass.SNOWY, Boolean.valueOf(block == Blocks.SNOW || block == Blocks.SNOW_LAYER));
+        return iblockdata.set(BlockGrass.SNOWY, block == Blocks.SNOW || block == Blocks.SNOW_LAYER);
     }
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockHopper.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockHopper.java
index 9f9b45d..28dd4e6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockHopper.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockHopper.java
@@ -18,7 +18,7 @@ public class BlockHopper extends BlockContainer {
 
     public BlockHopper() {
         super(Material.ORE, MaterialMapColor.m);
-        this.j(this.blockStateList.getBlockData().set(BlockHopper.FACING, EnumDirection.DOWN).set(BlockHopper.ENABLED, Boolean.valueOf(true)));
+        this.j(this.blockStateList.getBlockData().set(BlockHopper.FACING, EnumDirection.DOWN).set(BlockHopper.ENABLED, Boolean.TRUE));
         this.a(CreativeModeTab.d);
         this.a(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
     }
@@ -50,7 +50,7 @@ public class BlockHopper extends BlockContainer {
             enumdirection1 = EnumDirection.DOWN;
         }
 
-        return this.getBlockData().set(BlockHopper.FACING, enumdirection1).set(BlockHopper.ENABLED, Boolean.valueOf(true));
+        return this.getBlockData().set(BlockHopper.FACING, enumdirection1).set(BlockHopper.ENABLED, Boolean.TRUE);
     }
 
     public TileEntity a(World world, int i) {
@@ -95,8 +95,8 @@ public class BlockHopper extends BlockContainer {
     private void e(World world, BlockPosition blockposition, IBlockData iblockdata) {
         boolean flag = !world.isBlockIndirectlyPowered(blockposition);
 
-        if (flag != ((Boolean) iblockdata.get(BlockHopper.ENABLED)).booleanValue()) {
-            world.setTypeAndData(blockposition, iblockdata.set(BlockHopper.ENABLED, Boolean.valueOf(flag)), 4);
+        if (flag != iblockdata.get(BlockHopper.ENABLED)) {
+            world.setTypeAndData(blockposition, iblockdata.set(BlockHopper.ENABLED, flag), 4);
         }
 
     }
@@ -141,14 +141,14 @@ public class BlockHopper extends BlockContainer {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockHopper.FACING, b(i)).set(BlockHopper.ENABLED, Boolean.valueOf(f(i)));
+        return this.getBlockData().set(BlockHopper.FACING, b(i)).set(BlockHopper.ENABLED, f(i));
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((EnumDirection) iblockdata.get(BlockHopper.FACING)).a();
+        int i = b0 | iblockdata.get(BlockHopper.FACING).a();
 
-        if (!((Boolean) iblockdata.get(BlockHopper.ENABLED)).booleanValue()) {
+        if (!(Boolean) iblockdata.get(BlockHopper.ENABLED)) {
             i |= 8;
         }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockJukeBox.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockJukeBox.java
index b1bfb7e..fcd15f7 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockJukeBox.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockJukeBox.java
@@ -6,14 +6,14 @@ public class BlockJukeBox extends BlockContainer {
 
     protected BlockJukeBox() {
         super(Material.WOOD, MaterialMapColor.l);
-        this.j(this.blockStateList.getBlockData().set(BlockJukeBox.HAS_RECORD, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockJukeBox.HAS_RECORD, Boolean.FALSE));
         this.a(CreativeModeTab.c);
     }
 
     public boolean interact(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman, EnumDirection enumdirection, float f, float f1, float f2) {
-        if (((Boolean) iblockdata.get(BlockJukeBox.HAS_RECORD)).booleanValue()) {
+        if (iblockdata.get(BlockJukeBox.HAS_RECORD)) {
             this.dropRecord(world, blockposition, iblockdata);
-            iblockdata = iblockdata.set(BlockJukeBox.HAS_RECORD, Boolean.valueOf(false));
+            iblockdata = iblockdata.set(BlockJukeBox.HAS_RECORD, Boolean.FALSE);
             world.setTypeAndData(blockposition, iblockdata, 2);
             return true;
         } else {
@@ -27,7 +27,7 @@ public class BlockJukeBox extends BlockContainer {
 
             if (tileentity instanceof BlockJukeBox.TileEntityRecordPlayer) {
                 ((BlockJukeBox.TileEntityRecordPlayer) tileentity).setRecord(new ItemStack(itemstack.getItem(), 1, itemstack.getData()));
-                world.setTypeAndData(blockposition, iblockdata.set(BlockJukeBox.HAS_RECORD, Boolean.valueOf(true)), 2);
+                world.setTypeAndData(blockposition, iblockdata.set(BlockJukeBox.HAS_RECORD, Boolean.TRUE), 2);
             }
         }
     }
@@ -43,7 +43,7 @@ public class BlockJukeBox extends BlockContainer {
                 if (itemstack != null) {
                     world.triggerEffect(1005, blockposition, 0);
                     world.a(blockposition, (String) null);
-                    blockjukebox_tileentityrecordplayer.setRecord((ItemStack) null);
+                    blockjukebox_tileentityrecordplayer.setRecord(null);
                     float f = 0.7F;
                     double d0 = (double) (world.random.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
                     double d1 = (double) (world.random.nextFloat() * f) + (double) (1.0F - f) * 0.2D + 0.6D;
@@ -96,11 +96,11 @@ public class BlockJukeBox extends BlockContainer {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockJukeBox.HAS_RECORD, Boolean.valueOf(i > 0));
+        return this.getBlockData().set(BlockJukeBox.HAS_RECORD, i > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Boolean) iblockdata.get(BlockJukeBox.HAS_RECORD)).booleanValue() ? 1 : 0;
+        return iblockdata.get(BlockJukeBox.HAS_RECORD) ? 1 : 0;
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockLeaves.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockLeaves.java
index 7bf9018..db9b5e3 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockLeaves.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockLeaves.java
@@ -33,8 +33,8 @@ public abstract class BlockLeaves extends BlockTransparent {
                         BlockPosition blockposition1 = blockposition.a(i1, j1, k1);
                         IBlockData iblockdata1 = world.getType(blockposition1);
 
-                        if (iblockdata1.getBlock().getMaterial() == Material.LEAVES && !((Boolean) iblockdata1.get(BlockLeaves.CHECK_DECAY)).booleanValue()) {
-                            world.setTypeAndData(blockposition1, iblockdata1.set(BlockLeaves.CHECK_DECAY, Boolean.valueOf(true)), 4);
+                        if (iblockdata1.getBlock().getMaterial() == Material.LEAVES && !(Boolean) iblockdata1.get(BlockLeaves.CHECK_DECAY)) {
+                            world.setTypeAndData(blockposition1, iblockdata1.set(BlockLeaves.CHECK_DECAY, Boolean.TRUE), 4);
                         }
                     }
                 }
@@ -45,7 +45,7 @@ public abstract class BlockLeaves extends BlockTransparent {
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
         if (!world.isClientSide) {
-            if (((Boolean) iblockdata.get(BlockLeaves.CHECK_DECAY)).booleanValue() && ((Boolean) iblockdata.get(BlockLeaves.DECAYABLE)).booleanValue()) {
+            if (iblockdata.get(BlockLeaves.CHECK_DECAY) && iblockdata.get(BlockLeaves.DECAYABLE)) {
                 byte b0 = 4;
                 int i = b0 + 1;
                 int j = blockposition.getX();
@@ -122,7 +122,7 @@ public abstract class BlockLeaves extends BlockTransparent {
                 int k2 = this.N[j1 * i1 + j1 * b1 + j1];
 
                 if (k2 >= 0) {
-                    world.setTypeAndData(blockposition, iblockdata.set(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false)), 4);
+                    world.setTypeAndData(blockposition, iblockdata.set(BlockLeaves.CHECK_DECAY, Boolean.FALSE), 4);
                 } else {
                     this.e(world, blockposition);
                 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockLever.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockLever.java
index c9015eb..f2148b6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockLever.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockLever.java
@@ -11,7 +11,7 @@ public class BlockLever extends Block {
 
     protected BlockLever() {
         super(Material.ORIENTABLE);
-        this.j(this.blockStateList.getBlockData().set(BlockLever.FACING, BlockLever.EnumLeverPosition.NORTH).set(BlockLever.POWERED, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockLever.FACING, BlockLever.EnumLeverPosition.NORTH).set(BlockLever.POWERED, Boolean.FALSE));
         this.a(CreativeModeTab.d);
     }
 
@@ -35,9 +35,7 @@ public class BlockLever extends Block {
         EnumDirection[] aenumdirection = EnumDirection.values();
         int i = aenumdirection.length;
 
-        for (int j = 0; j < i; ++j) {
-            EnumDirection enumdirection = aenumdirection[j];
-
+        for (EnumDirection enumdirection : aenumdirection) {
             if (a(world, blockposition, enumdirection)) {
                 return true;
             }
@@ -51,7 +49,7 @@ public class BlockLever extends Block {
     }
 
     public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) {
-        IBlockData iblockdata = this.getBlockData().set(BlockLever.POWERED, Boolean.valueOf(false));
+        IBlockData iblockdata = this.getBlockData().set(BlockLever.POWERED, Boolean.FALSE);
 
         if (a(world, blockposition, enumdirection.opposite())) {
             return iblockdata.set(BlockLever.FACING, BlockLever.EnumLeverPosition.a(enumdirection, entityliving.getDirection()));
@@ -62,7 +60,7 @@ public class BlockLever extends Block {
 
             do {
                 if (!iterator.hasNext()) {
-                    if (World.a((IBlockAccess) world, blockposition.down())) {
+                    if (World.a(world, blockposition.down())) {
                         return iblockdata.set(BlockLever.FACING, BlockLever.EnumLeverPosition.a(EnumDirection.UP, entityliving.getDirection()));
                     }
 
@@ -102,7 +100,7 @@ public class BlockLever extends Block {
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
-        if (this.e(world, blockposition, iblockdata) && !a(world, blockposition, ((BlockLever.EnumLeverPosition) iblockdata.get(BlockLever.FACING)).c().opposite())) {
+        if (this.e(world, blockposition, iblockdata) && !a(world, blockposition, iblockdata.get(BlockLever.FACING).c().opposite())) {
             this.b(world, blockposition, iblockdata, 0);
             world.setAir(blockposition);
         }
@@ -122,7 +120,7 @@ public class BlockLever extends Block {
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
         float f = 0.1875F;
 
-        switch (BlockLever.SyntheticClass_1.b[((BlockLever.EnumLeverPosition) iblockaccess.getType(blockposition).get(BlockLever.FACING)).ordinal()]) {
+        switch (BlockLever.SyntheticClass_1.b[iblockaccess.getType(blockposition).get(BlockLever.FACING).ordinal()]) {
         case 1:
             this.a(0.0F, 0.2F, 0.5F - f, f * 2.0F, 0.8F, 0.5F + f);
             break;
@@ -166,16 +164,16 @@ public class BlockLever extends Block {
             BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
             world.getServer().getPluginManager().callEvent(eventRedstone);
 
-            if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
+            if ((eventRedstone.getNewCurrent() > 0) == (powered)) {
                 return true;
             }
             // CraftBukkit end
             
             iblockdata = iblockdata.a(BlockLever.POWERED);
             world.setTypeAndData(blockposition, iblockdata, 3);
-            world.makeSound((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, "random.click", 0.3F, ((Boolean) iblockdata.get(BlockLever.POWERED)).booleanValue() ? 0.6F : 0.5F);
+            world.makeSound((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, "random.click", 0.3F, iblockdata.get(BlockLever.POWERED) ? 0.6F : 0.5F);
             world.applyPhysics(blockposition, this);
-            EnumDirection enumdirection1 = ((BlockLever.EnumLeverPosition) iblockdata.get(BlockLever.FACING)).c();
+            EnumDirection enumdirection1 = iblockdata.get(BlockLever.FACING).c();
 
             world.applyPhysics(blockposition.shift(enumdirection1.opposite()), this);
             return true;
@@ -183,9 +181,9 @@ public class BlockLever extends Block {
     }
 
     public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        if (((Boolean) iblockdata.get(BlockLever.POWERED)).booleanValue()) {
+        if (iblockdata.get(BlockLever.POWERED)) {
             world.applyPhysics(blockposition, this);
-            EnumDirection enumdirection = ((BlockLever.EnumLeverPosition) iblockdata.get(BlockLever.FACING)).c();
+            EnumDirection enumdirection = iblockdata.get(BlockLever.FACING).c();
 
             world.applyPhysics(blockposition.shift(enumdirection.opposite()), this);
         }
@@ -194,11 +192,11 @@ public class BlockLever extends Block {
     }
 
     public int a(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection) {
-        return ((Boolean) iblockdata.get(BlockLever.POWERED)).booleanValue() ? 15 : 0;
+        return iblockdata.get(BlockLever.POWERED) ? 15 : 0;
     }
 
     public int b(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection) {
-        return !((Boolean) iblockdata.get(BlockLever.POWERED)).booleanValue() ? 0 : (((BlockLever.EnumLeverPosition) iblockdata.get(BlockLever.FACING)).c() == enumdirection ? 15 : 0);
+        return !(Boolean) iblockdata.get(BlockLever.POWERED) ? 0 : (iblockdata.get(BlockLever.FACING).c() == enumdirection ? 15 : 0);
     }
 
     public boolean isPowerSource() {
@@ -206,14 +204,14 @@ public class BlockLever extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockLever.FACING, BlockLever.EnumLeverPosition.a(i & 7)).set(BlockLever.POWERED, Boolean.valueOf((i & 8) > 0));
+        return this.getBlockData().set(BlockLever.FACING, BlockLever.EnumLeverPosition.a(i & 7)).set(BlockLever.POWERED, (i & 8) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((BlockLever.EnumLeverPosition) iblockdata.get(BlockLever.FACING)).a();
+        int i = b0 | iblockdata.get(BlockLever.FACING).a();
 
-        if (((Boolean) iblockdata.get(BlockLever.POWERED)).booleanValue()) {
+        if (iblockdata.get(BlockLever.POWERED)) {
             i |= 8;
         }
 
@@ -233,102 +231,86 @@ public class BlockLever extends Block {
         static {
             try {
                 BlockLever.SyntheticClass_1.c[EnumDirection.EnumAxis.X.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.c[EnumDirection.EnumAxis.Z.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             b = new int[BlockLever.EnumLeverPosition.values().length];
 
             try {
                 BlockLever.SyntheticClass_1.b[BlockLever.EnumLeverPosition.EAST.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.b[BlockLever.EnumLeverPosition.WEST.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.b[BlockLever.EnumLeverPosition.SOUTH.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.b[BlockLever.EnumLeverPosition.NORTH.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror5) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.b[BlockLever.EnumLeverPosition.UP_Z.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror6) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.b[BlockLever.EnumLeverPosition.UP_X.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror7) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.b[BlockLever.EnumLeverPosition.DOWN_X.ordinal()] = 7;
-            } catch (NoSuchFieldError nosuchfielderror8) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.b[BlockLever.EnumLeverPosition.DOWN_Z.ordinal()] = 8;
-            } catch (NoSuchFieldError nosuchfielderror9) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             a = new int[EnumDirection.values().length];
 
             try {
                 BlockLever.SyntheticClass_1.a[EnumDirection.DOWN.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror10) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.a[EnumDirection.UP.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror11) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror12) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror13) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror14) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockLever.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror15) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
@@ -420,10 +402,8 @@ public class BlockLever extends Block {
             BlockLever.EnumLeverPosition[] ablocklever_enumleverposition = values();
             int i = ablocklever_enumleverposition.length;
 
-            for (int j = 0; j < i; ++j) {
-                BlockLever.EnumLeverPosition blocklever_enumleverposition = ablocklever_enumleverposition[j];
-
-                BlockLever.EnumLeverPosition.i[blocklever_enumleverposition.a()] = blocklever_enumleverposition;
+            for (EnumLeverPosition blocklever_enumleverposition : ablocklever_enumleverposition) {
+                EnumLeverPosition.i[blocklever_enumleverposition.a()] = blocklever_enumleverposition;
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMinecartDetector.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMinecartDetector.java
index f3ce4a9..1500bde 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMinecartDetector.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMinecartDetector.java
@@ -21,7 +21,7 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
 
     public BlockMinecartDetector() {
         super(true);
-        this.j(this.blockStateList.getBlockData().set(BlockMinecartDetector.POWERED, Boolean.valueOf(false)).set(BlockMinecartDetector.SHAPE, BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH));
+        this.j(this.blockStateList.getBlockData().set(BlockMinecartDetector.POWERED, Boolean.FALSE).set(BlockMinecartDetector.SHAPE, BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH));
         this.a(true);
     }
 
@@ -35,7 +35,7 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
 
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
         if (!world.isClientSide) {
-            if (!((Boolean) iblockdata.get(BlockMinecartDetector.POWERED)).booleanValue()) {
+            if (!(Boolean) iblockdata.get(BlockMinecartDetector.POWERED)) {
                 this.e(world, blockposition, iblockdata);
             }
         }
@@ -44,21 +44,21 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {}
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
-        if (!world.isClientSide && ((Boolean) iblockdata.get(BlockMinecartDetector.POWERED)).booleanValue()) {
+        if (!world.isClientSide && iblockdata.get(BlockMinecartDetector.POWERED)) {
             this.e(world, blockposition, iblockdata);
         }
     }
 
     public int a(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection) {
-        return ((Boolean) iblockdata.get(BlockMinecartDetector.POWERED)).booleanValue() ? 15 : 0;
+        return iblockdata.get(BlockMinecartDetector.POWERED) ? 15 : 0;
     }
 
     public int b(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection) {
-        return !((Boolean) iblockdata.get(BlockMinecartDetector.POWERED)).booleanValue() ? 0 : (enumdirection == EnumDirection.UP ? 15 : 0);
+        return !(Boolean) iblockdata.get(BlockMinecartDetector.POWERED) ? 0 : (enumdirection == EnumDirection.UP ? 15 : 0);
     }
 
     private void e(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        boolean flag = ((Boolean) iblockdata.get(BlockMinecartDetector.POWERED)).booleanValue();
+        boolean flag = iblockdata.get(BlockMinecartDetector.POWERED);
         boolean flag1 = false;
         List list = this.a(world, blockposition, EntityMinecartAbstract.class, new Predicate[0]);
 
@@ -78,21 +78,21 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
         // CraftBukkit end
 
         if (flag1 && !flag) {
-            world.setTypeAndData(blockposition, iblockdata.set(BlockMinecartDetector.POWERED, Boolean.valueOf(true)), 3);
+            world.setTypeAndData(blockposition, iblockdata.set(BlockMinecartDetector.POWERED, Boolean.TRUE), 3);
             world.applyPhysics(blockposition, this);
             world.applyPhysics(blockposition.down(), this);
             world.b(blockposition, blockposition);
         }
 
         if (!flag1 && flag) {
-            world.setTypeAndData(blockposition, iblockdata.set(BlockMinecartDetector.POWERED, Boolean.valueOf(false)), 3);
+            world.setTypeAndData(blockposition, iblockdata.set(BlockMinecartDetector.POWERED, Boolean.FALSE), 3);
             world.applyPhysics(blockposition, this);
             world.applyPhysics(blockposition.down(), this);
             world.b(blockposition, blockposition);
         }
 
         if (flag1) {
-            world.a(blockposition, (Block) this, this.a(world));
+            world.a(blockposition, this, this.a(world));
         }
 
         world.updateAdjacentComparators(blockposition, this);
@@ -112,7 +112,7 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
     }
 
     public int l(World world, BlockPosition blockposition) {
-        if (((Boolean) world.getType(blockposition).get(BlockMinecartDetector.POWERED)).booleanValue()) {
+        if (world.getType(blockposition).get(BlockMinecartDetector.POWERED)) {
             List list = this.a(world, blockposition, EntityMinecartCommandBlock.class, new Predicate[0]);
 
             if (!list.isEmpty()) {
@@ -138,18 +138,18 @@ public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
     private AxisAlignedBB a(BlockPosition blockposition) {
         float f = 0.2F;
 
-        return new AxisAlignedBB((double) ((float) blockposition.getX() + 0.2F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.2F), (double) ((float) (blockposition.getX() + 1) - 0.2F), (double) ((float) (blockposition.getY() + 1) - 0.2F), (double) ((float) (blockposition.getZ() + 1) - 0.2F));
+        return new AxisAlignedBB((float) blockposition.getX() + 0.2F, blockposition.getY(), (float) blockposition.getZ() + 0.2F, (float) (blockposition.getX() + 1) - 0.2F, (float) (blockposition.getY() + 1) - 0.2F, (float) (blockposition.getZ() + 1) - 0.2F);
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockMinecartDetector.SHAPE, BlockMinecartTrackAbstract.EnumTrackPosition.a(i & 7)).set(BlockMinecartDetector.POWERED, Boolean.valueOf((i & 8) > 0));
+        return this.getBlockData().set(BlockMinecartDetector.SHAPE, BlockMinecartTrackAbstract.EnumTrackPosition.a(i & 7)).set(BlockMinecartDetector.POWERED, (i & 8) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(BlockMinecartDetector.SHAPE)).a();
+        int i = b0 | iblockdata.get(BlockMinecartDetector.SHAPE).a();
 
-        if (((Boolean) iblockdata.get(BlockMinecartDetector.POWERED)).booleanValue()) {
+        if (iblockdata.get(BlockMinecartDetector.POWERED)) {
             i |= 8;
         }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
index ec42421..4c1db81 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java
@@ -40,7 +40,7 @@ public abstract class BlockMinecartTrackAbstract extends Block {
 
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
         IBlockData iblockdata = iblockaccess.getType(blockposition);
-        BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.getBlock() == this ? (BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(this.n()) : null;
+        BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.getBlock() == this ? iblockdata.get(this.n()) : null;
 
         if (blockminecarttrackabstract_enumtrackposition != null && blockminecarttrackabstract_enumtrackposition.c()) {
             this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.625F, 1.0F);
@@ -55,7 +55,7 @@ public abstract class BlockMinecartTrackAbstract extends Block {
     }
 
     public boolean canPlace(World world, BlockPosition blockposition) {
-        return World.a((IBlockAccess) world, blockposition.down());
+        return World.a(world, blockposition.down());
     }
 
     public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
@@ -70,20 +70,20 @@ public abstract class BlockMinecartTrackAbstract extends Block {
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
         if (!world.isClientSide) {
-            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = (BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(this.n());
+            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.get(this.n());
             boolean flag = false;
 
-            if (!World.a((IBlockAccess) world, blockposition.down())) {
+            if (!World.a(world, blockposition.down())) {
                 flag = true;
             }
 
-            if (blockminecarttrackabstract_enumtrackposition == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_EAST && !World.a((IBlockAccess) world, blockposition.east())) {
+            if (blockminecarttrackabstract_enumtrackposition == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_EAST && !World.a(world, blockposition.east())) {
                 flag = true;
-            } else if (blockminecarttrackabstract_enumtrackposition == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_WEST && !World.a((IBlockAccess) world, blockposition.west())) {
+            } else if (blockminecarttrackabstract_enumtrackposition == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_WEST && !World.a(world, blockposition.west())) {
                 flag = true;
-            } else if (blockminecarttrackabstract_enumtrackposition == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_NORTH && !World.a((IBlockAccess) world, blockposition.north())) {
+            } else if (blockminecarttrackabstract_enumtrackposition == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_NORTH && !World.a(world, blockposition.north())) {
                 flag = true;
-            } else if (blockminecarttrackabstract_enumtrackposition == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_SOUTH && !World.a((IBlockAccess) world, blockposition.south())) {
+            } else if (blockminecarttrackabstract_enumtrackposition == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_SOUTH && !World.a(world, blockposition.south())) {
                 flag = true;
             }
 
@@ -109,7 +109,7 @@ public abstract class BlockMinecartTrackAbstract extends Block {
 
     public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
         super.remove(world, blockposition, iblockdata);
-        if (((BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(this.n())).c()) {
+        if (iblockdata.get(this.n()).c()) {
             world.applyPhysics(blockposition.up(), this);
         }
 
@@ -129,62 +129,52 @@ public abstract class BlockMinecartTrackAbstract extends Block {
         static {
             try {
                 BlockMinecartTrackAbstract.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMinecartTrackAbstract.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.EAST_WEST.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMinecartTrackAbstract.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_EAST.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMinecartTrackAbstract.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_WEST.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMinecartTrackAbstract.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_NORTH.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMinecartTrackAbstract.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_SOUTH.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror5) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMinecartTrackAbstract.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.SOUTH_EAST.ordinal()] = 7;
-            } catch (NoSuchFieldError nosuchfielderror6) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMinecartTrackAbstract.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.SOUTH_WEST.ordinal()] = 8;
-            } catch (NoSuchFieldError nosuchfielderror7) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMinecartTrackAbstract.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_WEST.ordinal()] = 9;
-            } catch (NoSuchFieldError nosuchfielderror8) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMinecartTrackAbstract.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_EAST.ordinal()] = 10;
-            } catch (NoSuchFieldError nosuchfielderror9) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
@@ -231,10 +221,8 @@ public abstract class BlockMinecartTrackAbstract extends Block {
             BlockMinecartTrackAbstract.EnumTrackPosition[] ablockminecarttrackabstract_enumtrackposition = values();
             int i = ablockminecarttrackabstract_enumtrackposition.length;
 
-            for (int j = 0; j < i; ++j) {
-                BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = ablockminecarttrackabstract_enumtrackposition[j];
-
-                BlockMinecartTrackAbstract.EnumTrackPosition.k[blockminecarttrackabstract_enumtrackposition.a()] = blockminecarttrackabstract_enumtrackposition;
+            for (EnumTrackPosition blockminecarttrackabstract_enumtrackposition : ablockminecarttrackabstract_enumtrackposition) {
+                EnumTrackPosition.k[blockminecarttrackabstract_enumtrackposition.a()] = blockminecarttrackabstract_enumtrackposition;
             }
 
         }
@@ -254,7 +242,7 @@ public abstract class BlockMinecartTrackAbstract extends Block {
             this.c = blockposition;
             this.e = iblockdata;
             this.d = (BlockMinecartTrackAbstract) iblockdata.getBlock();
-            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = (BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(BlockMinecartTrackAbstract.this.n());
+            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.get(BlockMinecartTrackAbstract.this.n());
 
             this.f = this.d.a;
             this.a(blockminecarttrackabstract_enumtrackposition);
@@ -317,7 +305,7 @@ public abstract class BlockMinecartTrackAbstract extends Block {
 
         private void c() {
             for (int i = 0; i < this.g.size(); ++i) {
-                BlockMinecartTrackAbstract.MinecartTrackLogic blockminecarttrackabstract_minecarttracklogic = this.b((BlockPosition) this.g.get(i));
+                BlockMinecartTrackAbstract.MinecartTrackLogic blockminecarttrackabstract_minecarttracklogic = this.b(this.g.get(i));
 
                 if (blockminecarttrackabstract_minecarttracklogic != null && blockminecarttrackabstract_minecarttracklogic.a(this)) {
                     this.g.set(i, blockminecarttrackabstract_minecarttracklogic.c);
@@ -356,8 +344,8 @@ public abstract class BlockMinecartTrackAbstract extends Block {
         }
 
         private boolean c(BlockPosition blockposition) {
-            for (int i = 0; i < this.g.size(); ++i) {
-                BlockPosition blockposition1 = (BlockPosition) this.g.get(i);
+            for (BlockPosition blockPosition : this.g) {
+                BlockPosition blockposition1 = blockPosition;
 
                 if (blockposition1.getX() == blockposition.getX() && blockposition1.getZ() == blockposition.getZ()) {
                     return true;
@@ -369,11 +357,8 @@ public abstract class BlockMinecartTrackAbstract extends Block {
 
         protected int a() {
             int i = 0;
-            Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
-
-            while (iterator.hasNext()) {
-                EnumDirection enumdirection = (EnumDirection) iterator.next();
 
+            for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
                 if (this.a(this.c.shift(enumdirection))) {
                     ++i;
                 }
@@ -575,8 +560,8 @@ public abstract class BlockMinecartTrackAbstract extends Block {
             if (flag1 || this.b.getType(this.c) != this.e) {
                 this.b.setTypeAndData(this.c, this.e, 3);
 
-                for (int i = 0; i < this.g.size(); ++i) {
-                    BlockMinecartTrackAbstract.MinecartTrackLogic blockminecarttrackabstract_minecarttracklogic = this.b((BlockPosition) this.g.get(i));
+                for (BlockPosition blockPosition : this.g) {
+                    MinecartTrackLogic blockminecarttrackabstract_minecarttracklogic = this.b(blockPosition);
 
                     if (blockminecarttrackabstract_minecarttracklogic != null) {
                         blockminecarttrackabstract_minecarttracklogic.c();
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMonsterEggs.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMonsterEggs.java
index 0b58e4f..e3468be 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMonsterEggs.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMonsterEggs.java
@@ -26,7 +26,7 @@ public class BlockMonsterEggs extends Block {
     }
 
     protected ItemStack i(IBlockData iblockdata) {
-        switch (BlockMonsterEggs.SyntheticClass_1.a[((BlockMonsterEggs.EnumMonsterEggVarient) iblockdata.get(BlockMonsterEggs.VARIANT)).ordinal()]) {
+        switch (BlockMonsterEggs.SyntheticClass_1.a[iblockdata.get(BlockMonsterEggs.VARIANT).ordinal()]) {
         case 1:
             return new ItemStack(Blocks.COBBLESTONE);
 
@@ -51,7 +51,7 @@ public class BlockMonsterEggs extends Block {
         if (!world.isClientSide && world.getGameRules().getBoolean("doTileDrops")) {
             EntitySilverfish entitysilverfish = new EntitySilverfish(world);
 
-            entitysilverfish.setPositionRotation((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, 0.0F, 0.0F);
+            entitysilverfish.setPositionRotation((double) blockposition.getX() + 0.5D, blockposition.getY(), (double) blockposition.getZ() + 0.5D, 0.0F, 0.0F);
             world.addEntity(entitysilverfish, SpawnReason.SILVERFISH_BLOCK); // CraftBukkit - add SpawnReason
             entitysilverfish.y();
         }
@@ -69,7 +69,7 @@ public class BlockMonsterEggs extends Block {
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((BlockMonsterEggs.EnumMonsterEggVarient) iblockdata.get(BlockMonsterEggs.VARIANT)).a();
+        return iblockdata.get(BlockMonsterEggs.VARIANT).a();
     }
 
     protected BlockStateList getStateList() {
@@ -83,32 +83,27 @@ public class BlockMonsterEggs extends Block {
         static {
             try {
                 BlockMonsterEggs.SyntheticClass_1.a[BlockMonsterEggs.EnumMonsterEggVarient.COBBLESTONE.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMonsterEggs.SyntheticClass_1.a[BlockMonsterEggs.EnumMonsterEggVarient.STONEBRICK.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMonsterEggs.SyntheticClass_1.a[BlockMonsterEggs.EnumMonsterEggVarient.MOSSY_STONEBRICK.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMonsterEggs.SyntheticClass_1.a[BlockMonsterEggs.EnumMonsterEggVarient.CRACKED_STONEBRICK.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockMonsterEggs.SyntheticClass_1.a[BlockMonsterEggs.EnumMonsterEggVarient.CHISELED_STONEBRICK.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
@@ -116,28 +111,28 @@ public class BlockMonsterEggs extends Block {
 
     public static enum EnumMonsterEggVarient implements INamable {
 
-        STONE(0, "stone") {;
+        STONE(0, "stone") {
             public IBlockData d() {
                 return Blocks.STONE.getBlockData().set(BlockStone.VARIANT, BlockStone.EnumStoneVariant.STONE);
             }
-        }, COBBLESTONE(1, "cobblestone", "cobble") {;
-    public IBlockData d() {
+        }, COBBLESTONE(1, "cobblestone", "cobble") {
+            public IBlockData d() {
         return Blocks.COBBLESTONE.getBlockData();
     }
-}, STONEBRICK(2, "stone_brick", "brick") {;
-    public IBlockData d() {
+}, STONEBRICK(2, "stone_brick", "brick") {
+            public IBlockData d() {
         return Blocks.STONEBRICK.getBlockData().set(BlockSmoothBrick.VARIANT, BlockSmoothBrick.EnumStonebrickType.DEFAULT);
     }
-}, MOSSY_STONEBRICK(3, "mossy_brick", "mossybrick") {;
-    public IBlockData d() {
+}, MOSSY_STONEBRICK(3, "mossy_brick", "mossybrick") {
+            public IBlockData d() {
         return Blocks.STONEBRICK.getBlockData().set(BlockSmoothBrick.VARIANT, BlockSmoothBrick.EnumStonebrickType.MOSSY);
     }
-}, CRACKED_STONEBRICK(4, "cracked_brick", "crackedbrick") {;
-    public IBlockData d() {
+}, CRACKED_STONEBRICK(4, "cracked_brick", "crackedbrick") {
+            public IBlockData d() {
         return Blocks.STONEBRICK.getBlockData().set(BlockSmoothBrick.VARIANT, BlockSmoothBrick.EnumStonebrickType.CRACKED);
     }
-}, CHISELED_STONEBRICK(5, "chiseled_brick", "chiseledbrick") {;
-    public IBlockData d() {
+}, CHISELED_STONEBRICK(5, "chiseled_brick", "chiseledbrick") {
+            public IBlockData d() {
         return Blocks.STONEBRICK.getBlockData().set(BlockSmoothBrick.VARIANT, BlockSmoothBrick.EnumStonebrickType.CHISELED);
     }
 };
@@ -187,9 +182,7 @@ public class BlockMonsterEggs extends Block {
             BlockMonsterEggs.EnumMonsterEggVarient[] ablockmonstereggs_enummonstereggvarient = values();
             int i = ablockmonstereggs_enummonstereggvarient.length;
 
-            for (int j = 0; j < i; ++j) {
-                BlockMonsterEggs.EnumMonsterEggVarient blockmonstereggs_enummonstereggvarient = ablockmonstereggs_enummonstereggvarient[j];
-
+            for (EnumMonsterEggVarient blockmonstereggs_enummonstereggvarient : ablockmonstereggs_enummonstereggvarient) {
                 if (iblockdata == blockmonstereggs_enummonstereggvarient.d()) {
                     return blockmonstereggs_enummonstereggvarient;
                 }
@@ -210,10 +203,8 @@ public class BlockMonsterEggs extends Block {
             BlockMonsterEggs.EnumMonsterEggVarient[] ablockmonstereggs_enummonstereggvarient = values();
             int i = ablockmonstereggs_enummonstereggvarient.length;
 
-            for (int j = 0; j < i; ++j) {
-                BlockMonsterEggs.EnumMonsterEggVarient blockmonstereggs_enummonstereggvarient = ablockmonstereggs_enummonstereggvarient[j];
-
-                BlockMonsterEggs.EnumMonsterEggVarient.g[blockmonstereggs_enummonstereggvarient.a()] = blockmonstereggs_enummonstereggvarient;
+            for (EnumMonsterEggVarient blockmonstereggs_enummonstereggvarient : ablockmonstereggs_enummonstereggvarient) {
+                EnumMonsterEggVarient.g[blockmonstereggs_enummonstereggvarient.a()] = blockmonstereggs_enummonstereggvarient;
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMushroom.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMushroom.java
index 7cf7a08..567e839 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMushroom.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMushroom.java
@@ -23,10 +23,9 @@ public class BlockMushroom extends BlockPlant implements IBlockFragilePlantEleme
         if (random.nextInt(Math.max(1, (int) world.growthOdds / world.spigotConfig.mushroomModifier * 25)) == 0) { // Spigot            int i = 5;
             int i = 5;
             boolean flag = true;
-            Iterator iterator = BlockPosition.b(blockposition.a(-4, -1, -4), blockposition.a(4, 1, 4)).iterator();
 
-            while (iterator.hasNext()) {
-                BlockPosition blockposition1 = (BlockPosition) iterator.next();
+            for (BlockPosition.MutableBlockPosition mutableBlockPosition : BlockPosition.b(blockposition.a(-4, -1, -4), blockposition.a(4, 1, 4))) {
+                BlockPosition blockposition1 = mutableBlockPosition;
 
                 if (world.getType(blockposition1).getBlock() == this) {
                     --i;
@@ -77,7 +76,7 @@ public class BlockMushroom extends BlockPlant implements IBlockFragilePlantEleme
         if (blockposition.getY() >= 0 && blockposition.getY() < 256) {
             IBlockData iblockdata1 = world.getType(blockposition.down());
 
-            return iblockdata1.getBlock() == Blocks.MYCELIUM ? true : (iblockdata1.getBlock() == Blocks.DIRT && iblockdata1.get(BlockDirt.VARIANT) == BlockDirt.EnumDirtVariant.PODZOL ? true : world.k(blockposition) < 13 && this.c(iblockdata1.getBlock()));
+            return iblockdata1.getBlock() == Blocks.MYCELIUM || (iblockdata1.getBlock() == Blocks.DIRT && iblockdata1.get(BlockDirt.VARIANT) == BlockDirt.EnumDirtVariant.PODZOL || world.k(blockposition) < 13 && this.c(iblockdata1.getBlock()));
         } else {
             return false;
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMycel.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMycel.java
index d2bd4dd..d267725 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMycel.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockMycel.java
@@ -15,7 +15,7 @@ public class BlockMycel extends Block {
 
     protected BlockMycel() {
         super(Material.GRASS, MaterialMapColor.z);
-        this.j(this.blockStateList.getBlockData().set(BlockMycel.SNOWY, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockMycel.SNOWY, Boolean.FALSE));
         this.a(true);
         this.a(CreativeModeTab.b);
     }
@@ -23,7 +23,7 @@ public class BlockMycel extends Block {
     public IBlockData updateState(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition) {
         Block block = iblockaccess.getType(blockposition.up()).getBlock();
 
-        return iblockdata.set(BlockMycel.SNOWY, Boolean.valueOf(block == Blocks.SNOW || block == Blocks.SNOW_LAYER));
+        return iblockdata.set(BlockMycel.SNOWY, block == Blocks.SNOW || block == Blocks.SNOW_LAYER);
     }
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockNetherWart.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockNetherWart.java
index 374f06c..da53f87 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockNetherWart.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockNetherWart.java
@@ -8,7 +8,7 @@ public class BlockNetherWart extends BlockPlant {
 
     protected BlockNetherWart() {
         super(Material.PLANT, MaterialMapColor.D);
-        this.j(this.blockStateList.getBlockData().set(BlockNetherWart.AGE, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockNetherWart.AGE, 0));
         this.a(true);
         float f = 0.5F;
 
@@ -25,10 +25,10 @@ public class BlockNetherWart extends BlockPlant {
     }
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
-        int i = ((Integer) iblockdata.get(BlockNetherWart.AGE)).intValue();
+        int i = iblockdata.get(BlockNetherWart.AGE);
 
         if (i < 3 && random.nextInt(Math.max(1, (int) world.growthOdds / world.spigotConfig.wartModifier * 10)) == 0) { // Spigot
-            iblockdata = iblockdata.set(BlockNetherWart.AGE, Integer.valueOf(i + 1));
+            iblockdata = iblockdata.set(BlockNetherWart.AGE, i + 1);
             // world.setTypeAndData(blockposition, iblockdata, 2); // CraftBukkit
             org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(iblockdata)); // CraftBukkit
         }
@@ -40,7 +40,7 @@ public class BlockNetherWart extends BlockPlant {
         if (!world.isClientSide) {
             int j = 1;
 
-            if (((Integer) iblockdata.get(BlockNetherWart.AGE)).intValue() >= 3) {
+            if (iblockdata.get(BlockNetherWart.AGE) >= 3) {
                 j = 2 + world.random.nextInt(3);
                 if (i > 0) {
                     j += world.random.nextInt(i + 1);
@@ -63,11 +63,11 @@ public class BlockNetherWart extends BlockPlant {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockNetherWart.AGE, Integer.valueOf(i));
+        return this.getBlockData().set(BlockNetherWart.AGE, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockNetherWart.AGE)).intValue();
+        return iblockdata.get(BlockNetherWart.AGE);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockOre.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockOre.java
index 4d97cdf..071323d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockOre.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockOre.java
@@ -22,7 +22,7 @@ public class BlockOre extends Block {
     }
 
     public int getDropCount(int i, Random random) {
-        if (i > 0 && Item.getItemOf(this) != this.getDropType((IBlockData) this.P().a().iterator().next(), random, i)) {
+        if (i > 0 && Item.getItemOf(this) != this.getDropType(this.P().a().iterator().next(), random, i)) {
             int j = random.nextInt(i + 2) - 1;
 
             if (j < 0) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPiston.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPiston.java
index 8426097..21c4885 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPiston.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPiston.java
@@ -4,9 +4,6 @@ import java.util.List;
 
 // CraftBukkit start
 import java.util.AbstractList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.ListIterator;
 
 import com.google.common.collect.ImmutableList;
 import org.bukkit.craftbukkit.block.CraftBlock;
@@ -24,7 +21,7 @@ public class BlockPiston extends Block {
 
     public BlockPiston(boolean flag) {
         super(Material.PISTON);
-        this.j(this.blockStateList.getBlockData().set(BlockPiston.FACING, EnumDirection.NORTH).set(BlockPiston.EXTENDED, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockPiston.FACING, EnumDirection.NORTH).set(BlockPiston.EXTENDED, Boolean.FALSE));
         this.sticky = flag;
         this.a(BlockPiston.i);
         this.c(0.5F);
@@ -58,18 +55,18 @@ public class BlockPiston extends Block {
     }
 
     public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) {
-        return this.getBlockData().set(BlockPiston.FACING, a(world, blockposition, entityliving)).set(BlockPiston.EXTENDED, Boolean.valueOf(false));
+        return this.getBlockData().set(BlockPiston.FACING, a(world, blockposition, entityliving)).set(BlockPiston.EXTENDED, Boolean.FALSE);
     }
 
     private void e(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockPiston.FACING);
+        EnumDirection enumdirection = iblockdata.get(BlockPiston.FACING);
         boolean flag = this.a(world, blockposition, enumdirection);
 
-        if (flag && !((Boolean) iblockdata.get(BlockPiston.EXTENDED)).booleanValue()) {
+        if (flag && !(Boolean) iblockdata.get(BlockPiston.EXTENDED)) {
             if ((new PistonExtendsChecker(world, blockposition, enumdirection, true)).a()) {
                 world.playBlockAction(blockposition, this, 0, enumdirection.a());
             }
-        } else if (!flag && ((Boolean) iblockdata.get(BlockPiston.EXTENDED)).booleanValue()) {
+        } else if (!flag && iblockdata.get(BlockPiston.EXTENDED)) {
             // CraftBukkit start
             if (!this.sticky) {
                 org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
@@ -81,7 +78,7 @@ public class BlockPiston extends Block {
                 }
             }
             // CraftBukkit end
-            world.setTypeAndData(blockposition, iblockdata.set(BlockPiston.EXTENDED, Boolean.valueOf(false)), 2);
+            world.setTypeAndData(blockposition, iblockdata.set(BlockPiston.EXTENDED, Boolean.FALSE), 2);
             world.playBlockAction(blockposition, this, 1, enumdirection.a());
         }
 
@@ -120,13 +117,13 @@ public class BlockPiston extends Block {
     }
 
     public boolean a(World world, BlockPosition blockposition, IBlockData iblockdata, int i, int j) {
-        EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockPiston.FACING);
+        EnumDirection enumdirection = iblockdata.get(BlockPiston.FACING);
 
         if (!world.isClientSide) {
             boolean flag = this.a(world, blockposition, enumdirection);
 
             if (flag && i == 1) {
-                world.setTypeAndData(blockposition, iblockdata.set(BlockPiston.EXTENDED, Boolean.valueOf(true)), 2);
+                world.setTypeAndData(blockposition, iblockdata.set(BlockPiston.EXTENDED, Boolean.TRUE), 2);
                 return false;
             }
 
@@ -140,7 +137,7 @@ public class BlockPiston extends Block {
                 return false;
             }
 
-            world.setTypeAndData(blockposition, iblockdata.set(BlockPiston.EXTENDED, Boolean.valueOf(true)), 2);
+            world.setTypeAndData(blockposition, iblockdata.set(BlockPiston.EXTENDED, Boolean.TRUE), 2);
             world.makeSound((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, "tile.piston.out", 0.5F, world.random.nextFloat() * 0.25F + 0.6F);
         } else if (i == 1) {
             TileEntity tileentity = world.getTileEntity(blockposition.shift(enumdirection));
@@ -185,9 +182,9 @@ public class BlockPiston extends Block {
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
         IBlockData iblockdata = iblockaccess.getType(blockposition);
 
-        if (iblockdata.getBlock() == this && ((Boolean) iblockdata.get(BlockPiston.EXTENDED)).booleanValue()) {
+        if (iblockdata.getBlock() == this && iblockdata.get(BlockPiston.EXTENDED)) {
             float f = 0.25F;
-            EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockPiston.FACING);
+            EnumDirection enumdirection = iblockdata.get(BlockPiston.FACING);
 
             if (enumdirection != null) {
                 switch (BlockPiston.SyntheticClass_1.a[enumdirection.ordinal()]) {
@@ -284,7 +281,7 @@ public class BlockPiston extends Block {
 
                         return true;
                     }
-                } else if (((Boolean) world.getType(blockposition).get(BlockPiston.EXTENDED)).booleanValue()) {
+                } else if (world.getType(blockposition).get(BlockPiston.EXTENDED)) {
                     return false;
                 }
 
@@ -327,7 +324,7 @@ public class BlockPiston extends Block {
                     if (index >= size() || index < 0) {
                         throw new ArrayIndexOutOfBoundsException(index);
                     }
-                    BlockPosition pos = (BlockPosition) (index < moved.size() ? moved.get(index) : broken.get(index - moved.size()));
+                    BlockPosition pos = index < moved.size() ? moved.get(index) : broken.get(index - moved.size());
                     return bblock.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
                 }
             };
@@ -417,14 +414,14 @@ public class BlockPiston extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockPiston.FACING, b(i)).set(BlockPiston.EXTENDED, Boolean.valueOf((i & 8) > 0));
+        return this.getBlockData().set(BlockPiston.FACING, b(i)).set(BlockPiston.EXTENDED, (i & 8) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((EnumDirection) iblockdata.get(BlockPiston.FACING)).a();
+        int i = b0 | iblockdata.get(BlockPiston.FACING).a();
 
-        if (((Boolean) iblockdata.get(BlockPiston.EXTENDED)).booleanValue()) {
+        if (iblockdata.get(BlockPiston.EXTENDED)) {
             i |= 8;
         }
 
@@ -442,38 +439,32 @@ public class BlockPiston extends Block {
         static {
             try {
                 BlockPiston.SyntheticClass_1.a[EnumDirection.DOWN.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPiston.SyntheticClass_1.a[EnumDirection.UP.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPiston.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPiston.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPiston.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPiston.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror5) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPlant.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPlant.java
index c111024..8b84846 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPlant.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPlant.java
@@ -2,7 +2,6 @@ package net.minecraft.server;
 
 import java.util.Random;
 // CraftBukkit start
-import org.bukkit.craftbukkit.util.CraftMagicNumbers;
 import org.bukkit.event.block.BlockPhysicsEvent;
 // CraftBukkit end
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPortal.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPortal.java
index 170f776..8295565 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPortal.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPortal.java
@@ -23,8 +23,7 @@ public class BlockPortal extends BlockHalfTransparent {
 
             BlockPosition blockposition1;
 
-            for (blockposition1 = blockposition; !World.a((IBlockAccess) world, blockposition1) && blockposition1.getY() > 0; blockposition1 = blockposition1.down()) {
-                ;
+            for (blockposition1 = blockposition; !World.a(world, blockposition1) && blockposition1.getY() > 0; blockposition1 = blockposition1.down()) {
             }
 
             if (i > 0 && !world.getType(blockposition1.up()).getBlock().isOccluding()) {
@@ -44,7 +43,7 @@ public class BlockPortal extends BlockHalfTransparent {
     }
 
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
-        EnumDirection.EnumAxis enumdirection_enumaxis = (EnumDirection.EnumAxis) iblockaccess.getType(blockposition).get(BlockPortal.AXIS);
+        EnumDirection.EnumAxis enumdirection_enumaxis = iblockaccess.getType(blockposition).get(BlockPortal.AXIS);
         float f = 0.125F;
         float f1 = 0.125F;
 
@@ -88,7 +87,7 @@ public class BlockPortal extends BlockHalfTransparent {
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
-        EnumDirection.EnumAxis enumdirection_enumaxis = (EnumDirection.EnumAxis) iblockdata.get(BlockPortal.AXIS);
+        EnumDirection.EnumAxis enumdirection_enumaxis = iblockdata.get(BlockPortal.AXIS);
         BlockPortal.Shape blockportal_shape;
 
         if (enumdirection_enumaxis == EnumDirection.EnumAxis.X) {
@@ -125,7 +124,7 @@ public class BlockPortal extends BlockHalfTransparent {
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return a((EnumDirection.EnumAxis) iblockdata.get(BlockPortal.AXIS));
+        return a(iblockdata.get(BlockPortal.AXIS));
     }
 
     protected BlockStateList getStateList() {
@@ -195,7 +194,7 @@ public class BlockPortal extends BlockHalfTransparent {
         private BlockPosition position;
         private int height;
         private int width;
-        java.util.Collection blocks = new java.util.HashSet(); // CraftBukkit - add field
+        java.util.Collection blocks = new java.util.HashSet<>(); // CraftBukkit - add field
 
         public Shape(World world, BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) {
             this.a = world;
@@ -209,7 +208,6 @@ public class BlockPortal extends BlockHalfTransparent {
             }
 
             for (BlockPosition blockposition1 = blockposition; blockposition.getY() > blockposition1.getY() - 21 && blockposition.getY() > 0 && this.a(world.getType(blockposition.down()).getBlock()); blockposition = blockposition.down()) {
-                ;
             }
 
             int i = this.a(blockposition, this.d) - 1;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPoweredRail.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPoweredRail.java
index 43a400f..4d5e581 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPoweredRail.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPoweredRail.java
@@ -19,7 +19,7 @@ public class BlockPoweredRail extends BlockMinecartTrackAbstract {
 
     protected BlockPoweredRail() {
         super(true);
-        this.j(this.blockStateList.getBlockData().set(BlockPoweredRail.SHAPE, BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH).set(BlockPoweredRail.POWERED, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockPoweredRail.SHAPE, BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH).set(BlockPoweredRail.POWERED, Boolean.FALSE));
     }
 
     protected boolean a(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag, int i) {
@@ -30,7 +30,7 @@ public class BlockPoweredRail extends BlockMinecartTrackAbstract {
             int k = blockposition.getY();
             int l = blockposition.getZ();
             boolean flag1 = true;
-            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = (BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(BlockPoweredRail.SHAPE);
+            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.get(BlockPoweredRail.SHAPE);
 
             switch (BlockPoweredRail.SyntheticClass_1.a[blockminecarttrackabstract_enumtrackposition.ordinal()]) {
             case 1:
@@ -97,7 +97,7 @@ public class BlockPoweredRail extends BlockMinecartTrackAbstract {
                 blockminecarttrackabstract_enumtrackposition = BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH;
             }
 
-            return this.a(world, new BlockPosition(j, k, l), flag, i, blockminecarttrackabstract_enumtrackposition) ? true : flag1 && this.a(world, new BlockPosition(j, k - 1, l), flag, i, blockminecarttrackabstract_enumtrackposition);
+            return this.a(world, new BlockPosition(j, k, l), flag, i, blockminecarttrackabstract_enumtrackposition) || flag1 && this.a(world, new BlockPosition(j, k - 1, l), flag, i, blockminecarttrackabstract_enumtrackposition);
         }
     }
 
@@ -107,27 +107,27 @@ public class BlockPoweredRail extends BlockMinecartTrackAbstract {
         if (iblockdata.getBlock() != this) {
             return false;
         } else {
-            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition1 = (BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(BlockPoweredRail.SHAPE);
+            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition1 = iblockdata.get(BlockPoweredRail.SHAPE);
 
-            return blockminecarttrackabstract_enumtrackposition == BlockMinecartTrackAbstract.EnumTrackPosition.EAST_WEST && (blockminecarttrackabstract_enumtrackposition1 == BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH || blockminecarttrackabstract_enumtrackposition1 == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_NORTH || blockminecarttrackabstract_enumtrackposition1 == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_SOUTH) ? false : (blockminecarttrackabstract_enumtrackposition == BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH && (blockminecarttrackabstract_enumtrackposition1 == BlockMinecartTrackAbstract.EnumTrackPosition.EAST_WEST || blockminecarttrackabstract_enumtrackposition1 == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_EAST || blockminecarttrackabstract_enumtrackposition1 == BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_WEST) ? false : (((Boolean) iblockdata.get(BlockPoweredRail.POWERED)).booleanValue() ? (world.isBlockIndirectlyPowered(blockposition) ? true : this.a(world, blockposition, iblockdata, flag, i + 1)) : false));
+            return (blockminecarttrackabstract_enumtrackposition != EnumTrackPosition.EAST_WEST || (blockminecarttrackabstract_enumtrackposition1 != EnumTrackPosition.NORTH_SOUTH && blockminecarttrackabstract_enumtrackposition1 != EnumTrackPosition.ASCENDING_NORTH && blockminecarttrackabstract_enumtrackposition1 != EnumTrackPosition.ASCENDING_SOUTH)) && ((blockminecarttrackabstract_enumtrackposition != EnumTrackPosition.NORTH_SOUTH || (blockminecarttrackabstract_enumtrackposition1 != EnumTrackPosition.EAST_WEST && blockminecarttrackabstract_enumtrackposition1 != EnumTrackPosition.ASCENDING_EAST && blockminecarttrackabstract_enumtrackposition1 != EnumTrackPosition.ASCENDING_WEST)) && (iblockdata.get(BlockPoweredRail.POWERED) && (world.isBlockIndirectlyPowered(blockposition) || this.a(world, blockposition, iblockdata, flag, i + 1))));
         }
     }
 
     protected void b(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
-        boolean flag = ((Boolean) iblockdata.get(BlockPoweredRail.POWERED)).booleanValue();
+        boolean flag = iblockdata.get(BlockPoweredRail.POWERED);
         boolean flag1 = world.isBlockIndirectlyPowered(blockposition) || this.a(world, blockposition, iblockdata, true, 0) || this.a(world, blockposition, iblockdata, false, 0);
 
         if (flag1 != flag) {
             // CraftBukkit start
-            int power = (Boolean)iblockdata.get(POWERED) ? 15 : 0;
+            int power = iblockdata.get(POWERED) ? 15 : 0;
             int newPower = CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), power, 15 - power).getNewCurrent();
             if (newPower == power) {
                 return;
             }
             // CraftBukkit end
-            world.setTypeAndData(blockposition, iblockdata.set(BlockPoweredRail.POWERED, Boolean.valueOf(flag1)), 3);
+            world.setTypeAndData(blockposition, iblockdata.set(BlockPoweredRail.POWERED, flag1), 3);
             world.applyPhysics(blockposition.down(), this);
-            if (((BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(BlockPoweredRail.SHAPE)).c()) {
+            if (iblockdata.get(BlockPoweredRail.SHAPE).c()) {
                 world.applyPhysics(blockposition.up(), this);
             }
         }
@@ -139,14 +139,14 @@ public class BlockPoweredRail extends BlockMinecartTrackAbstract {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockPoweredRail.SHAPE, BlockMinecartTrackAbstract.EnumTrackPosition.a(i & 7)).set(BlockPoweredRail.POWERED, Boolean.valueOf((i & 8) > 0));
+        return this.getBlockData().set(BlockPoweredRail.SHAPE, BlockMinecartTrackAbstract.EnumTrackPosition.a(i & 7)).set(BlockPoweredRail.POWERED, (i & 8) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(BlockPoweredRail.SHAPE)).a();
+        int i = b0 | iblockdata.get(BlockPoweredRail.SHAPE).a();
 
-        if (((Boolean) iblockdata.get(BlockPoweredRail.POWERED)).booleanValue()) {
+        if (iblockdata.get(BlockPoweredRail.POWERED)) {
             i |= 8;
         }
 
@@ -164,38 +164,32 @@ public class BlockPoweredRail extends BlockMinecartTrackAbstract {
         static {
             try {
                 BlockPoweredRail.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPoweredRail.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.EAST_WEST.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPoweredRail.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_EAST.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPoweredRail.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_WEST.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPoweredRail.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_NORTH.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPoweredRail.SyntheticClass_1.a[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_SOUTH.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror5) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateAbstract.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateAbstract.java
index 6da1fcc..893ff0c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateAbstract.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateAbstract.java
@@ -69,7 +69,7 @@ public abstract class BlockPressurePlateAbstract extends Block {
     }
 
     private boolean m(World world, BlockPosition blockposition) {
-        return World.a((IBlockAccess) world, blockposition) || world.getType(blockposition).getBlock() instanceof BlockFence;
+        return World.a(world, blockposition) || world.getType(blockposition).getBlock() instanceof BlockFence;
     }
 
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {}
@@ -128,7 +128,7 @@ public abstract class BlockPressurePlateAbstract extends Block {
         }
 
         if (flag1) {
-            world.a(blockposition, (Block) this, this.a(world));
+            world.a(blockposition, this, this.a(world));
         }
 
     }
@@ -136,7 +136,7 @@ public abstract class BlockPressurePlateAbstract extends Block {
     protected AxisAlignedBB getBoundingBox(BlockPosition blockposition) {
         float f = 0.125F;
 
-        return new AxisAlignedBB((double) ((float) blockposition.getX() + 0.125F), (double) blockposition.getY(), (double) ((float) blockposition.getZ() + 0.125F), (double) ((float) (blockposition.getX() + 1) - 0.125F), (double) blockposition.getY() + 0.25D, (double) ((float) (blockposition.getZ() + 1) - 0.125F));
+        return new AxisAlignedBB((float) blockposition.getX() + 0.125F, blockposition.getY(), (float) blockposition.getZ() + 0.125F, (float) (blockposition.getX() + 1) - 0.125F, (double) blockposition.getY() + 0.25D, (float) (blockposition.getZ() + 1) - 0.125F);
     }
 
     public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
index ada3875..2f55d00 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java
@@ -12,16 +12,16 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
 
     protected BlockPressurePlateBinary(Material material, BlockPressurePlateBinary.EnumMobType blockpressureplatebinary_enummobtype) {
         super(material);
-        this.j(this.blockStateList.getBlockData().set(BlockPressurePlateBinary.POWERED, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockPressurePlateBinary.POWERED, Boolean.FALSE));
         this.b = blockpressureplatebinary_enummobtype;
     }
 
     protected int e(IBlockData iblockdata) {
-        return ((Boolean) iblockdata.get(BlockPressurePlateBinary.POWERED)).booleanValue() ? 15 : 0;
+        return iblockdata.get(BlockPressurePlateBinary.POWERED) ? 15 : 0;
     }
 
     protected IBlockData a(IBlockData iblockdata, int i) {
-        return iblockdata.set(BlockPressurePlateBinary.POWERED, Boolean.valueOf(i > 0));
+        return iblockdata.set(BlockPressurePlateBinary.POWERED, i > 0);
     }
 
     protected int f(World world, BlockPosition blockposition) {
@@ -30,7 +30,7 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
 
         switch (BlockPressurePlateBinary.SyntheticClass_1.a[this.b.ordinal()]) {
         case 1:
-            list = world.getEntities((Entity) null, axisalignedbb);
+            list = world.getEntities(null, axisalignedbb);
             break;
 
         case 2:
@@ -42,10 +42,9 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
         }
 
         if (!list.isEmpty()) {
-            Iterator iterator = list.iterator();
 
-            while (iterator.hasNext()) {
-                Entity entity = (Entity) iterator.next();
+            for (Object value : list) {
+                Entity entity = (Entity) value;
 
                 // CraftBukkit start - Call interact event when turning on a pressure plate
                 if (this.e(world.getType(blockposition)) == 0) {
@@ -77,11 +76,11 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockPressurePlateBinary.POWERED, Boolean.valueOf(i == 1));
+        return this.getBlockData().set(BlockPressurePlateBinary.POWERED, i == 1);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Boolean) iblockdata.get(BlockPressurePlateBinary.POWERED)).booleanValue() ? 1 : 0;
+        return iblockdata.get(BlockPressurePlateBinary.POWERED) ? 1 : 0;
     }
 
     protected BlockStateList getStateList() {
@@ -95,14 +94,12 @@ public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
         static {
             try {
                 BlockPressurePlateBinary.SyntheticClass_1.a[BlockPressurePlateBinary.EnumMobType.EVERYTHING.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockPressurePlateBinary.SyntheticClass_1.a[BlockPressurePlateBinary.EnumMobType.MOBS.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateWeighted.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateWeighted.java
index 5e96f9b..a1b356b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateWeighted.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateWeighted.java
@@ -13,7 +13,7 @@ public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
 
     protected BlockPressurePlateWeighted(Material material, int i, MaterialMapColor materialmapcolor) {
         super(material, materialmapcolor);
-        this.j(this.blockStateList.getBlockData().set(BlockPressurePlateWeighted.POWER, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockPressurePlateWeighted.POWER, 0));
         this.weight = i;
     }
 
@@ -21,11 +21,8 @@ public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
         // CraftBukkit start
         //int i = Math.min(world.a(Entity.class, this.a(blockposition)).size(), this.b);
         int i = 0;
-        java.util.Iterator iterator = world.a(Entity.class, this.getBoundingBox(blockposition)).iterator();
-
-        while (iterator.hasNext()) {
-            Entity entity = (Entity) iterator.next();
 
+        for (Entity entity : world.a(Entity.class, this.getBoundingBox(blockposition))) {
             org.bukkit.event.Cancellable cancellable;
 
             if (entity instanceof EntityHuman) {
@@ -54,11 +51,11 @@ public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
     }
 
     protected int e(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockPressurePlateWeighted.POWER)).intValue();
+        return iblockdata.get(BlockPressurePlateWeighted.POWER);
     }
 
     protected IBlockData a(IBlockData iblockdata, int i) {
-        return iblockdata.set(BlockPressurePlateWeighted.POWER, Integer.valueOf(i));
+        return iblockdata.set(BlockPressurePlateWeighted.POWER, i);
     }
 
     public int a(World world) {
@@ -66,11 +63,11 @@ public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockPressurePlateWeighted.POWER, Integer.valueOf(i));
+        return this.getBlockData().set(BlockPressurePlateWeighted.POWER, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockPressurePlateWeighted.POWER)).intValue();
+        return iblockdata.get(BlockPressurePlateWeighted.POWER);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPumpkin.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPumpkin.java
index 1295820..21b3cc2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPumpkin.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockPumpkin.java
@@ -4,7 +4,6 @@ import com.google.common.base.Predicate;
 
 // CraftBukkit start
 import org.bukkit.craftbukkit.util.BlockStateListPopulator;
-import org.bukkit.event.block.BlockRedstoneEvent;
 import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
 // CraftBukkit end
 
@@ -114,7 +113,7 @@ public class BlockPumpkin extends BlockDirectional {
     }
 
     public boolean canPlace(World world, BlockPosition blockposition) {
-        return world.getType(blockposition).getBlock().material.isReplaceable() && World.a((IBlockAccess) world, blockposition.down());
+        return world.getType(blockposition).getBlock().material.isReplaceable() && World.a(world, blockposition.down());
     }
 
     public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) {
@@ -126,7 +125,7 @@ public class BlockPumpkin extends BlockDirectional {
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((EnumDirection) iblockdata.get(BlockPumpkin.FACING)).b();
+        return iblockdata.get(BlockPumpkin.FACING).b();
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneLamp.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneLamp.java
index 4542b49..e132c4c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneLamp.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneLamp.java
@@ -36,7 +36,7 @@ public class BlockRedstoneLamp extends Block {
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
         if (!world.isClientSide) {
             if (this.a && !world.isBlockIndirectlyPowered(blockposition)) {
-                world.a(blockposition, (Block) this, 4);
+                world.a(blockposition, this, 4);
             } else if (!this.a && world.isBlockIndirectlyPowered(blockposition)) {
                 // CraftBukkit start
                 if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 0, 15).getNewCurrent() != 15) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneOre.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneOre.java
index 119354a..881de93 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneOre.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneOre.java
@@ -106,9 +106,8 @@ public class BlockRedstoneOre extends Block {
     @Override
     public int getExpDrop(World world, IBlockData data, int i) {
         if (this.getDropType(data, world.random, i) != Item.getItemOf(this)) {
-            int j = 1 + world.random.nextInt(5);
 
-            return j;
+            return 1 + world.random.nextInt(5);
         }
         return 0;
         // CraftBukkit end
@@ -119,9 +118,9 @@ public class BlockRedstoneOre extends Block {
         double d0 = 0.0625D;
 
         for (int i = 0; i < 6; ++i) {
-            double d1 = (double) ((float) blockposition.getX() + random.nextFloat());
-            double d2 = (double) ((float) blockposition.getY() + random.nextFloat());
-            double d3 = (double) ((float) blockposition.getZ() + random.nextFloat());
+            double d1 = (float) blockposition.getX() + random.nextFloat();
+            double d2 = (float) blockposition.getY() + random.nextFloat();
+            double d3 = (float) blockposition.getZ() + random.nextFloat();
 
             if (i == 0 && !world.getType(blockposition.up()).getBlock().c()) {
                 d2 = (double) blockposition.getY() + d0 + 1.0D;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneTorch.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
index ae64ebf..2627344 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneTorch.java
@@ -20,10 +20,7 @@ public class BlockRedstoneTorch extends BlockTorch {
 
         int i = 0;
 
-        for (java.util.Iterator iterator = list.iterator(); iterator
-                .hasNext();) {
-            BlockRedstoneTorch.RedstoneUpdateInfo blockredstonetorch_redstoneupdateinfo = iterator.next();
-
+        for (RedstoneUpdateInfo blockredstonetorch_redstoneupdateinfo : list) {
             if (blockredstonetorch_redstoneupdateinfo.a.equals(blockposition)) {
                 ++i;
                 if (i >= 8) {
@@ -63,9 +60,7 @@ public class BlockRedstoneTorch extends BlockTorch {
             EnumDirection[] aenumdirection = EnumDirection.values();
             int i = aenumdirection.length;
 
-            for (int j = 0; j < i; ++j) {
-                EnumDirection enumdirection = aenumdirection[j];
-
+            for (EnumDirection enumdirection : aenumdirection) {
                 world.applyPhysics(blockposition.shift(enumdirection), this);
             }
         }
@@ -89,9 +84,7 @@ public class BlockRedstoneTorch extends BlockTorch {
             EnumDirection[] aenumdirection = EnumDirection.values();
             int i = aenumdirection.length;
 
-            for (int j = 0; j < i; ++j) {
-                EnumDirection enumdirection = aenumdirection[j];
-
+            for (EnumDirection enumdirection : aenumdirection) {
                 world.applyPhysics(blockposition.shift(enumdirection), this);
             }
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 625ea6a..43a74b9 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -22,7 +22,7 @@ public class BlockRedstoneWire extends Block {
 
     public BlockRedstoneWire() {
         super(Material.ORIENTABLE);
-        this.j(this.blockStateList.getBlockData().set(BlockRedstoneWire.NORTH, BlockRedstoneWire.EnumRedstoneWireConnection.NONE).set(BlockRedstoneWire.EAST, BlockRedstoneWire.EnumRedstoneWireConnection.NONE).set(BlockRedstoneWire.SOUTH, BlockRedstoneWire.EnumRedstoneWireConnection.NONE).set(BlockRedstoneWire.WEST, BlockRedstoneWire.EnumRedstoneWireConnection.NONE).set(BlockRedstoneWire.POWER, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockRedstoneWire.NORTH, BlockRedstoneWire.EnumRedstoneWireConnection.NONE).set(BlockRedstoneWire.EAST, BlockRedstoneWire.EnumRedstoneWireConnection.NONE).set(BlockRedstoneWire.SOUTH, BlockRedstoneWire.EnumRedstoneWireConnection.NONE).set(BlockRedstoneWire.WEST, BlockRedstoneWire.EnumRedstoneWireConnection.NONE).set(BlockRedstoneWire.POWER, 0));
         this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.0625F, 1.0F);
     }
 
@@ -60,7 +60,7 @@ public class BlockRedstoneWire extends Block {
     }
 
     public boolean canPlace(World world, BlockPosition blockposition) {
-        return World.a((IBlockAccess) world, blockposition.down()) || world.getType(blockposition.down()).getBlock() == Blocks.GLOWSTONE;
+        return World.a(world, blockposition.down()) || world.getType(blockposition.down()).getBlock() == Blocks.GLOWSTONE;
     }
 
     private IBlockData e(World world, BlockPosition blockposition, IBlockData iblockdata) {
@@ -74,10 +74,8 @@ public class BlockRedstoneWire extends Block {
         }
         // Migot end
 
-        Iterator iterator = arraylist.iterator();
-
-        while (iterator.hasNext()) {
-            BlockPosition blockposition1 = (BlockPosition) iterator.next();
+        for (Object value : arraylist) {
+            BlockPosition blockposition1 = (BlockPosition) value;
 
             world.applyPhysics(blockposition1, this);
         }
@@ -87,7 +85,7 @@ public class BlockRedstoneWire extends Block {
 
     private IBlockData a(World world, BlockPosition blockposition, BlockPosition blockposition1, IBlockData iblockdata) {
         IBlockData iblockdata1 = iblockdata;
-        int i = ((Integer) iblockdata.get(BlockRedstoneWire.POWER)).intValue();
+        int i = iblockdata.get(BlockRedstoneWire.POWER);
         byte b0 = 0;
         int j = this.getPower(world, blockposition1, b0);
 
@@ -100,10 +98,8 @@ public class BlockRedstoneWire extends Block {
         }
 
         int l = 0;
-        Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
 
-        while (iterator.hasNext()) {
-            EnumDirection enumdirection = (EnumDirection) iterator.next();
+        for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
             BlockPosition blockposition2 = blockposition.shift(enumdirection);
             boolean flag = blockposition2.getX() != blockposition1.getX() || blockposition2.getZ() != blockposition1.getZ();
 
@@ -142,7 +138,7 @@ public class BlockRedstoneWire extends Block {
         // CraftBukkit end
 
         if (i != j) {
-            iblockdata = iblockdata.set(BlockRedstoneWire.POWER, Integer.valueOf(j));
+            iblockdata = iblockdata.set(BlockRedstoneWire.POWER, j);
             if (world.getType(blockposition) == iblockdata1) {
                 world.setTypeAndData(blockposition, iblockdata, 2);
             }
@@ -162,9 +158,7 @@ public class BlockRedstoneWire extends Block {
             EnumDirection[] aenumdirection = EnumDirection.values();
             int i1 = aenumdirection.length;
 
-            for (int j1 = 0; j1 < i1; ++j1) {
-                EnumDirection enumdirection1 = aenumdirection[j1];
-
+            for (EnumDirection enumdirection1 : aenumdirection) {
                 this.R.add(blockposition.shift(enumdirection1));
             }
         }
@@ -189,9 +183,7 @@ public class BlockRedstoneWire extends Block {
             EnumDirection[] aenumdirection = EnumDirection.values();
             int i = aenumdirection.length;
 
-            for (int j = 0; j < i; ++j) {
-                EnumDirection enumdirection = aenumdirection[j];
-
+            for (EnumDirection enumdirection : aenumdirection) {
                 world.applyPhysics(blockposition.shift(enumdirection), this);
             }
 
@@ -239,9 +231,7 @@ public class BlockRedstoneWire extends Block {
             EnumDirection[] aenumdirection = EnumDirection.values();
             int i = aenumdirection.length;
 
-            for (int j = 0; j < i; ++j) {
-                EnumDirection enumdirection = aenumdirection[j];
-
+            for (EnumDirection enumdirection : aenumdirection) {
                 world.applyPhysics(blockposition.shift(enumdirection), this);
             }
 
@@ -275,7 +265,7 @@ public class BlockRedstoneWire extends Block {
         if (world.getType(blockposition).getBlock() != this) {
             return i;
         } else {
-            int j = ((Integer) world.getType(blockposition).get(BlockRedstoneWire.POWER)).intValue();
+            int j = world.getType(blockposition).get(BlockRedstoneWire.POWER);
 
             return j > i ? j : i;
         }
@@ -305,7 +295,7 @@ public class BlockRedstoneWire extends Block {
         if (!this.Q) {
             return 0;
         } else {
-            int i = ((Integer) iblockdata.get(BlockRedstoneWire.POWER)).intValue();
+            int i = iblockdata.get(BlockRedstoneWire.POWER);
 
             if (i == 0) {
                 return 0;
@@ -313,11 +303,8 @@ public class BlockRedstoneWire extends Block {
                 return i;
             } else {
                 EnumSet enumset = EnumSet.noneOf(EnumDirection.class);
-                Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
-
-                while (iterator.hasNext()) {
-                    EnumDirection enumdirection1 = (EnumDirection) iterator.next();
 
+                for (EnumDirection enumdirection1 : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
                     if (this.d(iblockaccess, blockposition, enumdirection1)) {
                         enumset.add(enumdirection1);
                     }
@@ -341,7 +328,7 @@ public class BlockRedstoneWire extends Block {
         boolean flag = block.isOccluding();
         boolean flag1 = iblockaccess.getType(blockposition.up()).getBlock().isOccluding();
 
-        return !flag1 && flag && e(iblockaccess, blockposition1.up()) ? true : (a(iblockdata, enumdirection) ? true : (block == Blocks.POWERED_REPEATER && iblockdata.get(BlockDiodeAbstract.FACING) == enumdirection ? true : !flag && e(iblockaccess, blockposition1.down())));
+        return !flag1 && flag && e(iblockaccess, blockposition1.up()) || (a(iblockdata, enumdirection) || (block == Blocks.POWERED_REPEATER && iblockdata.get(BlockDiodeAbstract.FACING) == enumdirection || !flag && e(iblockaccess, blockposition1.down())));
     }
 
     protected static boolean e(IBlockAccess iblockaccess, BlockPosition blockposition) {
@@ -349,7 +336,7 @@ public class BlockRedstoneWire extends Block {
     }
 
     protected static boolean d(IBlockData iblockdata) {
-        return a(iblockdata, (EnumDirection) null);
+        return a(iblockdata, null);
     }
 
     protected static boolean a(IBlockData iblockdata, EnumDirection enumdirection) {
@@ -358,7 +345,7 @@ public class BlockRedstoneWire extends Block {
         if (block == Blocks.REDSTONE_WIRE) {
             return true;
         } else if (Blocks.UNPOWERED_REPEATER.e(block)) {
-            EnumDirection enumdirection1 = (EnumDirection) iblockdata.get(BlockRepeater.FACING);
+            EnumDirection enumdirection1 = iblockdata.get(BlockRepeater.FACING);
 
             return enumdirection1 == enumdirection || enumdirection1.opposite() == enumdirection;
         } else {
@@ -371,11 +358,11 @@ public class BlockRedstoneWire extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockRedstoneWire.POWER, Integer.valueOf(i));
+        return this.getBlockData().set(BlockRedstoneWire.POWER, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockRedstoneWire.POWER)).intValue();
+        return iblockdata.get(BlockRedstoneWire.POWER);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockReed.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockReed.java
index 337f2c4..a779c7c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockReed.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockReed.java
@@ -9,7 +9,7 @@ public class BlockReed extends Block {
 
     protected BlockReed() {
         super(Material.PLANT);
-        this.j(this.blockStateList.getBlockData().set(BlockReed.AGE, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockReed.AGE, 0));
         float f = 0.375F;
 
         this.a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 1.0F, 0.5F + f);
@@ -22,21 +22,20 @@ public class BlockReed extends Block {
                 int i;
 
                 for (i = 1; world.getType(blockposition.down(i)).getBlock() == this; ++i) {
-                    ;
                 }
 
                 if (i < world.paperSpigotConfig.reedMaxHeight) { // PaperSpigot - Configurable max growth height for reed blocks) {
-                    int j = ((Integer) iblockdata.get(BlockReed.AGE)).intValue();
+                    int j = iblockdata.get(BlockReed.AGE);
 
                     if (j >= (byte) range(3, (world.growthOdds / world.spigotConfig.caneModifier * 15) + 0.5F, 15)) { // Spigot
                         // CraftBukkit start
                         // world.setTypeUpdate(blockposition.up(), this.getBlockData()); // CraftBukkit
                         BlockPosition upPos = blockposition.up();
                         org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, upPos.getX(), upPos.getY(), upPos.getZ(), this, 0);
-                        world.setTypeAndData(blockposition, iblockdata.set(BlockReed.AGE, Integer.valueOf(0)), 4);
+                        world.setTypeAndData(blockposition, iblockdata.set(BlockReed.AGE, 0), 4);
                         // CraftBukkit end
                     } else {
-                        world.setTypeAndData(blockposition, iblockdata.set(BlockReed.AGE, Integer.valueOf(j + 1)), 4);
+                        world.setTypeAndData(blockposition, iblockdata.set(BlockReed.AGE, j + 1), 4);
                     }
                 }
             }
@@ -103,11 +102,11 @@ public class BlockReed extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockReed.AGE, Integer.valueOf(i));
+        return this.getBlockData().set(BlockReed.AGE, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockReed.AGE)).intValue();
+        return iblockdata.get(BlockReed.AGE);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSapling.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSapling.java
index 45fbf5c..b48b8ed 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSapling.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSapling.java
@@ -18,7 +18,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
     public static TreeType treeType; // CraftBukkit
 
     protected BlockSapling() {
-        this.j(this.blockStateList.getBlockData().set(BlockSapling.TYPE, BlockWood.EnumLogVariant.OAK).set(BlockSapling.STAGE, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockSapling.TYPE, BlockWood.EnumLogVariant.OAK).set(BlockSapling.STAGE, 0));
         float f = 0.4F;
 
         this.a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f * 2.0F, 0.5F + f);
@@ -63,7 +63,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
     }
 
     public void grow(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
-        if (((Integer) iblockdata.get(BlockSapling.STAGE)).intValue() == 0) {
+        if (iblockdata.get(BlockSapling.STAGE) == 0) {
             world.setTypeAndData(blockposition, iblockdata.a(BlockSapling.STAGE), 4);
         } else {
             this.e(world, blockposition, iblockdata, random);
@@ -88,7 +88,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
         boolean flag = false;
         IBlockData iblockdata1;
 
-        switch (BlockSapling.SyntheticClass_1.a[((BlockWood.EnumLogVariant) iblockdata.get(BlockSapling.TYPE)).ordinal()]) {
+        switch (BlockSapling.SyntheticClass_1.a[iblockdata.get(BlockSapling.TYPE).ordinal()]) {
         case 1:
             label66:
             for (i = 0; i >= -1; --i) {
@@ -117,7 +117,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
 
         case 3:
             iblockdata1 = Blocks.LOG.getBlockData().set(BlockLog1.VARIANT, BlockWood.EnumLogVariant.JUNGLE);
-            IBlockData iblockdata2 = Blocks.LEAVES.getBlockData().set(BlockLeaves1.VARIANT, BlockWood.EnumLogVariant.JUNGLE).set(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
+            IBlockData iblockdata2 = Blocks.LEAVES.getBlockData().set(BlockLeaves1.VARIANT, BlockWood.EnumLogVariant.JUNGLE).set(BlockLeaves.CHECK_DECAY, Boolean.FALSE);
 
             label78:
             for (i = 0; i >= -1; --i) {
@@ -198,7 +198,7 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
     }
 
     public int getDropData(IBlockData iblockdata) {
-        return ((BlockWood.EnumLogVariant) iblockdata.get(BlockSapling.TYPE)).a();
+        return iblockdata.get(BlockSapling.TYPE).a();
     }
 
     public boolean a(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag) {
@@ -214,14 +214,14 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockSapling.TYPE, BlockWood.EnumLogVariant.a(i & 7)).set(BlockSapling.STAGE, Integer.valueOf((i & 8) >> 3));
+        return this.getBlockData().set(BlockSapling.TYPE, BlockWood.EnumLogVariant.a(i & 7)).set(BlockSapling.STAGE, (i & 8) >> 3);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((BlockWood.EnumLogVariant) iblockdata.get(BlockSapling.TYPE)).a();
+        int i = b0 | iblockdata.get(BlockSapling.TYPE).a();
 
-        i |= ((Integer) iblockdata.get(BlockSapling.STAGE)).intValue() << 3;
+        i |= iblockdata.get(BlockSapling.STAGE) << 3;
         return i;
     }
 
@@ -236,38 +236,32 @@ public class BlockSapling extends BlockPlant implements IBlockFragilePlantElemen
         static {
             try {
                 BlockSapling.SyntheticClass_1.a[BlockWood.EnumLogVariant.SPRUCE.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockSapling.SyntheticClass_1.a[BlockWood.EnumLogVariant.BIRCH.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockSapling.SyntheticClass_1.a[BlockWood.EnumLogVariant.JUNGLE.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockSapling.SyntheticClass_1.a[BlockWood.EnumLogVariant.ACACIA.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockSapling.SyntheticClass_1.a[BlockWood.EnumLogVariant.DARK_OAK.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockSapling.SyntheticClass_1.a[BlockWood.EnumLogVariant.OAK.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror5) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSkull.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSkull.java
index 95a1049..74673e4 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSkull.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSkull.java
@@ -27,7 +27,7 @@ public class BlockSkull extends BlockContainer {
 
     protected BlockSkull() {
         super(Material.ORIENTABLE);
-        this.j(this.blockStateList.getBlockData().set(BlockSkull.FACING, EnumDirection.NORTH).set(BlockSkull.NODROP, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockSkull.FACING, EnumDirection.NORTH).set(BlockSkull.NODROP, Boolean.FALSE));
         this.a(0.25F, 0.0F, 0.25F, 0.75F, 0.5F, 0.75F);
     }
 
@@ -44,7 +44,7 @@ public class BlockSkull extends BlockContainer {
     }
 
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
-        switch (BlockSkull.SyntheticClass_1.a[((EnumDirection) iblockaccess.getType(blockposition).get(BlockSkull.FACING)).ordinal()]) {
+        switch (BlockSkull.SyntheticClass_1.a[iblockaccess.getType(blockposition).get(BlockSkull.FACING).ordinal()]) {
         case 1:
         default:
             this.a(0.25F, 0.0F, 0.25F, 0.75F, 0.5F, 0.75F);
@@ -74,7 +74,7 @@ public class BlockSkull extends BlockContainer {
     }
 
     public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) {
-        return this.getBlockData().set(BlockSkull.FACING, entityliving.getDirection()).set(BlockSkull.NODROP, Boolean.valueOf(false));
+        return this.getBlockData().set(BlockSkull.FACING, entityliving.getDirection()).set(BlockSkull.NODROP, Boolean.FALSE);
     }
 
     public TileEntity a(World world, int i) {
@@ -109,7 +109,7 @@ public class BlockSkull extends BlockContainer {
 
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman) {
         if (entityhuman.abilities.canInstantlyBuild) {
-            iblockdata = iblockdata.set(BlockSkull.NODROP, Boolean.valueOf(true));
+            iblockdata = iblockdata.set(BlockSkull.NODROP, Boolean.TRUE);
             world.setTypeAndData(blockposition, iblockdata, 4);
         }
 
@@ -149,7 +149,7 @@ public class BlockSkull extends BlockContainer {
     }
 
     public boolean b(World world, BlockPosition blockposition, ItemStack itemstack) {
-        return itemstack.getData() == 1 && blockposition.getY() >= 2 && world.getDifficulty() != EnumDifficulty.PEACEFUL && !world.isClientSide ? this.l().a(world, blockposition) != null : false;
+        return itemstack.getData() == 1 && blockposition.getY() >= 2 && world.getDifficulty() != EnumDifficulty.PEACEFUL && !world.isClientSide && this.l().a(world, blockposition) != null;
     }
 
     public void a(World world, BlockPosition blockposition, TileEntitySkull tileentityskull) {
@@ -169,7 +169,7 @@ public class BlockSkull extends BlockContainer {
                     // CraftBukkit start
                     // world.setTypeAndData(shapedetectorblock.getPosition(), shapedetectorblock.a().set(BlockSkull.NODROP, Boolean.valueOf(true)), 2);
                     BlockPosition pos = shapedetectorblock.getPosition();
-                    IBlockData data = shapedetectorblock.a().set(BlockSkull.NODROP, Boolean.valueOf(true));
+                    IBlockData data = shapedetectorblock.a().set(BlockSkull.NODROP, Boolean.TRUE);
                     blockList.setTypeAndData(pos.getX(), pos.getY(), pos.getZ(), data.getBlock(), data.getBlock().toLegacyData(data), 2);
                     // CraftBukkit end
                 }
@@ -202,7 +202,7 @@ public class BlockSkull extends BlockContainer {
                 while (iterator.hasNext()) {
                     EntityHuman entityhuman = (EntityHuman) iterator.next();
 
-                    entityhuman.b((Statistic) AchievementList.I);
+                    entityhuman.b(AchievementList.I);
                 }
 
                 int k;
@@ -225,14 +225,14 @@ public class BlockSkull extends BlockContainer {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockSkull.FACING, EnumDirection.fromType1(i & 7)).set(BlockSkull.NODROP, Boolean.valueOf((i & 8) > 0));
+        return this.getBlockData().set(BlockSkull.FACING, EnumDirection.fromType1(i & 7)).set(BlockSkull.NODROP, (i & 8) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((EnumDirection) iblockdata.get(BlockSkull.FACING)).a();
+        int i = b0 | iblockdata.get(BlockSkull.FACING).a();
 
-        if (((Boolean) iblockdata.get(BlockSkull.NODROP)).booleanValue()) {
+        if (iblockdata.get(BlockSkull.NODROP)) {
             i |= 8;
         }
 
@@ -266,32 +266,27 @@ public class BlockSkull extends BlockContainer {
         static {
             try {
                 BlockSkull.SyntheticClass_1.a[EnumDirection.UP.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockSkull.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockSkull.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockSkull.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockSkull.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSnow.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSnow.java
index 03b1a8b..dc2f533 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSnow.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSnow.java
@@ -8,7 +8,7 @@ public class BlockSnow extends Block {
 
     protected BlockSnow() {
         super(Material.PACKED_ICE);
-        this.j(this.blockStateList.getBlockData().set(BlockSnow.LAYERS, Integer.valueOf(1)));
+        this.j(this.blockStateList.getBlockData().set(BlockSnow.LAYERS, 1));
         this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
         this.a(true);
         this.a(CreativeModeTab.c);
@@ -16,14 +16,14 @@ public class BlockSnow extends Block {
     }
 
     public boolean b(IBlockAccess iblockaccess, BlockPosition blockposition) {
-        return ((Integer) iblockaccess.getType(blockposition).get(BlockSnow.LAYERS)).intValue() < 5;
+        return iblockaccess.getType(blockposition).get(BlockSnow.LAYERS) < 5;
     }
 
     public AxisAlignedBB a(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        int i = ((Integer) iblockdata.get(BlockSnow.LAYERS)).intValue() - 1;
+        int i = iblockdata.get(BlockSnow.LAYERS) - 1;
         float f = 0.125F;
 
-        return new AxisAlignedBB((double) blockposition.getX() + this.minX, (double) blockposition.getY() + this.minY, (double) blockposition.getZ() + this.minZ, (double) blockposition.getX() + this.maxX, (double) ((float) blockposition.getY() + (float) i * f), (double) blockposition.getZ() + this.maxZ);
+        return new AxisAlignedBB((double) blockposition.getX() + this.minX, (double) blockposition.getY() + this.minY, (double) blockposition.getZ() + this.minZ, (double) blockposition.getX() + this.maxX, (float) blockposition.getY() + (float) i * f, (double) blockposition.getZ() + this.maxZ);
     }
 
     public boolean c() {
@@ -41,7 +41,7 @@ public class BlockSnow extends Block {
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
         IBlockData iblockdata = iblockaccess.getType(blockposition);
 
-        this.b(((Integer) iblockdata.get(BlockSnow.LAYERS)).intValue());
+        this.b(iblockdata.get(BlockSnow.LAYERS));
     }
 
     protected void b(int i) {
@@ -52,7 +52,7 @@ public class BlockSnow extends Block {
         IBlockData iblockdata = world.getType(blockposition.down());
         Block block = iblockdata.getBlock();
 
-        return block != Blocks.ICE && block != Blocks.PACKED_ICE ? (block.getMaterial() == Material.LEAVES ? true : (block == this && ((Integer) iblockdata.get(BlockSnow.LAYERS)).intValue() >= 7 ? true : block.c() && block.material.isSolid())) : false;
+        return block != Blocks.ICE && block != Blocks.PACKED_ICE && (block.getMaterial() == Material.LEAVES || (block == this && iblockdata.get(BlockSnow.LAYERS).intValue() >= 7 || block.c() && block.material.isSolid()));
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
@@ -70,7 +70,7 @@ public class BlockSnow extends Block {
     }
 
     public void a(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, TileEntity tileentity) {
-        a(world, blockposition, new ItemStack(Items.SNOWBALL, ((Integer) iblockdata.get(BlockSnow.LAYERS)).intValue() + 1, 0));
+        a(world, blockposition, new ItemStack(Items.SNOWBALL, iblockdata.get(BlockSnow.LAYERS) + 1, 0));
         world.setAir(blockposition);
         entityhuman.b(StatisticList.MINE_BLOCK_COUNT[Block.getId(this)]);
     }
@@ -97,15 +97,15 @@ public class BlockSnow extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockSnow.LAYERS, Integer.valueOf((i & 7) + 1));
+        return this.getBlockData().set(BlockSnow.LAYERS, (i & 7) + 1);
     }
 
     public boolean a(World world, BlockPosition blockposition) {
-        return ((Integer) world.getType(blockposition).get(BlockSnow.LAYERS)).intValue() == 1;
+        return world.getType(blockposition).get(BlockSnow.LAYERS) == 1;
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockSnow.LAYERS)).intValue() - 1;
+        return iblockdata.get(BlockSnow.LAYERS) - 1;
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSoil.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSoil.java
index 362a346..654bc70 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSoil.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockSoil.java
@@ -14,14 +14,14 @@ public class BlockSoil extends Block {
 
     protected BlockSoil() {
         super(Material.EARTH);
-        this.j(this.blockStateList.getBlockData().set(BlockSoil.MOISTURE, Integer.valueOf(0)));
+        this.j(this.blockStateList.getBlockData().set(BlockSoil.MOISTURE, 0));
         this.a(true);
         this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.9375F, 1.0F);
         this.e(255);
     }
 
     public AxisAlignedBB a(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        return new AxisAlignedBB((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 1), (double) (blockposition.getZ() + 1));
+        return new AxisAlignedBB(blockposition.getX(), blockposition.getY(), blockposition.getZ(), blockposition.getX() + 1, blockposition.getY() + 1, blockposition.getZ() + 1);
     }
 
     public boolean c() {
@@ -33,11 +33,11 @@ public class BlockSoil extends Block {
     }
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
-        int i = ((Integer) iblockdata.get(BlockSoil.MOISTURE)).intValue();
+        int i = iblockdata.get(BlockSoil.MOISTURE);
 
         if (!this.f(world, blockposition) && !world.isRainingAt(blockposition.up())) {
             if (i > 0) {
-                world.setTypeAndData(blockposition, iblockdata.set(BlockSoil.MOISTURE, Integer.valueOf(i - 1)), 2);
+                world.setTypeAndData(blockposition, iblockdata.set(BlockSoil.MOISTURE, i - 1), 2);
             } else if (!this.e(world, blockposition)) {
                 // CraftBukkit start
                 org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
@@ -48,7 +48,7 @@ public class BlockSoil extends Block {
                 world.setTypeUpdate(blockposition, Blocks.DIRT.getBlockData());
             }
         } else if (i < 7) {
-            world.setTypeAndData(blockposition, iblockdata.set(BlockSoil.MOISTURE, Integer.valueOf(7)), 2);
+            world.setTypeAndData(blockposition, iblockdata.set(BlockSoil.MOISTURE, 7), 2);
         }
 
     }
@@ -121,11 +121,11 @@ public class BlockSoil extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockSoil.MOISTURE, Integer.valueOf(i & 7));
+        return this.getBlockData().set(BlockSoil.MOISTURE, i & 7);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockSoil.MOISTURE)).intValue();
+        return iblockdata.get(BlockSoil.MOISTURE);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockState.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockState.java
index 17a1617..049019d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockState.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockState.java
@@ -3,7 +3,6 @@ package net.minecraft.server;
 import com.google.common.base.Objects;
 
 // TacoSpigot start
-import com.google.common.base.Preconditions;
 
 import net.techcable.tacospigot.BlockStateRegistry;
 // TacoSpigot end
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateBoolean.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateBoolean.java
index d6d9a22..4c9413d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateBoolean.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateBoolean.java
@@ -5,7 +5,7 @@ import java.util.Collection;
 
 public class BlockStateBoolean extends BlockState {
 
-    private final ImmutableSet a = ImmutableSet.of(Boolean.valueOf(true), Boolean.valueOf(false));
+    private final ImmutableSet a = ImmutableSet.of(Boolean.TRUE, Boolean.FALSE);
 
     protected BlockStateBoolean(String s) {
         super(s, Boolean.class);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateEnum.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateEnum.java
index ca38c59..9768ac5 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateEnum.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateEnum.java
@@ -18,11 +18,11 @@ public class BlockStateEnum & INamable> extends BlockState
     protected BlockStateEnum(String s, Class oclass, Collection collection) {
         super(s, oclass);
         this.a = ImmutableSet.copyOf(collection);
-        Iterator iterator = collection.iterator(); // TacoSpigot - generic iterator
+        // TacoSpigot - generic iterator
 
-        while (iterator.hasNext()) {
-            T oenum = iterator.next(); // TacoSpigot - generics
-            String s1 = ((INamable) oenum).getName();
+        // TacoSpigot - generics
+        for (T oenum : collection) {
+            String s1 = oenum.getName();
 
             if (this.b.containsKey(s1)) {
                 throw new IllegalArgumentException("Multiple values have the same name \'" + s1 + "\'");
@@ -37,7 +37,7 @@ public class BlockStateEnum & INamable> extends BlockState
         return this.a;
     }
     public String a(T t0) {
-        return ((INamable) t0).getName();
+        return t0.getName();
     }
 
     // TacoSpigot start
@@ -67,7 +67,7 @@ getValueId(T value) {
     }
 
     public static  & INamable> BlockStateEnum of(String s, Class oclass, T... at) {
-        return a(s, oclass, (Collection) Lists.newArrayList(at));
+        return a(s, oclass, Lists.newArrayList(at));
     }
 
     public static  & INamable> BlockStateEnum a(String s, Class oclass, Collection collection) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateInteger.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateInteger.java
index 13b7d37..f3660f1 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateInteger.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateInteger.java
@@ -50,7 +50,7 @@ public class BlockStateInteger extends BlockState {
             HashSet hashset = Sets.newHashSet();
 
             for (int k = i; k <= j; ++k) {
-                hashset.add(Integer.valueOf(k));
+                hashset.add(k);
             }
 
             this.a = ImmutableSet.copyOf(hashset);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateList.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateList.java
index fda9640..aae2034 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateList.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStateList.java
@@ -24,7 +24,6 @@ import java.util.Map;
 // TacoSpigot start
 import com.google.common.collect.Table;
 
-import net.techcable.tacospigot.BlockStateRegistry;
 import net.techcable.tacospigot.ImmutableArrayMap;
 import net.techcable.tacospigot.ImmutableArrayTable;
 import net.techcable.tacospigot.TacoSpigotConfig;
@@ -78,7 +77,7 @@ public class BlockStateList {
         while (iterator.hasNext()) {
             BlockStateList.BlockData blockstatelist_blockdata1 = (BlockStateList.BlockData) iterator.next();
 
-            blockstatelist_blockdata1.a((Map) linkedhashmap);
+            blockstatelist_blockdata1.a(linkedhashmap);
         }
 
         this.e = ImmutableList.copyOf(arraylist);
@@ -92,14 +91,14 @@ public class BlockStateList {
         ArrayList arraylist = Lists.newArrayList();
 
         for (int i = 0; i < this.d.size(); ++i) {
-            arraylist.add(((IBlockState) this.d.get(i)).c());
+            arraylist.add(this.d.get(i).c());
         }
 
         return arraylist;
     }
 
     public IBlockData getBlockData() {
-        return (IBlockData) this.e.get(0);
+        return this.e.get(0);
     }
 
     public Block getBlock() {
@@ -143,7 +142,7 @@ public class BlockStateList {
             // TacoSpigot start - runtime check -> assertion
             assert this.b.containsKey(iblockstate) : "Cannot get property " + iblockstate + " as it does not exist in " + this.a.P();
             Object value = this.b.get(iblockstate);
-            assert value == bAsImmutableMap.get(iblockstate) : "Array map gave data " + String.valueOf(value) + " and regular map gave data " + String.valueOf(bAsImmutableMap.get(iblockstate));
+            assert value == bAsImmutableMap.get(iblockstate) : "Array map gave data " + value + " and regular map gave data " + bAsImmutableMap.get(iblockstate);
             assert value != null : "Null value for state " + iblockstate + " and data " + this;
             assert iblockstate.b().isInstance(value) : "Value " + value + " for state " + iblockstate + " and data " + this + " not instanceof " + iblockstate.b().getTypeName();
             return (T) value;
@@ -156,7 +155,7 @@ public class BlockStateList {
             assert v0 != null : "Null value for block state " + iblockstate;
             assert this.b.containsKey(iblockstate) : "Cannot set property " + iblockstate + " as it does not exist in " + this.a.P();
             assert  iblockstate.c().contains(v0) : "Cannot set property " + iblockstate + " to " + v0 + " on block " + Block.REGISTRY.c(this.a) + ", it is not an allowed value";
-            IBlockData data = (IBlockData) (this.b.get(iblockstate) == v0 ? this : (IBlockData) this.c.get(iblockstate, v0));
+            IBlockData data = this.b.get(iblockstate) == v0 ? this : this.c.get(iblockstate, v0);
             assert data != null : "No block data with property " + iblockstate + " and value " + v0 + " for block data " + this;
             return data;
             // TacoSpigot end
@@ -183,14 +182,10 @@ public class BlockStateList {
                 throw new IllegalStateException();
             } else {
                 HashBasedTable hashbasedtable = HashBasedTable.create();
-                Iterator iterator = this.b.keySet().iterator();
 
-                while (iterator.hasNext()) {
-                    IBlockState iblockstate = (IBlockState) iterator.next();
-                    Iterator iterator1 = iblockstate.c().iterator();
-
-                    while (iterator1.hasNext()) {
-                        Comparable comparable = (Comparable) iterator1.next();
+                for (IBlockState iblockstate : this.b.keySet()) {
+                    for (Object o : iblockstate.c()) {
+                        Comparable comparable = (Comparable) o;
 
                         if (comparable != this.get(iblockstate)) { // TacoSpigot - use this.get(iblockstate) instead of this.b.get(iblockstate)
                             assert map.get(this.b(iblockstate, comparable)) != null : "Map doesn't contain block data with state " + iblockstate + " and comparable " + comparable + b(iblockstate, comparable); // TacoSpigot - assert present
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStationary.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStationary.java
index a4ff3f8..5c9bd07 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStationary.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStationary.java
@@ -26,7 +26,7 @@ public class BlockStationary extends BlockFluids {
         BlockFlowing blockflowing = a(this.material);
 
         world.setTypeAndData(blockposition, blockflowing.getBlockData().set(BlockStationary.LEVEL, iblockdata.get(BlockStationary.LEVEL)), 2);
-        world.a(blockposition, (Block) blockflowing, this.a(world));
+        world.a(blockposition, blockflowing, this.a(world));
     }
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
@@ -82,9 +82,7 @@ public class BlockStationary extends BlockFluids {
     protected boolean f(World world, BlockPosition blockposition) {
         int i = aenumdirection.length;
 
-        for (int j = 0; j < i; ++j) {
-            EnumDirection enumdirection = aenumdirection[j];
-
+        for (EnumDirection enumdirection : aenumdirection) {
             if (this.m(world, blockposition.shift(enumdirection))) {
                 return true;
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStem.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStem.java
index 0a6871b..4e37da2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStem.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockStem.java
@@ -21,7 +21,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
     private final Block blockFruit;
 
     protected BlockStem(Block block) {
-        this.j(this.blockStateList.getBlockData().set(BlockStem.AGE, Integer.valueOf(0)).set(BlockStem.FACING, EnumDirection.UP));
+        this.j(this.blockStateList.getBlockData().set(BlockStem.AGE, 0).set(BlockStem.FACING, EnumDirection.UP));
         this.blockFruit = block;
         this.a(true);
         float f = 0.125F;
@@ -32,11 +32,8 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
 
     public IBlockData updateState(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition) {
         iblockdata = iblockdata.set(BlockStem.FACING, EnumDirection.UP);
-        Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
-
-        while (iterator.hasNext()) {
-            EnumDirection enumdirection = (EnumDirection) iterator.next();
 
+        for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
             if (iblockaccess.getType(blockposition.shift(enumdirection)).getBlock() == this.blockFruit) {
                 iblockdata = iblockdata.set(BlockStem.FACING, enumdirection);
                 break;
@@ -53,21 +50,18 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
         super.b(world, blockposition, iblockdata, random);
         if (world.isLightLevel(blockposition.up(), 9)) { // Paper
-            float f = BlockCrops.a((Block) this, world, blockposition);
+            float f = BlockCrops.a(this, world, blockposition);
 
             if (random.nextInt((int) (world.growthOdds / (this == Blocks.PUMPKIN_STEM? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier) * (25.0F / f)) + 1) == 0) { // Spigot
-                int i = ((Integer) iblockdata.get(BlockStem.AGE)).intValue();
+                int i = iblockdata.get(BlockStem.AGE);
 
                 if (i < 7) {
-                    iblockdata = iblockdata.set(BlockStem.AGE, Integer.valueOf(i + 1));
+                    iblockdata = iblockdata.set(BlockStem.AGE, i + 1);
                     // world.setTypeAndData(blockposition, iblockdata, 2); // CraftBukkit
                     CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(iblockdata)); // CraftBukkit
                 } else {
-                    Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
-
-                    while (iterator.hasNext()) {
-                        EnumDirection enumdirection = (EnumDirection) iterator.next();
 
+                    for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
                         if (world.getType(blockposition.shift(enumdirection)).getBlock() == this.blockFruit) {
                             return;
                         }
@@ -87,7 +81,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
     }
 
     public void g(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        int i = ((Integer) iblockdata.get(BlockStem.AGE)).intValue() + MathHelper.nextInt(world.random, 2, 5);
+        int i = iblockdata.get(BlockStem.AGE) + MathHelper.nextInt(world.random, 2, 5);
 
         // world.setTypeAndData(blockposition, iblockdata.set(BlockStem.AGE, Integer.valueOf(Math.min(7, i))), 2);
         CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, Math.min(7, i)); // CraftBukkit
@@ -100,7 +94,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
     }
 
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
-        this.maxY = (double) ((float) (((Integer) iblockaccess.getType(blockposition).get(BlockStem.AGE)).intValue() * 2 + 2) / 16.0F);
+        this.maxY = (float) (iblockaccess.getType(blockposition).get(BlockStem.AGE) * 2 + 2) / 16.0F;
         float f = 0.125F;
 
         this.a(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, (float) this.maxY, 0.5F + f);
@@ -112,7 +106,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
             Item item = this.l();
 
             if (item != null) {
-                int j = ((Integer) iblockdata.get(BlockStem.AGE)).intValue();
+                int j = iblockdata.get(BlockStem.AGE);
 
                 for (int k = 0; k < 3; ++k) {
                     if (world.random.nextInt(15) <= j) {
@@ -133,7 +127,7 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
     }
 
     public boolean a(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag) {
-        return ((Integer) iblockdata.get(BlockStem.AGE)).intValue() != 7;
+        return iblockdata.get(BlockStem.AGE) != 7;
     }
 
     public boolean a(World world, Random random, BlockPosition blockposition, IBlockData iblockdata) {
@@ -145,11 +139,11 @@ public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockStem.AGE, Integer.valueOf(i));
+        return this.getBlockData().set(BlockStem.AGE, i);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Integer) iblockdata.get(BlockStem.AGE)).intValue();
+        return iblockdata.get(BlockStem.AGE);
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTNT.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTNT.java
index 3d1e583..22b896c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTNT.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTNT.java
@@ -6,14 +6,14 @@ public class BlockTNT extends Block {
 
     public BlockTNT() {
         super(Material.TNT);
-        this.j(this.blockStateList.getBlockData().set(BlockTNT.EXPLODE, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockTNT.EXPLODE, Boolean.FALSE));
         this.a(CreativeModeTab.d);
     }
 
     public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
         super.onPlace(world, blockposition, iblockdata);
         if (world.isBlockIndirectlyPowered(blockposition)) {
-            this.postBreak(world, blockposition, iblockdata.set(BlockTNT.EXPLODE, Boolean.valueOf(true)));
+            this.postBreak(world, blockposition, iblockdata.set(BlockTNT.EXPLODE, Boolean.TRUE));
             world.setAir(blockposition);
         }
 
@@ -21,7 +21,7 @@ public class BlockTNT extends Block {
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
         if (world.isBlockIndirectlyPowered(blockposition)) {
-            this.postBreak(world, blockposition, iblockdata.set(BlockTNT.EXPLODE, Boolean.valueOf(true)));
+            this.postBreak(world, blockposition, iblockdata.set(BlockTNT.EXPLODE, Boolean.TRUE));
             world.setAir(blockposition);
         }
 
@@ -33,7 +33,7 @@ public class BlockTNT extends Block {
             // PaperSpigot start - Fix cannons
             double y = blockposition.getY();
             if (!world.paperSpigotConfig.fixCannons) y += 0.5;
-            EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), explosion.getSource()); // PaperSpigot - add loc
+            EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (float) blockposition.getX() + 0.5F, y, (float) blockposition.getZ() + 0.5F, explosion.getSource()); // PaperSpigot - add loc
             // PaperSpigot end
 
             entitytntprimed.fuseTicks = world.random.nextInt(entitytntprimed.fuseTicks / 4) + entitytntprimed.fuseTicks / 8;
@@ -47,12 +47,12 @@ public class BlockTNT extends Block {
 
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving) {
         if (!world.isClientSide) {
-            if (((Boolean) iblockdata.get(BlockTNT.EXPLODE)).booleanValue()) {
+            if (iblockdata.get(BlockTNT.EXPLODE)) {
                 org.bukkit.Location loc = new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()); // PaperSpigot
                 // PaperSpigot start - Fix cannons
                 double y = blockposition.getY();
                 if (!world.paperSpigotConfig.fixCannons) y += 0.5;
-                EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (double) ((float) blockposition.getX() + 0.5F), y, (double) ((float) blockposition.getZ() + 0.5F), entityliving); // PaperSpigot - add loc
+                EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(loc, world, (float) blockposition.getX() + 0.5F, y, (float) blockposition.getZ() + 0.5F, entityliving); // PaperSpigot - add loc
                 // PaperSpigot end
 
                 world.addEntity(entitytntprimed);
@@ -67,7 +67,7 @@ public class BlockTNT extends Block {
             Item item = entityhuman.bZ().getItem();
 
             if (item == Items.FLINT_AND_STEEL || item == Items.FIRE_CHARGE) {
-                this.a(world, blockposition, iblockdata.set(BlockTNT.EXPLODE, Boolean.valueOf(true)), (EntityLiving) entityhuman);
+                this.a(world, blockposition, iblockdata.set(BlockTNT.EXPLODE, Boolean.TRUE), (EntityLiving) entityhuman);
                 world.setAir(blockposition);
                 if (item == Items.FLINT_AND_STEEL) {
                     entityhuman.bZ().damage(1, entityhuman);
@@ -92,7 +92,7 @@ public class BlockTNT extends Block {
                     return;
                 }
                 // CraftBukkit end
-                this.a(world, blockposition, world.getType(blockposition).set(BlockTNT.EXPLODE, Boolean.valueOf(true)), entityarrow.shooter instanceof EntityLiving ? (EntityLiving) entityarrow.shooter : null);
+                this.a(world, blockposition, world.getType(blockposition).set(BlockTNT.EXPLODE, Boolean.TRUE), entityarrow.shooter instanceof EntityLiving ? (EntityLiving) entityarrow.shooter : null);
                 world.setAir(blockposition);
             }
         }
@@ -104,11 +104,11 @@ public class BlockTNT extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockTNT.EXPLODE, Boolean.valueOf((i & 1) > 0));
+        return this.getBlockData().set(BlockTNT.EXPLODE, (i & 1) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
-        return ((Boolean) iblockdata.get(BlockTNT.EXPLODE)).booleanValue() ? 1 : 0;
+        return iblockdata.get(BlockTNT.EXPLODE) ? 1 : 0;
     }
 
     protected BlockStateList getStateList() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTrapdoor.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTrapdoor.java
index 1a2cdd1..fbba729 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTrapdoor.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTrapdoor.java
@@ -6,13 +6,13 @@ import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
 
 public class BlockTrapdoor extends Block {
 
-    public static final BlockStateDirection FACING = BlockStateDirection.of("facing", (Predicate) EnumDirection.EnumDirectionLimit.HORIZONTAL);
+    public static final BlockStateDirection FACING = BlockStateDirection.of("facing", EnumDirection.EnumDirectionLimit.HORIZONTAL);
     public static final BlockStateBoolean OPEN = BlockStateBoolean.of("open");
     public static final BlockStateEnum HALF = BlockStateEnum.of("half", BlockTrapdoor.EnumTrapdoorHalf.class);
 
     protected BlockTrapdoor(Material material) {
         super(material);
-        this.j(this.blockStateList.getBlockData().set(BlockTrapdoor.FACING, EnumDirection.NORTH).set(BlockTrapdoor.OPEN, Boolean.valueOf(false)).set(BlockTrapdoor.HALF, BlockTrapdoor.EnumTrapdoorHalf.BOTTOM));
+        this.j(this.blockStateList.getBlockData().set(BlockTrapdoor.FACING, EnumDirection.NORTH).set(BlockTrapdoor.OPEN, Boolean.FALSE).set(BlockTrapdoor.HALF, BlockTrapdoor.EnumTrapdoorHalf.BOTTOM));
         float f = 0.5F;
         float f1 = 1.0F;
 
@@ -29,7 +29,7 @@ public class BlockTrapdoor extends Block {
     }
 
     public boolean b(IBlockAccess iblockaccess, BlockPosition blockposition) {
-        return !((Boolean) iblockaccess.getType(blockposition).get(BlockTrapdoor.OPEN)).booleanValue();
+        return !(Boolean) iblockaccess.getType(blockposition).get(BlockTrapdoor.OPEN);
     }
 
     public AxisAlignedBB a(World world, BlockPosition blockposition, IBlockData iblockdata) {
@@ -50,8 +50,8 @@ public class BlockTrapdoor extends Block {
     public void d(IBlockData iblockdata) {
         if (iblockdata.getBlock() == this) {
             boolean flag = iblockdata.get(BlockTrapdoor.HALF) == BlockTrapdoor.EnumTrapdoorHalf.TOP;
-            Boolean obool = (Boolean) iblockdata.get(BlockTrapdoor.OPEN);
-            EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockTrapdoor.FACING);
+            Boolean obool = iblockdata.get(BlockTrapdoor.OPEN);
+            EnumDirection enumdirection = iblockdata.get(BlockTrapdoor.FACING);
             float f = 0.1875F;
 
             if (flag) {
@@ -60,7 +60,7 @@ public class BlockTrapdoor extends Block {
                 this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.1875F, 1.0F);
             }
 
-            if (obool.booleanValue()) {
+            if (obool) {
                 if (enumdirection == EnumDirection.NORTH) {
                     this.a(0.0F, 0.0F, 0.8125F, 1.0F, 1.0F, 1.0F);
                 }
@@ -87,14 +87,14 @@ public class BlockTrapdoor extends Block {
         } else {
             iblockdata = iblockdata.a(BlockTrapdoor.OPEN);
             world.setTypeAndData(blockposition, iblockdata, 2);
-            world.a(entityhuman, ((Boolean) iblockdata.get(BlockTrapdoor.OPEN)).booleanValue() ? 1003 : 1006, blockposition, 0);
+            world.a(entityhuman, iblockdata.get(BlockTrapdoor.OPEN) ? 1003 : 1006, blockposition, 0);
             return true;
         }
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
         if (!world.isClientSide) {
-            BlockPosition blockposition1 = blockposition.shift(((EnumDirection) iblockdata.get(BlockTrapdoor.FACING)).opposite());
+            BlockPosition blockposition1 = blockposition.shift(iblockdata.get(BlockTrapdoor.FACING).opposite());
 
             if (!c(world.getType(blockposition1).getBlock())) {
                 world.setAir(blockposition);
@@ -108,7 +108,7 @@ public class BlockTrapdoor extends Block {
                     org.bukkit.block.Block bblock = bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
 
                     int power = bblock.getBlockPower();
-                    int oldPower = (Boolean) iblockdata.get(OPEN) ? 15 : 0;
+                    int oldPower = iblockdata.get(OPEN) ? 15 : 0;
 
                     if (oldPower == 0 ^ power == 0 || block.isPowerSource()) {
                         BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bblock, oldPower, power);
@@ -116,11 +116,11 @@ public class BlockTrapdoor extends Block {
                         flag = eventRedstone.getNewCurrent() > 0;
                     }
                     // CraftBukkit end
-                    boolean flag1 = ((Boolean) iblockdata.get(BlockTrapdoor.OPEN)).booleanValue();
+                    boolean flag1 = iblockdata.get(BlockTrapdoor.OPEN);
 
                     if (flag1 != flag) {
-                        world.setTypeAndData(blockposition, iblockdata.set(BlockTrapdoor.OPEN, Boolean.valueOf(flag)), 2);
-                        world.a((EntityHuman) null, flag ? 1003 : 1006, blockposition, 0);
+                        world.setTypeAndData(blockposition, iblockdata.set(BlockTrapdoor.OPEN, flag), 2);
+                        world.a(null, flag ? 1003 : 1006, blockposition, 0);
                     }
                 }
 
@@ -137,7 +137,7 @@ public class BlockTrapdoor extends Block {
         IBlockData iblockdata = this.getBlockData();
 
         if (enumdirection.k().c()) {
-            iblockdata = iblockdata.set(BlockTrapdoor.FACING, enumdirection).set(BlockTrapdoor.OPEN, Boolean.valueOf(false));
+            iblockdata = iblockdata.set(BlockTrapdoor.FACING, enumdirection).set(BlockTrapdoor.OPEN, Boolean.FALSE);
             iblockdata = iblockdata.set(BlockTrapdoor.HALF, f1 > 0.5F ? BlockTrapdoor.EnumTrapdoorHalf.TOP : BlockTrapdoor.EnumTrapdoorHalf.BOTTOM);
         }
 
@@ -187,14 +187,14 @@ public class BlockTrapdoor extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockTrapdoor.FACING, b(i)).set(BlockTrapdoor.OPEN, Boolean.valueOf((i & 4) != 0)).set(BlockTrapdoor.HALF, (i & 8) == 0 ? BlockTrapdoor.EnumTrapdoorHalf.BOTTOM : BlockTrapdoor.EnumTrapdoorHalf.TOP);
+        return this.getBlockData().set(BlockTrapdoor.FACING, b(i)).set(BlockTrapdoor.OPEN, (i & 4) != 0).set(BlockTrapdoor.HALF, (i & 8) == 0 ? BlockTrapdoor.EnumTrapdoorHalf.BOTTOM : BlockTrapdoor.EnumTrapdoorHalf.TOP);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | a((EnumDirection) iblockdata.get(BlockTrapdoor.FACING));
+        int i = b0 | a(iblockdata.get(BlockTrapdoor.FACING));
 
-        if (((Boolean) iblockdata.get(BlockTrapdoor.OPEN)).booleanValue()) {
+        if (iblockdata.get(BlockTrapdoor.OPEN)) {
             i |= 4;
         }
 
@@ -216,26 +216,22 @@ public class BlockTrapdoor extends Block {
         static {
             try {
                 BlockTrapdoor.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockTrapdoor.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockTrapdoor.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockTrapdoor.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTripwire.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTripwire.java
index bc61e17..0e9a35b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTripwire.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTripwire.java
@@ -19,13 +19,13 @@ public class BlockTripwire extends Block {
 
     public BlockTripwire() {
         super(Material.ORIENTABLE);
-        this.j(this.blockStateList.getBlockData().set(BlockTripwire.POWERED, Boolean.valueOf(false)).set(BlockTripwire.SUSPENDED, Boolean.valueOf(false)).set(BlockTripwire.ATTACHED, Boolean.valueOf(false)).set(BlockTripwire.DISARMED, Boolean.valueOf(false)).set(BlockTripwire.NORTH, Boolean.valueOf(false)).set(BlockTripwire.EAST, Boolean.valueOf(false)).set(BlockTripwire.SOUTH, Boolean.valueOf(false)).set(BlockTripwire.WEST, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockTripwire.POWERED, Boolean.FALSE).set(BlockTripwire.SUSPENDED, Boolean.FALSE).set(BlockTripwire.ATTACHED, Boolean.FALSE).set(BlockTripwire.DISARMED, Boolean.FALSE).set(BlockTripwire.NORTH, Boolean.FALSE).set(BlockTripwire.EAST, Boolean.FALSE).set(BlockTripwire.SOUTH, Boolean.FALSE).set(BlockTripwire.WEST, Boolean.FALSE));
         this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.15625F, 1.0F);
         this.a(true);
     }
 
     public IBlockData updateState(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition) {
-        return iblockdata.set(BlockTripwire.NORTH, Boolean.valueOf(c(iblockaccess, blockposition, iblockdata, EnumDirection.NORTH))).set(BlockTripwire.EAST, Boolean.valueOf(c(iblockaccess, blockposition, iblockdata, EnumDirection.EAST))).set(BlockTripwire.SOUTH, Boolean.valueOf(c(iblockaccess, blockposition, iblockdata, EnumDirection.SOUTH))).set(BlockTripwire.WEST, Boolean.valueOf(c(iblockaccess, blockposition, iblockdata, EnumDirection.WEST)));
+        return iblockdata.set(BlockTripwire.NORTH, c(iblockaccess, blockposition, iblockdata, EnumDirection.NORTH)).set(BlockTripwire.EAST, c(iblockaccess, blockposition, iblockdata, EnumDirection.EAST)).set(BlockTripwire.SOUTH, c(iblockaccess, blockposition, iblockdata, EnumDirection.SOUTH)).set(BlockTripwire.WEST, c(iblockaccess, blockposition, iblockdata, EnumDirection.WEST));
     }
 
     public AxisAlignedBB a(World world, BlockPosition blockposition, IBlockData iblockdata) {
@@ -45,8 +45,8 @@ public class BlockTripwire extends Block {
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
-        boolean flag = ((Boolean) iblockdata.get(BlockTripwire.SUSPENDED)).booleanValue();
-        boolean flag1 = !World.a((IBlockAccess) world, blockposition.down());
+        boolean flag = iblockdata.get(BlockTripwire.SUSPENDED);
+        boolean flag1 = !World.a(world, blockposition.down());
 
         if (flag != flag1) {
             this.b(world, blockposition, iblockdata, 0);
@@ -57,8 +57,8 @@ public class BlockTripwire extends Block {
 
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
         IBlockData iblockdata = iblockaccess.getType(blockposition);
-        boolean flag = ((Boolean) iblockdata.get(BlockTripwire.ATTACHED)).booleanValue();
-        boolean flag1 = ((Boolean) iblockdata.get(BlockTripwire.SUSPENDED)).booleanValue();
+        boolean flag = iblockdata.get(BlockTripwire.ATTACHED);
+        boolean flag1 = iblockdata.get(BlockTripwire.SUSPENDED);
 
         if (!flag1) {
             this.a(0.0F, 0.0F, 0.0F, 1.0F, 0.09375F, 1.0F);
@@ -71,19 +71,19 @@ public class BlockTripwire extends Block {
     }
 
     public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        iblockdata = iblockdata.set(BlockTripwire.SUSPENDED, Boolean.valueOf(!World.a((IBlockAccess) world, blockposition.down())));
+        iblockdata = iblockdata.set(BlockTripwire.SUSPENDED, !World.a(world, blockposition.down()));
         world.setTypeAndData(blockposition, iblockdata, 3);
         this.e(world, blockposition, iblockdata);
     }
 
     public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        this.e(world, blockposition, iblockdata.set(BlockTripwire.POWERED, Boolean.valueOf(true)));
+        this.e(world, blockposition, iblockdata.set(BlockTripwire.POWERED, Boolean.TRUE));
     }
 
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman) {
         if (!world.isClientSide) {
             if (entityhuman.bZ() != null && entityhuman.bZ().getItem() == Items.SHEARS) {
-                world.setTypeAndData(blockposition, iblockdata.set(BlockTripwire.DISARMED, Boolean.valueOf(true)), 4);
+                world.setTypeAndData(blockposition, iblockdata.set(BlockTripwire.DISARMED, Boolean.TRUE), 4);
             }
 
         }
@@ -122,7 +122,7 @@ public class BlockTripwire extends Block {
 
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
         if (!world.isClientSide) {
-            if (!((Boolean) iblockdata.get(BlockTripwire.POWERED)).booleanValue()) {
+            if (!(Boolean) iblockdata.get(BlockTripwire.POWERED)) {
                 this.e(world, blockposition);
             }
         }
@@ -132,7 +132,7 @@ public class BlockTripwire extends Block {
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
         if (!world.isClientSide) {
-            if (((Boolean) world.getType(blockposition).get(BlockTripwire.POWERED)).booleanValue()) {
+            if (world.getType(blockposition).get(BlockTripwire.POWERED)) {
                 this.e(world, blockposition);
             }
         }
@@ -140,15 +140,14 @@ public class BlockTripwire extends Block {
 
     private void e(World world, BlockPosition blockposition) {
         IBlockData iblockdata = world.getType(blockposition);
-        boolean flag = ((Boolean) iblockdata.get(BlockTripwire.POWERED)).booleanValue();
+        boolean flag = iblockdata.get(BlockTripwire.POWERED);
         boolean flag1 = false;
-        List list = world.getEntities((Entity) null, new AxisAlignedBB((double) blockposition.getX() + this.minX, (double) blockposition.getY() + this.minY, (double) blockposition.getZ() + this.minZ, (double) blockposition.getX() + this.maxX, (double) blockposition.getY() + this.maxY, (double) blockposition.getZ() + this.maxZ));
+        List list = world.getEntities(null, new AxisAlignedBB((double) blockposition.getX() + this.minX, (double) blockposition.getY() + this.minY, (double) blockposition.getZ() + this.minZ, (double) blockposition.getX() + this.maxX, (double) blockposition.getY() + this.maxY, (double) blockposition.getZ() + this.maxZ));
 
         if (!list.isEmpty()) {
-            Iterator iterator = list.iterator();
 
-            while (iterator.hasNext()) {
-                Entity entity = (Entity) iterator.next();
+            for (Object value : list) {
+                Entity entity = (Entity) value;
 
                 if (!entity.aI()) {
                     flag1 = true;
@@ -158,7 +157,7 @@ public class BlockTripwire extends Block {
         }
 
         // CraftBukkit start - Call interact even when triggering connected tripwire
-        if (flag != flag1 && flag1 && (Boolean)iblockdata.get(ATTACHED)) {
+        if (flag != flag1 && flag1 && iblockdata.get(ATTACHED)) {
             org.bukkit.World bworld = world.getWorld();
             org.bukkit.plugin.PluginManager manager = world.getServer().getPluginManager();
             org.bukkit.block.Block block = bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
@@ -192,13 +191,13 @@ public class BlockTripwire extends Block {
         // CraftBukkit end
 
         if (flag1 != flag) {
-            iblockdata = iblockdata.set(BlockTripwire.POWERED, Boolean.valueOf(flag1));
+            iblockdata = iblockdata.set(BlockTripwire.POWERED, flag1);
             world.setTypeAndData(blockposition, iblockdata, 3);
             this.e(world, blockposition, iblockdata);
         }
 
         if (flag1) {
-            world.a(blockposition, (Block) this, this.a(world));
+            world.a(blockposition, this, this.a(world));
         }
 
     }
@@ -213,8 +212,8 @@ public class BlockTripwire extends Block {
 
             return iblockdata1.get(BlockTripwireHook.FACING) == enumdirection1;
         } else if (block == Blocks.TRIPWIRE) {
-            boolean flag = ((Boolean) iblockdata.get(BlockTripwire.SUSPENDED)).booleanValue();
-            boolean flag1 = ((Boolean) iblockdata1.get(BlockTripwire.SUSPENDED)).booleanValue();
+            boolean flag = iblockdata.get(BlockTripwire.SUSPENDED);
+            boolean flag1 = iblockdata1.get(BlockTripwire.SUSPENDED);
 
             return flag == flag1;
         } else {
@@ -223,25 +222,25 @@ public class BlockTripwire extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockTripwire.POWERED, Boolean.valueOf((i & 1) > 0)).set(BlockTripwire.SUSPENDED, Boolean.valueOf((i & 2) > 0)).set(BlockTripwire.ATTACHED, Boolean.valueOf((i & 4) > 0)).set(BlockTripwire.DISARMED, Boolean.valueOf((i & 8) > 0));
+        return this.getBlockData().set(BlockTripwire.POWERED, (i & 1) > 0).set(BlockTripwire.SUSPENDED, (i & 2) > 0).set(BlockTripwire.ATTACHED, (i & 4) > 0).set(BlockTripwire.DISARMED, (i & 8) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         int i = 0;
 
-        if (((Boolean) iblockdata.get(BlockTripwire.POWERED)).booleanValue()) {
+        if (iblockdata.get(BlockTripwire.POWERED)) {
             i |= 1;
         }
 
-        if (((Boolean) iblockdata.get(BlockTripwire.SUSPENDED)).booleanValue()) {
+        if (iblockdata.get(BlockTripwire.SUSPENDED)) {
             i |= 2;
         }
 
-        if (((Boolean) iblockdata.get(BlockTripwire.ATTACHED)).booleanValue()) {
+        if (iblockdata.get(BlockTripwire.ATTACHED)) {
             i |= 4;
         }
 
-        if (((Boolean) iblockdata.get(BlockTripwire.DISARMED)).booleanValue()) {
+        if (iblockdata.get(BlockTripwire.DISARMED)) {
             i |= 8;
         }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTripwireHook.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTripwireHook.java
index 0ad4a20..5129862 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTripwireHook.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockTripwireHook.java
@@ -9,20 +9,20 @@ import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
 
 public class BlockTripwireHook extends Block {
 
-    public static final BlockStateDirection FACING = BlockStateDirection.of("facing", (Predicate) EnumDirection.EnumDirectionLimit.HORIZONTAL);
+    public static final BlockStateDirection FACING = BlockStateDirection.of("facing", EnumDirection.EnumDirectionLimit.HORIZONTAL);
     public static final BlockStateBoolean POWERED = BlockStateBoolean.of("powered");
     public static final BlockStateBoolean ATTACHED = BlockStateBoolean.of("attached");
     public static final BlockStateBoolean SUSPENDED = BlockStateBoolean.of("suspended");
 
     public BlockTripwireHook() {
         super(Material.ORIENTABLE);
-        this.j(this.blockStateList.getBlockData().set(BlockTripwireHook.FACING, EnumDirection.NORTH).set(BlockTripwireHook.POWERED, Boolean.valueOf(false)).set(BlockTripwireHook.ATTACHED, Boolean.valueOf(false)).set(BlockTripwireHook.SUSPENDED, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockTripwireHook.FACING, EnumDirection.NORTH).set(BlockTripwireHook.POWERED, Boolean.FALSE).set(BlockTripwireHook.ATTACHED, Boolean.FALSE).set(BlockTripwireHook.SUSPENDED, Boolean.FALSE));
         this.a(CreativeModeTab.d);
         this.a(true);
     }
 
     public IBlockData updateState(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition) {
-        return iblockdata.set(BlockTripwireHook.SUSPENDED, Boolean.valueOf(!World.a(iblockaccess, blockposition.down())));
+        return iblockdata.set(BlockTripwireHook.SUSPENDED, !World.a(iblockaccess, blockposition.down()));
     }
 
     public AxisAlignedBB a(World world, BlockPosition blockposition, IBlockData iblockdata) {
@@ -58,7 +58,7 @@ public class BlockTripwireHook extends Block {
     }
 
     public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) {
-        IBlockData iblockdata = this.getBlockData().set(BlockTripwireHook.POWERED, Boolean.valueOf(false)).set(BlockTripwireHook.ATTACHED, Boolean.valueOf(false)).set(BlockTripwireHook.SUSPENDED, Boolean.valueOf(false));
+        IBlockData iblockdata = this.getBlockData().set(BlockTripwireHook.POWERED, Boolean.FALSE).set(BlockTripwireHook.ATTACHED, Boolean.FALSE).set(BlockTripwireHook.SUSPENDED, Boolean.FALSE);
 
         if (enumdirection.k().c()) {
             iblockdata = iblockdata.set(BlockTripwireHook.FACING, enumdirection);
@@ -68,13 +68,13 @@ public class BlockTripwireHook extends Block {
     }
 
     public void postPlace(World world, BlockPosition blockposition, IBlockData iblockdata, EntityLiving entityliving, ItemStack itemstack) {
-        this.a(world, blockposition, iblockdata, false, false, -1, (IBlockData) null);
+        this.a(world, blockposition, iblockdata, false, false, -1, null);
     }
 
     public void doPhysics(World world, BlockPosition blockposition, IBlockData iblockdata, Block block) {
         if (block != this) {
             if (this.e(world, blockposition, iblockdata)) {
-                EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockTripwireHook.FACING);
+                EnumDirection enumdirection = iblockdata.get(BlockTripwireHook.FACING);
 
                 if (!world.getType(blockposition.shift(enumdirection.opposite())).getBlock().isOccluding()) {
                     this.b(world, blockposition, iblockdata, 0);
@@ -86,10 +86,10 @@ public class BlockTripwireHook extends Block {
     }
 
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag, boolean flag1, int i, IBlockData iblockdata1) {
-        EnumDirection enumdirection = (EnumDirection) iblockdata.get(BlockTripwireHook.FACING);
-        boolean flag2 = ((Boolean) iblockdata.get(BlockTripwireHook.ATTACHED)).booleanValue();
-        boolean flag3 = ((Boolean) iblockdata.get(BlockTripwireHook.POWERED)).booleanValue();
-        boolean flag4 = !World.a((IBlockAccess) world, blockposition.down());
+        EnumDirection enumdirection = iblockdata.get(BlockTripwireHook.FACING);
+        boolean flag2 = iblockdata.get(BlockTripwireHook.ATTACHED);
+        boolean flag3 = iblockdata.get(BlockTripwireHook.POWERED);
+        boolean flag4 = !World.a(world, blockposition.down());
         boolean flag5 = !flag;
         boolean flag6 = false;
         int j = 0;
@@ -113,18 +113,18 @@ public class BlockTripwireHook extends Block {
                 flag5 = false;
             } else {
                 if (k == i) {
-                    iblockdata2 = (IBlockData) Objects.firstNonNull(iblockdata1, iblockdata2);
+                    iblockdata2 = Objects.firstNonNull(iblockdata1, iblockdata2);
                 }
 
-                boolean flag7 = !((Boolean) iblockdata2.get(BlockTripwire.DISARMED)).booleanValue();
-                boolean flag8 = ((Boolean) iblockdata2.get(BlockTripwire.POWERED)).booleanValue();
-                boolean flag9 = ((Boolean) iblockdata2.get(BlockTripwire.SUSPENDED)).booleanValue();
+                boolean flag7 = !(Boolean) iblockdata2.get(BlockTripwire.DISARMED);
+                boolean flag8 = iblockdata2.get(BlockTripwire.POWERED);
+                boolean flag9 = iblockdata2.get(BlockTripwire.SUSPENDED);
 
                 flag5 &= flag9 == flag4;
                 flag6 |= flag7 && flag8;
                 aiblockdata[k] = iblockdata2;
                 if (k == i) {
-                    world.a(blockposition, (Block) this, this.a(world));
+                    world.a(blockposition, this, this.a(world));
                     flag5 &= flag7;
                 }
             }
@@ -132,7 +132,7 @@ public class BlockTripwireHook extends Block {
 
         flag5 &= j > 1;
         flag6 &= flag5;
-        IBlockData iblockdata3 = this.getBlockData().set(BlockTripwireHook.ATTACHED, Boolean.valueOf(flag5)).set(BlockTripwireHook.POWERED, Boolean.valueOf(flag6));
+        IBlockData iblockdata3 = this.getBlockData().set(BlockTripwireHook.ATTACHED, flag5).set(BlockTripwireHook.POWERED, flag6);
 
         if (j > 0) {
             blockposition1 = blockposition.shift(enumdirection, j);
@@ -168,7 +168,7 @@ public class BlockTripwireHook extends Block {
                 IBlockData iblockdata4 = aiblockdata[l];
 
                 if (iblockdata4 != null && world.getType(blockposition2).getBlock() != Blocks.AIR) {
-                    world.setTypeAndData(blockposition2, iblockdata4.set(BlockTripwireHook.ATTACHED, Boolean.valueOf(flag5)), 3);
+                    world.setTypeAndData(blockposition2, iblockdata4.set(BlockTripwireHook.ATTACHED, flag5), 3);
                 }
             }
         }
@@ -178,7 +178,7 @@ public class BlockTripwireHook extends Block {
     public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {}
 
     public void b(World world, BlockPosition blockposition, IBlockData iblockdata, Random random) {
-        this.a(world, blockposition, iblockdata, false, true, -1, (IBlockData) null);
+        this.a(world, blockposition, iblockdata, false, true, -1, null);
     }
 
     private void a(World world, BlockPosition blockposition, boolean flag, boolean flag1, boolean flag2, boolean flag3) {
@@ -212,7 +212,7 @@ public class BlockTripwireHook extends Block {
     public void updateShape(IBlockAccess iblockaccess, BlockPosition blockposition) {
         float f = 0.1875F;
 
-        switch (BlockTripwireHook.SyntheticClass_1.a[((EnumDirection) iblockaccess.getType(blockposition).get(BlockTripwireHook.FACING)).ordinal()]) {
+        switch (BlockTripwireHook.SyntheticClass_1.a[iblockaccess.getType(blockposition).get(BlockTripwireHook.FACING).ordinal()]) {
         case 1:
             this.a(0.0F, 0.2F, 0.5F - f, f * 2.0F, 0.8F, 0.5F + f);
             break;
@@ -232,27 +232,27 @@ public class BlockTripwireHook extends Block {
     }
 
     public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) {
-        boolean flag = ((Boolean) iblockdata.get(BlockTripwireHook.ATTACHED)).booleanValue();
-        boolean flag1 = ((Boolean) iblockdata.get(BlockTripwireHook.POWERED)).booleanValue();
+        boolean flag = iblockdata.get(BlockTripwireHook.ATTACHED);
+        boolean flag1 = iblockdata.get(BlockTripwireHook.POWERED);
 
         if (flag || flag1) {
-            this.a(world, blockposition, iblockdata, true, false, -1, (IBlockData) null);
+            this.a(world, blockposition, iblockdata, true, false, -1, null);
         }
 
         if (flag1) {
             world.applyPhysics(blockposition, this);
-            world.applyPhysics(blockposition.shift(((EnumDirection) iblockdata.get(BlockTripwireHook.FACING)).opposite()), this);
+            world.applyPhysics(blockposition.shift(iblockdata.get(BlockTripwireHook.FACING).opposite()), this);
         }
 
         super.remove(world, blockposition, iblockdata);
     }
 
     public int a(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection) {
-        return ((Boolean) iblockdata.get(BlockTripwireHook.POWERED)).booleanValue() ? 15 : 0;
+        return iblockdata.get(BlockTripwireHook.POWERED) ? 15 : 0;
     }
 
     public int b(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection) {
-        return !((Boolean) iblockdata.get(BlockTripwireHook.POWERED)).booleanValue() ? 0 : (iblockdata.get(BlockTripwireHook.FACING) == enumdirection ? 15 : 0);
+        return !(Boolean) iblockdata.get(BlockTripwireHook.POWERED) ? 0 : (iblockdata.get(BlockTripwireHook.FACING) == enumdirection ? 15 : 0);
     }
 
     public boolean isPowerSource() {
@@ -260,18 +260,18 @@ public class BlockTripwireHook extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockTripwireHook.FACING, EnumDirection.fromType2(i & 3)).set(BlockTripwireHook.POWERED, Boolean.valueOf((i & 8) > 0)).set(BlockTripwireHook.ATTACHED, Boolean.valueOf((i & 4) > 0));
+        return this.getBlockData().set(BlockTripwireHook.FACING, EnumDirection.fromType2(i & 3)).set(BlockTripwireHook.POWERED, (i & 8) > 0).set(BlockTripwireHook.ATTACHED, (i & 4) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         byte b0 = 0;
-        int i = b0 | ((EnumDirection) iblockdata.get(BlockTripwireHook.FACING)).b();
+        int i = b0 | iblockdata.get(BlockTripwireHook.FACING).b();
 
-        if (((Boolean) iblockdata.get(BlockTripwireHook.POWERED)).booleanValue()) {
+        if (iblockdata.get(BlockTripwireHook.POWERED)) {
             i |= 8;
         }
 
-        if (((Boolean) iblockdata.get(BlockTripwireHook.ATTACHED)).booleanValue()) {
+        if (iblockdata.get(BlockTripwireHook.ATTACHED)) {
             i |= 4;
         }
 
@@ -289,26 +289,22 @@ public class BlockTripwireHook extends Block {
         static {
             try {
                 BlockTripwireHook.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockTripwireHook.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockTripwireHook.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockTripwireHook.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockVine.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockVine.java
index 25d19c4..23e22e6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockVine.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/BlockVine.java
@@ -16,13 +16,13 @@ public class BlockVine extends Block {
 
     public BlockVine() {
         super(Material.REPLACEABLE_PLANT);
-        this.j(this.blockStateList.getBlockData().set(BlockVine.UP, Boolean.valueOf(false)).set(BlockVine.NORTH, Boolean.valueOf(false)).set(BlockVine.EAST, Boolean.valueOf(false)).set(BlockVine.SOUTH, Boolean.valueOf(false)).set(BlockVine.WEST, Boolean.valueOf(false)));
+        this.j(this.blockStateList.getBlockData().set(BlockVine.UP, Boolean.FALSE).set(BlockVine.NORTH, Boolean.FALSE).set(BlockVine.EAST, Boolean.FALSE).set(BlockVine.SOUTH, Boolean.FALSE).set(BlockVine.WEST, Boolean.FALSE));
         this.a(true);
         this.a(CreativeModeTab.c);
     }
 
     public IBlockData updateState(IBlockData iblockdata, IBlockAccess iblockaccess, BlockPosition blockposition) {
-        return iblockdata.set(BlockVine.UP, Boolean.valueOf(iblockaccess.getType(blockposition.up()).getBlock().u()));
+        return iblockdata.set(BlockVine.UP, iblockaccess.getType(blockposition.up()).getBlock().u());
     }
 
     public void j() {
@@ -51,7 +51,7 @@ public class BlockVine extends Block {
         float f6 = 0.0F;
         boolean flag = false;
 
-        if (((Boolean) iblockaccess.getType(blockposition).get(BlockVine.WEST)).booleanValue()) {
+        if (iblockaccess.getType(blockposition).get(BlockVine.WEST)) {
             f4 = Math.max(f4, 0.0625F);
             f1 = 0.0F;
             f2 = 0.0F;
@@ -61,7 +61,7 @@ public class BlockVine extends Block {
             flag = true;
         }
 
-        if (((Boolean) iblockaccess.getType(blockposition).get(BlockVine.EAST)).booleanValue()) {
+        if (iblockaccess.getType(blockposition).get(BlockVine.EAST)) {
             f1 = Math.min(f1, 0.9375F);
             f4 = 1.0F;
             f2 = 0.0F;
@@ -71,7 +71,7 @@ public class BlockVine extends Block {
             flag = true;
         }
 
-        if (((Boolean) iblockaccess.getType(blockposition).get(BlockVine.NORTH)).booleanValue()) {
+        if (iblockaccess.getType(blockposition).get(BlockVine.NORTH)) {
             f6 = Math.max(f6, 0.0625F);
             f3 = 0.0F;
             f1 = 0.0F;
@@ -81,7 +81,7 @@ public class BlockVine extends Block {
             flag = true;
         }
 
-        if (((Boolean) iblockaccess.getType(blockposition).get(BlockVine.SOUTH)).booleanValue()) {
+        if (iblockaccess.getType(blockposition).get(BlockVine.SOUTH)) {
             f3 = Math.min(f3, 0.9375F);
             f6 = 1.0F;
             f1 = 0.0F;
@@ -129,17 +129,15 @@ public class BlockVine extends Block {
 
     private boolean e(World world, BlockPosition blockposition, IBlockData iblockdata) {
         IBlockData iblockdata1 = iblockdata;
-        Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
 
-        while (iterator.hasNext()) {
-            EnumDirection enumdirection = (EnumDirection) iterator.next();
+        for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
             BlockStateBoolean blockstateboolean = getDirection(enumdirection);
 
-            if (((Boolean) iblockdata.get(blockstateboolean)).booleanValue() && !this.c(world.getType(blockposition.shift(enumdirection)).getBlock())) {
+            if (iblockdata.get(blockstateboolean) && !this.c(world.getType(blockposition.shift(enumdirection)).getBlock())) {
                 IBlockData iblockdata2 = world.getType(blockposition.up());
 
-                if (iblockdata2.getBlock() != this || !((Boolean) iblockdata2.get(blockstateboolean)).booleanValue()) {
-                    iblockdata = iblockdata.set(blockstateboolean, Boolean.valueOf(false));
+                if (iblockdata2.getBlock() != this || !(Boolean) iblockdata2.get(blockstateboolean)) {
+                    iblockdata = iblockdata.set(blockstateboolean, Boolean.FALSE);
                 }
             }
         }
@@ -192,21 +190,19 @@ public class BlockVine extends Block {
                 if (enumdirection == EnumDirection.UP && blockposition.getY() < 255 && world.isEmpty(blockposition1)) {
                     if (!flag) {
                         IBlockData iblockdata1 = iblockdata;
-                        Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
 
-                        while (iterator.hasNext()) {
-                            enumdirection1 = (EnumDirection) iterator.next();
+                        for (EnumDirection enumDirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
+                            enumdirection1 = enumDirection;
                             if (random.nextBoolean() || !this.c(world.getType(blockposition1.shift(enumdirection1)).getBlock())) {
-                                iblockdata1 = iblockdata1.set(getDirection(enumdirection1), Boolean.valueOf(false));
+                                iblockdata1 = iblockdata1.set(getDirection(enumdirection1), Boolean.FALSE);
                             }
                         }
 
-                        if (((Boolean) iblockdata1.get(BlockVine.NORTH)).booleanValue() || ((Boolean) iblockdata1.get(BlockVine.EAST)).booleanValue() || ((Boolean) iblockdata1.get(BlockVine.SOUTH)).booleanValue() || ((Boolean) iblockdata1.get(BlockVine.WEST)).booleanValue()) {
+                        if (iblockdata1.get(BlockVine.NORTH) || iblockdata1.get(BlockVine.EAST) || iblockdata1.get(BlockVine.SOUTH) || iblockdata1.get(BlockVine.WEST)) {
                             // CraftBukkit start - Call BlockSpreadEvent
                             // world.setTypeAndData(blockposition1, iblockdata1, 2);
-                            BlockPosition target = blockposition1;
                             org.bukkit.block.Block source = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-                            org.bukkit.block.Block block = world.getWorld().getBlockAt(target.getX(), target.getY(), target.getZ());
+                            org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition1.getX(), blockposition1.getY(), blockposition1.getZ());
                             CraftEventFactory.handleBlockSpreadEvent(block, source, this, toLegacyData(iblockdata1));
                             // CraftBukkit end
                         }
@@ -215,7 +211,7 @@ public class BlockVine extends Block {
                 } else {
                     BlockPosition blockposition2;
 
-                    if (enumdirection.k().c() && !((Boolean) iblockdata.get(getDirection(enumdirection))).booleanValue()) {
+                    if (enumdirection.k().c() && !(Boolean) iblockdata.get(getDirection(enumdirection))) {
                         if (!flag) {
                             blockposition2 = blockposition.shift(enumdirection);
                             Block block = world.getType(blockposition2).getBlock();
@@ -223,8 +219,8 @@ public class BlockVine extends Block {
                             if (block.material == Material.AIR) {
                                 enumdirection1 = enumdirection.e();
                                 EnumDirection enumdirection2 = enumdirection.f();
-                                boolean flag1 = ((Boolean) iblockdata.get(getDirection(enumdirection1))).booleanValue();
-                                boolean flag2 = ((Boolean) iblockdata.get(getDirection(enumdirection2))).booleanValue();
+                                boolean flag1 = iblockdata.get(getDirection(enumdirection1));
+                                boolean flag2 = iblockdata.get(getDirection(enumdirection2));
                                 BlockPosition blockposition3 = blockposition2.shift(enumdirection1);
                                 BlockPosition blockposition4 = blockposition2.shift(enumdirection2);
 
@@ -234,25 +230,25 @@ public class BlockVine extends Block {
 
                                 if (flag1 && this.c(world.getType(blockposition3).getBlock())) {
                                     // world.setTypeAndData(blockposition2, this.getBlockData().set(a(enumdirection1), Boolean.valueOf(true)), 2);
-                                    CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData().set(getDirection(enumdirection1), Boolean.valueOf(true))));
+                                    CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData().set(getDirection(enumdirection1), Boolean.TRUE)));
                                 } else if (flag2 && this.c(world.getType(blockposition4).getBlock())) {
                                     // world.setTypeAndData(blockposition2, this.getBlockData().set(a(enumdirection2), Boolean.valueOf(true)), 2);
-                                    CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData().set(getDirection(enumdirection2), Boolean.valueOf(true))));
+                                    CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData().set(getDirection(enumdirection2), Boolean.TRUE)));
                                 } else if (flag1 && world.isEmpty(blockposition3) && this.c(world.getType(blockposition.shift(enumdirection1)).getBlock())) {
                                     // world.setTypeAndData(blockposition3, this.getBlockData().set(a(enumdirection.opposite()), Boolean.valueOf(true)), 2);
                                     bukkitBlock = world.getWorld().getBlockAt(blockposition3.getX(), blockposition3.getY(), blockposition3.getZ());
-                                    CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData().set(getDirection(enumdirection.opposite()), Boolean.valueOf(true))));
+                                    CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData().set(getDirection(enumdirection.opposite()), Boolean.TRUE)));
                                 } else if (flag2 && world.isEmpty(blockposition4) && this.c(world.getType(blockposition.shift(enumdirection2)).getBlock())) {
                                     // world.setTypeAndData(blockposition4, this.getBlockData().set(a(enumdirection.opposite()), Boolean.valueOf(true)), 2);
                                     bukkitBlock = world.getWorld().getBlockAt(blockposition4.getX(), blockposition4.getY(), blockposition4.getZ());
-                                    CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData().set(getDirection(enumdirection.opposite()), Boolean.valueOf(true))));
+                                    CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData().set(getDirection(enumdirection.opposite()), Boolean.TRUE)));
                                 } else if (this.c(world.getType(blockposition2.up()).getBlock())) {
                                     // world.setTypeAndData(blockposition2, this.getBlockData(), 2);
                                     CraftEventFactory.handleBlockSpreadEvent(bukkitBlock, source, this, toLegacyData(this.getBlockData()));
                                 }
                                 // CraftBukkit end
                             } else if (block.material.k() && block.d()) {
-                                world.setTypeAndData(blockposition, iblockdata.set(getDirection(enumdirection), Boolean.valueOf(true)), 2);
+                                world.setTypeAndData(blockposition, iblockdata.set(getDirection(enumdirection), Boolean.TRUE), 2);
                             }
 
                         }
@@ -272,11 +268,11 @@ public class BlockVine extends Block {
                                 while (iterator1.hasNext()) {
                                     enumdirection3 = (EnumDirection) iterator1.next();
                                     if (random.nextBoolean()) {
-                                        iblockdata3 = iblockdata3.set(getDirection(enumdirection3), Boolean.valueOf(false));
+                                        iblockdata3 = iblockdata3.set(getDirection(enumdirection3), Boolean.FALSE);
                                     }
                                 }
 
-                                if (((Boolean) iblockdata3.get(BlockVine.NORTH)).booleanValue() || ((Boolean) iblockdata3.get(BlockVine.EAST)).booleanValue() || ((Boolean) iblockdata3.get(BlockVine.SOUTH)).booleanValue() || ((Boolean) iblockdata3.get(BlockVine.WEST)).booleanValue()) {
+                                if (iblockdata3.get(BlockVine.NORTH) || iblockdata3.get(BlockVine.EAST) || iblockdata3.get(BlockVine.SOUTH) || iblockdata3.get(BlockVine.WEST)) {
                                     // CraftBukkit start - Call BlockSpreadEvent
                                     // world.setTypeAndData(blockposition2, iblockdata3, 2);
                                     org.bukkit.block.Block source = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
@@ -292,12 +288,12 @@ public class BlockVine extends Block {
                                     enumdirection3 = (EnumDirection) iterator1.next();
                                     BlockStateBoolean blockstateboolean = getDirection(enumdirection3);
 
-                                    if (random.nextBoolean() && ((Boolean) iblockdata.get(blockstateboolean)).booleanValue()) {
-                                        iblockdata3 = iblockdata3.set(blockstateboolean, Boolean.valueOf(true));
+                                    if (random.nextBoolean() && iblockdata.get(blockstateboolean)) {
+                                        iblockdata3 = iblockdata3.set(blockstateboolean, Boolean.TRUE);
                                     }
                                 }
 
-                                if (((Boolean) iblockdata3.get(BlockVine.NORTH)).booleanValue() || ((Boolean) iblockdata3.get(BlockVine.EAST)).booleanValue() || ((Boolean) iblockdata3.get(BlockVine.SOUTH)).booleanValue() || ((Boolean) iblockdata3.get(BlockVine.WEST)).booleanValue()) {
+                                if (iblockdata3.get(BlockVine.NORTH) || iblockdata3.get(BlockVine.EAST) || iblockdata3.get(BlockVine.SOUTH) || iblockdata3.get(BlockVine.WEST)) {
                                     world.setTypeAndData(blockposition2, iblockdata3, 2);
                                 }
                             }
@@ -310,9 +306,9 @@ public class BlockVine extends Block {
     }
 
     public IBlockData getPlacedState(World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2, int i, EntityLiving entityliving) {
-        IBlockData iblockdata = this.getBlockData().set(BlockVine.UP, Boolean.valueOf(false)).set(BlockVine.NORTH, Boolean.valueOf(false)).set(BlockVine.EAST, Boolean.valueOf(false)).set(BlockVine.SOUTH, Boolean.valueOf(false)).set(BlockVine.WEST, Boolean.valueOf(false));
+        IBlockData iblockdata = this.getBlockData().set(BlockVine.UP, Boolean.FALSE).set(BlockVine.NORTH, Boolean.FALSE).set(BlockVine.EAST, Boolean.FALSE).set(BlockVine.SOUTH, Boolean.FALSE).set(BlockVine.WEST, Boolean.FALSE);
 
-        return enumdirection.k().c() ? iblockdata.set(getDirection(enumdirection.opposite()), Boolean.valueOf(true)) : iblockdata;
+        return enumdirection.k().c() ? iblockdata.set(getDirection(enumdirection.opposite()), Boolean.TRUE) : iblockdata;
     }
 
     public Item getDropType(IBlockData iblockdata, Random random, int i) {
@@ -334,25 +330,25 @@ public class BlockVine extends Block {
     }
 
     public IBlockData fromLegacyData(int i) {
-        return this.getBlockData().set(BlockVine.SOUTH, Boolean.valueOf((i & 1) > 0)).set(BlockVine.WEST, Boolean.valueOf((i & 2) > 0)).set(BlockVine.NORTH, Boolean.valueOf((i & 4) > 0)).set(BlockVine.EAST, Boolean.valueOf((i & 8) > 0));
+        return this.getBlockData().set(BlockVine.SOUTH, (i & 1) > 0).set(BlockVine.WEST, (i & 2) > 0).set(BlockVine.NORTH, (i & 4) > 0).set(BlockVine.EAST, (i & 8) > 0);
     }
 
     public int toLegacyData(IBlockData iblockdata) {
         int i = 0;
 
-        if (((Boolean) iblockdata.get(BlockVine.SOUTH)).booleanValue()) {
+        if (iblockdata.get(BlockVine.SOUTH)) {
             i |= 1;
         }
 
-        if (((Boolean) iblockdata.get(BlockVine.WEST)).booleanValue()) {
+        if (iblockdata.get(BlockVine.WEST)) {
             i |= 2;
         }
 
-        if (((Boolean) iblockdata.get(BlockVine.NORTH)).booleanValue()) {
+        if (iblockdata.get(BlockVine.NORTH)) {
             i |= 4;
         }
 
-        if (((Boolean) iblockdata.get(BlockVine.EAST)).booleanValue()) {
+        if (iblockdata.get(BlockVine.EAST)) {
             i |= 8;
         }
 
@@ -390,10 +386,8 @@ public class BlockVine extends Block {
         BlockStateBoolean[] ablockstateboolean = BlockVine.Q;
         int j = ablockstateboolean.length;
 
-        for (int k = 0; k < j; ++k) {
-            BlockStateBoolean blockstateboolean = ablockstateboolean[k];
-
-            if (((Boolean) iblockdata.get(blockstateboolean)).booleanValue()) {
+        for (BlockStateBoolean blockstateboolean : ablockstateboolean) {
+            if (iblockdata.get(blockstateboolean)) {
                 ++i;
             }
         }
@@ -408,32 +402,27 @@ public class BlockVine extends Block {
         static {
             try {
                 BlockVine.SyntheticClass_1.a[EnumDirection.UP.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockVine.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockVine.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockVine.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 BlockVine.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChatBaseComponent.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChatBaseComponent.java
index dc496c2..650b257 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChatBaseComponent.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChatBaseComponent.java
@@ -29,11 +29,8 @@ public abstract class ChatBaseComponent implements IChatBaseComponent {
 
     public IChatBaseComponent setChatModifier(ChatModifier chatmodifier) {
         this.b = chatmodifier;
-        Iterator iterator = this.a.iterator();
-
-        while (iterator.hasNext()) {
-            IChatBaseComponent ichatbasecomponent = (IChatBaseComponent) iterator.next();
 
+        for (IChatBaseComponent ichatbasecomponent : this.a) {
             ichatbasecomponent.getChatModifier().setChatModifier(this.getChatModifier());
         }
 
@@ -43,11 +40,8 @@ public abstract class ChatBaseComponent implements IChatBaseComponent {
     public ChatModifier getChatModifier() {
         if (this.b == null) {
             this.b = new ChatModifier();
-            Iterator iterator = this.a.iterator();
-
-            while (iterator.hasNext()) {
-                IChatBaseComponent ichatbasecomponent = (IChatBaseComponent) iterator.next();
 
+            for (IChatBaseComponent ichatbasecomponent : this.a) {
                 ichatbasecomponent.getChatModifier().setChatModifier(this.b);
             }
         }
@@ -56,16 +50,13 @@ public abstract class ChatBaseComponent implements IChatBaseComponent {
     }
 
     public Iterator iterator() {
-        return Iterators.concat(Iterators.forArray(new ChatBaseComponent[] { this}), a((Iterable) this.a));
+        return Iterators.concat(Iterators.forArray(new ChatBaseComponent[] { this}), a(this.a));
     }
 
     public final String c() {
         StringBuilder stringbuilder = new StringBuilder();
-        Iterator iterator = this.iterator();
-
-        while (iterator.hasNext()) {
-            IChatBaseComponent ichatbasecomponent = (IChatBaseComponent) iterator.next();
 
+        for (IChatBaseComponent ichatbasecomponent : this) {
             stringbuilder.append(ichatbasecomponent.getText());
         }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChatModifier.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChatModifier.java
index 21f7e6b..1a7105e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChatModifier.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChatModifier.java
@@ -115,23 +115,23 @@ public class ChatModifier {
     }
 
     public boolean isBold() {
-        return this.c == null ? this.o().isBold() : this.c.booleanValue();
+        return this.c == null ? this.o().isBold() : this.c;
     }
 
     public boolean isItalic() {
-        return this.d == null ? this.o().isItalic() : this.d.booleanValue();
+        return this.d == null ? this.o().isItalic() : this.d;
     }
 
     public boolean isStrikethrough() {
-        return this.f == null ? this.o().isStrikethrough() : this.f.booleanValue();
+        return this.f == null ? this.o().isStrikethrough() : this.f;
     }
 
     public boolean isUnderlined() {
-        return this.e == null ? this.o().isUnderlined() : this.e.booleanValue();
+        return this.e == null ? this.o().isUnderlined() : this.e;
     }
 
     public boolean isRandom() {
-        return this.g == null ? this.o().isRandom() : this.g.booleanValue();
+        return this.g == null ? this.o().isRandom() : this.g;
     }
 
     public boolean g() {
@@ -288,11 +288,11 @@ public class ChatModifier {
     public ChatModifier n() {
         ChatModifier chatmodifier = new ChatModifier();
 
-        chatmodifier.setBold(Boolean.valueOf(this.isBold()));
-        chatmodifier.setItalic(Boolean.valueOf(this.isItalic()));
-        chatmodifier.setStrikethrough(Boolean.valueOf(this.isStrikethrough()));
-        chatmodifier.setUnderline(Boolean.valueOf(this.isUnderlined()));
-        chatmodifier.setRandom(Boolean.valueOf(this.isRandom()));
+        chatmodifier.setBold(this.isBold());
+        chatmodifier.setItalic(this.isItalic());
+        chatmodifier.setStrikethrough(this.isStrikethrough());
+        chatmodifier.setUnderline(this.isUnderlined());
+        chatmodifier.setRandom(this.isRandom());
         chatmodifier.setColor(this.getColor());
         chatmodifier.setChatClickable(this.h());
         chatmodifier.setChatHoverable(this.i());
@@ -313,27 +313,27 @@ public class ChatModifier {
                     return null;
                 } else {
                     if (jsonobject.has("bold")) {
-                        chatmodifier.c = Boolean.valueOf(jsonobject.get("bold").getAsBoolean());
+                        chatmodifier.c = jsonobject.get("bold").getAsBoolean();
                     }
 
                     if (jsonobject.has("italic")) {
-                        chatmodifier.d = Boolean.valueOf(jsonobject.get("italic").getAsBoolean());
+                        chatmodifier.d = jsonobject.get("italic").getAsBoolean();
                     }
 
                     if (jsonobject.has("underlined")) {
-                        chatmodifier.e = Boolean.valueOf(jsonobject.get("underlined").getAsBoolean());
+                        chatmodifier.e = jsonobject.get("underlined").getAsBoolean();
                     }
 
                     if (jsonobject.has("strikethrough")) {
-                        chatmodifier.f = Boolean.valueOf(jsonobject.get("strikethrough").getAsBoolean());
+                        chatmodifier.f = jsonobject.get("strikethrough").getAsBoolean();
                     }
 
                     if (jsonobject.has("obfuscated")) {
-                        chatmodifier.g = Boolean.valueOf(jsonobject.get("obfuscated").getAsBoolean());
+                        chatmodifier.g = jsonobject.get("obfuscated").getAsBoolean();
                     }
 
                     if (jsonobject.has("color")) {
-                        chatmodifier.b = (EnumChatFormat) jsondeserializationcontext.deserialize(jsonobject.get("color"), EnumChatFormat.class);
+                        chatmodifier.b = jsondeserializationcontext.deserialize(jsonobject.get("color"), EnumChatFormat.class);
                     }
 
                     if (jsonobject.has("insertion")) {
@@ -362,7 +362,7 @@ public class ChatModifier {
                         if (jsonobject1 != null) {
                             jsonprimitive = jsonobject1.getAsJsonPrimitive("action");
                             ChatHoverable.EnumHoverAction chathoverable_enumhoveraction = jsonprimitive == null ? null : ChatHoverable.EnumHoverAction.a(jsonprimitive.getAsString());
-                            IChatBaseComponent ichatbasecomponent = (IChatBaseComponent) jsondeserializationcontext.deserialize(jsonobject1.get("value"), IChatBaseComponent.class);
+                            IChatBaseComponent ichatbasecomponent = jsondeserializationcontext.deserialize(jsonobject1.get("value"), IChatBaseComponent.class);
 
                             if (chathoverable_enumhoveraction != null && ichatbasecomponent != null && chathoverable_enumhoveraction.a()) {
                                 chatmodifier.i = new ChatHoverable(chathoverable_enumhoveraction, ichatbasecomponent);
@@ -432,7 +432,7 @@ public class ChatModifier {
         }
 
         public JsonElement serialize(ChatModifier object, Type type, JsonSerializationContext jsonserializationcontext) { // CraftBukkit - fix decompile error
-            return this.a((ChatModifier) object, type, jsonserializationcontext);
+            return this.a(object, type, jsonserializationcontext);
         }
 
         public ChatModifier deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // CraftBukkit - fix decompile error
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/Chunk.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/Chunk.java
index 1935ba6..71c4630 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/Chunk.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/Chunk.java
@@ -49,7 +49,7 @@ public class Chunk {
     private long u;
     private int v;
     private ConcurrentLinkedQueue w;
-    protected gnu.trove.map.hash.TObjectIntHashMap entityCount = new gnu.trove.map.hash.TObjectIntHashMap(); // Spigot
+    protected gnu.trove.map.hash.TObjectIntHashMap entityCount = new gnu.trove.map.hash.TObjectIntHashMap<>(); // Spigot
 
     // Migot start
     private boolean unloaded = false;
@@ -430,11 +430,8 @@ public class Chunk {
             }
 
             if (!this.world.worldProvider.o()) {
-                Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
-
-                while (iterator.hasNext()) {
-                    EnumDirection enumdirection = (EnumDirection) iterator.next();
 
+                for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
                     this.a(j1 + enumdirection.getAdjacentX(), k1 + enumdirection.getAdjacentZ(), i2, j2);
                 }
 
@@ -835,10 +832,9 @@ public class Chunk {
 
     public boolean isBelowHeightMap(int blockposition_x, int blockposition_y, int blockposition_z) {
         int i = blockposition_x & 15;
-        int j = blockposition_y;
         int k = blockposition_z & 15;
 
-        return j >= this.heightMap[k << 4 | i];
+        return blockposition_y >= this.heightMap[k << 4 | i];
     }
 
     public TileEntity i(BlockPosition blockposition) {
@@ -854,7 +850,7 @@ public class Chunk {
             tileentity = world.capturedTileEntities.get(blockposition);
         }
         if (tileentity == null) {
-            tileentity = (TileEntity) this.tileEntities.get(blockposition);
+            tileentity = this.tileEntities.get(blockposition);
         }
         // CraftBukkit end
 
@@ -886,7 +882,7 @@ public class Chunk {
         tileentity.a(blockposition);
         if (this.getType(blockposition) instanceof IContainer) {
             if (this.tileEntities.containsKey(blockposition)) {
-                ((TileEntity) this.tileEntities.get(blockposition)).y();
+                this.tileEntities.get(blockposition).y();
             }
 
             tileentity.D();
@@ -908,7 +904,7 @@ public class Chunk {
 
     public void e(BlockPosition blockposition) {
         if (this.h) {
-            TileEntity tileentity = (TileEntity) this.tileEntities.remove(blockposition);
+            TileEntity tileentity = this.tileEntities.remove(blockposition);
 
             if (tileentity != null) {
                 tileentity.y();
@@ -921,8 +917,8 @@ public class Chunk {
         this.h = true;
         this.world.a(this.tileEntities.values());
 
-        for (int i = 0; i < this.entitySlices.length; ++i) {
-            Iterator iterator = this.entitySlices[i].iterator();
+        for (List entitySlice : this.entitySlices) {
+            Iterator iterator = entitySlice.iterator();
 
             while (iterator.hasNext()) {
                 Entity entity = (Entity) iterator.next();
@@ -930,25 +926,20 @@ public class Chunk {
                 entity.ah();
             }
 
-            this.world.b((Collection) this.entitySlices[i]);
+            this.world.b(entitySlice);
         }
 
     }
 
     public void removeEntities() {
         this.h = false;
-        Iterator iterator = this.tileEntities.values().iterator();
 
-        while (iterator.hasNext()) {
-            TileEntity tileentity = (TileEntity) iterator.next();
+        for (TileEntity tileentity : this.tileEntities.values()) {
             // Spigot Start
-            if ( tileentity instanceof IInventory )
-            {
-                for ( org.bukkit.entity.HumanEntity h : Lists.newArrayList((List) ( (IInventory) tileentity ).getViewers() ) )
-                {
-                    if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
-                    {
-                       ( (org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeInventory();
+            if (tileentity instanceof IInventory) {
+                for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) tileentity).getViewers())) {
+                    if (h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity) {
+                        ((org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeInventory();
                     }
                 }
             }
@@ -957,20 +948,17 @@ public class Chunk {
             this.world.b(tileentity);
         }
 
-        for (int i = 0; i < this.entitySlices.length; ++i) {
+        for (List entitySlice : this.entitySlices) {
             // CraftBukkit start
-            List newList = Lists.newArrayList(this.entitySlices[i]);
-            java.util.Iterator iter = newList.iterator();
+            List newList = Lists.newArrayList(entitySlice);
+            Iterator iter = newList.iterator();
             while (iter.hasNext()) {
                 Entity entity = iter.next();
                 // Spigot Start
-                if ( entity instanceof IInventory )
-                {
-                    for ( org.bukkit.entity.HumanEntity h : Lists.newArrayList( (List) ( (IInventory) entity ).getViewers() ) )
-                    {
-                        if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity )
-                        {
-                           ( (org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeInventory();
+                if (entity instanceof IInventory) {
+                    for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) entity).getViewers())) {
+                        if (h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity) {
+                            ((org.bukkit.craftbukkit.entity.CraftHumanEntity) h).getHandle().closeInventory();
                         }
                     }
                 }
@@ -983,7 +971,7 @@ public class Chunk {
                 }
             }
 
-            this.world.c((Collection) newList);
+            this.world.c(newList);
             // CraftBukkit end
         }
 
@@ -1023,8 +1011,8 @@ public class Chunk {
                         Entity[] aentity = entity1.aB();
 
                         if (aentity != null) {
-                            for (int l = 0; l < aentity.length; ++l) {
-                                entity1 = aentity[l];
+                            for (Entity value : aentity) {
+                                entity1 = value;
                                 if (entity1 != entity && entity1.getBoundingBox().b(axisalignedbb) && (predicate == null || predicate.apply(entity1))) {
                                     list.add(entity1);
                                 }
@@ -1056,11 +1044,9 @@ public class Chunk {
         // PaperSpigot end
         for (int k = i; k <= j; ++k) {
             if (counts != null && counts[k] <= 0) continue; // PaperSpigot - Don't check a chunk if it doesn't have the type we are looking for
-            Iterator iterator = this.entitySlices[k].iterator(); // Spigot
-
-            while (iterator.hasNext()) {
-                Entity entity = (Entity) iterator.next();
+            // Spigot
 
+            for (Entity entity : this.entitySlices[k]) {
                 if (oclass.isInstance(entity) && entity.getBoundingBox().b(axisalignedbb) && (predicate == null || predicate.apply((T) entity))) { // CraftBukkit - fix decompile error // Spigot
                     list.add((T) entity); // Fix decompile error
                 }
@@ -1082,7 +1068,7 @@ public class Chunk {
     }
 
     public Random a(long i) {
-        return new Random(this.world.getSeed() + (long) (this.locX * this.locX * 4987142) + (long) (this.locX * 5947611) + (long) (this.locZ * this.locZ) * 4392871L + (long) (this.locZ * 389711) ^ i);
+        return new Random(this.world.getSeed() + (this.locX * this.locX * 4987142) + (this.locX * 5947611L) + (this.locZ * this.locZ) * 4392871L + (this.locZ * 389711L) ^ i);
     }
 
     public boolean isEmpty() {
@@ -1180,7 +1166,7 @@ public class Chunk {
         }
 
         while (!this.w.isEmpty()) {
-            BlockPosition blockposition = (BlockPosition) this.w.poll();
+            BlockPosition blockposition = this.w.poll();
 
             if (this.a(blockposition, Chunk.EnumTileEntityState.CHECK) == null && this.getType(blockposition).isTileEntity()) {
                 TileEntity tileentity = this.i(blockposition);
@@ -1201,12 +1187,7 @@ public class Chunk {
             return;
         }
 
-        world.lightingExecutor.submit(new Runnable() {
-            @Override
-            public void run() {
-                Chunk.this.h(isClientSide);
-            }
-        });
+        world.lightingExecutor.submit(() -> Chunk.this.h(isClientSide));
     }
 
     public boolean isReady() {
@@ -1249,9 +1230,7 @@ public class Chunk {
         if (this.sections.length != achunksection.length) {
             Chunk.c.warn("Could not set level chunk sections, array length is " + achunksection.length + " instead of " + this.sections.length);
         } else {
-            for (int i = 0; i < this.sections.length; ++i) {
-                this.sections[i] = achunksection[i];
-            }
+            System.arraycopy(achunksection, 0, this.sections, 0, this.sections.length);
 
         }
     }
@@ -1280,9 +1259,7 @@ public class Chunk {
         if (this.e.length != abyte.length) {
             Chunk.c.warn("Could not set level chunk biomes, array length is " + abyte.length + " instead of " + this.e.length);
         } else {
-            for (int i = 0; i < this.e.length; ++i) {
-                this.e[i] = abyte[i];
-            }
+            System.arraycopy(abyte, 0, this.e, 0, this.e.length);
 
         }
     }
@@ -1313,8 +1290,7 @@ public class Chunk {
                     EnumDirection[] aenumdirection = EnumDirection.values();
                     int j1 = aenumdirection.length;
 
-                    for (int k1 = 0; k1 < j1; ++k1) {
-                        EnumDirection enumdirection = aenumdirection[k1];
+                    for (EnumDirection enumdirection : aenumdirection) {
                         BlockPosition blockposition2 = blockposition1.shift(enumdirection);
 
                         if (this.world.getType(blockposition2).getBlock().r() > 0) {
@@ -1347,10 +1323,8 @@ public class Chunk {
                 }
 
                 if (this.lit) {
-                    Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
 
-                    while (iterator.hasNext()) {
-                        EnumDirection enumdirection = (EnumDirection) iterator.next();
+                    for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
                         int k = enumdirection.c() == EnumDirection.EnumAxisDirection.POSITIVE ? 16 : 1;
 
                         this.world.getChunkAtWorldCoords(blockposition.shift(enumdirection, k)).a(enumdirection.opposite());
@@ -1408,7 +1382,7 @@ public class Chunk {
 
         for (l = k + 16 - 1; l > this.world.F() || l > 0 && !flag1; --l) {
             blockposition_mutableblockposition.c(blockposition_mutableblockposition.getX(), l, blockposition_mutableblockposition.getZ());
-            int i1 = this.b((BlockPosition) blockposition_mutableblockposition);
+            int i1 = this.b(blockposition_mutableblockposition);
 
             if (i1 == 255 && blockposition_mutableblockposition.getY() < this.world.F()) {
                 flag1 = true;
@@ -1447,9 +1421,7 @@ public class Chunk {
         if (this.heightMap.length != aint.length) {
             Chunk.c.warn("Could not set level chunk heightmap, array length is " + aint.length + " instead of " + this.heightMap.length);
         } else {
-            for (int i = 0; i < this.heightMap.length; ++i) {
-                this.heightMap[i] = aint[i];
-            }
+            System.arraycopy(aint, 0, this.heightMap, 0, this.heightMap.length);
 
         }
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderFlat.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderFlat.java
index b939f47..c971c1c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderFlat.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderFlat.java
@@ -64,11 +64,8 @@ public class ChunkProviderFlat implements IChunkProvider {
         int j = 0;
         int k = 0;
         boolean flag1 = true;
-        Iterator iterator = this.d.c().iterator();
-
-        while (iterator.hasNext()) {
-            WorldGenFlatLayerInfo worldgenflatlayerinfo = (WorldGenFlatLayerInfo) iterator.next();
 
+        for (WorldGenFlatLayerInfo worldgenflatlayerinfo : this.d.c()) {
             for (int l = worldgenflatlayerinfo.d(); l < worldgenflatlayerinfo.d() + worldgenflatlayerinfo.b(); ++l) {
                 IBlockData iblockdata = worldgenflatlayerinfo.c();
 
@@ -87,7 +84,7 @@ public class ChunkProviderFlat implements IChunkProvider {
         }
 
         world.b(j);
-        this.f = flag1 ? false : this.d.b().containsKey("decoration");
+        this.f = !flag1 && this.d.b().containsKey("decoration");
     }
 
     public Chunk getOrCreateChunk(int i, int j) {
@@ -107,16 +104,14 @@ public class ChunkProviderFlat implements IChunkProvider {
             }
         }
 
-        Iterator iterator = this.e.iterator();
-
-        while (iterator.hasNext()) {
-            WorldGenBase worldgenbase = (WorldGenBase) iterator.next();
+        for (StructureGenerator structureGenerator : this.e) {
+            WorldGenBase worldgenbase = structureGenerator;
 
             worldgenbase.a(this, this.a, i, j, chunksnapshot);
         }
 
         Chunk chunk = new Chunk(this.a, chunksnapshot, i, j);
-        BiomeBase[] abiomebase = this.a.getWorldChunkManager().getBiomeBlock((BiomeBase[]) null, i * 16, j * 16, 16, 16);
+        BiomeBase[] abiomebase = this.a.getWorldChunkManager().getBiomeBlock(null, i * 16, j * 16, 16, 16);
         byte[] abyte = chunk.getBiomeIndex();
 
         for (k = 0; k < abyte.length; ++k) {
@@ -144,10 +139,8 @@ public class ChunkProviderFlat implements IChunkProvider {
 
         this.b.setSeed((long) i * i1 + (long) j * j1 ^ this.a.getSeed());
         ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
-        Iterator iterator = this.e.iterator();
 
-        while (iterator.hasNext()) {
-            StructureGenerator structuregenerator = (StructureGenerator) iterator.next();
+        for (StructureGenerator structuregenerator : this.e) {
             boolean flag1 = structuregenerator.a(this.a, this.b, chunkcoordintpair);
 
             if (structuregenerator instanceof WorldGenVillage) {
@@ -209,11 +202,8 @@ public class ChunkProviderFlat implements IChunkProvider {
 
     public BlockPosition findNearestMapFeature(World world, String s, BlockPosition blockposition) {
         if ("Stronghold".equals(s)) {
-            Iterator iterator = this.e.iterator();
-
-            while (iterator.hasNext()) {
-                StructureGenerator structuregenerator = (StructureGenerator) iterator.next();
 
+            for (StructureGenerator structuregenerator : this.e) {
                 if (structuregenerator instanceof WorldGenStronghold) {
                     return structuregenerator.getNearestGeneratedFeature(world, blockposition);
                 }
@@ -228,12 +218,9 @@ public class ChunkProviderFlat implements IChunkProvider {
     }
 
     public void recreateStructures(Chunk chunk, int i, int j) {
-        Iterator iterator = this.e.iterator();
 
-        while (iterator.hasNext()) {
-            StructureGenerator structuregenerator = (StructureGenerator) iterator.next();
-
-            structuregenerator.a(this, this.a, i, j, (ChunkSnapshot) null);
+        for (StructureGenerator structuregenerator : this.e) {
+            structuregenerator.a(this, this.a, i, j, null);
         }
 
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderGenerate.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
index ad464d3..a50c53a 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderGenerate.java
@@ -137,7 +137,7 @@ public class ChunkProviderGenerate implements IChunkProvider {
     public void a(int i, int j, ChunkSnapshot chunksnapshot, BiomeBase[] abiomebase) {
         double d0 = 0.03125D;
 
-        this.t = this.l.a(this.t, (double) (i * 16), (double) (j * 16), 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
+        this.t = this.l.a(this.t, i * 16, j * 16, 16, 16, d0 * 2.0D, d0 * 2.0D, 1.0D);
 
         for (int k = 0; k < 16; ++k) {
             for (int l = 0; l < 16; ++l) {
@@ -196,13 +196,13 @@ public class ChunkProviderGenerate implements IChunkProvider {
     }
 
     private void a(int i, int j, int k) {
-        this.g = this.b.a(this.g, i, k, 5, 5, (double) this.r.e, (double) this.r.f, (double) this.r.g);
+        this.g = this.b.a(this.g, i, k, 5, 5, this.r.e, this.r.f, this.r.g);
         float f = this.r.a;
         float f1 = this.r.b;
 
-        this.d = this.k.a(this.d, i, j, k, 5, 33, 5, (double) (f / this.r.h), (double) (f1 / this.r.i), (double) (f / this.r.j));
-        this.e = this.i.a(this.e, i, j, k, 5, 33, 5, (double) f, (double) f1, (double) f);
-        this.f = this.j.a(this.f, i, j, k, 5, 33, 5, (double) f, (double) f1, (double) f);
+        this.d = this.k.a(this.d, i, j, k, 5, 33, 5, f / this.r.h, f1 / this.r.i, f / this.r.j);
+        this.e = this.i.a(this.e, i, j, k, 5, 33, 5, f, f1, f);
+        this.f = this.j.a(this.f, i, j, k, 5, 33, 5, f, f1, f);
         boolean flag = false;
         boolean flag1 = false;
         int l = 0;
@@ -267,8 +267,8 @@ public class ChunkProviderGenerate implements IChunkProvider {
                 }
 
                 ++i1;
-                double d1 = (double) f3;
-                double d2 = (double) f2;
+                double d1 = f3;
+                double d2 = f2;
 
                 d1 += d0 * 0.2D;
                 d1 = d1 * (double) this.r.k / 8.0D;
@@ -287,7 +287,7 @@ public class ChunkProviderGenerate implements IChunkProvider {
                     double d8 = MathHelper.b(d5, d6, d7) - d4;
 
                     if (j2 > 29) {
-                        double d9 = (double) ((float) (j2 - 29) / 3.0F);
+                        double d9 = (float) (j2 - 29) / 3.0F;
 
                         d8 = d8 * (1.0D - d9) + -10.0D * d9;
                     }
@@ -445,23 +445,23 @@ public class ChunkProviderGenerate implements IChunkProvider {
 
     public void recreateStructures(Chunk chunk, int i, int j) {
         if (this.r.w && this.n && this.m.paperSpigotConfig.generateMineshaft) { // PaperSpigot
-            this.x.a(this, this.m, i, j, (ChunkSnapshot) null);
+            this.x.a(this, this.m, i, j, null);
         }
 
         if (this.r.v && this.n && this.m.paperSpigotConfig.generateVillage) { // PaperSpigot
-            this.w.a(this, this.m, i, j, (ChunkSnapshot) null);
+            this.w.a(this, this.m, i, j, null);
         }
 
         if (this.r.u && this.n && this.m.paperSpigotConfig.generateStronghold) { // PaperSpigot
-            this.v.a(this, this.m, i, j, (ChunkSnapshot) null);
+            this.v.a(this, this.m, i, j, null);
         }
 
         if (this.r.x && this.n && this.m.paperSpigotConfig.generateTemple) { // PaperSpigot
-            this.y.a(this, this.m, i, j, (ChunkSnapshot) null);
+            this.y.a(this, this.m, i, j, null);
         }
 
         if (this.r.y && this.n && this.m.paperSpigotConfig.generateMonument) { // PaperSpigot
-            this.A.a(this, this.m, i, j, (ChunkSnapshot) null);
+            this.A.a(this, this.m, i, j, null);
         }
 
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderHell.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderHell.java
index 0156892..84e8a24 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderHell.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderHell.java
@@ -207,7 +207,7 @@ public class ChunkProviderHell implements IChunkProvider {
         }
 
         Chunk chunk = new Chunk(this.h, chunksnapshot, i, j);
-        BiomeBase[] abiomebase = this.h.getWorldChunkManager().getBiomeBlock((BiomeBase[]) null, i * 16, j * 16, 16, 16);
+        BiomeBase[] abiomebase = this.h.getWorldChunkManager().getBiomeBlock(null, i * 16, j * 16, 16, 16);
         byte[] abyte = chunk.getBiomeIndex();
 
         for (int k = 0; k < abyte.length; ++k) {
@@ -238,10 +238,10 @@ public class ChunkProviderHell implements IChunkProvider {
 
         for (l1 = 0; l1 < i1; ++l1) {
             adouble1[l1] = Math.cos((double) l1 * 3.141592653589793D * 6.0D / (double) i1) * 2.0D;
-            double d2 = (double) l1;
+            double d2 = l1;
 
             if (l1 > i1 / 2) {
-                d2 = (double) (i1 - 1 - l1);
+                d2 = i1 - 1 - l1;
             }
 
             if (d2 < 4.0D) {
@@ -273,7 +273,7 @@ public class ChunkProviderHell implements IChunkProvider {
                     double d9;
 
                     if (j2 > i1 - 4) {
-                        d9 = (double) ((float) (j2 - (i1 - 4)) / 3.0F);
+                        d9 = (float) (j2 - (i1 - 4)) / 3.0F;
                         d4 = d4 * (1.0D - d9) + -10.0D * d9;
                     }
 
@@ -387,7 +387,7 @@ public class ChunkProviderHell implements IChunkProvider {
     }
 
     public void recreateStructures(Chunk chunk, int i, int j) {
-        if (this.h.paperSpigotConfig.generateFortress) this.B.a(this, this.h, i, j, (ChunkSnapshot) null); // PaperSpigot
+        if (this.h.paperSpigotConfig.generateFortress) this.B.a(this, this.h, i, j, null); // PaperSpigot
     }
 
     public Chunk getChunkAt(BlockPosition blockposition) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java
index bcaf636..968a807 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -1,25 +1,18 @@
 package net.minecraft.server;
 
-import com.google.common.collect.Lists;
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
+
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
 // CraftBukkit start
 import java.util.Random;
-import java.util.logging.Level;
 
 import org.bukkit.Server;
 import org.bukkit.craftbukkit.chunkio.ChunkIOExecutor;
 import org.bukkit.craftbukkit.util.LongHash;
-import org.bukkit.craftbukkit.util.LongHashSet;
-import org.bukkit.craftbukkit.util.LongObjectHashMap;
 import org.bukkit.event.world.ChunkUnloadEvent;
 // CraftBukkit end
 // TacoSpigot start
@@ -38,7 +31,7 @@ public class ChunkProviderServer implements IChunkProvider {
     public IChunkProvider chunkProvider;
     public IChunkLoader chunkLoader; // KigPaper - private -> public
     public boolean forceChunkLoad = false; // CraftBukkit - true -> false
-    public Long2ObjectMap chunks = new Long2ObjectOpenHashMap(4096, 0.5f); // TacoSpigot - use trove Long2ObjectOpenHashMap instead of craftbukkit implementation (using inital capacity and load factor chosen by Amaranth in an old impl)
+    public Long2ObjectMap chunks = new Long2ObjectOpenHashMap<>(4096, 0.5f); // TacoSpigot - use trove Long2ObjectOpenHashMap instead of craftbukkit implementation (using inital capacity and load factor chosen by Amaranth in an old impl)
     public WorldServer world;
 
     // Migot start
@@ -116,11 +109,8 @@ public class ChunkProviderServer implements IChunkProvider {
     }
 
     public void b() {
-        Iterator iterator = this.chunks.values().iterator();
-
-        while (iterator.hasNext()) {
-            Chunk chunk = (Chunk) iterator.next();
 
+        for (Chunk chunk : this.chunks.values()) {
             this.queueUnload(chunk.locX, chunk.locZ);
         }
 
@@ -165,7 +155,7 @@ public class ChunkProviderServer implements IChunkProvider {
     }
     public Chunk originalGetChunkAt(int i, int j) {
         this.unloadQueue.remove(LongHash.toLong(i, j)); // TacoSpigot - directly invoke LongHash
-        Chunk chunk = (Chunk) this.chunks.get(LongHash.toLong(i, j));
+        Chunk chunk = this.chunks.get(LongHash.toLong(i, j));
         boolean newChunk = false;
         // CraftBukkit end
 
@@ -182,9 +172,9 @@ public class ChunkProviderServer implements IChunkProvider {
                         CrashReport crashreport = CrashReport.a(throwable, "Exception generating new chunk");
                         CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Chunk to be generated");
 
-                        crashreportsystemdetails.a("Location", (Object) String.format("%d,%d", new Object[] { Integer.valueOf(i), Integer.valueOf(j)}));
-                        crashreportsystemdetails.a("Position hash", (Object) Long.valueOf(LongHash.toLong(i, j))); // CraftBukkit - Use LongHash
-                        crashreportsystemdetails.a("Generator", (Object) this.chunkProvider.getName());
+                        crashreportsystemdetails.a("Location", String.format("%d,%d", new Object[] {i, j}));
+                        crashreportsystemdetails.a("Position hash", LongHash.toLong(i, j)); // CraftBukkit - Use LongHash
+                        crashreportsystemdetails.a("Generator", this.chunkProvider.getName());
                         throw new ReportedException(crashreport);
                     }
                 }
@@ -230,7 +220,7 @@ public class ChunkProviderServer implements IChunkProvider {
 
     public Chunk getOrCreateChunk(int i, int j) {
         // CraftBukkit start
-        Chunk chunk = (Chunk) this.chunks.get(LongHash.toLong(i, j));
+        Chunk chunk = this.chunks.get(LongHash.toLong(i, j));
 
         chunk = chunk == null ? (!this.world.ad() && !this.forceChunkLoad ? this.emptyChunk : this.getChunkAt(i, j)) : chunk;
 
@@ -348,9 +338,7 @@ public class ChunkProviderServer implements IChunkProvider {
         int i = 0;
 
         // CraftBukkit start
-        Iterator iterator = this.chunks.values().iterator();
-        while (iterator.hasNext()) {
-            Chunk chunk = (Chunk) iterator.next();
+        for (Chunk chunk : this.chunks.values()) {
             // CraftBukkit end
 
             if (flag) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index baadcc8..ee240ce 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -69,7 +69,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
     public Object[] loadChunk(World world, int i, int j) throws IOException {
         // CraftBukkit end
         ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);
-        NBTTagCompound nbttagcompound = (NBTTagCompound) this.b.get(chunkcoordintpair);
+        NBTTagCompound nbttagcompound = this.b.get(chunkcoordintpair);
 
         if (nbttagcompound == null) {
             // KigPaper - use try-with-resources
@@ -108,7 +108,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
                     NBTTagList tileEntities = nbttagcompound.getCompound("Level").getList("TileEntities", 10);
                     if (tileEntities != null) {
                         for (int te = 0; te < tileEntities.size(); te++) {
-                            NBTTagCompound tileEntity = (NBTTagCompound) tileEntities.get(te);
+                            NBTTagCompound tileEntity = tileEntities.get(te);
                             int x = tileEntity.getInt("x") - chunk.locX * 16;
                             int z = tileEntity.getInt("z") - chunk.locZ * 16;
                             tileEntity.setInt("x", i * 16 + x);
@@ -161,13 +161,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
 
             return false;
         } else {
-            ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair) this.b.keySet().iterator().next();
+            ChunkCoordIntPair chunkcoordintpair = this.b.keySet().iterator().next();
 
             boolean flag;
 
             try {
                 this.c.add(chunkcoordintpair);
-                NBTTagCompound nbttagcompound = (NBTTagCompound) this.b.remove(chunkcoordintpair);
+                NBTTagCompound nbttagcompound = this.b.remove(chunkcoordintpair);
 
                 if (nbttagcompound != null) {
                     try {
@@ -224,13 +224,12 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
         ChunkSection[] achunksection = chunk.getSections();
         NBTTagList nbttaglist = new NBTTagList();
         boolean flag = !world.worldProvider.o();
-        ChunkSection[] achunksection1 = achunksection;
         int i = achunksection.length;
 
         NBTTagCompound nbttagcompound1;
 
         for (int j = 0; j < i; ++j) {
-            ChunkSection chunksection = achunksection1[j];
+            ChunkSection chunksection = achunksection[j];
 
             if (chunksection != null) {
                 nbttagcompound1 = new NBTTagCompound();
@@ -314,12 +313,11 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
         if (list != null) {
             long k1 = world.getTime();
             NBTTagList nbttaglist3 = new NBTTagList();
-            Iterator iterator1 = list.iterator();
 
-            while (iterator1.hasNext()) {
-                NextTickListEntry nextticklistentry = (NextTickListEntry) iterator1.next();
+            for (Object o : list) {
+                NextTickListEntry nextticklistentry = (NextTickListEntry) o;
                 NBTTagCompound nbttagcompound2 = new NBTTagCompound();
-                MinecraftKey minecraftkey = (MinecraftKey) Block.REGISTRY.c(nextticklistentry.a());
+                MinecraftKey minecraftkey = Block.REGISTRY.c(nextticklistentry.a());
 
                 nbttagcompound2.setString("i", minecraftkey == null ? "" : minecraftkey.toString());
                 nbttagcompound2.setInt("x", nextticklistentry.a.getX());
@@ -367,19 +365,18 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
                 // CraftBukkit start - fix broken blocks
                 // achar[l] = (char) (l1 << 12 | (abyte[l] & 255) << 4 | nibblearray.a(i1, j1, k1));
 
-                int ex =  l1;
                 int id = (abyte[l] & 255);
                 int data = nibblearray.a(i1, j1, k1);
-                int packed = ex << 12 | id << 4 | data;
+                int packed = l1 << 12 | id << 4 | data;
                 if (Block.d.a(packed) == null) {
-                    Block block = Block.getById(ex << 8 | id);
+                    Block block = Block.getById(l1 << 8 | id);
                     if (block != null) {
                         try {
                             data = block.toLegacyData(block.fromLegacyData(data));
                         } catch (Exception ignored) {
                             data = block.toLegacyData(block.getBlockData());
                         }
-                        packed = ex << 12 | id << 4 | data;
+                        packed = l1 << 12 | id << 4 | data;
                     }
                 }
                 achar[l] = (char) packed;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkSection.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkSection.java
index 6a14609..a4e179d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ChunkSection.java
@@ -35,7 +35,7 @@ public class ChunkSection {
     // CraftBukkit end
 
     public IBlockData getType(int i, int j, int k) {
-        IBlockData iblockdata = (IBlockData) Block.d.a(this.blockIds[j << 8 | k << 4 | i]);
+        IBlockData iblockdata = Block.d.a(this.blockIds[j << 8 | k << 4 | i]);
 
         return iblockdata != null ? iblockdata : Blocks.AIR.getBlockData();
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
index 7820257..ddb214c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
@@ -129,7 +129,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
             command = command.substring(1);
         }
         String[] args = command.split(" ");
-        ArrayList commands = new ArrayList();
+        ArrayList commands = new ArrayList<>();
 
         String cmd = args[0];
         if (cmd.startsWith("minecraft:")) cmd = cmd.substring("minecraft:".length());
@@ -157,9 +157,9 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
             if (command.startsWith("/")) {
                 command = command.substring(1);
             }
-            String as[] = command.split(" ");
+            String[] as = command.split(" ");
             as = VanillaCommandWrapper.dropFirstArgument(as);
-            if (!((VanillaCommandWrapper) commandBlockCommand).testPermission(bSender)) {
+            if (!commandBlockCommand.testPermission(bSender)) {
                 return 0;
             }
             return ((VanillaCommandWrapper) commandBlockCommand).dispatchVanillaCommand(bSender, sender, as);
@@ -187,11 +187,11 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
             server.worldServer[pos] = world;
         }
         try {
-            ArrayList newCommands = new ArrayList();
+            ArrayList newCommands = new ArrayList<>();
             for (int i = 0; i < args.length; i++) {
                 if (PlayerSelector.isPattern(args[i])) {
-                    for (int j = 0; j < commands.size(); j++) {
-                        newCommands.addAll(buildCommands(sender, commands.get(j), i));
+                    for (String[] strings : commands) {
+                        newCommands.addAll(buildCommands(sender, strings, i));
                     }
                     ArrayList temp = commands;
                     commands = newCommands;
@@ -206,9 +206,9 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
         int completed = 0;
 
         // Now dispatch all of the commands we ended up with
-        for (int i = 0; i < commands.size(); i++) {
+        for (String[] strings : commands) {
             try {
-                if (commandMap.dispatch(bSender, joiner.join(java.util.Arrays.asList(commands.get(i))))) {
+                if (commandMap.dispatch(bSender, joiner.join(java.util.Arrays.asList(strings)))) {
                     completed++;
                 }
             } catch (Throwable exception) {
@@ -218,7 +218,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
                     CommandBlockListenerAbstract listener = (CommandBlockListenerAbstract) sender;
                     MinecraftServer.getServer().server.getLogger().log(Level.WARNING, String.format("CommandBlock at (%d,%d,%d) failed to handle command", listener.getChunkCoordinates().getX(), listener.getChunkCoordinates().getY(), listener.getChunkCoordinates().getZ()), exception);
                 } else {
-                    MinecraftServer.getServer().server.getLogger().log(Level.WARNING, String.format("Unknown CommandBlock failed to handle command"), exception);
+                    MinecraftServer.getServer().server.getLogger().log(Level.WARNING, "Unknown CommandBlock failed to handle command", exception);
                 }
             }
         }
@@ -227,8 +227,8 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
     }
 
     private static ArrayList buildCommands(ICommandListener sender, String[] args, int pos) {
-        ArrayList commands = new ArrayList();
-        java.util.List players = (java.util.List)PlayerSelector.getPlayers(sender, args[pos], EntityPlayer.class);
+        ArrayList commands = new ArrayList<>();
+        java.util.List players = PlayerSelector.getPlayers(sender, args[pos], EntityPlayer.class);
 
         if (players != null) {
             for (EntityPlayer player : players) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandDispatcher.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandDispatcher.java
index fc52287..b0597a2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandDispatcher.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandDispatcher.java
@@ -5,70 +5,70 @@ import java.util.Iterator;
 public class CommandDispatcher extends CommandHandler implements ICommandDispatcher {
 
     public CommandDispatcher() {
-        this.a((ICommand) (new CommandTime()));
-        this.a((ICommand) (new CommandGamemode()));
-        this.a((ICommand) (new CommandDifficulty()));
-        this.a((ICommand) (new CommandGamemodeDefault()));
-        this.a((ICommand) (new CommandKill()));
-        this.a((ICommand) (new CommandToggleDownfall()));
-        this.a((ICommand) (new CommandWeather()));
-        this.a((ICommand) (new CommandXp()));
-        this.a((ICommand) (new CommandTp()));
-        this.a((ICommand) (new CommandGive()));
-        this.a((ICommand) (new CommandReplaceItem()));
-        this.a((ICommand) (new CommandStats()));
-        this.a((ICommand) (new CommandEffect()));
-        this.a((ICommand) (new CommandEnchant()));
-        this.a((ICommand) (new CommandParticle()));
-        this.a((ICommand) (new CommandMe()));
-        this.a((ICommand) (new CommandSeed()));
-        this.a((ICommand) (new CommandHelp()));
-        this.a((ICommand) (new CommandDebug()));
-        this.a((ICommand) (new CommandTell()));
-        this.a((ICommand) (new CommandSay()));
-        this.a((ICommand) (new CommandSpawnpoint()));
-        this.a((ICommand) (new CommandSetWorldSpawn()));
-        this.a((ICommand) (new CommandGamerule()));
-        this.a((ICommand) (new CommandClear()));
-        this.a((ICommand) (new CommandTestFor()));
-        this.a((ICommand) (new CommandSpreadPlayers()));
-        this.a((ICommand) (new CommandPlaySound()));
-        this.a((ICommand) (new CommandScoreboard()));
-        this.a((ICommand) (new CommandExecute()));
-        this.a((ICommand) (new CommandTrigger()));
-        this.a((ICommand) (new CommandAchievement()));
-        this.a((ICommand) (new CommandSummon()));
-        this.a((ICommand) (new CommandSetBlock()));
-        this.a((ICommand) (new CommandFill()));
-        this.a((ICommand) (new CommandClone()));
-        this.a((ICommand) (new CommandTestForBlocks()));
-        this.a((ICommand) (new CommandBlockData()));
-        this.a((ICommand) (new CommandTestForBlock()));
-        this.a((ICommand) (new CommandTellRaw()));
-        this.a((ICommand) (new CommandWorldBorder()));
-        this.a((ICommand) (new CommandTitle()));
-        this.a((ICommand) (new CommandEntityData()));
+        this.a(new CommandTime());
+        this.a(new CommandGamemode());
+        this.a(new CommandDifficulty());
+        this.a(new CommandGamemodeDefault());
+        this.a(new CommandKill());
+        this.a(new CommandToggleDownfall());
+        this.a(new CommandWeather());
+        this.a(new CommandXp());
+        this.a(new CommandTp());
+        this.a(new CommandGive());
+        this.a(new CommandReplaceItem());
+        this.a(new CommandStats());
+        this.a(new CommandEffect());
+        this.a(new CommandEnchant());
+        this.a(new CommandParticle());
+        this.a(new CommandMe());
+        this.a(new CommandSeed());
+        this.a(new CommandHelp());
+        this.a(new CommandDebug());
+        this.a(new CommandTell());
+        this.a(new CommandSay());
+        this.a(new CommandSpawnpoint());
+        this.a(new CommandSetWorldSpawn());
+        this.a(new CommandGamerule());
+        this.a(new CommandClear());
+        this.a(new CommandTestFor());
+        this.a(new CommandSpreadPlayers());
+        this.a(new CommandPlaySound());
+        this.a(new CommandScoreboard());
+        this.a(new CommandExecute());
+        this.a(new CommandTrigger());
+        this.a(new CommandAchievement());
+        this.a(new CommandSummon());
+        this.a(new CommandSetBlock());
+        this.a(new CommandFill());
+        this.a(new CommandClone());
+        this.a(new CommandTestForBlocks());
+        this.a(new CommandBlockData());
+        this.a(new CommandTestForBlock());
+        this.a(new CommandTellRaw());
+        this.a(new CommandWorldBorder());
+        this.a(new CommandTitle());
+        this.a(new CommandEntityData());
         if (MinecraftServer.getServer().ae()) {
-            this.a((ICommand) (new CommandOp()));
-            this.a((ICommand) (new CommandDeop()));
-            this.a((ICommand) (new CommandStop()));
-            this.a((ICommand) (new CommandSaveAll()));
-            this.a((ICommand) (new CommandSaveOff()));
-            this.a((ICommand) (new CommandSaveOn()));
-            this.a((ICommand) (new CommandBanIp()));
-            this.a((ICommand) (new CommandPardonIP()));
-            this.a((ICommand) (new CommandBan()));
-            this.a((ICommand) (new CommandBanList()));
-            this.a((ICommand) (new CommandPardon()));
-            this.a((ICommand) (new CommandKick()));
-            this.a((ICommand) (new CommandList()));
-            this.a((ICommand) (new CommandWhitelist()));
-            this.a((ICommand) (new CommandIdleTimeout()));
+            this.a(new CommandOp());
+            this.a(new CommandDeop());
+            this.a(new CommandStop());
+            this.a(new CommandSaveAll());
+            this.a(new CommandSaveOff());
+            this.a(new CommandSaveOn());
+            this.a(new CommandBanIp());
+            this.a(new CommandPardonIP());
+            this.a(new CommandBan());
+            this.a(new CommandBanList());
+            this.a(new CommandPardon());
+            this.a(new CommandKick());
+            this.a(new CommandList());
+            this.a(new CommandWhitelist());
+            this.a(new CommandIdleTimeout());
         } else {
-            this.a((ICommand) (new CommandPublish()));
+            this.a(new CommandPublish());
         }
 
-        CommandAbstract.a((ICommandDispatcher) this);
+        CommandAbstract.a(this);
     }
 
     public void a(ICommandListener icommandlistener, ICommand icommand, int i, String s, Object... aobject) {
@@ -82,12 +82,11 @@ public class CommandDispatcher extends CommandHandler implements ICommandDispatc
         ChatMessage chatmessage = new ChatMessage("chat.type.admin", new Object[] { icommandlistener.getName(), new ChatMessage(s, aobject)});
 
         chatmessage.getChatModifier().setColor(EnumChatFormat.GRAY);
-        chatmessage.getChatModifier().setItalic(Boolean.valueOf(true));
+        chatmessage.getChatModifier().setItalic(Boolean.TRUE);
         if (flag) {
-            Iterator iterator = minecraftserver.getPlayerList().v().iterator();
 
-            while (iterator.hasNext()) {
-                EntityHuman entityhuman = (EntityHuman) iterator.next();
+            for (EntityPlayer entityPlayer : minecraftserver.getPlayerList().v()) {
+                EntityHuman entityhuman = entityPlayer;
 
                 if (entityhuman != icommandlistener && minecraftserver.getPlayerList().isOp(entityhuman.getProfile()) && icommand.canUse(icommandlistener)) {
                     boolean flag1 = icommandlistener instanceof MinecraftServer && MinecraftServer.getServer().r();
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandExecute.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandExecute.java
index 1dc8e36..f7e7114 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandExecute.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandExecute.java
@@ -129,7 +129,7 @@ public class CommandExecute extends CommandAbstract {
     }
 
     public List tabComplete(ICommandListener icommandlistener, String[] astring, BlockPosition blockposition) {
-        return astring.length == 1 ? a(astring, MinecraftServer.getServer().getPlayers()) : (astring.length > 1 && astring.length <= 4 ? a(astring, 1, blockposition) : (astring.length > 5 && astring.length <= 8 && "detect".equals(astring[4]) ? a(astring, 5, blockposition) : (astring.length == 9 && "detect".equals(astring[4]) ? a(astring, (Collection) Block.REGISTRY.keySet()) : null)));
+        return astring.length == 1 ? a(astring, MinecraftServer.getServer().getPlayers()) : (astring.length > 1 && astring.length <= 4 ? a(astring, 1, blockposition) : (astring.length > 5 && astring.length <= 8 && "detect".equals(astring[4]) ? a(astring, 5, blockposition) : (astring.length == 9 && "detect".equals(astring[4]) ? a(astring, Block.REGISTRY.keySet()) : null)));
     }
 
     public boolean isListStart(String[] astring, int i) {
@@ -139,7 +139,7 @@ public class CommandExecute extends CommandAbstract {
     // CraftBukkit start - fix decompiler error
     @Override
     public int compareTo(ICommand o) {
-        return a((ICommand) o);
+        return a(o);
     }
     // CraftBukkit end
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandGamemode.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandGamemode.java
index abd23e7..817c276 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandGamemode.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandGamemode.java
@@ -68,7 +68,7 @@ public class CommandGamemode extends CommandAbstract {
     // CraftBukkit start - fix decompiler error
     @Override
     public int compareTo(ICommand o) {
-        return a((ICommand) o);
+        return a(o);
     }
     // CraftBukkit end
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandGamerule.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandGamerule.java
index cabbe5b..ad8a240 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandGamerule.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandGamerule.java
@@ -26,7 +26,7 @@ public class CommandGamerule extends CommandAbstract {
 
         switch (astring.length) {
         case 0:
-            icommandlistener.sendMessage(new ChatComponentText(a((Object[]) gamerules.getGameRules())));
+            icommandlistener.sendMessage(new ChatComponentText(a(gamerules.getGameRules())));
             break;
 
         case 1:
@@ -55,11 +55,8 @@ public class CommandGamerule extends CommandAbstract {
     public static void a(GameRules gamerules, String s) {
         if ("reducedDebugInfo".equals(s)) {
             int i = gamerules.getBoolean(s) ? 22 : 23;
-            Iterator iterator = MinecraftServer.getServer().getPlayerList().v().iterator();
-
-            while (iterator.hasNext()) {
-                EntityPlayer entityplayer = (EntityPlayer) iterator.next();
 
+            for (EntityPlayer entityplayer : MinecraftServer.getServer().getPlayerList().v()) {
                 entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) i));
             }
         }
@@ -89,7 +86,7 @@ public class CommandGamerule extends CommandAbstract {
     // CraftBukkit start - fix decompile error
     @Override
     public int compareTo(ICommand o) {
-        return a((ICommand) o);
+        return a(o);
     }
     // CraftBukkit end
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandScoreboard.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandScoreboard.java
index 3acb074..5e4ed54 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandScoreboard.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandScoreboard.java
@@ -208,10 +208,9 @@ public class CommandScoreboard extends CommandAbstract {
             ArrayList arraylist = Lists.newArrayList(this.d().getPlayers());
             String s = astring[i];
             ArrayList arraylist1 = Lists.newArrayList();
-            Iterator iterator = arraylist.iterator();
 
-            while (iterator.hasNext()) {
-                String s1 = (String) iterator.next();
+            for (Object o : arraylist) {
+                String s1 = (String) o;
 
                 astring[i] = s1;
 
@@ -268,14 +267,14 @@ public class CommandScoreboard extends CommandAbstract {
         String s = astring[i++];
         String s1 = astring[i++];
         Scoreboard scoreboard = this.d();
-        IScoreboardCriteria iscoreboardcriteria = (IScoreboardCriteria) IScoreboardCriteria.criteria.get(s1);
+        IScoreboardCriteria iscoreboardcriteria = IScoreboardCriteria.criteria.get(s1);
 
         if (iscoreboardcriteria == null) {
             throw new ExceptionUsage("commands.scoreboard.objectives.add.wrongType", new Object[] { s1});
         } else if (scoreboard.getObjective(s) != null) {
             throw new CommandException("commands.scoreboard.objectives.add.alreadyExists", new Object[] { s});
         } else if (s.length() > 16) {
-            throw new ExceptionInvalidSyntax("commands.scoreboard.objectives.add.tooLong", new Object[] { s, Integer.valueOf(16)});
+            throw new ExceptionInvalidSyntax("commands.scoreboard.objectives.add.tooLong", new Object[] { s, 16});
         } else if (s.length() == 0) {
             throw new ExceptionUsage("commands.scoreboard.objectives.add.usage", new Object[0]);
         } else {
@@ -283,7 +282,7 @@ public class CommandScoreboard extends CommandAbstract {
                 String s2 = a(icommandlistener, astring, i).c();
 
                 if (s2.length() > 32) {
-                    throw new ExceptionInvalidSyntax("commands.scoreboard.objectives.add.displayTooLong", new Object[] { s2, Integer.valueOf(32)});
+                    throw new ExceptionInvalidSyntax("commands.scoreboard.objectives.add.displayTooLong", new Object[] { s2, 32});
                 }
 
                 if (s2.length() > 0) {
@@ -306,7 +305,7 @@ public class CommandScoreboard extends CommandAbstract {
         if (scoreboard.getTeam(s) != null) {
             throw new CommandException("commands.scoreboard.teams.add.alreadyExists", new Object[] { s});
         } else if (s.length() > 16) {
-            throw new ExceptionInvalidSyntax("commands.scoreboard.teams.add.tooLong", new Object[] { s, Integer.valueOf(16)});
+            throw new ExceptionInvalidSyntax("commands.scoreboard.teams.add.tooLong", new Object[] { s, 16});
         } else if (s.length() == 0) {
             throw new ExceptionUsage("commands.scoreboard.teams.add.usage", new Object[0]);
         } else {
@@ -314,7 +313,7 @@ public class CommandScoreboard extends CommandAbstract {
                 String s1 = a(icommandlistener, astring, i).c();
 
                 if (s1.length() > 32) {
-                    throw new ExceptionInvalidSyntax("commands.scoreboard.teams.add.displayTooLong", new Object[] { s1, Integer.valueOf(32)});
+                    throw new ExceptionInvalidSyntax("commands.scoreboard.teams.add.displayTooLong", new Object[] { s1, 32});
                 }
 
                 if (s1.length() > 0) {
@@ -345,10 +344,10 @@ public class CommandScoreboard extends CommandAbstract {
                     if (!s.equalsIgnoreCase("nametagVisibility") && !s.equalsIgnoreCase("deathMessageVisibility")) {
                         throw new ExceptionUsage("commands.scoreboard.teams.option.usage", new Object[0]);
                     } else {
-                        throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Object[]) ScoreboardTeamBase.EnumNameTagVisibility.a())});
+                        throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(ScoreboardTeamBase.EnumNameTagVisibility.a())});
                     }
                 } else {
-                    throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Collection) Arrays.asList(new String[] { "true", "false"}))});
+                    throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(Arrays.asList(new String[] { "true", "false"}))});
                 }
             } else {
                 String s1 = astring[i];
@@ -365,13 +364,13 @@ public class CommandScoreboard extends CommandAbstract {
                     scoreboardteam.setSuffix(EnumChatFormat.RESET.toString());
                 } else if (s.equalsIgnoreCase("friendlyfire")) {
                     if (!s1.equalsIgnoreCase("true") && !s1.equalsIgnoreCase("false")) {
-                        throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Collection) Arrays.asList(new String[] { "true", "false"}))});
+                        throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(Arrays.asList(new String[] { "true", "false"}))});
                     }
 
                     scoreboardteam.setAllowFriendlyFire(s1.equalsIgnoreCase("true"));
                 } else if (s.equalsIgnoreCase("seeFriendlyInvisibles")) {
                     if (!s1.equalsIgnoreCase("true") && !s1.equalsIgnoreCase("false")) {
-                        throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Collection) Arrays.asList(new String[] { "true", "false"}))});
+                        throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(Arrays.asList(new String[] { "true", "false"}))});
                     }
 
                     scoreboardteam.setCanSeeFriendlyInvisibles(s1.equalsIgnoreCase("true"));
@@ -381,14 +380,14 @@ public class CommandScoreboard extends CommandAbstract {
                     if (s.equalsIgnoreCase("nametagVisibility")) {
                         scoreboardteambase_enumnametagvisibility = ScoreboardTeamBase.EnumNameTagVisibility.a(s1);
                         if (scoreboardteambase_enumnametagvisibility == null) {
-                            throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Object[]) ScoreboardTeamBase.EnumNameTagVisibility.a())});
+                            throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(ScoreboardTeamBase.EnumNameTagVisibility.a())});
                         }
 
                         scoreboardteam.setNameTagVisibility(scoreboardteambase_enumnametagvisibility);
                     } else if (s.equalsIgnoreCase("deathMessageVisibility")) {
                         scoreboardteambase_enumnametagvisibility = ScoreboardTeamBase.EnumNameTagVisibility.a(s1);
                         if (scoreboardteambase_enumnametagvisibility == null) {
-                            throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a((Object[]) ScoreboardTeamBase.EnumNameTagVisibility.a())});
+                            throw new ExceptionUsage("commands.scoreboard.teams.option.noValue", new Object[] { s, a(ScoreboardTeamBase.EnumNameTagVisibility.a())});
                         }
 
                         scoreboardteam.b(scoreboardteambase_enumnametagvisibility);
@@ -427,7 +426,7 @@ public class CommandScoreboard extends CommandAbstract {
                 throw new CommandException("commands.scoreboard.teams.list.player.empty", new Object[] { scoreboardteam.getName()});
             }
 
-            ChatMessage chatmessage = new ChatMessage("commands.scoreboard.teams.list.player.count", new Object[] { Integer.valueOf(collection.size()), scoreboardteam.getName()});
+            ChatMessage chatmessage = new ChatMessage("commands.scoreboard.teams.list.player.count", new Object[] {collection.size(), scoreboardteam.getName()});
 
             chatmessage.getChatModifier().setColor(EnumChatFormat.DARK_GREEN);
             icommandlistener.sendMessage(chatmessage);
@@ -440,16 +439,15 @@ public class CommandScoreboard extends CommandAbstract {
                 throw new CommandException("commands.scoreboard.teams.list.empty", new Object[0]);
             }
 
-            ChatMessage chatmessage1 = new ChatMessage("commands.scoreboard.teams.list.count", new Object[] { Integer.valueOf(collection1.size())});
+            ChatMessage chatmessage1 = new ChatMessage("commands.scoreboard.teams.list.count", new Object[] {collection1.size()});
 
             chatmessage1.getChatModifier().setColor(EnumChatFormat.DARK_GREEN);
             icommandlistener.sendMessage(chatmessage1);
-            Iterator iterator = collection1.iterator();
 
-            while (iterator.hasNext()) {
-                ScoreboardTeam scoreboardteam1 = (ScoreboardTeam) iterator.next();
+            for (Object o : collection1) {
+                ScoreboardTeam scoreboardteam1 = (ScoreboardTeam) o;
 
-                icommandlistener.sendMessage(new ChatMessage("commands.scoreboard.teams.list.entry", new Object[] { scoreboardteam1.getName(), scoreboardteam1.getDisplayName(), Integer.valueOf(scoreboardteam1.getPlayerNameSet().size())}));
+                icommandlistener.sendMessage(new ChatMessage("commands.scoreboard.teams.list.entry", new Object[]{scoreboardteam1.getName(), scoreboardteam1.getDisplayName(), scoreboardteam1.getPlayerNameSet().size()}));
             }
         }
 
@@ -474,11 +472,11 @@ public class CommandScoreboard extends CommandAbstract {
                 s1 = astring[i++];
                 if (s1.startsWith("@")) {
                     List list = c(icommandlistener, s1);
-                    Iterator iterator = list.iterator();
 
-                    while (iterator.hasNext()) {
-                        Entity entity = (Entity) iterator.next();
-                        if (!entity.world.tacoSpigotConfig.nonPlayerEntitiesOnScoreboards && !(entity instanceof EntityHuman)) continue; // TacoSpigot
+                    for (Object o : list) {
+                        Entity entity = (Entity) o;
+                        if (!entity.world.tacoSpigotConfig.nonPlayerEntitiesOnScoreboards && !(entity instanceof EntityHuman))
+                            continue; // TacoSpigot
                         String s2 = e(icommandlistener, entity.getUniqueID().toString());
 
                         if (scoreboard.addPlayerToTeam(s2, s)) {
@@ -501,11 +499,11 @@ public class CommandScoreboard extends CommandAbstract {
 
         if (!hashset.isEmpty()) {
             icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.AFFECTED_ENTITIES, hashset.size());
-            a(icommandlistener, this, "commands.scoreboard.teams.join.success", new Object[] { Integer.valueOf(hashset.size()), s, a(hashset.toArray(new String[hashset.size()]))});
+            a(icommandlistener, this, "commands.scoreboard.teams.join.success", new Object[] {hashset.size(), s, a(hashset.toArray(new String[0]))});
         }
 
         if (!hashset1.isEmpty()) {
-            throw new CommandException("commands.scoreboard.teams.join.failure", new Object[] { Integer.valueOf(hashset1.size()), s, a(hashset1.toArray(new String[hashset1.size()]))});
+            throw new CommandException("commands.scoreboard.teams.join.failure", new Object[] {hashset1.size(), s, a(hashset1.toArray(new String[0]))});
         }
     }
 
@@ -527,10 +525,9 @@ public class CommandScoreboard extends CommandAbstract {
                 s = astring[i++];
                 if (s.startsWith("@")) {
                     List list = c(icommandlistener, s);
-                    Iterator iterator = list.iterator();
 
-                    while (iterator.hasNext()) {
-                        Entity entity = (Entity) iterator.next();
+                    for (Object o : list) {
+                        Entity entity = (Entity) o;
                         String s1 = e(icommandlistener, entity.getUniqueID().toString());
 
                         if (scoreboard.removePlayerFromTeam(s1)) {
@@ -553,11 +550,11 @@ public class CommandScoreboard extends CommandAbstract {
 
         if (!hashset.isEmpty()) {
             icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.AFFECTED_ENTITIES, hashset.size());
-            a(icommandlistener, this, "commands.scoreboard.teams.leave.success", new Object[] { Integer.valueOf(hashset.size()), a(hashset.toArray(new String[hashset.size()]))});
+            a(icommandlistener, this, "commands.scoreboard.teams.leave.success", new Object[] {hashset.size(), a(hashset.toArray(new String[0]))});
         }
 
         if (!hashset1.isEmpty()) {
-            throw new CommandException("commands.scoreboard.teams.leave.failure", new Object[] { Integer.valueOf(hashset1.size()), a(hashset1.toArray(new String[hashset1.size()]))});
+            throw new CommandException("commands.scoreboard.teams.leave.failure", new Object[] {hashset1.size(), a(hashset1.toArray(new String[0]))});
         }
     }
 
@@ -572,15 +569,14 @@ public class CommandScoreboard extends CommandAbstract {
             if (arraylist.isEmpty()) {
                 throw new CommandException("commands.scoreboard.teams.empty.alreadyEmpty", new Object[] { scoreboardteam.getName()});
             } else {
-                Iterator iterator = arraylist.iterator();
 
-                while (iterator.hasNext()) {
-                    String s = (String) iterator.next();
+                for (Object o : arraylist) {
+                    String s = (String) o;
 
                     scoreboard.removePlayerFromTeam(s, scoreboardteam);
                 }
 
-                a(icommandlistener, this, "commands.scoreboard.teams.empty.success", new Object[] { Integer.valueOf(arraylist.size()), scoreboardteam.getName()});
+                a(icommandlistener, this, "commands.scoreboard.teams.empty.success", new Object[] {arraylist.size(), scoreboardteam.getName()});
             }
         }
     }
@@ -600,16 +596,15 @@ public class CommandScoreboard extends CommandAbstract {
         if (collection.size() <= 0) {
             throw new CommandException("commands.scoreboard.objectives.list.empty", new Object[0]);
         } else {
-            ChatMessage chatmessage = new ChatMessage("commands.scoreboard.objectives.list.count", new Object[] { Integer.valueOf(collection.size())});
+            ChatMessage chatmessage = new ChatMessage("commands.scoreboard.objectives.list.count", new Object[] {collection.size()});
 
             chatmessage.getChatModifier().setColor(EnumChatFormat.DARK_GREEN);
             icommandlistener.sendMessage(chatmessage);
-            Iterator iterator = collection.iterator();
 
-            while (iterator.hasNext()) {
-                ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
+            for (Object o : collection) {
+                ScoreboardObjective scoreboardobjective = (ScoreboardObjective) o;
 
-                icommandlistener.sendMessage(new ChatMessage("commands.scoreboard.objectives.list.entry", new Object[] { scoreboardobjective.getName(), scoreboardobjective.getDisplayName(), scoreboardobjective.getCriteria().getName()}));
+                icommandlistener.sendMessage(new ChatMessage("commands.scoreboard.objectives.list.entry", new Object[]{scoreboardobjective.getName(), scoreboardobjective.getDisplayName(), scoreboardobjective.getCriteria().getName()}));
             }
 
         }
@@ -650,16 +645,15 @@ public class CommandScoreboard extends CommandAbstract {
                 throw new CommandException("commands.scoreboard.players.list.player.empty", new Object[] { s});
             }
 
-            ChatMessage chatmessage = new ChatMessage("commands.scoreboard.players.list.player.count", new Object[] { Integer.valueOf(map.size()), s});
+            ChatMessage chatmessage = new ChatMessage("commands.scoreboard.players.list.player.count", new Object[] {map.size(), s});
 
             chatmessage.getChatModifier().setColor(EnumChatFormat.DARK_GREEN);
             icommandlistener.sendMessage(chatmessage);
-            Iterator iterator = map.values().iterator();
 
-            while (iterator.hasNext()) {
-                ScoreboardScore scoreboardscore = (ScoreboardScore) iterator.next();
+            for (Object o : map.values()) {
+                ScoreboardScore scoreboardscore = (ScoreboardScore) o;
 
-                icommandlistener.sendMessage(new ChatMessage("commands.scoreboard.players.list.player.entry", new Object[] { Integer.valueOf(scoreboardscore.getScore()), scoreboardscore.getObjective().getDisplayName(), scoreboardscore.getObjective().getName()}));
+                icommandlistener.sendMessage(new ChatMessage("commands.scoreboard.players.list.player.entry", new Object[]{scoreboardscore.getScore(), scoreboardscore.getObjective().getDisplayName(), scoreboardscore.getObjective().getName()}));
             }
         } else {
             Collection collection = scoreboard.getPlayers();
@@ -669,7 +663,7 @@ public class CommandScoreboard extends CommandAbstract {
                 throw new CommandException("commands.scoreboard.players.list.empty", new Object[0]);
             }
 
-            ChatMessage chatmessage1 = new ChatMessage("commands.scoreboard.players.list.count", new Object[] { Integer.valueOf(collection.size())});
+            ChatMessage chatmessage1 = new ChatMessage("commands.scoreboard.players.list.count", new Object[] {collection.size()});
 
             chatmessage1.getChatModifier().setColor(EnumChatFormat.DARK_GREEN);
             icommandlistener.sendMessage(chatmessage1);
@@ -684,7 +678,7 @@ public class CommandScoreboard extends CommandAbstract {
         String s1 = e(icommandlistener, astring[i++]);
 
         if (s1.length() > 40) {
-            throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s1, Integer.valueOf(40)});
+            throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s1, 40});
         } else {
             ScoreboardObjective scoreboardobjective = this.a(astring[i++], true);
             int k = s.equalsIgnoreCase("set") ? a(astring[i++]) : a(astring[i++], 0);
@@ -716,7 +710,7 @@ public class CommandScoreboard extends CommandAbstract {
                 scoreboardscore.removeScore(k);
             }
 
-            a(icommandlistener, this, "commands.scoreboard.players.set.success", new Object[] { scoreboardobjective.getName(), s1, Integer.valueOf(scoreboardscore.getScore())});
+            a(icommandlistener, this, "commands.scoreboard.players.set.success", new Object[] { scoreboardobjective.getName(), s1, scoreboardscore.getScore()});
         }
     }
 
@@ -730,7 +724,7 @@ public class CommandScoreboard extends CommandAbstract {
             scoreboard.resetPlayerScores(s, scoreboardobjective);
             a(icommandlistener, this, "commands.scoreboard.players.resetscore.success", new Object[] { scoreboardobjective.getName(), s});
         } else {
-            scoreboard.resetPlayerScores(s, (ScoreboardObjective) null);
+            scoreboard.resetPlayerScores(s, null);
             a(icommandlistener, this, "commands.scoreboard.players.reset.success", new Object[] { s});
         }
 
@@ -741,7 +735,7 @@ public class CommandScoreboard extends CommandAbstract {
         String s = d(icommandlistener, astring[i++]);
 
         if (s.length() > 40) {
-            throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s, Integer.valueOf(40)});
+            throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s, 40});
         } else {
             ScoreboardObjective scoreboardobjective = this.a(astring[i], false);
 
@@ -761,7 +755,7 @@ public class CommandScoreboard extends CommandAbstract {
         String s = e(icommandlistener, astring[i++]);
 
         if (s.length() > 40) {
-            throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s, Integer.valueOf(40)});
+            throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s, 40});
         } else {
             ScoreboardObjective scoreboardobjective = this.a(astring[i++], false);
 
@@ -775,9 +769,9 @@ public class CommandScoreboard extends CommandAbstract {
                 ScoreboardScore scoreboardscore = scoreboard.getPlayerScoreForObjective(s, scoreboardobjective);
 
                 if (scoreboardscore.getScore() >= j && scoreboardscore.getScore() <= k) {
-                    a(icommandlistener, this, "commands.scoreboard.players.test.success", new Object[] { Integer.valueOf(scoreboardscore.getScore()), Integer.valueOf(j), Integer.valueOf(k)});
+                    a(icommandlistener, this, "commands.scoreboard.players.test.success", new Object[] {scoreboardscore.getScore(), j, k});
                 } else {
-                    throw new CommandException("commands.scoreboard.players.test.failed", new Object[] { Integer.valueOf(scoreboardscore.getScore()), Integer.valueOf(j), Integer.valueOf(k)});
+                    throw new CommandException("commands.scoreboard.players.test.failed", new Object[] {scoreboardscore.getScore(), j, k});
                 }
             }
         }
@@ -792,9 +786,9 @@ public class CommandScoreboard extends CommandAbstract {
         ScoreboardObjective scoreboardobjective1 = this.a(astring[i], false);
 
         if (s.length() > 40) {
-            throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s, Integer.valueOf(40)});
+            throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s, 40});
         } else if (s2.length() > 40) {
-            throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s2, Integer.valueOf(40)});
+            throw new ExceptionInvalidSyntax("commands.scoreboard.players.name.tooLong", new Object[] { s2, 40});
         } else {
             ScoreboardScore scoreboardscore = scoreboard.getPlayerScoreForObjective(s, scoreboardobjective);
 
@@ -803,35 +797,45 @@ public class CommandScoreboard extends CommandAbstract {
             } else {
                 ScoreboardScore scoreboardscore1 = scoreboard.getPlayerScoreForObjective(s2, scoreboardobjective1);
 
-                if (s1.equals("+=")) {
-                    scoreboardscore.setScore(scoreboardscore.getScore() + scoreboardscore1.getScore());
-                } else if (s1.equals("-=")) {
-                    scoreboardscore.setScore(scoreboardscore.getScore() - scoreboardscore1.getScore());
-                } else if (s1.equals("*=")) {
-                    scoreboardscore.setScore(scoreboardscore.getScore() * scoreboardscore1.getScore());
-                } else if (s1.equals("/=")) {
-                    if (scoreboardscore1.getScore() != 0) {
-                        scoreboardscore.setScore(scoreboardscore.getScore() / scoreboardscore1.getScore());
-                    }
-                } else if (s1.equals("%=")) {
-                    if (scoreboardscore1.getScore() != 0) {
-                        scoreboardscore.setScore(scoreboardscore.getScore() % scoreboardscore1.getScore());
-                    }
-                } else if (s1.equals("=")) {
-                    scoreboardscore.setScore(scoreboardscore1.getScore());
-                } else if (s1.equals("<")) {
-                    scoreboardscore.setScore(Math.min(scoreboardscore.getScore(), scoreboardscore1.getScore()));
-                } else if (s1.equals(">")) {
-                    scoreboardscore.setScore(Math.max(scoreboardscore.getScore(), scoreboardscore1.getScore()));
-                } else {
-                    if (!s1.equals("><")) {
-                        throw new CommandException("commands.scoreboard.players.operation.invalidOperation", new Object[] { s1});
-                    }
+                switch (s1) {
+                    case "+=":
+                        scoreboardscore.setScore(scoreboardscore.getScore() + scoreboardscore1.getScore());
+                        break;
+                    case "-=":
+                        scoreboardscore.setScore(scoreboardscore.getScore() - scoreboardscore1.getScore());
+                        break;
+                    case "*=":
+                        scoreboardscore.setScore(scoreboardscore.getScore() * scoreboardscore1.getScore());
+                        break;
+                    case "/=":
+                        if (scoreboardscore1.getScore() != 0) {
+                            scoreboardscore.setScore(scoreboardscore.getScore() / scoreboardscore1.getScore());
+                        }
+                        break;
+                    case "%=":
+                        if (scoreboardscore1.getScore() != 0) {
+                            scoreboardscore.setScore(scoreboardscore.getScore() % scoreboardscore1.getScore());
+                        }
+                        break;
+                    case "=":
+                        scoreboardscore.setScore(scoreboardscore1.getScore());
+                        break;
+                    case "<":
+                        scoreboardscore.setScore(Math.min(scoreboardscore.getScore(), scoreboardscore1.getScore()));
+                        break;
+                    case ">":
+                        scoreboardscore.setScore(Math.max(scoreboardscore.getScore(), scoreboardscore1.getScore()));
+                        break;
+                    default:
+                        if (!s1.equals("><")) {
+                            throw new CommandException("commands.scoreboard.players.operation.invalidOperation", new Object[]{s1});
+                        }
 
-                    int j = scoreboardscore.getScore();
+                        int j = scoreboardscore.getScore();
 
-                    scoreboardscore.setScore(scoreboardscore1.getScore());
-                    scoreboardscore1.setScore(j);
+                        scoreboardscore.setScore(scoreboardscore1.getScore());
+                        scoreboardscore1.setScore(j);
+                        break;
                 }
 
                 a(icommandlistener, this, "commands.scoreboard.players.operation.success", new Object[0]);
@@ -852,11 +856,11 @@ public class CommandScoreboard extends CommandAbstract {
                     if (astring.length == 4) {
                         Set set = IScoreboardCriteria.criteria.keySet();
 
-                        return a(astring, (Collection) set);
+                        return a(astring, set);
                     }
                 } else if (astring[1].equalsIgnoreCase("remove")) {
                     if (astring.length == 3) {
-                        return a(astring, (Collection) this.a(false));
+                        return a(astring, this.a(false));
                     }
                 } else if (astring[1].equalsIgnoreCase("setdisplay")) {
                     if (astring.length == 3) {
@@ -864,7 +868,7 @@ public class CommandScoreboard extends CommandAbstract {
                     }
 
                     if (astring.length == 4) {
-                        return a(astring, (Collection) this.a(false));
+                        return a(astring, this.a(false));
                     }
                 }
             } else if (astring[0].equalsIgnoreCase("players")) {
@@ -879,7 +883,7 @@ public class CommandScoreboard extends CommandAbstract {
                         }
 
                         if (astring.length == 4) {
-                            return a(astring, (Collection) this.e());
+                            return a(astring, this.e());
                         }
                     } else if (!astring[1].equalsIgnoreCase("list") && !astring[1].equalsIgnoreCase("test")) {
                         if (astring[1].equalsIgnoreCase("operation")) {
@@ -888,7 +892,7 @@ public class CommandScoreboard extends CommandAbstract {
                             }
 
                             if (astring.length == 4) {
-                                return a(astring, (Collection) this.a(true));
+                                return a(astring, this.a(true));
                             }
 
                             if (astring.length == 5) {
@@ -900,7 +904,7 @@ public class CommandScoreboard extends CommandAbstract {
                             }
 
                             if (astring.length == 7) {
-                                return a(astring, (Collection) this.a(false));
+                                return a(astring, this.a(false));
                             }
                         }
                     } else {
@@ -909,7 +913,7 @@ public class CommandScoreboard extends CommandAbstract {
                         }
 
                         if (astring.length == 4 && astring[1].equalsIgnoreCase("test")) {
-                            return a(astring, (Collection) this.a(false));
+                            return a(astring, this.a(false));
                         }
                     }
                 } else {
@@ -918,7 +922,7 @@ public class CommandScoreboard extends CommandAbstract {
                     }
 
                     if (astring.length == 4) {
-                        return a(astring, (Collection) this.a(true));
+                        return a(astring, this.a(true));
                     }
                 }
             } else if (astring[0].equalsIgnoreCase("teams")) {
@@ -976,10 +980,9 @@ public class CommandScoreboard extends CommandAbstract {
     protected List a(boolean flag) {
         Collection collection = this.d().getObjectives();
         ArrayList arraylist = Lists.newArrayList();
-        Iterator iterator = collection.iterator();
 
-        while (iterator.hasNext()) {
-            ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
+        for (Object o : collection) {
+            ScoreboardObjective scoreboardobjective = (ScoreboardObjective) o;
 
             if (!flag || !scoreboardobjective.getCriteria().isReadOnly()) {
                 arraylist.add(scoreboardobjective.getName());
@@ -992,10 +995,9 @@ public class CommandScoreboard extends CommandAbstract {
     protected List e() {
         Collection collection = this.d().getObjectives();
         ArrayList arraylist = Lists.newArrayList();
-        Iterator iterator = collection.iterator();
 
-        while (iterator.hasNext()) {
-            ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
+        for (Object o : collection) {
+            ScoreboardObjective scoreboardobjective = (ScoreboardObjective) o;
 
             if (scoreboardobjective.getCriteria() == IScoreboardCriteria.c) {
                 arraylist.add(scoreboardobjective.getName());
@@ -1006,6 +1008,6 @@ public class CommandScoreboard extends CommandAbstract {
     }
 
     public boolean isListStart(String[] astring, int i) {
-        return !astring[0].equalsIgnoreCase("players") ? (astring[0].equalsIgnoreCase("teams") ? i == 2 : false) : (astring.length > 1 && astring[1].equalsIgnoreCase("operation") ? i == 2 || i == 5 : i == 2);
+        return !astring[0].equalsIgnoreCase("players") ? (astring[0].equalsIgnoreCase("teams") && i == 2) : (astring.length > 1 && astring[1].equalsIgnoreCase("operation") ? i == 2 || i == 5 : i == 2);
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandSpreadPlayers.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandSpreadPlayers.java
index 53c5d92..7fa663d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandSpreadPlayers.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandSpreadPlayers.java
@@ -32,10 +32,10 @@ public class CommandSpreadPlayers extends CommandAbstract {
         } else {
             byte b0 = 0;
             BlockPosition blockposition = icommandlistener.getChunkCoordinates();
-            double d0 = (double) blockposition.getX();
+            double d0 = blockposition.getX();
             int i = b0 + 1;
             double d1 = b(d0, astring[b0], true);
-            double d2 = b((double) blockposition.getZ(), astring[i++], true);
+            double d2 = b(blockposition.getZ(), astring[i++], true);
             double d3 = a(astring[i++], 0.0D);
             double d4 = a(astring[i++], d3 + 1.0D);
             boolean flag = d(astring[i++]);
@@ -67,7 +67,7 @@ public class CommandSpreadPlayers extends CommandAbstract {
             if (arraylist.isEmpty()) {
                 throw new ExceptionEntityNotFound();
             } else {
-                icommandlistener.sendMessage(new ChatMessage("commands.spreadplayers.spreading." + (flag ? "teams" : "players"), new Object[] { Integer.valueOf(arraylist.size()), Double.valueOf(d4), Double.valueOf(d1), Double.valueOf(d2), Double.valueOf(d3)}));
+                icommandlistener.sendMessage(new ChatMessage("commands.spreadplayers.spreading." + (flag ? "teams" : "players"), new Object[] {arraylist.size(), d4, d1, d2, d3}));
                 this.a(icommandlistener, arraylist, new CommandSpreadPlayers.Location2D(d1, d2), d3, d4, ((Entity) arraylist.get(0)).world, flag);
             }
         }
@@ -83,24 +83,21 @@ public class CommandSpreadPlayers extends CommandAbstract {
         int i = this.a(commandspreadplayers_location2d, d0, world, random, d2, d3, d4, d5, acommandspreadplayers_location2d, flag);
         double d6 = this.a(list, world, acommandspreadplayers_location2d, flag);
 
-        a(icommandlistener, this, "commands.spreadplayers.success." + (flag ? "teams" : "players"), new Object[] { Integer.valueOf(acommandspreadplayers_location2d.length), Double.valueOf(commandspreadplayers_location2d.a), Double.valueOf(commandspreadplayers_location2d.b)});
+        a(icommandlistener, this, "commands.spreadplayers.success." + (flag ? "teams" : "players"), new Object[] {acommandspreadplayers_location2d.length, commandspreadplayers_location2d.a, commandspreadplayers_location2d.b});
         if (acommandspreadplayers_location2d.length > 1) {
-            icommandlistener.sendMessage(new ChatMessage("commands.spreadplayers.info." + (flag ? "teams" : "players"), new Object[] { String.format("%.2f", new Object[] { Double.valueOf(d6)}), Integer.valueOf(i)}));
+            icommandlistener.sendMessage(new ChatMessage("commands.spreadplayers.info." + (flag ? "teams" : "players"), new Object[] { String.format("%.2f", new Object[] {d6}), i}));
         }
 
     }
 
     private int b(List list) {
         HashSet hashset = Sets.newHashSet();
-        Iterator iterator = list.iterator();
-
-        while (iterator.hasNext()) {
-            Entity entity = (Entity) iterator.next();
 
+        for (Entity entity : list) {
             if (entity instanceof EntityHuman) {
                 hashset.add(((EntityHuman) entity).getScoreboardTeam());
             } else {
-                hashset.add((Object) null);
+                hashset.add(null);
             }
         }
 
@@ -141,9 +138,9 @@ public class CommandSpreadPlayers extends CommandAbstract {
                 }
 
                 if (j > 0) {
-                    commandspreadplayers_location2d1.a /= (double) j;
-                    commandspreadplayers_location2d1.b /= (double) j;
-                    double d7 = (double) commandspreadplayers_location2d1.b();
+                    commandspreadplayers_location2d1.a /= j;
+                    commandspreadplayers_location2d1.b /= j;
+                    double d7 = commandspreadplayers_location2d1.b();
 
                     if (d7 > 0.0D) {
                         commandspreadplayers_location2d1.a();
@@ -161,11 +158,10 @@ public class CommandSpreadPlayers extends CommandAbstract {
             }
 
             if (!flag1) {
-                CommandSpreadPlayers.Location2D[] acommandspreadplayers_location2d1 = acommandspreadplayers_location2d;
                 int i1 = acommandspreadplayers_location2d.length;
 
                 for (j = 0; j < i1; ++j) {
-                    commandspreadplayers_location2d1 = acommandspreadplayers_location2d1[j];
+                    commandspreadplayers_location2d1 = acommandspreadplayers_location2d[j];
                     if (!commandspreadplayers_location2d1.b(world)) {
                         commandspreadplayers_location2d1.a(random, d1, d2, d3, d4);
                         flag1 = true;
@@ -175,7 +171,7 @@ public class CommandSpreadPlayers extends CommandAbstract {
         }
 
         if (i >= 10000) {
-            throw new CommandException("commands.spreadplayers.failure." + (flag ? "teams" : "players"), new Object[] { Integer.valueOf(acommandspreadplayers_location2d.length), Double.valueOf(commandspreadplayers_location2d.a), Double.valueOf(commandspreadplayers_location2d.b), String.format("%.2f", new Object[] { Double.valueOf(d5)})});
+            throw new CommandException("commands.spreadplayers.failure." + (flag ? "teams" : "players"), new Object[] {acommandspreadplayers_location2d.length, commandspreadplayers_location2d.a, commandspreadplayers_location2d.b, String.format("%.2f", new Object[] {d5})});
         } else {
             return i;
         }
@@ -186,9 +182,9 @@ public class CommandSpreadPlayers extends CommandAbstract {
         int i = 0;
         HashMap hashmap = Maps.newHashMap();
 
-        for (int j = 0; j < list.size(); ++j) {
-            Entity entity = (Entity) list.get(j);
-            CommandSpreadPlayers.Location2D commandspreadplayers_location2d;
+        for (Entity value : list) {
+            Entity entity = value;
+            Location2D commandspreadplayers_location2d;
 
             if (flag) {
                 ScoreboardTeamBase scoreboardteambase = entity instanceof EntityHuman ? ((EntityHuman) entity).getScoreboardTeam() : null;
@@ -197,17 +193,17 @@ public class CommandSpreadPlayers extends CommandAbstract {
                     hashmap.put(scoreboardteambase, acommandspreadplayers_location2d[i++]);
                 }
 
-                commandspreadplayers_location2d = (CommandSpreadPlayers.Location2D) hashmap.get(scoreboardteambase);
+                commandspreadplayers_location2d = (Location2D) hashmap.get(scoreboardteambase);
             } else {
                 commandspreadplayers_location2d = acommandspreadplayers_location2d[i++];
             }
 
-            entity.enderTeleportTo((double) ((float) MathHelper.floor(commandspreadplayers_location2d.a) + 0.5F), (double) commandspreadplayers_location2d.a(world), (double) MathHelper.floor(commandspreadplayers_location2d.b) + 0.5D);
+            entity.enderTeleportTo((float) MathHelper.floor(commandspreadplayers_location2d.a) + 0.5F, commandspreadplayers_location2d.a(world), (double) MathHelper.floor(commandspreadplayers_location2d.b) + 0.5D);
             double d1 = Double.MAX_VALUE;
 
-            for (int k = 0; k < acommandspreadplayers_location2d.length; ++k) {
-                if (commandspreadplayers_location2d != acommandspreadplayers_location2d[k]) {
-                    double d2 = commandspreadplayers_location2d.a(acommandspreadplayers_location2d[k]);
+            for (Location2D location2D : acommandspreadplayers_location2d) {
+                if (commandspreadplayers_location2d != location2D) {
+                    double d2 = commandspreadplayers_location2d.a(location2D);
 
                     d1 = Math.min(d2, d1);
                 }
@@ -216,7 +212,7 @@ public class CommandSpreadPlayers extends CommandAbstract {
             d0 += d1;
         }
 
-        d0 /= (double) list.size();
+        d0 /= list.size();
         return d0;
     }
 
@@ -264,7 +260,7 @@ public class CommandSpreadPlayers extends CommandAbstract {
         }
 
         void a() {
-            double d0 = (double) this.b();
+            double d0 = this.b();
 
             this.a /= d0;
             this.b /= d0;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandTp.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandTp.java
index 008b8c8..e05bcce 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandTp.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/CommandTp.java
@@ -41,8 +41,8 @@ public class CommandTp extends CommandAbstract {
                     CommandAbstract.CommandNumber commandabstract_commandnumber = a(((Entity) object).locX, astring[b0], true);
                     CommandAbstract.CommandNumber commandabstract_commandnumber1 = a(((Entity) object).locY, astring[i++], 0, 0, false);
                     CommandAbstract.CommandNumber commandabstract_commandnumber2 = a(((Entity) object).locZ, astring[i++], true);
-                    CommandAbstract.CommandNumber commandabstract_commandnumber3 = a((double) ((Entity) object).yaw, astring.length > i ? astring[i++] : "~", false);
-                    CommandAbstract.CommandNumber commandabstract_commandnumber4 = a((double) ((Entity) object).pitch, astring.length > i ? astring[i] : "~", false);
+                    CommandAbstract.CommandNumber commandabstract_commandnumber3 = a(((Entity) object).yaw, astring.length > i ? astring[i++] : "~", false);
+                    CommandAbstract.CommandNumber commandabstract_commandnumber4 = a(((Entity) object).pitch, astring.length > i ? astring[i] : "~", false);
                     float f;
 
                     if (object instanceof EntityPlayer) {
@@ -84,7 +84,7 @@ public class CommandTp extends CommandAbstract {
                             f = MathHelper.g(f + 180.0F);
                         }
 
-                        ((Entity) object).mount((Entity) null);
+                        ((Entity) object).mount(null);
                         ((EntityPlayer) object).playerConnection.a(commandabstract_commandnumber.b(), commandabstract_commandnumber1.b(), commandabstract_commandnumber2.b(), f, f1, enumset);
                         ((Entity) object).f(f);
                     } else {
@@ -100,7 +100,7 @@ public class CommandTp extends CommandAbstract {
                         ((Entity) object).f(f2);
                     }
 
-                    a(icommandlistener, this, "commands.tp.success.coordinates", new Object[] { ((Entity) object).getName(), Double.valueOf(commandabstract_commandnumber.a()), Double.valueOf(commandabstract_commandnumber1.a()), Double.valueOf(commandabstract_commandnumber2.a())});
+                    a(icommandlistener, this, "commands.tp.success.coordinates", new Object[] { ((Entity) object).getName(), commandabstract_commandnumber.a(), commandabstract_commandnumber1.a(), commandabstract_commandnumber2.a()});
                 }
             } else {
                 Entity entity = b(icommandlistener, astring[astring.length - 1]);
@@ -126,7 +126,7 @@ public class CommandTp extends CommandAbstract {
     // CraftBukkit start - fix decompile error
     @Override
     public int compareTo(ICommand o) {
-        return a((ICommand) o);
+        return a(o);
     }
     // CraftBukkit end
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/Container.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/Container.java
index 7fc4957..b26ec5c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/Container.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/Container.java
@@ -64,8 +64,8 @@ public abstract class Container {
     public List a() {
         ArrayList arraylist = Lists.newArrayList();
 
-        for (int i = 0; i < this.c.size(); ++i) {
-            arraylist.add(((Slot) this.c.get(i)).getItem());
+        for (Slot slot : this.c) {
+            arraylist.add(slot.getItem());
         }
 
         return arraylist;
@@ -73,15 +73,15 @@ public abstract class Container {
 
     public void b() {
         for (int i = 0; i < this.c.size(); ++i) {
-            ItemStack itemstack = ((Slot) this.c.get(i)).getItem();
-            ItemStack itemstack1 = (ItemStack) this.b.get(i);
+            ItemStack itemstack = this.c.get(i).getItem();
+            ItemStack itemstack1 = this.b.get(i);
 
             if (!ItemStack.fastMatches(itemstack1, itemstack) || (tickCount % 20 == 0 && !ItemStack.matches(itemstack1, itemstack))) { // Spigot
                 itemstack1 = itemstack == null ? null : itemstack.cloneItemStack();
                 this.b.set(i, itemstack1);
 
-                for (int j = 0; j < this.listeners.size(); ++j) {
-                    ((ICrafting) this.listeners.get(j)).a(this, i, itemstack1);
+                for (ICrafting listener : this.listeners) {
+                    listener.a(this, i, itemstack1);
                 }
             }
         }
@@ -94,8 +94,8 @@ public abstract class Container {
     }
 
     public Slot getSlot(IInventory iinventory, int i) {
-        for (int j = 0; j < this.c.size(); ++j) {
-            Slot slot = (Slot) this.c.get(j);
+        for (Slot value : this.c) {
+            Slot slot = value;
 
             if (slot.a(iinventory, i)) {
                 return slot;
@@ -106,11 +106,11 @@ public abstract class Container {
     }
 
     public Slot getSlot(int i) {
-        return (Slot) this.c.get(i);
+        return this.c.get(i);
     }
 
     public ItemStack b(EntityHuman entityhuman, int i) {
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         return slot != null ? slot.getItem() : null;
     }
@@ -149,7 +149,7 @@ public abstract class Container {
                     l = playerinventory.getCarried().count;
                     Iterator iterator = this.h.iterator();
 
-                    Map draggedSlots = new HashMap(); // CraftBukkit - Store slots from drag in map (raw slot id -> new stack)
+                    Map draggedSlots = new HashMap<>(); // CraftBukkit - Store slots from drag in map (raw slot id -> new stack)
                     while (iterator.hasNext()) {
                         Slot slot1 = (Slot) iterator.next();
 
@@ -176,7 +176,7 @@ public abstract class Container {
                     InventoryView view = getBukkitView();
                     org.bukkit.inventory.ItemStack newcursor = CraftItemStack.asCraftMirror(itemstack1);
                     newcursor.setAmount(l);
-                    Map eventmap = new HashMap();
+                    Map eventmap = new HashMap<>();
                     for (Map.Entry ditem : draggedSlots.entrySet()) {
                         eventmap.put(ditem.getKey(), CraftItemStack.asBukkitCopy(ditem.getValue()));
                     }
@@ -227,7 +227,7 @@ public abstract class Container {
                     if (playerinventory.getCarried() != null) {
                         if (j == 0) {
                             entityhuman.drop(playerinventory.getCarried(), true);
-                            playerinventory.setCarried((ItemStack) null);
+                            playerinventory.setCarried(null);
                         }
 
                         if (j == 1) {
@@ -239,7 +239,7 @@ public abstract class Container {
 
                             if (itemstack4.count == 0) {
                                 // CraftBukkit end
-                                playerinventory.setCarried((ItemStack) null);
+                                playerinventory.setCarried(null);
                             }
                         }
                     }
@@ -248,7 +248,7 @@ public abstract class Container {
                         return null;
                     }
 
-                    slot2 = (Slot) this.c.get(i);
+                    slot2 = this.c.get(i);
                     if (slot2 != null && slot2.isAllowed(entityhuman)) {
                         itemstack1 = this.b(entityhuman, i);
                         if (itemstack1 != null) {
@@ -265,7 +265,7 @@ public abstract class Container {
                         return null;
                     }
 
-                    slot2 = (Slot) this.c.get(i);
+                    slot2 = this.c.get(i);
                     if (slot2 != null) {
                         itemstack1 = slot2.getItem();
                         ItemStack itemstack4 = playerinventory.getCarried();
@@ -286,7 +286,7 @@ public abstract class Container {
                                 }
 
                                 if (itemstack4.count == 0) {
-                                    playerinventory.setCarried((ItemStack) null);
+                                    playerinventory.setCarried(null);
                                 // CraftBukkit start - Update client cursor if we didn't empty it
                                 } else if (entityhuman instanceof EntityPlayer) {
                                     ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, entityhuman.inventory.getCarried()));
@@ -299,7 +299,7 @@ public abstract class Container {
                                 itemstack3 = slot2.a(k1);
                                 playerinventory.setCarried(itemstack3);
                                 if (itemstack1.count == 0) {
-                                    slot2.set((ItemStack) null);
+                                    slot2.set(null);
                                 }
 
                                 slot2.a(entityhuman, playerinventory.getCarried());
@@ -316,7 +316,7 @@ public abstract class Container {
 
                                     itemstack4.cloneAndSubtract(k1);
                                     if (itemstack4.count == 0) {
-                                        playerinventory.setCarried((ItemStack) null);
+                                        playerinventory.setCarried(null);
                                     // CraftBukkit start - Update client cursor if we didn't empty it
                                     } else if (entityhuman instanceof EntityPlayer) {
                                         ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutSetSlot(-1, -1, entityhuman.inventory.getCarried()));
@@ -336,7 +336,7 @@ public abstract class Container {
                                     itemstack4.count += k1;
                                     itemstack1 = slot2.a(k1);
                                     if (itemstack1.count == 0) {
-                                        slot2.set((ItemStack) null);
+                                        slot2.set(null);
                                     }
 
                                     slot2.a(entityhuman, playerinventory.getCarried());
@@ -361,7 +361,7 @@ public abstract class Container {
                     }
                 }
             } else if (k == 2 && j >= 0 && j < 9) {
-                slot2 = (Slot) this.c.get(i);
+                slot2 = this.c.get(i);
                 if (slot2.isAllowed(entityhuman)) {
                     itemstack1 = playerinventory.getItem(j);
                     boolean flag = itemstack1 == null || slot2.inventory == playerinventory && slot2.isAllowed(itemstack1);
@@ -379,7 +379,7 @@ public abstract class Container {
                             if (k1 > -1) {
                                 playerinventory.pickup(itemstack1);
                                 slot2.a(itemstack3.count);
-                                slot2.set((ItemStack) null);
+                                slot2.set(null);
                                 slot2.a(entityhuman, itemstack3);
                             }
                         } else {
@@ -388,26 +388,26 @@ public abstract class Container {
                             slot2.a(entityhuman, itemstack3);
                         }
                     } else if (!slot2.hasItem() && itemstack1 != null && slot2.isAllowed(itemstack1)) {
-                        playerinventory.setItem(j, (ItemStack) null);
+                        playerinventory.setItem(j, null);
                         slot2.set(itemstack1);
                     }
                 }
             } else if (k == 3 && entityhuman.abilities.canInstantlyBuild && playerinventory.getCarried() == null && i >= 0) {
-                slot2 = (Slot) this.c.get(i);
+                slot2 = this.c.get(i);
                 if (slot2 != null && slot2.hasItem()) {
                     itemstack1 = slot2.getItem().cloneItemStack();
                     itemstack1.count = itemstack1.getMaxStackSize();
                     playerinventory.setCarried(itemstack1);
                 }
             } else if (k == 4 && playerinventory.getCarried() == null && i >= 0) {
-                slot2 = (Slot) this.c.get(i);
+                slot2 = this.c.get(i);
                 if (slot2 != null && slot2.hasItem() && slot2.isAllowed(entityhuman)) {
                     itemstack1 = slot2.a(j == 0 ? 1 : slot2.getItem().count);
                     slot2.a(entityhuman, itemstack1);
                     entityhuman.drop(itemstack1, true);
                 }
             } else if (k == 6 && i >= 0) {
-                slot2 = (Slot) this.c.get(i);
+                slot2 = this.c.get(i);
                 itemstack1 = playerinventory.getCarried();
                 if (itemstack1 != null && (slot2 == null || !slot2.hasItem() || !slot2.isAllowed(entityhuman))) {
                     l = j == 0 ? 0 : this.c.size() - 1;
@@ -415,7 +415,7 @@ public abstract class Container {
 
                     for (int l1 = 0; l1 < 2; ++l1) {
                         for (int i2 = l; i2 >= 0 && i2 < this.c.size() && itemstack1.count < itemstack1.getMaxStackSize(); i2 += k1) {
-                            Slot slot3 = (Slot) this.c.get(i2);
+                            Slot slot3 = this.c.get(i2);
 
                             if (slot3.hasItem() && a(slot3, itemstack1, true) && slot3.isAllowed(entityhuman) && this.a(itemstack1, slot3) && (l1 != 0 || slot3.getItem().count != slot3.getItem().getMaxStackSize())) {
                                 int j2 = Math.min(itemstack1.getMaxStackSize() - itemstack1.count, slot3.getItem().count);
@@ -423,7 +423,7 @@ public abstract class Container {
 
                                 itemstack1.count += j2;
                                 if (itemstack5.count <= 0) {
-                                    slot3.set((ItemStack) null);
+                                    slot3.set(null);
                                 }
 
                                 slot3.a(entityhuman, itemstack5);
@@ -452,7 +452,7 @@ public abstract class Container {
 
         if (playerinventory.getCarried() != null) {
             entityhuman.drop(playerinventory.getCarried(), false);
-            playerinventory.setCarried((ItemStack) null);
+            playerinventory.setCarried(null);
         }
 
     }
@@ -493,7 +493,7 @@ public abstract class Container {
 
         if (itemstack.isStackable()) {
             while (itemstack.count > 0 && (!flag && k < j || flag && k >= i)) {
-                slot = (Slot) this.c.get(k);
+                slot = this.c.get(k);
                 itemstack1 = slot.getItem();
                 if (itemstack1 != null && itemstack1.getItem() == itemstack.getItem() && (!itemstack.usesData() || itemstack.getData() == itemstack1.getData()) && ItemStack.equals(itemstack, itemstack1)) {
                     int l = itemstack1.count + itemstack.count;
@@ -530,7 +530,7 @@ public abstract class Container {
             }
 
             while (!flag && k < j || flag && k >= i) {
-                slot = (Slot) this.c.get(k);
+                slot = this.c.get(k);
                 itemstack1 = slot.getItem();
                 if (itemstack1 == null) {
                     slot.set(itemstack.cloneItemStack());
@@ -560,7 +560,7 @@ public abstract class Container {
     }
 
     public static boolean a(int i, EntityHuman entityhuman) {
-        return i == 0 ? true : (i == 1 ? true : i == 2 && entityhuman.abilities.canInstantlyBuild);
+        return i == 0 || (i == 1 || i == 2 && entityhuman.abilities.canInstantlyBuild);
     }
 
     protected void d() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerAnvil.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerAnvil.java
index 2816de6..58bc75e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerAnvil.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerAnvil.java
@@ -15,7 +15,7 @@ public class ContainerAnvil extends Container {
     private IInventory h = new InventorySubcontainer("Repair", true, 2) {
         public void update() {
             super.update();
-            ContainerAnvil.this.a((IInventory) this);
+            ContainerAnvil.this.a(this);
         }
     };
     private World i;
@@ -50,7 +50,7 @@ public class ContainerAnvil extends Container {
                     entityhuman.levelDown(-ContainerAnvil.this.a);
                 }
 
-                ContainerAnvil.this.h.setItem(0, (ItemStack) null);
+                ContainerAnvil.this.h.setItem(0, null);
                 if (ContainerAnvil.this.k > 0) {
                     ItemStack itemstack1 = ContainerAnvil.this.h.getItem(1);
 
@@ -58,24 +58,24 @@ public class ContainerAnvil extends Container {
                         itemstack1.count -= ContainerAnvil.this.k;
                         ContainerAnvil.this.h.setItem(1, itemstack1);
                     } else {
-                        ContainerAnvil.this.h.setItem(1, (ItemStack) null);
+                        ContainerAnvil.this.h.setItem(1, null);
                     }
                 } else {
-                    ContainerAnvil.this.h.setItem(1, (ItemStack) null);
+                    ContainerAnvil.this.h.setItem(1, null);
                 }
 
                 ContainerAnvil.this.a = 0;
                 IBlockData iblockdata = world.getType(blockposition);
 
                 if (!entityhuman.abilities.canInstantlyBuild && !world.isClientSide && iblockdata.getBlock() == Blocks.ANVIL && entityhuman.bc().nextFloat() < 0.12F) {
-                    int i = ((Integer) iblockdata.get(BlockAnvil.DAMAGE)).intValue();
+                    int i = iblockdata.get(BlockAnvil.DAMAGE);
 
                     ++i;
                     if (i > 2) {
                         world.setAir(blockposition);
                         world.triggerEffect(1020, blockposition, 0);
                     } else {
-                        world.setTypeAndData(blockposition, iblockdata.set(BlockAnvil.DAMAGE, Integer.valueOf(i)), 2);
+                        world.setTypeAndData(blockposition, iblockdata.set(BlockAnvil.DAMAGE, i), 2);
                         world.triggerEffect(1021, blockposition, 0);
                     }
                 } else if (!world.isClientSide) {
@@ -123,7 +123,7 @@ public class ContainerAnvil extends Container {
         byte b1 = 0;
 
         if (itemstack == null) {
-            this.g.setItem(0, (ItemStack) null);
+            this.g.setItem(0, null);
             this.a = 0;
         } else {
             ItemStack itemstack1 = itemstack.cloneItemStack();
@@ -143,7 +143,7 @@ public class ContainerAnvil extends Container {
                 if (itemstack1.e() && itemstack1.getItem().a(itemstack, itemstack2)) {
                     k = Math.min(itemstack1.h(), itemstack1.j() / 4);
                     if (k <= 0) {
-                        this.g.setItem(0, (ItemStack) null);
+                        this.g.setItem(0, null);
                         this.a = 0;
                         return;
                     }
@@ -158,7 +158,7 @@ public class ContainerAnvil extends Container {
                     this.k = l;
                 } else {
                     if (!flag7 && (itemstack1.getItem() != itemstack2.getItem() || !itemstack1.e())) {
-                        this.g.setItem(0, (ItemStack) null);
+                        this.g.setItem(0, null);
                         this.a = 0;
                         return;
                     }
@@ -183,15 +183,14 @@ public class ContainerAnvil extends Container {
                     }
 
                     Map map1 = EnchantmentManager.a(itemstack2);
-                    Iterator iterator = map1.keySet().iterator();
 
-                    while (iterator.hasNext()) {
-                        i1 = ((Integer) iterator.next()).intValue();
+                    for (Object value : map1.keySet()) {
+                        i1 = (Integer) value;
                         Enchantment enchantment = Enchantment.getById(i1);
 
                         if (enchantment != null) {
-                            j1 = map.containsKey(Integer.valueOf(i1)) ? ((Integer) map.get(Integer.valueOf(i1))).intValue() : 0;
-                            int l1 = ((Integer) map1.get(Integer.valueOf(i1))).intValue();
+                            j1 = map.containsKey(i1) ? (Integer) map.get(i1) : 0;
+                            int l1 = (Integer) map1.get(i1);
                             int i2;
 
                             if (j1 == l1) {
@@ -208,10 +207,8 @@ public class ContainerAnvil extends Container {
                                 flag8 = true;
                             }
 
-                            Iterator iterator1 = map.keySet().iterator();
-
-                            while (iterator1.hasNext()) {
-                                int j2 = ((Integer) iterator1.next()).intValue();
+                            for (Object o : map.keySet()) {
+                                int j2 = (Integer) o;
 
                                 if (j2 != i1 && !enchantment.a(Enchantment.getById(j2))) {
                                     flag8 = false;
@@ -224,32 +221,32 @@ public class ContainerAnvil extends Container {
                                     l1 = enchantment.getMaxLevel();
                                 }
 
-                                map.put(Integer.valueOf(i1), Integer.valueOf(l1));
+                                map.put(i1, l1);
                                 int k2 = 0;
 
                                 switch (enchantment.getRandomWeight()) {
-                                case 1:
-                                    k2 = 8;
-                                    break;
+                                    case 1:
+                                        k2 = 8;
+                                        break;
 
-                                case 2:
-                                    k2 = 4;
+                                    case 2:
+                                        k2 = 4;
 
-                                case 3:
-                                case 4:
-                                case 6:
-                                case 7:
-                                case 8:
-                                case 9:
-                                default:
-                                    break;
+                                    case 3:
+                                    case 4:
+                                    case 6:
+                                    case 7:
+                                    case 8:
+                                    case 9:
+                                    default:
+                                        break;
 
-                                case 5:
-                                    k2 = 2;
-                                    break;
+                                    case 5:
+                                        k2 = 2;
+                                        break;
 
-                                case 10:
-                                    k2 = 1;
+                                    case 10:
+                                        k2 = 1;
                                 }
 
                                 if (flag7) {
@@ -325,12 +322,12 @@ public class ContainerAnvil extends Container {
 
     public boolean a(EntityHuman entityhuman) {
         if (!this.checkReachable) return true; // CraftBukkit
-        return this.i.getType(this.j).getBlock() != Blocks.ANVIL ? false : entityhuman.e((double) this.j.getX() + 0.5D, (double) this.j.getY() + 0.5D, (double) this.j.getZ() + 0.5D) <= 64.0D;
+        return this.i.getType(this.j).getBlock() == Blocks.ANVIL && entityhuman.e((double) this.j.getX() + 0.5D, (double) this.j.getY() + 0.5D, (double) this.j.getZ() + 0.5D) <= 64.0D;
     }
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -351,7 +348,7 @@ public class ContainerAnvil extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerBeacon.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerBeacon.java
index 9c755fa..3873c75 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerBeacon.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerBeacon.java
@@ -14,7 +14,7 @@ public class ContainerBeacon extends Container {
     public ContainerBeacon(IInventory iinventory, IInventory iinventory1) {
         player = (PlayerInventory) iinventory; // CraftBukkit - TODO: check this
         this.beacon = iinventory1;
-        this.a((Slot) (this.f = new ContainerBeacon.SlotBeacon(iinventory1, 0, 136, 110)));
+        this.a(this.f = new SlotBeacon(iinventory1, 0, 136, 110));
         byte b0 = 36;
         short short0 = 137;
 
@@ -60,7 +60,7 @@ public class ContainerBeacon extends Container {
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -89,7 +89,7 @@ public class ContainerBeacon extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
@@ -111,7 +111,7 @@ public class ContainerBeacon extends Container {
         }
 
         public boolean isAllowed(ItemStack itemstack) {
-            return itemstack == null ? false : itemstack.getItem() == Items.EMERALD || itemstack.getItem() == Items.DIAMOND || itemstack.getItem() == Items.GOLD_INGOT || itemstack.getItem() == Items.IRON_INGOT;
+            return itemstack != null && (itemstack.getItem() == Items.EMERALD || itemstack.getItem() == Items.DIAMOND || itemstack.getItem() == Items.GOLD_INGOT || itemstack.getItem() == Items.IRON_INGOT);
         }
 
         public int getMaxStackSize() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerBrewingStand.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerBrewingStand.java
index ba558b8..2c3fc02 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerBrewingStand.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerBrewingStand.java
@@ -19,10 +19,10 @@ public class ContainerBrewingStand extends Container {
     public ContainerBrewingStand(PlayerInventory playerinventory, IInventory iinventory) {
         player = playerinventory; // CraftBukkit
         this.brewingStand = iinventory;
-        this.a((Slot) (new ContainerBrewingStand.SlotPotionBottle(playerinventory.player, iinventory, 0, 56, 46)));
-        this.a((Slot) (new ContainerBrewingStand.SlotPotionBottle(playerinventory.player, iinventory, 1, 79, 53)));
-        this.a((Slot) (new ContainerBrewingStand.SlotPotionBottle(playerinventory.player, iinventory, 2, 102, 46)));
-        this.f = this.a((Slot) (new ContainerBrewingStand.SlotBrewing(iinventory, 3, 79, 17)));
+        this.a(new SlotPotionBottle(playerinventory.player, iinventory, 0, 56, 46));
+        this.a(new SlotPotionBottle(playerinventory.player, iinventory, 1, 79, 53));
+        this.a(new SlotPotionBottle(playerinventory.player, iinventory, 2, 102, 46));
+        this.f = this.a(new SlotBrewing(iinventory, 3, 79, 17));
 
         int i;
 
@@ -46,8 +46,8 @@ public class ContainerBrewingStand extends Container {
     public void b() {
         super.b();
 
-        for (int i = 0; i < this.listeners.size(); ++i) {
-            ICrafting icrafting = (ICrafting) this.listeners.get(i);
+        for (ICrafting listener : this.listeners) {
+            ICrafting icrafting = listener;
 
             if (this.g != this.brewingStand.getProperty(0)) {
                 icrafting.setContainerData(this, 0, this.brewingStand.getProperty(0));
@@ -64,7 +64,7 @@ public class ContainerBrewingStand extends Container {
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -99,7 +99,7 @@ public class ContainerBrewingStand extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
@@ -121,7 +121,7 @@ public class ContainerBrewingStand extends Container {
         }
 
         public boolean isAllowed(ItemStack itemstack) {
-            return itemstack != null ? itemstack.getItem().l(itemstack) : false;
+            return itemstack != null && itemstack.getItem().l(itemstack);
         }
 
         public int getMaxStackSize() {
@@ -148,7 +148,7 @@ public class ContainerBrewingStand extends Container {
 
         public void a(EntityHuman entityhuman, ItemStack itemstack) {
             if (itemstack.getItem() == Items.POTION && itemstack.getData() > 0) {
-                this.a.b((Statistic) AchievementList.B);
+                this.a.b(AchievementList.B);
             }
 
             super.a(entityhuman, itemstack);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerChest.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerChest.java
index 5a33217..3b850d4 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerChest.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerChest.java
@@ -72,7 +72,7 @@ public class ContainerChest extends Container {
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -87,7 +87,7 @@ public class ContainerChest extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerDispenser.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerDispenser.java
index 8862b2a..5de3d62 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerDispenser.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerDispenser.java
@@ -48,7 +48,7 @@ public class ContainerDispenser extends Container {
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -63,7 +63,7 @@ public class ContainerDispenser extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerEnchantTable.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerEnchantTable.java
index 5c473be..e87e741 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerEnchantTable.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerEnchantTable.java
@@ -24,7 +24,7 @@ public class ContainerEnchantTable extends Container {
 
         public void update() {
             super.update();
-            ContainerEnchantTable.this.a((IInventory) this);
+            ContainerEnchantTable.this.a(this);
         }
     };
     private World world;
@@ -88,8 +88,8 @@ public class ContainerEnchantTable extends Container {
     public void b() {
         super.b();
 
-        for (int i = 0; i < this.listeners.size(); ++i) {
-            ICrafting icrafting = (ICrafting) this.listeners.get(i);
+        for (ICrafting listener : this.listeners) {
+            ICrafting icrafting = listener;
 
             icrafting.setContainerData(this, 0, this.costs[0]);
             icrafting.setContainerData(this, 1, this.costs[1]);
@@ -145,7 +145,7 @@ public class ContainerEnchantTable extends Container {
                         }
                     }
 
-                    this.k.setSeed((long) this.f);
+                    this.k.setSeed(this.f);
 
                     for (j = 0; j < 3; ++j) {
                         this.costs[j] = EnchantmentManager.a(this.k, j, i, itemstack);
@@ -212,7 +212,7 @@ public class ContainerEnchantTable extends Container {
 
                 if (list != null) {
                     // CraftBukkit start
-                    Map enchants = new java.util.HashMap();
+                    Map enchants = new java.util.HashMap<>();
                     for (Object obj : list) {
                         WeightedRandomEnchant instance = (WeightedRandomEnchant) obj;
                         enchants.put(org.bukkit.enchantments.Enchantment.getById(instance.enchantment.id), instance.level);
@@ -255,7 +255,7 @@ public class ContainerEnchantTable extends Container {
                     if (!entityhuman.abilities.canInstantlyBuild) {
                         itemstack1.count -= j;
                         if (itemstack1.count <= 0) {
-                            this.enchantSlots.setItem(1, (ItemStack) null);
+                            this.enchantSlots.setItem(1, null);
                         }
                     }
 
@@ -273,7 +273,7 @@ public class ContainerEnchantTable extends Container {
     }
 
     private List a(ItemStack itemstack, int i, int j) {
-        this.k.setSeed((long) (this.f + i));
+        this.k.setSeed(this.f + i);
         List list = EnchantmentManager.b(this.k, itemstack, j);
 
         if (itemstack.getItem() == Items.BOOK && list != null && list.size() > 1) {
@@ -304,12 +304,12 @@ public class ContainerEnchantTable extends Container {
 
     public boolean a(EntityHuman entityhuman) {
         if (!this.checkReachable) return true; // CraftBukkit
-        return this.world.getType(this.position).getBlock() != Blocks.ENCHANTING_TABLE ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
+        return this.world.getType(this.position).getBlock() == Blocks.ENCHANTING_TABLE && entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
     }
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -328,25 +328,25 @@ public class ContainerEnchantTable extends Container {
                     return null;
                 }
             } else {
-                if (((Slot) this.c.get(0)).hasItem() || !((Slot) this.c.get(0)).isAllowed(itemstack1)) {
+                if (this.c.get(0).hasItem() || !this.c.get(0).isAllowed(itemstack1)) {
                     return null;
                 }
 
                 if (itemstack1.hasTag() && itemstack1.count == 1) {
-                    ((Slot) this.c.get(0)).set(itemstack1.cloneItemStack());
+                    this.c.get(0).set(itemstack1.cloneItemStack());
                     itemstack1.count = 0;
                 } else if (itemstack1.count >= 1) {
                     // Spigot start
                     ItemStack clone = itemstack1.cloneItemStack();
                     clone.count = 1;
-                    ((Slot) this.c.get(0)).set(clone);
+                    this.c.get(0).set(clone);
                     // Spigot end
                     --itemstack1.count;
                 }
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerFurnace.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerFurnace.java
index 04cccbb..862636a 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerFurnace.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerFurnace.java
@@ -32,8 +32,8 @@ public class ContainerFurnace extends Container {
     public ContainerFurnace(PlayerInventory playerinventory, IInventory iinventory) {
         this.furnace = iinventory;
         this.a(new Slot(iinventory, 0, 56, 17));
-        this.a((Slot) (new SlotFurnaceFuel(iinventory, 1, 56, 53)));
-        this.a((Slot) (new SlotFurnaceResult(playerinventory.player, iinventory, 2, 116, 35)));
+        this.a(new SlotFurnaceFuel(iinventory, 1, 56, 53));
+        this.a(new SlotFurnaceResult(playerinventory.player, iinventory, 2, 116, 35));
         this.player = playerinventory; // CraftBukkit - save player
 
         int i;
@@ -58,8 +58,8 @@ public class ContainerFurnace extends Container {
     public void b() {
         super.b();
 
-        for (int i = 0; i < this.listeners.size(); ++i) {
-            ICrafting icrafting = (ICrafting) this.listeners.get(i);
+        for (ICrafting listener : this.listeners) {
+            ICrafting icrafting = listener;
 
             if (this.f != this.furnace.getProperty(2)) {
                 icrafting.setContainerData(this, 2, this.furnace.getProperty(2));
@@ -91,7 +91,7 @@ public class ContainerFurnace extends Container {
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -124,7 +124,7 @@ public class ContainerFurnace extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerHopper.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerHopper.java
index 6fc7187..6561fa0 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerHopper.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerHopper.java
@@ -56,7 +56,7 @@ public class ContainerHopper extends Container {
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -71,7 +71,7 @@ public class ContainerHopper extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerHorse.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerHorse.java
index 155591a..752fb03 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerHorse.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerHorse.java
@@ -74,7 +74,7 @@ public class ContainerHorse extends Container {
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -97,7 +97,7 @@ public class ContainerHorse extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerMerchant.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerMerchant.java
index f8aa2ae..55b970e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerMerchant.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerMerchant.java
@@ -15,7 +15,7 @@ public class ContainerMerchant extends Container {
     @Override
     public CraftInventoryView getBukkitView() {
         if (bukkitEntity == null) {
-            bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), new org.bukkit.craftbukkit.inventory.CraftInventoryMerchant((InventoryMerchant) f), this);
+            bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), new org.bukkit.craftbukkit.inventory.CraftInventoryMerchant(f), this);
         }
         return bukkitEntity;
     }
@@ -27,7 +27,7 @@ public class ContainerMerchant extends Container {
         this.f = new InventoryMerchant(playerinventory.player, imerchant);
         this.a(new Slot(this.f, 0, 36, 53));
         this.a(new Slot(this.f, 1, 62, 53));
-        this.a((Slot) (new SlotMerchantResult(playerinventory.player, imerchant, this.f, 2, 120, 53)));
+        this.a(new SlotMerchantResult(playerinventory.player, imerchant, this.f, 2, 120, 53));
         this.player = playerinventory; // CraftBukkit - save player
 
         int i;
@@ -71,7 +71,7 @@ public class ContainerMerchant extends Container {
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -96,7 +96,7 @@ public class ContainerMerchant extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerPlayer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerPlayer.java
index a86f896..4d0eb4e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerPlayer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerPlayer.java
@@ -23,7 +23,7 @@ public class ContainerPlayer extends Container {
         this.craftInventory = new InventoryCrafting(this, 2, 2, playerinventory.player); // CraftBukkit - pass player
         this.craftInventory.resultInventory = this.resultInventory; // CraftBukkit - let InventoryCrafting know about its result slot
         this.player = playerinventory; // CraftBukkit - save player
-        this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 144, 36)));
+        this.a(new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 144, 36));
 
         // CraftBukkit - fixed multiple decompiler errors below, good luck
         int j;
@@ -42,7 +42,7 @@ public class ContainerPlayer extends Container {
                 }
 
                 public boolean isAllowed(ItemStack itemstack) {
-                    return itemstack == null ? false : (itemstack.getItem() instanceof ItemArmor ? ((ItemArmor) itemstack.getItem()).b == i : (itemstack.getItem() != Item.getItemOf(Blocks.PUMPKIN) && itemstack.getItem() != Items.SKULL ? false : i == 0));
+                    return itemstack != null && (itemstack.getItem() instanceof ItemArmor ? ((ItemArmor) itemstack.getItem()).b == i : ((itemstack.getItem() == Item.getItemOf(Blocks.PUMPKIN) || itemstack.getItem() == Items.SKULL) && i == 0));
                 }
             });
         }
@@ -86,7 +86,7 @@ public class ContainerPlayer extends Container {
             }
         }
 
-        this.resultInventory.setItem(0, (ItemStack) null);
+        this.resultInventory.setItem(0, null);
     }
 
     public boolean a(EntityHuman entityhuman) {
@@ -95,7 +95,7 @@ public class ContainerPlayer extends Container {
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -115,7 +115,7 @@ public class ContainerPlayer extends Container {
                 if (!this.a(itemstack1, 9, 45, false)) {
                     return null;
                 }
-            } else if (itemstack.getItem() instanceof ItemArmor && !((Slot) this.c.get(5 + ((ItemArmor) itemstack.getItem()).b)).hasItem()) {
+            } else if (itemstack.getItem() instanceof ItemArmor && !this.c.get(5 + ((ItemArmor) itemstack.getItem()).b).hasItem()) {
                 int j = 5 + ((ItemArmor) itemstack.getItem()).b;
 
                 if (!this.a(itemstack1, j, j + 1, false)) {
@@ -134,7 +134,7 @@ public class ContainerPlayer extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerWorkbench.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerWorkbench.java
index 862ca2a..f9d6c87 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerWorkbench.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ContainerWorkbench.java
@@ -25,7 +25,7 @@ public class ContainerWorkbench extends Container {
         // CraftBukkit end
         this.g = world;
         this.h = blockposition;
-        this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 124, 35)));
+        this.a(new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 124, 35));
 
         int i;
         int j;
@@ -46,7 +46,7 @@ public class ContainerWorkbench extends Container {
             this.a(new Slot(playerinventory, i, 8 + i * 18, 142));
         }
 
-        this.a((IInventory) this.craftInventory);
+        this.a(this.craftInventory);
     }
 
     public void a(IInventory iinventory) {
@@ -83,12 +83,12 @@ public class ContainerWorkbench extends Container {
 
     public boolean a(EntityHuman entityhuman) {
         if (!this.checkReachable) return true; // CraftBukkit
-        return this.g.getType(this.h).getBlock() != Blocks.CRAFTING_TABLE ? false : entityhuman.e((double) this.h.getX() + 0.5D, (double) this.h.getY() + 0.5D, (double) this.h.getZ() + 0.5D) <= 64.0D;
+        return this.g.getType(this.h).getBlock() == Blocks.CRAFTING_TABLE && entityhuman.e((double) this.h.getX() + 0.5D, (double) this.h.getY() + 0.5D, (double) this.h.getZ() + 0.5D) <= 64.0D;
     }
 
     public ItemStack b(EntityHuman entityhuman, int i) {
         ItemStack itemstack = null;
-        Slot slot = (Slot) this.c.get(i);
+        Slot slot = this.c.get(i);
 
         if (slot != null && slot.hasItem()) {
             ItemStack itemstack1 = slot.getItem();
@@ -113,7 +113,7 @@ public class ContainerWorkbench extends Container {
             }
 
             if (itemstack1.count == 0) {
-                slot.set((ItemStack) null);
+                slot.set(null);
             } else {
                 slot.f();
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/CraftingManager.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/CraftingManager.java
index 544ff0a..ca75d69 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/CraftingManager.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/CraftingManager.java
@@ -39,171 +39,169 @@ public class CraftingManager {
         this.recipes.add(new RecipeFireworks());
         this.recipes.add(new RecipeRepair());
         (new RecipesBanner()).a(this);
-        this.registerShapedRecipe(new ItemStack(Items.PAPER, 3), new Object[] { "###", Character.valueOf('#'), Items.REEDS});
+        this.registerShapedRecipe(new ItemStack(Items.PAPER, 3), new Object[] { "###", '#', Items.REEDS});
         this.registerShapelessRecipe(new ItemStack(Items.BOOK, 1), new Object[] { Items.PAPER, Items.PAPER, Items.PAPER, Items.LEATHER});
         this.registerShapelessRecipe(new ItemStack(Items.WRITABLE_BOOK, 1), new Object[] { Items.BOOK, new ItemStack(Items.DYE, 1, EnumColor.BLACK.getInvColorIndex()), Items.FEATHER});
-        this.registerShapedRecipe(new ItemStack(Blocks.FENCE, 3), new Object[] { "W#W", "W#W", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.OAK.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.BIRCH_FENCE, 3), new Object[] { "W#W", "W#W", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.BIRCH.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.SPRUCE_FENCE, 3), new Object[] { "W#W", "W#W", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.JUNGLE_FENCE, 3), new Object[] { "W#W", "W#W", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.ACACIA_FENCE, 3), new Object[] { "W#W", "W#W", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4)});
-        this.registerShapedRecipe(new ItemStack(Blocks.DARK_OAK_FENCE, 3), new Object[] { "W#W", "W#W", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4)});
-        this.registerShapedRecipe(new ItemStack(Blocks.COBBLESTONE_WALL, 6, BlockCobbleWall.EnumCobbleVariant.NORMAL.a()), new Object[] { "###", "###", Character.valueOf('#'), Blocks.COBBLESTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.COBBLESTONE_WALL, 6, BlockCobbleWall.EnumCobbleVariant.MOSSY.a()), new Object[] { "###", "###", Character.valueOf('#'), Blocks.MOSSY_COBBLESTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.NETHER_BRICK_FENCE, 6), new Object[] { "###", "###", Character.valueOf('#'), Blocks.NETHER_BRICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.OAK.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.BIRCH_FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.BIRCH.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.SPRUCE_FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.JUNGLE_FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.ACACIA_FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4)});
-        this.registerShapedRecipe(new ItemStack(Blocks.DARK_OAK_FENCE_GATE, 1), new Object[] { "#W#", "#W#", Character.valueOf('#'), Items.STICK, Character.valueOf('W'), new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4)});
-        this.registerShapedRecipe(new ItemStack(Blocks.JUKEBOX, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Blocks.PLANKS, Character.valueOf('X'), Items.DIAMOND});
-        this.registerShapedRecipe(new ItemStack(Items.LEAD, 2), new Object[] { "~~ ", "~O ", "  ~", Character.valueOf('~'), Items.STRING, Character.valueOf('O'), Items.SLIME});
-        this.registerShapedRecipe(new ItemStack(Blocks.NOTEBLOCK, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Blocks.PLANKS, Character.valueOf('X'), Items.REDSTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.BOOKSHELF, 1), new Object[] { "###", "XXX", "###", Character.valueOf('#'), Blocks.PLANKS, Character.valueOf('X'), Items.BOOK});
-        this.registerShapedRecipe(new ItemStack(Blocks.SNOW, 1), new Object[] { "##", "##", Character.valueOf('#'), Items.SNOWBALL});
-        this.registerShapedRecipe(new ItemStack(Blocks.SNOW_LAYER, 6), new Object[] { "###", Character.valueOf('#'), Blocks.SNOW});
-        this.registerShapedRecipe(new ItemStack(Blocks.CLAY, 1), new Object[] { "##", "##", Character.valueOf('#'), Items.CLAY_BALL});
-        this.registerShapedRecipe(new ItemStack(Blocks.BRICK_BLOCK, 1), new Object[] { "##", "##", Character.valueOf('#'), Items.BRICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.GLOWSTONE, 1), new Object[] { "##", "##", Character.valueOf('#'), Items.GLOWSTONE_DUST});
-        this.registerShapedRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 1), new Object[] { "##", "##", Character.valueOf('#'), Items.QUARTZ});
-        this.registerShapedRecipe(new ItemStack(Blocks.WOOL, 1), new Object[] { "##", "##", Character.valueOf('#'), Items.STRING});
-        this.registerShapedRecipe(new ItemStack(Blocks.TNT, 1), new Object[] { "X#X", "#X#", "X#X", Character.valueOf('X'), Items.GUNPOWDER, Character.valueOf('#'), Blocks.SAND});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.COBBLESTONE.a()), new Object[] { "###", Character.valueOf('#'), Blocks.COBBLESTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.STONE.a()), new Object[] { "###", Character.valueOf('#'), new ItemStack(Blocks.STONE, BlockStone.EnumStoneVariant.STONE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.SAND.a()), new Object[] { "###", Character.valueOf('#'), Blocks.SANDSTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.BRICK.a()), new Object[] { "###", Character.valueOf('#'), Blocks.BRICK_BLOCK});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.SMOOTHBRICK.a()), new Object[] { "###", Character.valueOf('#'), Blocks.STONEBRICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.NETHERBRICK.a()), new Object[] { "###", Character.valueOf('#'), Blocks.NETHER_BRICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.QUARTZ.a()), new Object[] { "###", Character.valueOf('#'), Blocks.QUARTZ_BLOCK});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB2, 6, BlockDoubleStoneStepAbstract.EnumStoneSlab2Variant.RED_SANDSTONE.a()), new Object[] { "###", Character.valueOf('#'), Blocks.RED_SANDSTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, 0), new Object[] { "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.OAK.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, BlockWood.EnumLogVariant.BIRCH.a()), new Object[] { "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.BIRCH.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, BlockWood.EnumLogVariant.SPRUCE.a()), new Object[] { "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, BlockWood.EnumLogVariant.JUNGLE.a()), new Object[] { "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4), new Object[] { "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4)});
-        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4), new Object[] { "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4)});
-        this.registerShapedRecipe(new ItemStack(Blocks.LADDER, 3), new Object[] { "# #", "###", "# #", Character.valueOf('#'), Items.STICK});
-        this.registerShapedRecipe(new ItemStack(Items.WOODEN_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.OAK.a())});
-        this.registerShapedRecipe(new ItemStack(Items.SPRUCE_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
-        this.registerShapedRecipe(new ItemStack(Items.BIRCH_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.BIRCH.a())});
-        this.registerShapedRecipe(new ItemStack(Items.JUNGLE_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
-        this.registerShapedRecipe(new ItemStack(Items.ACACIA_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.ACACIA.a())});
-        this.registerShapedRecipe(new ItemStack(Items.DARK_OAK_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.DARK_OAK.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.TRAPDOOR, 2), new Object[] { "###", "###", Character.valueOf('#'), Blocks.PLANKS});
-        this.registerShapedRecipe(new ItemStack(Items.IRON_DOOR, 3), new Object[] { "##", "##", "##", Character.valueOf('#'), Items.IRON_INGOT});
-        this.registerShapedRecipe(new ItemStack(Blocks.IRON_TRAPDOOR, 1), new Object[] { "##", "##", Character.valueOf('#'), Items.IRON_INGOT});
-        this.registerShapedRecipe(new ItemStack(Items.SIGN, 3), new Object[] { "###", "###", " X ", Character.valueOf('#'), Blocks.PLANKS, Character.valueOf('X'), Items.STICK});
-        this.registerShapedRecipe(new ItemStack(Items.CAKE, 1), new Object[] { "AAA", "BEB", "CCC", Character.valueOf('A'), Items.MILK_BUCKET, Character.valueOf('B'), Items.SUGAR, Character.valueOf('C'), Items.WHEAT, Character.valueOf('E'), Items.EGG});
-        this.registerShapedRecipe(new ItemStack(Items.SUGAR, 1), new Object[] { "#", Character.valueOf('#'), Items.REEDS});
-        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, BlockWood.EnumLogVariant.OAK.a()), new Object[] { "#", Character.valueOf('#'), new ItemStack(Blocks.LOG, 1, BlockWood.EnumLogVariant.OAK.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, BlockWood.EnumLogVariant.SPRUCE.a()), new Object[] { "#", Character.valueOf('#'), new ItemStack(Blocks.LOG, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, BlockWood.EnumLogVariant.BIRCH.a()), new Object[] { "#", Character.valueOf('#'), new ItemStack(Blocks.LOG, 1, BlockWood.EnumLogVariant.BIRCH.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, BlockWood.EnumLogVariant.JUNGLE.a()), new Object[] { "#", Character.valueOf('#'), new ItemStack(Blocks.LOG, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4), new Object[] { "#", Character.valueOf('#'), new ItemStack(Blocks.LOG2, 1, BlockWood.EnumLogVariant.ACACIA.a() - 4)});
-        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4), new Object[] { "#", Character.valueOf('#'), new ItemStack(Blocks.LOG2, 1, BlockWood.EnumLogVariant.DARK_OAK.a() - 4)});
-        this.registerShapedRecipe(new ItemStack(Items.STICK, 4), new Object[] { "#", "#", Character.valueOf('#'), Blocks.PLANKS});
-        this.registerShapedRecipe(new ItemStack(Blocks.TORCH, 4), new Object[] { "X", "#", Character.valueOf('X'), Items.COAL, Character.valueOf('#'), Items.STICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.TORCH, 4), new Object[] { "X", "#", Character.valueOf('X'), new ItemStack(Items.COAL, 1, 1), Character.valueOf('#'), Items.STICK});
-        this.registerShapedRecipe(new ItemStack(Items.BOWL, 4), new Object[] { "# #", " # ", Character.valueOf('#'), Blocks.PLANKS});
-        this.registerShapedRecipe(new ItemStack(Items.GLASS_BOTTLE, 3), new Object[] { "# #", " # ", Character.valueOf('#'), Blocks.GLASS});
-        this.registerShapedRecipe(new ItemStack(Blocks.RAIL, 16), new Object[] { "X X", "X#X", "X X", Character.valueOf('X'), Items.IRON_INGOT, Character.valueOf('#'), Items.STICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.GOLDEN_RAIL, 6), new Object[] { "X X", "X#X", "XRX", Character.valueOf('X'), Items.GOLD_INGOT, Character.valueOf('R'), Items.REDSTONE, Character.valueOf('#'), Items.STICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.ACTIVATOR_RAIL, 6), new Object[] { "XSX", "X#X", "XSX", Character.valueOf('X'), Items.IRON_INGOT, Character.valueOf('#'), Blocks.REDSTONE_TORCH, Character.valueOf('S'), Items.STICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.DETECTOR_RAIL, 6), new Object[] { "X X", "X#X", "XRX", Character.valueOf('X'), Items.IRON_INGOT, Character.valueOf('R'), Items.REDSTONE, Character.valueOf('#'), Blocks.STONE_PRESSURE_PLATE});
-        this.registerShapedRecipe(new ItemStack(Items.MINECART, 1), new Object[] { "# #", "###", Character.valueOf('#'), Items.IRON_INGOT});
-        this.registerShapedRecipe(new ItemStack(Items.CAULDRON, 1), new Object[] { "# #", "# #", "###", Character.valueOf('#'), Items.IRON_INGOT});
-        this.registerShapedRecipe(new ItemStack(Items.BREWING_STAND, 1), new Object[] { " B ", "###", Character.valueOf('#'), Blocks.COBBLESTONE, Character.valueOf('B'), Items.BLAZE_ROD});
-        this.registerShapedRecipe(new ItemStack(Blocks.LIT_PUMPKIN, 1), new Object[] { "A", "B", Character.valueOf('A'), Blocks.PUMPKIN, Character.valueOf('B'), Blocks.TORCH});
-        this.registerShapedRecipe(new ItemStack(Items.CHEST_MINECART, 1), new Object[] { "A", "B", Character.valueOf('A'), Blocks.CHEST, Character.valueOf('B'), Items.MINECART});
-        this.registerShapedRecipe(new ItemStack(Items.FURNACE_MINECART, 1), new Object[] { "A", "B", Character.valueOf('A'), Blocks.FURNACE, Character.valueOf('B'), Items.MINECART});
-        this.registerShapedRecipe(new ItemStack(Items.TNT_MINECART, 1), new Object[] { "A", "B", Character.valueOf('A'), Blocks.TNT, Character.valueOf('B'), Items.MINECART});
-        this.registerShapedRecipe(new ItemStack(Items.HOPPER_MINECART, 1), new Object[] { "A", "B", Character.valueOf('A'), Blocks.HOPPER, Character.valueOf('B'), Items.MINECART});
-        this.registerShapedRecipe(new ItemStack(Items.BOAT, 1), new Object[] { "# #", "###", Character.valueOf('#'), Blocks.PLANKS});
-        this.registerShapedRecipe(new ItemStack(Items.BUCKET, 1), new Object[] { "# #", " # ", Character.valueOf('#'), Items.IRON_INGOT});
-        this.registerShapedRecipe(new ItemStack(Items.FLOWER_POT, 1), new Object[] { "# #", " # ", Character.valueOf('#'), Items.BRICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.FENCE, 3), new Object[] { "W#W", "W#W", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.OAK.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.BIRCH_FENCE, 3), new Object[] { "W#W", "W#W", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.BIRCH.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.SPRUCE_FENCE, 3), new Object[] { "W#W", "W#W", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.JUNGLE_FENCE, 3), new Object[] { "W#W", "W#W", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.ACACIA_FENCE, 3), new Object[] { "W#W", "W#W", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4)});
+        this.registerShapedRecipe(new ItemStack(Blocks.DARK_OAK_FENCE, 3), new Object[] { "W#W", "W#W", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4)});
+        this.registerShapedRecipe(new ItemStack(Blocks.COBBLESTONE_WALL, 6, BlockCobbleWall.EnumCobbleVariant.NORMAL.a()), new Object[] { "###", "###", '#', Blocks.COBBLESTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.COBBLESTONE_WALL, 6, BlockCobbleWall.EnumCobbleVariant.MOSSY.a()), new Object[] { "###", "###", '#', Blocks.MOSSY_COBBLESTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.NETHER_BRICK_FENCE, 6), new Object[] { "###", "###", '#', Blocks.NETHER_BRICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.FENCE_GATE, 1), new Object[] { "#W#", "#W#", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.OAK.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.BIRCH_FENCE_GATE, 1), new Object[] { "#W#", "#W#", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.BIRCH.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.SPRUCE_FENCE_GATE, 1), new Object[] { "#W#", "#W#", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.JUNGLE_FENCE_GATE, 1), new Object[] { "#W#", "#W#", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.ACACIA_FENCE_GATE, 1), new Object[] { "#W#", "#W#", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4)});
+        this.registerShapedRecipe(new ItemStack(Blocks.DARK_OAK_FENCE_GATE, 1), new Object[] { "#W#", "#W#", '#', Items.STICK, 'W', new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4)});
+        this.registerShapedRecipe(new ItemStack(Blocks.JUKEBOX, 1), new Object[] { "###", "#X#", "###", '#', Blocks.PLANKS, 'X', Items.DIAMOND});
+        this.registerShapedRecipe(new ItemStack(Items.LEAD, 2), new Object[] { "~~ ", "~O ", "  ~", '~', Items.STRING, 'O', Items.SLIME});
+        this.registerShapedRecipe(new ItemStack(Blocks.NOTEBLOCK, 1), new Object[] { "###", "#X#", "###", '#', Blocks.PLANKS, 'X', Items.REDSTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.BOOKSHELF, 1), new Object[] { "###", "XXX", "###", '#', Blocks.PLANKS, 'X', Items.BOOK});
+        this.registerShapedRecipe(new ItemStack(Blocks.SNOW, 1), new Object[] { "##", "##", '#', Items.SNOWBALL});
+        this.registerShapedRecipe(new ItemStack(Blocks.SNOW_LAYER, 6), new Object[] { "###", '#', Blocks.SNOW});
+        this.registerShapedRecipe(new ItemStack(Blocks.CLAY, 1), new Object[] { "##", "##", '#', Items.CLAY_BALL});
+        this.registerShapedRecipe(new ItemStack(Blocks.BRICK_BLOCK, 1), new Object[] { "##", "##", '#', Items.BRICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.GLOWSTONE, 1), new Object[] { "##", "##", '#', Items.GLOWSTONE_DUST});
+        this.registerShapedRecipe(new ItemStack(Blocks.QUARTZ_BLOCK, 1), new Object[] { "##", "##", '#', Items.QUARTZ});
+        this.registerShapedRecipe(new ItemStack(Blocks.WOOL, 1), new Object[] { "##", "##", '#', Items.STRING});
+        this.registerShapedRecipe(new ItemStack(Blocks.TNT, 1), new Object[] { "X#X", "#X#", "X#X", 'X', Items.GUNPOWDER, '#', Blocks.SAND});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.COBBLESTONE.a()), new Object[] { "###", '#', Blocks.COBBLESTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.STONE.a()), new Object[] { "###", '#', new ItemStack(Blocks.STONE, BlockStone.EnumStoneVariant.STONE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.SAND.a()), new Object[] { "###", '#', Blocks.SANDSTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.BRICK.a()), new Object[] { "###", '#', Blocks.BRICK_BLOCK});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.SMOOTHBRICK.a()), new Object[] { "###", '#', Blocks.STONEBRICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.NETHERBRICK.a()), new Object[] { "###", '#', Blocks.NETHER_BRICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB, 6, BlockDoubleStepAbstract.EnumStoneSlabVariant.QUARTZ.a()), new Object[] { "###", '#', Blocks.QUARTZ_BLOCK});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_SLAB2, 6, BlockDoubleStoneStepAbstract.EnumStoneSlab2Variant.RED_SANDSTONE.a()), new Object[] { "###", '#', Blocks.RED_SANDSTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, 0), new Object[] { "###", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.OAK.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, BlockWood.EnumLogVariant.BIRCH.a()), new Object[] { "###", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.BIRCH.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, BlockWood.EnumLogVariant.SPRUCE.a()), new Object[] { "###", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, BlockWood.EnumLogVariant.JUNGLE.a()), new Object[] { "###", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4), new Object[] { "###", '#', new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4)});
+        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_SLAB, 6, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4), new Object[] { "###", '#', new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4)});
+        this.registerShapedRecipe(new ItemStack(Blocks.LADDER, 3), new Object[] { "# #", "###", "# #", '#', Items.STICK});
+        this.registerShapedRecipe(new ItemStack(Items.WOODEN_DOOR, 3), new Object[] { "##", "##", "##", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.OAK.a())});
+        this.registerShapedRecipe(new ItemStack(Items.SPRUCE_DOOR, 3), new Object[] { "##", "##", "##", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
+        this.registerShapedRecipe(new ItemStack(Items.BIRCH_DOOR, 3), new Object[] { "##", "##", "##", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.BIRCH.a())});
+        this.registerShapedRecipe(new ItemStack(Items.JUNGLE_DOOR, 3), new Object[] { "##", "##", "##", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
+        this.registerShapedRecipe(new ItemStack(Items.ACACIA_DOOR, 3), new Object[] { "##", "##", "##", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.ACACIA.a())});
+        this.registerShapedRecipe(new ItemStack(Items.DARK_OAK_DOOR, 3), new Object[] { "##", "##", "##", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.DARK_OAK.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.TRAPDOOR, 2), new Object[] { "###", "###", '#', Blocks.PLANKS});
+        this.registerShapedRecipe(new ItemStack(Items.IRON_DOOR, 3), new Object[] { "##", "##", "##", '#', Items.IRON_INGOT});
+        this.registerShapedRecipe(new ItemStack(Blocks.IRON_TRAPDOOR, 1), new Object[] { "##", "##", '#', Items.IRON_INGOT});
+        this.registerShapedRecipe(new ItemStack(Items.SIGN, 3), new Object[] { "###", "###", " X ", '#', Blocks.PLANKS, 'X', Items.STICK});
+        this.registerShapedRecipe(new ItemStack(Items.CAKE, 1), new Object[] { "AAA", "BEB", "CCC", 'A', Items.MILK_BUCKET, 'B', Items.SUGAR, 'C', Items.WHEAT, 'E', Items.EGG});
+        this.registerShapedRecipe(new ItemStack(Items.SUGAR, 1), new Object[] { "#", '#', Items.REEDS});
+        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, BlockWood.EnumLogVariant.OAK.a()), new Object[] { "#", '#', new ItemStack(Blocks.LOG, 1, BlockWood.EnumLogVariant.OAK.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, BlockWood.EnumLogVariant.SPRUCE.a()), new Object[] { "#", '#', new ItemStack(Blocks.LOG, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, BlockWood.EnumLogVariant.BIRCH.a()), new Object[] { "#", '#', new ItemStack(Blocks.LOG, 1, BlockWood.EnumLogVariant.BIRCH.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, BlockWood.EnumLogVariant.JUNGLE.a()), new Object[] { "#", '#', new ItemStack(Blocks.LOG, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4), new Object[] { "#", '#', new ItemStack(Blocks.LOG2, 1, BlockWood.EnumLogVariant.ACACIA.a() - 4)});
+        this.registerShapedRecipe(new ItemStack(Blocks.PLANKS, 4, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4), new Object[] { "#", '#', new ItemStack(Blocks.LOG2, 1, BlockWood.EnumLogVariant.DARK_OAK.a() - 4)});
+        this.registerShapedRecipe(new ItemStack(Items.STICK, 4), new Object[] { "#", "#", '#', Blocks.PLANKS});
+        this.registerShapedRecipe(new ItemStack(Blocks.TORCH, 4), new Object[] { "X", "#", 'X', Items.COAL, '#', Items.STICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.TORCH, 4), new Object[] { "X", "#", 'X', new ItemStack(Items.COAL, 1, 1), '#', Items.STICK});
+        this.registerShapedRecipe(new ItemStack(Items.BOWL, 4), new Object[] { "# #", " # ", '#', Blocks.PLANKS});
+        this.registerShapedRecipe(new ItemStack(Items.GLASS_BOTTLE, 3), new Object[] { "# #", " # ", '#', Blocks.GLASS});
+        this.registerShapedRecipe(new ItemStack(Blocks.RAIL, 16), new Object[] { "X X", "X#X", "X X", 'X', Items.IRON_INGOT, '#', Items.STICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.GOLDEN_RAIL, 6), new Object[] { "X X", "X#X", "XRX", 'X', Items.GOLD_INGOT, 'R', Items.REDSTONE, '#', Items.STICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.ACTIVATOR_RAIL, 6), new Object[] { "XSX", "X#X", "XSX", 'X', Items.IRON_INGOT, '#', Blocks.REDSTONE_TORCH, 'S', Items.STICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.DETECTOR_RAIL, 6), new Object[] { "X X", "X#X", "XRX", 'X', Items.IRON_INGOT, 'R', Items.REDSTONE, '#', Blocks.STONE_PRESSURE_PLATE});
+        this.registerShapedRecipe(new ItemStack(Items.MINECART, 1), new Object[] { "# #", "###", '#', Items.IRON_INGOT});
+        this.registerShapedRecipe(new ItemStack(Items.CAULDRON, 1), new Object[] { "# #", "# #", "###", '#', Items.IRON_INGOT});
+        this.registerShapedRecipe(new ItemStack(Items.BREWING_STAND, 1), new Object[] { " B ", "###", '#', Blocks.COBBLESTONE, 'B', Items.BLAZE_ROD});
+        this.registerShapedRecipe(new ItemStack(Blocks.LIT_PUMPKIN, 1), new Object[] { "A", "B", 'A', Blocks.PUMPKIN, 'B', Blocks.TORCH});
+        this.registerShapedRecipe(new ItemStack(Items.CHEST_MINECART, 1), new Object[] { "A", "B", 'A', Blocks.CHEST, 'B', Items.MINECART});
+        this.registerShapedRecipe(new ItemStack(Items.FURNACE_MINECART, 1), new Object[] { "A", "B", 'A', Blocks.FURNACE, 'B', Items.MINECART});
+        this.registerShapedRecipe(new ItemStack(Items.TNT_MINECART, 1), new Object[] { "A", "B", 'A', Blocks.TNT, 'B', Items.MINECART});
+        this.registerShapedRecipe(new ItemStack(Items.HOPPER_MINECART, 1), new Object[] { "A", "B", 'A', Blocks.HOPPER, 'B', Items.MINECART});
+        this.registerShapedRecipe(new ItemStack(Items.BOAT, 1), new Object[] { "# #", "###", '#', Blocks.PLANKS});
+        this.registerShapedRecipe(new ItemStack(Items.BUCKET, 1), new Object[] { "# #", " # ", '#', Items.IRON_INGOT});
+        this.registerShapedRecipe(new ItemStack(Items.FLOWER_POT, 1), new Object[] { "# #", " # ", '#', Items.BRICK});
         this.registerShapelessRecipe(new ItemStack(Items.FLINT_AND_STEEL, 1), new Object[] { new ItemStack(Items.IRON_INGOT, 1), new ItemStack(Items.FLINT, 1)});
-        this.registerShapedRecipe(new ItemStack(Items.BREAD, 1), new Object[] { "###", Character.valueOf('#'), Items.WHEAT});
-        this.registerShapedRecipe(new ItemStack(Blocks.OAK_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.OAK.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.BIRCH_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.BIRCH.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.SPRUCE_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.JUNGLE_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.ACACIA_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4)});
-        this.registerShapedRecipe(new ItemStack(Blocks.DARK_OAK_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4)});
-        this.registerShapedRecipe(new ItemStack(Items.FISHING_ROD, 1), new Object[] { "  #", " #X", "# X", Character.valueOf('#'), Items.STICK, Character.valueOf('X'), Items.STRING});
-        this.registerShapedRecipe(new ItemStack(Items.CARROT_ON_A_STICK, 1), new Object[] { "# ", " X", Character.valueOf('#'), Items.FISHING_ROD, Character.valueOf('X'), Items.CARROT});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), Blocks.COBBLESTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.BRICK_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), Blocks.BRICK_BLOCK});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_BRICK_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), Blocks.STONEBRICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.NETHER_BRICK_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), Blocks.NETHER_BRICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.SANDSTONE_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), Blocks.SANDSTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.RED_SANDSTONE_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), Blocks.RED_SANDSTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.QUARTZ_STAIRS, 4), new Object[] { "#  ", "## ", "###", Character.valueOf('#'), Blocks.QUARTZ_BLOCK});
-        this.registerShapedRecipe(new ItemStack(Items.PAINTING, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Items.STICK, Character.valueOf('X'), Blocks.WOOL});
-        this.registerShapedRecipe(new ItemStack(Items.ITEM_FRAME, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Items.STICK, Character.valueOf('X'), Items.LEATHER});
-        this.registerShapedRecipe(new ItemStack(Items.GOLDEN_APPLE, 1, 0), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Items.GOLD_INGOT, Character.valueOf('X'), Items.APPLE});
-        this.registerShapedRecipe(new ItemStack(Items.GOLDEN_APPLE, 1, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Blocks.GOLD_BLOCK, Character.valueOf('X'), Items.APPLE});
-        this.registerShapedRecipe(new ItemStack(Items.GOLDEN_CARROT, 1, 0), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Items.GOLD_NUGGET, Character.valueOf('X'), Items.CARROT});
-        this.registerShapedRecipe(new ItemStack(Items.SPECKLED_MELON, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Items.GOLD_NUGGET, Character.valueOf('X'), Items.MELON});
-        this.registerShapedRecipe(new ItemStack(Blocks.LEVER, 1), new Object[] { "X", "#", Character.valueOf('#'), Blocks.COBBLESTONE, Character.valueOf('X'), Items.STICK});
-        this.registerShapedRecipe(new ItemStack(Blocks.TRIPWIRE_HOOK, 2), new Object[] { "I", "S", "#", Character.valueOf('#'), Blocks.PLANKS, Character.valueOf('S'), Items.STICK, Character.valueOf('I'), Items.IRON_INGOT});
-        this.registerShapedRecipe(new ItemStack(Blocks.REDSTONE_TORCH, 1), new Object[] { "X", "#", Character.valueOf('#'), Items.STICK, Character.valueOf('X'), Items.REDSTONE});
-        this.registerShapedRecipe(new ItemStack(Items.REPEATER, 1), new Object[] { "#X#", "III", Character.valueOf('#'), Blocks.REDSTONE_TORCH, Character.valueOf('X'), Items.REDSTONE, Character.valueOf('I'), new ItemStack(Blocks.STONE, 1, BlockStone.EnumStoneVariant.STONE.a())});
-        this.registerShapedRecipe(new ItemStack(Items.COMPARATOR, 1), new Object[] { " # ", "#X#", "III", Character.valueOf('#'), Blocks.REDSTONE_TORCH, Character.valueOf('X'), Items.QUARTZ, Character.valueOf('I'), new ItemStack(Blocks.STONE, 1, BlockStone.EnumStoneVariant.STONE.a())});
-        this.registerShapedRecipe(new ItemStack(Items.CLOCK, 1), new Object[] { " # ", "#X#", " # ", Character.valueOf('#'), Items.GOLD_INGOT, Character.valueOf('X'), Items.REDSTONE});
-        this.registerShapedRecipe(new ItemStack(Items.COMPASS, 1), new Object[] { " # ", "#X#", " # ", Character.valueOf('#'), Items.IRON_INGOT, Character.valueOf('X'), Items.REDSTONE});
-        this.registerShapedRecipe(new ItemStack(Items.MAP, 1), new Object[] { "###", "#X#", "###", Character.valueOf('#'), Items.PAPER, Character.valueOf('X'), Items.COMPASS});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_BUTTON, 1), new Object[] { "#", Character.valueOf('#'), new ItemStack(Blocks.STONE, 1, BlockStone.EnumStoneVariant.STONE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_BUTTON, 1), new Object[] { "#", Character.valueOf('#'), Blocks.PLANKS});
-        this.registerShapedRecipe(new ItemStack(Blocks.STONE_PRESSURE_PLATE, 1), new Object[] { "##", Character.valueOf('#'), new ItemStack(Blocks.STONE, 1, BlockStone.EnumStoneVariant.STONE.a())});
-        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_PRESSURE_PLATE, 1), new Object[] { "##", Character.valueOf('#'), Blocks.PLANKS});
-        this.registerShapedRecipe(new ItemStack(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE, 1), new Object[] { "##", Character.valueOf('#'), Items.IRON_INGOT});
-        this.registerShapedRecipe(new ItemStack(Blocks.LIGHT_WEIGHTED_PRESSURE_PLATE, 1), new Object[] { "##", Character.valueOf('#'), Items.GOLD_INGOT});
-        this.registerShapedRecipe(new ItemStack(Blocks.DISPENSER, 1), new Object[] { "###", "#X#", "#R#", Character.valueOf('#'), Blocks.COBBLESTONE, Character.valueOf('X'), Items.BOW, Character.valueOf('R'), Items.REDSTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.DROPPER, 1), new Object[] { "###", "# #", "#R#", Character.valueOf('#'), Blocks.COBBLESTONE, Character.valueOf('R'), Items.REDSTONE});
-        this.registerShapedRecipe(new ItemStack(Blocks.PISTON, 1), new Object[] { "TTT", "#X#", "#R#", Character.valueOf('#'), Blocks.COBBLESTONE, Character.valueOf('X'), Items.IRON_INGOT, Character.valueOf('R'), Items.REDSTONE, Character.valueOf('T'), Blocks.PLANKS});
-        this.registerShapedRecipe(new ItemStack(Blocks.STICKY_PISTON, 1), new Object[] { "S", "P", Character.valueOf('S'), Items.SLIME, Character.valueOf('P'), Blocks.PISTON});
-        this.registerShapedRecipe(new ItemStack(Items.BED, 1), new Object[] { "###", "XXX", Character.valueOf('#'), Blocks.WOOL, Character.valueOf('X'), Blocks.PLANKS});
-        this.registerShapedRecipe(new ItemStack(Blocks.ENCHANTING_TABLE, 1), new Object[] { " B ", "D#D", "###", Character.valueOf('#'), Blocks.OBSIDIAN, Character.valueOf('B'), Items.BOOK, Character.valueOf('D'), Items.DIAMOND});
-        this.registerShapedRecipe(new ItemStack(Blocks.ANVIL, 1), new Object[] { "III", " i ", "iii", Character.valueOf('I'), Blocks.IRON_BLOCK, Character.valueOf('i'), Items.IRON_INGOT});
-        this.registerShapedRecipe(new ItemStack(Items.LEATHER), new Object[] { "##", "##", Character.valueOf('#'), Items.RABBIT_HIDE});
+        this.registerShapedRecipe(new ItemStack(Items.BREAD, 1), new Object[] { "###", '#', Items.WHEAT});
+        this.registerShapedRecipe(new ItemStack(Blocks.OAK_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.OAK.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.BIRCH_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.BIRCH.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.SPRUCE_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.SPRUCE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.JUNGLE_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', new ItemStack(Blocks.PLANKS, 1, BlockWood.EnumLogVariant.JUNGLE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.ACACIA_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.ACACIA.a() - 4)});
+        this.registerShapedRecipe(new ItemStack(Blocks.DARK_OAK_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', new ItemStack(Blocks.PLANKS, 1, 4 + BlockWood.EnumLogVariant.DARK_OAK.a() - 4)});
+        this.registerShapedRecipe(new ItemStack(Items.FISHING_ROD, 1), new Object[] { "  #", " #X", "# X", '#', Items.STICK, 'X', Items.STRING});
+        this.registerShapedRecipe(new ItemStack(Items.CARROT_ON_A_STICK, 1), new Object[] { "# ", " X", '#', Items.FISHING_ROD, 'X', Items.CARROT});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', Blocks.COBBLESTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.BRICK_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', Blocks.BRICK_BLOCK});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_BRICK_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', Blocks.STONEBRICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.NETHER_BRICK_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', Blocks.NETHER_BRICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.SANDSTONE_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', Blocks.SANDSTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.RED_SANDSTONE_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', Blocks.RED_SANDSTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.QUARTZ_STAIRS, 4), new Object[] { "#  ", "## ", "###", '#', Blocks.QUARTZ_BLOCK});
+        this.registerShapedRecipe(new ItemStack(Items.PAINTING, 1), new Object[] { "###", "#X#", "###", '#', Items.STICK, 'X', Blocks.WOOL});
+        this.registerShapedRecipe(new ItemStack(Items.ITEM_FRAME, 1), new Object[] { "###", "#X#", "###", '#', Items.STICK, 'X', Items.LEATHER});
+        this.registerShapedRecipe(new ItemStack(Items.GOLDEN_APPLE, 1, 0), new Object[] { "###", "#X#", "###", '#', Items.GOLD_INGOT, 'X', Items.APPLE});
+        this.registerShapedRecipe(new ItemStack(Items.GOLDEN_APPLE, 1, 1), new Object[] { "###", "#X#", "###", '#', Blocks.GOLD_BLOCK, 'X', Items.APPLE});
+        this.registerShapedRecipe(new ItemStack(Items.GOLDEN_CARROT, 1, 0), new Object[] { "###", "#X#", "###", '#', Items.GOLD_NUGGET, 'X', Items.CARROT});
+        this.registerShapedRecipe(new ItemStack(Items.SPECKLED_MELON, 1), new Object[] { "###", "#X#", "###", '#', Items.GOLD_NUGGET, 'X', Items.MELON});
+        this.registerShapedRecipe(new ItemStack(Blocks.LEVER, 1), new Object[] { "X", "#", '#', Blocks.COBBLESTONE, 'X', Items.STICK});
+        this.registerShapedRecipe(new ItemStack(Blocks.TRIPWIRE_HOOK, 2), new Object[] { "I", "S", "#", '#', Blocks.PLANKS, 'S', Items.STICK, 'I', Items.IRON_INGOT});
+        this.registerShapedRecipe(new ItemStack(Blocks.REDSTONE_TORCH, 1), new Object[] { "X", "#", '#', Items.STICK, 'X', Items.REDSTONE});
+        this.registerShapedRecipe(new ItemStack(Items.REPEATER, 1), new Object[] { "#X#", "III", '#', Blocks.REDSTONE_TORCH, 'X', Items.REDSTONE, 'I', new ItemStack(Blocks.STONE, 1, BlockStone.EnumStoneVariant.STONE.a())});
+        this.registerShapedRecipe(new ItemStack(Items.COMPARATOR, 1), new Object[] { " # ", "#X#", "III", '#', Blocks.REDSTONE_TORCH, 'X', Items.QUARTZ, 'I', new ItemStack(Blocks.STONE, 1, BlockStone.EnumStoneVariant.STONE.a())});
+        this.registerShapedRecipe(new ItemStack(Items.CLOCK, 1), new Object[] { " # ", "#X#", " # ", '#', Items.GOLD_INGOT, 'X', Items.REDSTONE});
+        this.registerShapedRecipe(new ItemStack(Items.COMPASS, 1), new Object[] { " # ", "#X#", " # ", '#', Items.IRON_INGOT, 'X', Items.REDSTONE});
+        this.registerShapedRecipe(new ItemStack(Items.MAP, 1), new Object[] { "###", "#X#", "###", '#', Items.PAPER, 'X', Items.COMPASS});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_BUTTON, 1), new Object[] { "#", '#', new ItemStack(Blocks.STONE, 1, BlockStone.EnumStoneVariant.STONE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_BUTTON, 1), new Object[] { "#", '#', Blocks.PLANKS});
+        this.registerShapedRecipe(new ItemStack(Blocks.STONE_PRESSURE_PLATE, 1), new Object[] { "##", '#', new ItemStack(Blocks.STONE, 1, BlockStone.EnumStoneVariant.STONE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.WOODEN_PRESSURE_PLATE, 1), new Object[] { "##", '#', Blocks.PLANKS});
+        this.registerShapedRecipe(new ItemStack(Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE, 1), new Object[] { "##", '#', Items.IRON_INGOT});
+        this.registerShapedRecipe(new ItemStack(Blocks.LIGHT_WEIGHTED_PRESSURE_PLATE, 1), new Object[] { "##", '#', Items.GOLD_INGOT});
+        this.registerShapedRecipe(new ItemStack(Blocks.DISPENSER, 1), new Object[] { "###", "#X#", "#R#", '#', Blocks.COBBLESTONE, 'X', Items.BOW, 'R', Items.REDSTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.DROPPER, 1), new Object[] { "###", "# #", "#R#", '#', Blocks.COBBLESTONE, 'R', Items.REDSTONE});
+        this.registerShapedRecipe(new ItemStack(Blocks.PISTON, 1), new Object[] { "TTT", "#X#", "#R#", '#', Blocks.COBBLESTONE, 'X', Items.IRON_INGOT, 'R', Items.REDSTONE, 'T', Blocks.PLANKS});
+        this.registerShapedRecipe(new ItemStack(Blocks.STICKY_PISTON, 1), new Object[] { "S", "P", 'S', Items.SLIME, 'P', Blocks.PISTON});
+        this.registerShapedRecipe(new ItemStack(Items.BED, 1), new Object[] { "###", "XXX", '#', Blocks.WOOL, 'X', Blocks.PLANKS});
+        this.registerShapedRecipe(new ItemStack(Blocks.ENCHANTING_TABLE, 1), new Object[] { " B ", "D#D", "###", '#', Blocks.OBSIDIAN, 'B', Items.BOOK, 'D', Items.DIAMOND});
+        this.registerShapedRecipe(new ItemStack(Blocks.ANVIL, 1), new Object[] { "III", " i ", "iii", 'I', Blocks.IRON_BLOCK, 'i', Items.IRON_INGOT});
+        this.registerShapedRecipe(new ItemStack(Items.LEATHER), new Object[] { "##", "##", '#', Items.RABBIT_HIDE});
         this.registerShapelessRecipe(new ItemStack(Items.ENDER_EYE, 1), new Object[] { Items.ENDER_PEARL, Items.BLAZE_POWDER});
         this.registerShapelessRecipe(new ItemStack(Items.FIRE_CHARGE, 3), new Object[] { Items.GUNPOWDER, Items.BLAZE_POWDER, Items.COAL});
         this.registerShapelessRecipe(new ItemStack(Items.FIRE_CHARGE, 3), new Object[] { Items.GUNPOWDER, Items.BLAZE_POWDER, new ItemStack(Items.COAL, 1, 1)});
-        this.registerShapedRecipe(new ItemStack(Blocks.DAYLIGHT_DETECTOR), new Object[] { "GGG", "QQQ", "WWW", Character.valueOf('G'), Blocks.GLASS, Character.valueOf('Q'), Items.QUARTZ, Character.valueOf('W'), Blocks.WOODEN_SLAB});
-        this.registerShapedRecipe(new ItemStack(Blocks.HOPPER), new Object[] { "I I", "ICI", " I ", Character.valueOf('I'), Items.IRON_INGOT, Character.valueOf('C'), Blocks.CHEST});
-        this.registerShapedRecipe(new ItemStack(Items.ARMOR_STAND, 1), new Object[] { "///", " / ", "/_/", Character.valueOf('/'), Items.STICK, Character.valueOf('_'), new ItemStack(Blocks.STONE_SLAB, 1, BlockDoubleStepAbstract.EnumStoneSlabVariant.STONE.a())});
+        this.registerShapedRecipe(new ItemStack(Blocks.DAYLIGHT_DETECTOR), new Object[] { "GGG", "QQQ", "WWW", 'G', Blocks.GLASS, 'Q', Items.QUARTZ, 'W', Blocks.WOODEN_SLAB});
+        this.registerShapedRecipe(new ItemStack(Blocks.HOPPER), new Object[] { "I I", "ICI", " I ", 'I', Items.IRON_INGOT, 'C', Blocks.CHEST});
+        this.registerShapedRecipe(new ItemStack(Items.ARMOR_STAND, 1), new Object[] { "///", " / ", "/_/", '/', Items.STICK, '_', new ItemStack(Blocks.STONE_SLAB, 1, BlockDoubleStepAbstract.EnumStoneSlabVariant.STONE.a())});
         sort();
     }
 
     // CraftBukkit start
     public void sort() {
-       Collections.sort(this.recipes, new Comparator() {
-            public int a(IRecipe irecipe, IRecipe irecipe1) {
-                return irecipe instanceof ShapelessRecipes && irecipe1 instanceof ShapedRecipes ? 1 : (irecipe1 instanceof ShapelessRecipes && irecipe instanceof ShapedRecipes ? -1 : (irecipe1.a() < irecipe.a() ? -1 : (irecipe1.a() > irecipe.a() ? 1 : 0)));
-            }
+       this.recipes.sort(new Comparator() {
+           public int a(IRecipe irecipe, IRecipe irecipe1) {
+               return irecipe instanceof ShapelessRecipes && irecipe1 instanceof ShapedRecipes ? 1 : (irecipe1 instanceof ShapelessRecipes && irecipe instanceof ShapedRecipes ? -1 : (Integer.compare(irecipe1.a(), irecipe.a())));
+           }
 
-            public int compare(Object object, Object object1) {
-                return this.a((IRecipe) object, (IRecipe) object1);
-            }
-        });
+           public int compare(Object object, Object object1) {
+               return this.a((IRecipe) object, (IRecipe) object1);
+           }
+       });
     }
 
     public ShapedRecipes registerShapedRecipe(ItemStack itemstack, Object... aobject) {
-        String s = "";
+        StringBuilder s = new StringBuilder();
         int i = 0;
         int j = 0;
         int k = 0;
 
         if (aobject[i] instanceof String[]) {
-            String[] astring = (String[]) ((String[]) aobject[i++]);
-
-            for (int l = 0; l < astring.length; ++l) {
-                String s1 = astring[l];
+            String[] astring = (String[]) aobject[i++];
 
+            for (String s1 : astring) {
                 ++k;
                 j = s1.length();
-                s = s + s1;
+                s.append(s1);
             }
         } else {
             while (aobject[i] instanceof String) {
@@ -211,7 +209,7 @@ public class CraftingManager {
 
                 ++k;
                 j = s2.length();
-                s = s + s2;
+                s.append(s2);
             }
         }
 
@@ -237,8 +235,8 @@ public class CraftingManager {
         for (int i1 = 0; i1 < j * k; ++i1) {
             char c0 = s.charAt(i1);
 
-            if (hashmap.containsKey(Character.valueOf(c0))) {
-                aitemstack[i1] = ((ItemStack) hashmap.get(Character.valueOf(c0))).cloneItemStack();
+            if (hashmap.containsKey(c0)) {
+                aitemstack[i1] = ((ItemStack) hashmap.get(c0)).cloneItemStack();
             } else {
                 aitemstack[i1] = null;
             }
@@ -252,11 +250,10 @@ public class CraftingManager {
 
     public void registerShapelessRecipe(ItemStack itemstack, Object... aobject) {
         ArrayList arraylist = Lists.newArrayList();
-        Object[] aobject1 = aobject;
         int i = aobject.length;
 
         for (int j = 0; j < i; ++j) {
-            Object object = aobject1[j];
+            Object object = aobject[j];
 
             if (object instanceof ItemStack) {
                 arraylist.add(((ItemStack) object).cloneItemStack());
@@ -300,11 +297,8 @@ public class CraftingManager {
     }
 
     public ItemStack[] b(InventoryCrafting inventorycrafting, World world) {
-        Iterator iterator = this.recipes.iterator();
-
-        while (iterator.hasNext()) {
-            IRecipe irecipe = (IRecipe) iterator.next();
 
+        for (IRecipe irecipe : this.recipes) {
             if (irecipe.a(inventorycrafting, world)) {
                 return irecipe.b(inventorycrafting);
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/CrashReport.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/CrashReport.java
index 741c419..e7134b6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/CrashReport.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/CrashReport.java
@@ -94,10 +94,9 @@ public class CrashReport {
                 List list = runtimemxbean.getInputArguments();
                 int i = 0;
                 StringBuilder stringbuilder = new StringBuilder();
-                Iterator iterator = list.iterator();
 
-                while (iterator.hasNext()) {
-                    String s = (String) iterator.next();
+                for (Object o : list) {
+                    String s = (String) o;
 
                     if (s.startsWith("-X")) {
                         if (i++ > 0) {
@@ -108,7 +107,7 @@ public class CrashReport {
                     }
                 }
 
-                return String.format("%d total; %s", new Object[] { Integer.valueOf(i), stringbuilder.toString()});
+                return String.format("%d total; %s", new Object[] {i, stringbuilder.toString()});
             }
 
             public Object call() throws Exception {
@@ -137,7 +136,7 @@ public class CrashReport {
 
     public void a(StringBuilder stringbuilder) {
         if ((this.h == null || this.h.length <= 0) && this.e.size() > 0) {
-            this.h = (StackTraceElement[]) ArrayUtils.subarray(((CrashReportSystemDetails) this.e.get(0)).a(), 0, 1);
+            this.h = ArrayUtils.subarray(this.e.get(0).a(), 0, 1);
         }
 
         if (this.h != null && this.h.length > 0) {
@@ -146,9 +145,7 @@ public class CrashReport {
             StackTraceElement[] astacktraceelement = this.h;
             int i = astacktraceelement.length;
 
-            for (int j = 0; j < i; ++j) {
-                StackTraceElement stacktraceelement = astacktraceelement[j];
-
+            for (StackTraceElement stacktraceelement : astacktraceelement) {
                 stringbuilder.append("\t").append("at ").append(stacktraceelement.toString());
                 stringbuilder.append("\n");
             }
@@ -156,11 +153,7 @@ public class CrashReport {
             stringbuilder.append("\n");
         }
 
-        Iterator iterator = this.e.iterator();
-
-        while (iterator.hasNext()) {
-            CrashReportSystemDetails crashreportsystemdetails = (CrashReportSystemDetails) iterator.next();
-
+        for (CrashReportSystemDetails crashreportsystemdetails : this.e) {
             crashreportsystemdetails.a(stringbuilder);
             stringbuilder.append("\n\n");
         }
@@ -185,7 +178,7 @@ public class CrashReport {
             ((Throwable) object).setStackTrace(this.c.getStackTrace());
         }
 
-        String s = ((Throwable) object).toString();
+        String s = object.toString();
 
         try {
             stringwriter = new StringWriter();
@@ -278,7 +271,7 @@ public class CrashReport {
 
             this.g = crashreportsystemdetails.a(stacktraceelement, stacktraceelement1);
             if (j > 0 && !this.e.isEmpty()) {
-                CrashReportSystemDetails crashreportsystemdetails1 = (CrashReportSystemDetails) this.e.get(this.e.size() - 1);
+                CrashReportSystemDetails crashreportsystemdetails1 = this.e.get(this.e.size() - 1);
 
                 crashreportsystemdetails1.b(j);
             } else if (astacktraceelement != null && astacktraceelement.length >= j && 0 <= k && k < astacktraceelement.length) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/DataWatcher.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/DataWatcher.java
index ed52d3c..3acc739 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/DataWatcher.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/DataWatcher.java
@@ -61,7 +61,7 @@ public class DataWatcher {
     }
 
     public void add(int i, int j) {
-        DataWatcher.WatchableObject datawatcher_watchableobject = new DataWatcher.WatchableObject(j, i, (Object) null);
+        DataWatcher.WatchableObject datawatcher_watchableobject = new DataWatcher.WatchableObject(j, i, null);
 
 //        this.f.writeLock().lock(); // Spigot - not required
         this.dataValues.put(i, datawatcher_watchableobject); // Spigot
@@ -70,19 +70,19 @@ public class DataWatcher {
     }
 
     public byte getByte(int i) {
-        return ((Byte) this.j(i).b()).byteValue();
+        return (Byte) this.j(i).b();
     }
 
     public short getShort(int i) {
-        return ((Short) this.j(i).b()).shortValue();
+        return (Short) this.j(i).b();
     }
 
     public int getInt(int i) {
-        return ((Integer) this.j(i).b()).intValue();
+        return (Integer) this.j(i).b();
     }
 
     public float getFloat(int i) {
-        return ((Float) this.j(i).b()).floatValue();
+        return (Float) this.j(i).b();
     }
 
     public String getString(int i) {
@@ -142,11 +142,8 @@ public class DataWatcher {
 
     public static void a(List list, PacketDataSerializer serializer) throws IOException {
         if (list != null) {
-            Iterator iterator = list.iterator();
-
-            while (iterator.hasNext()) {
-                DataWatcher.WatchableObject datawatcher_watchableobject = (DataWatcher.WatchableObject) iterator.next();
 
+            for (WatchableObject datawatcher_watchableobject : list) {
                 a(serializer, datawatcher_watchableobject);
             }
         }
@@ -159,10 +156,10 @@ public class DataWatcher {
 
         if (this.e) {
 //            this.f.readLock().lock(); // Spigot - not required
-            Iterator iterator = this.dataValues.values().iterator(); // Spigot // TacoSpigot
+            // Spigot // TacoSpigot
 
-            while (iterator.hasNext()) {
-                DataWatcher.WatchableObject datawatcher_watchableobject = (DataWatcher.WatchableObject) iterator.next();
+            for (Object o : this.dataValues.values()) {
+                WatchableObject datawatcher_watchableobject = (WatchableObject) o;
 
                 if (datawatcher_watchableobject.d()) {
                     datawatcher_watchableobject.a(false);
@@ -191,10 +188,10 @@ public class DataWatcher {
 
     public void a(PacketDataSerializer serializer) throws IOException {
 //        this.f.readLock().lock(); // Spigot - not required
-        Iterator iterator = this.dataValues.values().iterator(); // Spigot // TacoSpigot
+        // Spigot // TacoSpigot
 
-        while (iterator.hasNext()) {
-            DataWatcher.WatchableObject datawatcher_watchableobject = (DataWatcher.WatchableObject) iterator.next();
+        for (Object o : this.dataValues.values()) {
+            WatchableObject datawatcher_watchableobject = (WatchableObject) o;
 
             a(serializer, datawatcher_watchableobject);
         }
@@ -231,19 +228,19 @@ public class DataWatcher {
         serializer.writeByte(i);
         switch (datawatcher_watchableobject.c()) {
             case 0:
-                serializer.writeByte(((Byte) datawatcher_watchableobject.b()).byteValue());
+                serializer.writeByte((Byte) datawatcher_watchableobject.b());
                 break;
 
             case 1:
-                serializer.writeShort(((Short) datawatcher_watchableobject.b()).shortValue());
+                serializer.writeShort((Short) datawatcher_watchableobject.b());
                 break;
 
             case 2:
-                serializer.writeInt(((Integer) datawatcher_watchableobject.b()).intValue());
+                serializer.writeInt((Integer) datawatcher_watchableobject.b());
                 break;
 
             case 3:
-                serializer.writeFloat(((Float) datawatcher_watchableobject.b()).floatValue());
+                serializer.writeFloat((Float) datawatcher_watchableobject.b());
                 break;
 
             case 4:
@@ -289,22 +286,22 @@ public class DataWatcher {
             switch (i) {
                 case 0:
                     datawatcher_watchableobject = new DataWatcher.WatchableObject(i, j,
-                            Byte.valueOf(serializer.readByte()));
+                            serializer.readByte());
                     break;
 
                 case 1:
                     datawatcher_watchableobject = new DataWatcher.WatchableObject(i, j,
-                            Short.valueOf(serializer.readShort()));
+                            serializer.readShort());
                     break;
 
                 case 2:
                     datawatcher_watchableobject = new DataWatcher.WatchableObject(i, j,
-                            Integer.valueOf(serializer.readInt()));
+                            serializer.readInt());
                     break;
 
                 case 3:
                     datawatcher_watchableobject = new DataWatcher.WatchableObject(i, j,
-                            Float.valueOf(serializer.readFloat()));
+                            serializer.readFloat());
                     break;
 
                 case 4:
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/DedicatedServer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/DedicatedServer.java
index d826472..1a4a9f0 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -1,10 +1,9 @@
 package net.minecraft.server;
 
 import com.google.common.collect.Lists;
-import java.io.BufferedReader;
+
 import java.io.File;
 import java.io.IOException;
-import java.io.InputStreamReader;
 import java.net.InetAddress;
 import java.net.Proxy;
 import java.util.Collections;
@@ -52,8 +51,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
                 while (true) {
                     try {
                         Thread.sleep(2147483647L);
-                    } catch (InterruptedException interruptedexception) {
-                        ;
+                    } catch (InterruptedException ignored) {
                     }
                 }
             }
@@ -153,9 +151,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
             this.setForceGamemode(this.propertyManager.getBoolean("force-gamemode", false));
             this.setIdleTimeout(this.propertyManager.getInt("player-idle-timeout", 0));
             if (this.propertyManager.getInt("difficulty", 1) < 0) {
-                this.propertyManager.setProperty("difficulty", Integer.valueOf(0));
+                this.propertyManager.setProperty("difficulty", 0);
             } else if (this.propertyManager.getInt("difficulty", 1) > 3) {
-                this.propertyManager.setProperty("difficulty", Integer.valueOf(3));
+                this.propertyManager.setProperty("difficulty", 3);
             }
 
             this.generateStructures = this.propertyManager.getBoolean("generate-structures", true);
@@ -173,7 +171,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
                 this.setPort(this.propertyManager.getInt("server-port", 25565));
             }
             // Spigot start
-            this.a((PlayerList) (new DedicatedPlayerList(this)));
+            this.a(new DedicatedPlayerList(this));
             org.spigotmc.SpigotConfig.init((File) options.valueOf("spigot-settings"));
             org.spigotmc.SpigotConfig.registerCommands();
             // Spigot end
@@ -244,7 +242,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
                             k = l;
                         }
                     } catch (NumberFormatException numberformatexception) {
-                        k = (long) s.hashCode();
+                        k = s.hashCode();
                     }
                 }
 
@@ -262,11 +260,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
                 this.c(this.propertyManager.getInt("max-build-height", 256));
                 this.c((this.getMaxBuildHeight() + 8) / 16 * 16);
                 this.c(MathHelper.clamp(this.getMaxBuildHeight(), 64, 256));
-                this.propertyManager.setProperty("max-build-height", Integer.valueOf(this.getMaxBuildHeight()));
+                this.propertyManager.setProperty("max-build-height", this.getMaxBuildHeight());
                 DedicatedServer.LOGGER.info("Preparing level \"" + this.U() + "\"");
                 this.a(this.U(), this.U(), k, worldtype, s2);
                 long i1 = System.nanoTime() - j;
-                String s3 = String.format("%.3fs", new Object[] { Double.valueOf((double) i1 / 1.0E9D)});
+                String s3 = String.format("%.3fs", new Object[] {(double) i1 / 1.0E9D});
 
                 DedicatedServer.LOGGER.info("Done (" + s3 + ")! For help, type \"help\" or \"?\"");
                 if (this.propertyManager.getBoolean("enable-query", false)) {
@@ -388,8 +386,8 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
     }
 
     public void a(MojangStatisticsGenerator mojangstatisticsgenerator) {
-        mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(this.aP().getHasWhitelist()));
-        mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(this.aP().getWhitelisted().length));
+        mojangstatisticsgenerator.a("whitelist_enabled", this.aP().getHasWhitelist());
+        mojangstatisticsgenerator.a("whitelist_count", this.aP().getWhitelisted().length);
         super.a(mojangstatisticsgenerator);
     }
 
@@ -404,7 +402,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
     public void aO() {
         SpigotTimings.serverCommandTimer.startTiming(); // Spigot
         while (!this.l.isEmpty()) {
-            ServerCommand servercommand = (ServerCommand) this.l.remove(0);
+            ServerCommand servercommand = this.l.remove(0);
 
             // CraftBukkit start - ServerCommand for preprocessing
             ServerCommandEvent event = new ServerCommandEvent(console, servercommand.command);
@@ -504,7 +502,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
 
     public void setIdleTimeout(int i) {
         super.setIdleTimeout(i);
-        this.propertyManager.setProperty("player-idle-timeout", Integer.valueOf(i));
+        this.propertyManager.setProperty("player-idle-timeout", i);
         this.a();
     }
 
@@ -548,7 +546,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
                 this.aU();
             }
 
-            flag = NameReferencingFileConverter.a((MinecraftServer) this);
+            flag = NameReferencingFileConverter.a(this);
         }
 
         boolean flag1 = false;
@@ -559,7 +557,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
                 this.aU();
             }
 
-            flag1 = NameReferencingFileConverter.b((MinecraftServer) this);
+            flag1 = NameReferencingFileConverter.b(this);
         }
 
         boolean flag2 = false;
@@ -570,7 +568,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
                 this.aU();
             }
 
-            flag2 = NameReferencingFileConverter.c((MinecraftServer) this);
+            flag2 = NameReferencingFileConverter.c(this);
         }
 
         boolean flag3 = false;
@@ -581,7 +579,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
                 this.aU();
             }
 
-            flag3 = NameReferencingFileConverter.d((MinecraftServer) this);
+            flag3 = NameReferencingFileConverter.d(this);
         }
 
         boolean flag4 = false;
@@ -601,8 +599,7 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
     private void aU() {
         try {
             Thread.sleep(5000L);
-        } catch (InterruptedException interruptedexception) {
-            ;
+        } catch (InterruptedException ignored) {
         }
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorItem.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
index 35a3ff8..bd92f44 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorItem.java
@@ -75,7 +75,7 @@ public class DispenseBehaviorItem implements IDispenseBehavior {
         if (!event.getItem().getType().equals(craftItem.getType())) {
             // Chain to handler for new item
             ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-            IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+            IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
             if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior.getClass() != DispenseBehaviorItem.class) {
                 idispensebehavior.a(isourceblock, eventStack);
             } else {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorProjectile.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorProjectile.java
index 5cb0363..01727c2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorProjectile.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorProjectile.java
@@ -21,7 +21,7 @@ public abstract class DispenseBehaviorProjectile extends DispenseBehaviorItem {
         org.bukkit.block.Block block = world.getWorld().getBlockAt(isourceblock.getBlockPosition().getX(), isourceblock.getBlockPosition().getY(), isourceblock.getBlockPosition().getZ());
         CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
 
-        BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) enumdirection.getAdjacentX(), (double) ((float) enumdirection.getAdjacentY() + 0.1F), (double) enumdirection.getAdjacentZ()));
+        BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(enumdirection.getAdjacentX(), (float) enumdirection.getAdjacentY() + 0.1F, (double) enumdirection.getAdjacentZ()));
         if (!BlockDispenser.eventFired) {
             world.getServer().getPluginManager().callEvent(event);
         }
@@ -35,7 +35,7 @@ public abstract class DispenseBehaviorProjectile extends DispenseBehaviorItem {
             itemstack.count++;
             // Chain to handler for new item
             ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-            IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+            IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
             if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                 idispensebehavior.a(isourceblock, eventStack);
                 return itemstack;
@@ -43,7 +43,7 @@ public abstract class DispenseBehaviorProjectile extends DispenseBehaviorItem {
         }
 
         iprojectile.shoot(event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), this.getPower(), this.a());
-        ((Entity) iprojectile).projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource((TileEntityDispenser) isourceblock.getTileEntity());
+        ((Entity) iprojectile).projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(isourceblock.getTileEntity());
         // CraftBukkit end
         world.addEntity((Entity) iprojectile);
         // itemstack.a(1); // CraftBukkit - Handled during event processing
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenserRegistry.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenserRegistry.java
index 956794b..4c0f223 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenserRegistry.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/DispenserRegistry.java
@@ -76,7 +76,7 @@ public class DispenserRegistry {
             public ItemStack b(ISourceBlock isourceblock, ItemStack itemstack) {
                 EnumDirection enumdirection = BlockDispenser.b(isourceblock.f());
                 double d0 = isourceblock.getX() + (double) enumdirection.getAdjacentX();
-                double d1 = (double) ((float) isourceblock.getBlockPosition().getY() + 0.2F);
+                double d1 = (float) isourceblock.getBlockPosition().getY() + 0.2F;
                 double d2 = isourceblock.getZ() + (double) enumdirection.getAdjacentZ();
                 // Entity entity = ItemMonsterEgg.a(isourceblock.getWorld(), itemstack.getData(), d0, d1, d2);
 
@@ -100,7 +100,7 @@ public class DispenserRegistry {
                     itemstack.count++;
                     // Chain to handler for new item
                     ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                    IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                     if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                         idispensebehavior.a(isourceblock, eventStack);
                         return itemstack;
@@ -112,7 +112,7 @@ public class DispenserRegistry {
                 Entity entity = ItemMonsterEgg.spawnCreature(isourceblock.getWorld(), itemstack.getData(), event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DISPENSE_EGG);
 
                 if (entity instanceof EntityLiving && itemstack.hasName()) {
-                    ((EntityInsentient) entity).setCustomName(itemstack.getName());
+                    entity.setCustomName(itemstack.getName());
                 }
 
                 // itemstack.a(1); // Handled during event processing
@@ -124,7 +124,7 @@ public class DispenserRegistry {
             public ItemStack b(ISourceBlock isourceblock, ItemStack itemstack) {
                 EnumDirection enumdirection = BlockDispenser.b(isourceblock.f());
                 double d0 = isourceblock.getX() + (double) enumdirection.getAdjacentX();
-                double d1 = (double) ((float) isourceblock.getBlockPosition().getY() + 0.2F);
+                double d1 = (float) isourceblock.getBlockPosition().getY() + 0.2F;
                 double d2 = isourceblock.getZ() + (double) enumdirection.getAdjacentZ();
                 // CraftBukkit start
                 World world = isourceblock.getWorld();
@@ -146,7 +146,7 @@ public class DispenserRegistry {
                     itemstack.count++;
                     // Chain to handler for new item
                     ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                    IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                     if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                         idispensebehavior.a(isourceblock, eventStack);
                         return itemstack;
@@ -198,7 +198,7 @@ public class DispenserRegistry {
                     itemstack.count++;
                     // Chain to handler for new item
                     ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                    IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                     if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                         idispensebehavior.a(isourceblock, eventStack);
                         return itemstack;
@@ -206,7 +206,7 @@ public class DispenserRegistry {
                 }
 
                 EntitySmallFireball entitysmallfireball = new EntitySmallFireball(world, d0, d1, d2, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ());
-                entitysmallfireball.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource((TileEntityDispenser) isourceblock.getTileEntity());
+                entitysmallfireball.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(isourceblock.getTileEntity());
 
                 world.addEntity(entitysmallfireball);
                 // itemstack.a(1); // Handled during event processing
@@ -261,7 +261,7 @@ public class DispenserRegistry {
                     itemstack.count++;
                     // Chain to handler for new item
                     ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                    IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                     if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                         idispensebehavior.a(isourceblock, eventStack);
                         return itemstack;
@@ -308,7 +308,7 @@ public class DispenserRegistry {
                     if (!event.getItem().equals(craftItem)) {
                         // Chain to handler for new item
                         ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                        IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                        IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                         if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                             idispensebehavior.a(isourceblock, eventStack);
                             return itemstack;
@@ -349,10 +349,10 @@ public class DispenserRegistry {
                 Material material = block.getMaterial();
                 Item item;
 
-                if (Material.WATER.equals(material) && block instanceof BlockFluids && ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue() == 0) {
+                if (Material.WATER.equals(material) && block instanceof BlockFluids && iblockdata.get(BlockFluids.LEVEL) == 0) {
                     item = Items.WATER_BUCKET;
                 } else {
-                    if (!Material.LAVA.equals(material) || !(block instanceof BlockFluids) || ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue() != 0) {
+                    if (!Material.LAVA.equals(material) || !(block instanceof BlockFluids) || iblockdata.get(BlockFluids.LEVEL) != 0) {
                         return super.b(isourceblock, itemstack);
                     }
 
@@ -375,7 +375,7 @@ public class DispenserRegistry {
                 if (!event.getItem().equals(craftItem)) {
                     // Chain to handler for new item
                     ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                    IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                     if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                         idispensebehavior.a(isourceblock, eventStack);
                         return itemstack;
@@ -417,7 +417,7 @@ public class DispenserRegistry {
                 if (!event.getItem().equals(craftItem)) {
                     // Chain to handler for new item
                     ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                    IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                     if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                         idispensebehavior.a(isourceblock, eventStack);
                         return itemstack;
@@ -435,7 +435,7 @@ public class DispenserRegistry {
                     }
                     // CraftBukkit end
                 } else if (world.getType(blockposition).getBlock() == Blocks.TNT) {
-                    Blocks.TNT.postBreak(world, blockposition, Blocks.TNT.getBlockData().set(BlockTNT.EXPLODE, Boolean.valueOf(true)));
+                    Blocks.TNT.postBreak(world, blockposition, Blocks.TNT.getBlockData().set(BlockTNT.EXPLODE, Boolean.TRUE));
                     world.setAir(blockposition);
                 } else {
                     this.b = false;
@@ -477,7 +477,7 @@ public class DispenserRegistry {
                     if (!event.getItem().equals(craftItem)) {
                         // Chain to handler for new item
                         ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                        IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                        IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                         if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                             idispensebehavior.a(isourceblock, eventStack);
                             return itemstack;
@@ -537,14 +537,14 @@ public class DispenserRegistry {
                     itemstack.count++;
                     // Chain to handler for new item
                     ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                    IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                     if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                         idispensebehavior.a(isourceblock, eventStack);
                         return itemstack;
                     }
                 }
 
-                EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(block.getLocation(), world, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), (EntityLiving) null); // PaperSpigot
+                EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(block.getLocation(), world, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), null); // PaperSpigot
                 // CraftBukkit end
 
                 world.addEntity(entitytntprimed);
@@ -580,7 +580,7 @@ public class DispenserRegistry {
                                         String s = nbttagcompound.getString("SkullOwner");
 
                                         if (!UtilColor.b(s)) {
-                                            gameprofile = new GameProfile((UUID) null, s);
+                                            gameprofile = new GameProfile(null, s);
                                         }
                                     }
                                 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/Enchantment.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/Enchantment.java
index 0f61eec..17ecff0 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/Enchantment.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/Enchantment.java
@@ -61,7 +61,7 @@ public abstract class Enchantment {
     }
 
     public static Enchantment getByName(String s) {
-        return (Enchantment) Enchantment.E.get(new MinecraftKey(s));
+        return Enchantment.E.get(new MinecraftKey(s));
     }
 
     public static Set getEffects() {
@@ -128,14 +128,12 @@ public abstract class Enchantment {
         Enchantment[] aenchantment = Enchantment.byId;
         int i = aenchantment.length;
 
-        for (int j = 0; j < i; ++j) {
-            Enchantment enchantment = aenchantment[j];
-
+        for (Enchantment enchantment : aenchantment) {
             if (enchantment != null) {
                 arraylist.add(enchantment);
             }
         }
 
-        b = (Enchantment[]) arraylist.toArray(new Enchantment[arraylist.size()]);
+        b = (Enchantment[]) arraylist.toArray(new Enchantment[0]);
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EnchantmentManager.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EnchantmentManager.java
index da928a6..dd2aa15 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EnchantmentManager.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EnchantmentManager.java
@@ -13,10 +13,10 @@ import java.util.Random;
 public class EnchantmentManager {
 
     private static final Random a = new Random();
-    private static final EnchantmentManager.EnchantmentModifierProtection b = new EnchantmentManager.EnchantmentModifierProtection((EnchantmentManager.SyntheticClass_1) null);
-    private static final EnchantmentManager.EnchantmentModifierDamage c = new EnchantmentManager.EnchantmentModifierDamage((EnchantmentManager.SyntheticClass_1) null);
-    private static final EnchantmentManager.EnchantmentModifierThorns d = new EnchantmentManager.EnchantmentModifierThorns((EnchantmentManager.SyntheticClass_1) null);
-    private static final EnchantmentManager.EnchantmentModifierArthropods e = new EnchantmentManager.EnchantmentModifierArthropods((EnchantmentManager.SyntheticClass_1) null);
+    private static final EnchantmentManager.EnchantmentModifierProtection b = new EnchantmentManager.EnchantmentModifierProtection(null);
+    private static final EnchantmentManager.EnchantmentModifierDamage c = new EnchantmentManager.EnchantmentModifierDamage(null);
+    private static final EnchantmentManager.EnchantmentModifierThorns d = new EnchantmentManager.EnchantmentModifierThorns(null);
+    private static final EnchantmentManager.EnchantmentModifierArthropods e = new EnchantmentManager.EnchantmentModifierArthropods(null);
 
     public static int getEnchantmentLevel(int i, ItemStack itemstack) {
         if (itemstack == null) {
@@ -50,7 +50,7 @@ public class EnchantmentManager {
                 short short0 = nbttaglist.get(i).getShort("id");
                 short short1 = nbttaglist.get(i).getShort("lvl");
 
-                linkedhashmap.put(Integer.valueOf(short0), Integer.valueOf(short1));
+                linkedhashmap.put((int) short0, (int) short1);
             }
         }
 
@@ -59,27 +59,25 @@ public class EnchantmentManager {
 
     public static void a(Map map, ItemStack itemstack) {
         NBTTagList nbttaglist = new NBTTagList();
-        Iterator iterator = map.keySet().iterator();
 
-        while (iterator.hasNext()) {
-            int i = ((Integer) iterator.next()).intValue();
+        for (int i : map.keySet()) {
             Enchantment enchantment = Enchantment.getById(i);
 
             if (enchantment != null) {
                 NBTTagCompound nbttagcompound = new NBTTagCompound();
 
                 nbttagcompound.setShort("id", (short) i);
-                nbttagcompound.setShort("lvl", (short) ((Integer) map.get(Integer.valueOf(i))).intValue());
+                nbttagcompound.setShort("lvl", (short) map.get(i).intValue());
                 nbttaglist.add(nbttagcompound);
                 if (itemstack.getItem() == Items.ENCHANTED_BOOK) {
-                    Items.ENCHANTED_BOOK.a(itemstack, new WeightedRandomEnchant(enchantment, ((Integer) map.get(Integer.valueOf(i))).intValue()));
+                    Items.ENCHANTED_BOOK.a(itemstack, new WeightedRandomEnchant(enchantment, map.get(i)));
                 }
             }
         }
 
         if (nbttaglist.size() > 0) {
             if (itemstack.getItem() != Items.ENCHANTED_BOOK) {
-                itemstack.a("ench", (NBTBase) nbttaglist);
+                itemstack.a("ench", nbttaglist);
             }
         } else if (itemstack.hasTag()) {
             itemstack.getTag().remove("ench");
@@ -92,11 +90,10 @@ public class EnchantmentManager {
             return 0;
         } else {
             int j = 0;
-            ItemStack[] aitemstack1 = aitemstack;
             int k = aitemstack.length;
 
             for (int l = 0; l < k; ++l) {
-                ItemStack itemstack = aitemstack1[l];
+                ItemStack itemstack = aitemstack[l];
                 int i1 = getEnchantmentLevel(i, itemstack);
 
                 if (i1 > j) {
@@ -127,11 +124,10 @@ public class EnchantmentManager {
     }
 
     private static void a(EnchantmentManager.EnchantmentModifier enchantmentmanager_enchantmentmodifier, ItemStack[] aitemstack) {
-        ItemStack[] aitemstack1 = aitemstack;
         int i = aitemstack.length;
 
         for (int j = 0; j < i; ++j) {
-            ItemStack itemstack = aitemstack1[j];
+            ItemStack itemstack = aitemstack[j];
 
             a(enchantmentmanager_enchantmentmodifier, itemstack);
         }
@@ -141,7 +137,7 @@ public class EnchantmentManager {
     public static int a(ItemStack[] aitemstack, DamageSource damagesource) {
         EnchantmentManager.b.a = 0;
         EnchantmentManager.b.b = damagesource;
-        a((EnchantmentManager.EnchantmentModifier) EnchantmentManager.b, aitemstack);
+        a(EnchantmentManager.b, aitemstack);
         if (EnchantmentManager.b.a > 25) {
             EnchantmentManager.b.a = 25;
         } else if (EnchantmentManager.b.a < 0) {
@@ -157,7 +153,7 @@ public class EnchantmentManager {
     public static float a(ItemStack itemstack, EnumMonsterType enummonstertype) {
         EnchantmentManager.c.a = 0.0F;
         EnchantmentManager.c.b = enummonstertype;
-        a((EnchantmentManager.EnchantmentModifier) EnchantmentManager.c, itemstack);
+        a(EnchantmentManager.c, itemstack);
         return EnchantmentManager.c.a;
     }
 
@@ -165,11 +161,11 @@ public class EnchantmentManager {
         EnchantmentManager.d.b = entity;
         EnchantmentManager.d.a = entityliving;
         if (entityliving != null) {
-            a((EnchantmentManager.EnchantmentModifier) EnchantmentManager.d, entityliving.getEquipment());
+            a(EnchantmentManager.d, entityliving.getEquipment());
         }
 
         if (entity instanceof EntityHuman) {
-            a((EnchantmentManager.EnchantmentModifier) EnchantmentManager.d, entityliving.bA());
+            a(EnchantmentManager.d, entityliving.bA());
         }
 
         // KigPaper start
@@ -182,11 +178,11 @@ public class EnchantmentManager {
         EnchantmentManager.e.a = entityliving;
         EnchantmentManager.e.b = entity;
         if (entityliving != null) {
-            a((EnchantmentManager.EnchantmentModifier) EnchantmentManager.e, entityliving.getEquipment());
+            a(EnchantmentManager.e, entityliving.getEquipment());
         }
 
         if (entityliving instanceof EntityHuman) {
-            a((EnchantmentManager.EnchantmentModifier) EnchantmentManager.e, entityliving.bA());
+            a(EnchantmentManager.e, entityliving.bA());
         }
 
         // KigPaper start
@@ -243,9 +239,7 @@ public class EnchantmentManager {
         ItemStack[] aitemstack = entityliving.getEquipment();
         int i = aitemstack.length;
 
-        for (int j = 0; j < i; ++j) {
-            ItemStack itemstack = aitemstack[j];
-
+        for (ItemStack itemstack : aitemstack) {
             if (itemstack != null && getEnchantmentLevel(enchantment.id, itemstack) > 0) {
                 return itemstack;
             }
@@ -280,10 +274,9 @@ public class EnchantmentManager {
         }
 
         if (list != null) {
-            Iterator iterator = list.iterator();
 
-            while (iterator.hasNext()) {
-                WeightedRandomEnchant weightedrandomenchant = (WeightedRandomEnchant) iterator.next();
+            for (Object o : list) {
+                WeightedRandomEnchant weightedrandomenchant = (WeightedRandomEnchant) o;
 
                 if (flag) {
                     Items.ENCHANTED_BOOK.a(itemstack, weightedrandomenchant);
@@ -335,7 +328,7 @@ public class EnchantmentManager {
                                 if (iterator1.hasNext()) {
                                     WeightedRandomEnchant weightedrandomenchant1 = (WeightedRandomEnchant) iterator1.next();
 
-                                    if (weightedrandomenchant1.enchantment.a(Enchantment.getById(integer.intValue()))) {
+                                    if (weightedrandomenchant1.enchantment.a(Enchantment.getById(integer))) {
                                         continue;
                                     }
 
@@ -369,9 +362,7 @@ public class EnchantmentManager {
         Enchantment[] aenchantment = Enchantment.b;
         int j = aenchantment.length;
 
-        for (int k = 0; k < j; ++k) {
-            Enchantment enchantment = aenchantment[k];
-
+        for (Enchantment enchantment : aenchantment) {
             if (enchantment != null && (enchantment.slot.canEnchant(item) || flag)) {
                 for (int l = enchantment.getStartLevel(); l <= enchantment.getMaxLevel(); ++l) {
                     if (i >= enchantment.a(l) && i <= enchantment.b(l)) {
@@ -379,7 +370,7 @@ public class EnchantmentManager {
                             hashmap = Maps.newHashMap();
                         }
 
-                        hashmap.put(Integer.valueOf(enchantment.id), new WeightedRandomEnchant(enchantment, l));
+                        hashmap.put(enchantment.id, new WeightedRandomEnchant(enchantment, l));
                     }
                 }
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EnchantmentThorns.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EnchantmentThorns.java
index 913e5e4..a82fd5e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EnchantmentThorns.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EnchantmentThorns.java
@@ -22,7 +22,7 @@ public class EnchantmentThorns extends Enchantment {
     }
 
     public boolean canEnchant(ItemStack itemstack) {
-        return itemstack.getItem() instanceof ItemArmor ? true : super.canEnchant(itemstack);
+        return itemstack.getItem() instanceof ItemArmor || super.canEnchant(itemstack);
     }
 
     public void b(EntityLiving entityliving, Entity entity, int i) {
@@ -45,7 +45,7 @@ public class EnchantmentThorns extends Enchantment {
     }
 
     public static boolean a(int i, Random random) {
-        return i <= 0 ? false : random.nextFloat() < 0.15F * (float) i;
+        return i > 0 && random.nextFloat() < 0.15F * (float) i;
     }
 
     public static int b(int i, Random random) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/Entity.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/Entity.java
index a4f426c..f0f61d3 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/Entity.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/Entity.java
@@ -5,7 +5,6 @@ import java.util.concurrent.Callable;
 
 // CraftBukkit start
 import com.elevatemc.spigot.util.FastRandom;
-import org.apache.commons.lang3.tuple.Pair;
 import org.apache.logging.log4j.LogManager;
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
@@ -205,11 +204,11 @@ public abstract class Entity implements ICommandListener {
         // Spigot end
 
         this.datawatcher = new DataWatcher(this);
-        this.datawatcher.a(0, Byte.valueOf((byte) 0));
-        this.datawatcher.a(1, Short.valueOf((short) 300));
-        this.datawatcher.a(3, Byte.valueOf((byte) 0));
+        this.datawatcher.a(0, (byte) 0);
+        this.datawatcher.a(1, (short) 300);
+        this.datawatcher.a(3, (byte) 0);
         this.datawatcher.a(2, "");
-        this.datawatcher.a(4, Byte.valueOf((byte) 0));
+        this.datawatcher.a(4, (byte) 0);
         this.h();
     }
 
@@ -220,7 +219,7 @@ public abstract class Entity implements ICommandListener {
     }
 
     public boolean equals(Object object) {
-        return object instanceof Entity ? ((Entity) object).id == this.id : false;
+        return object instanceof Entity && ((Entity) object).id == this.id;
     }
 
     public int hashCode() {
@@ -239,7 +238,7 @@ public abstract class Entity implements ICommandListener {
             this.length = f1;
             this.a(new AxisAlignedBB(this.getBoundingBox().a, this.getBoundingBox().b, this.getBoundingBox().c, this.getBoundingBox().a + (double) this.width, this.getBoundingBox().b + (double) this.length, this.getBoundingBox().c + (double) this.width));
             if (this.width > f2 && !this.justCreated && !this.world.isClientSide) {
-                this.move((double) (f2 - this.width), 0.0D, (double) (f2 - this.width));
+                this.move(f2 - this.width, 0.0D, f2 - this.width);
             }
         }
 
@@ -611,7 +610,7 @@ public abstract class Entity implements ICommandListener {
                 AxisAlignedBB axisalignedbb3 = this.getBoundingBox();
 
                 this.a(axisalignedbb);
-                d1 = (double) this.S;
+                d1 = this.S;
                 List list1 = this.world.getCubesNoEntities(this, this.getBoundingBox().a(d6, d1, d8)); // eSpigot - Don't check entities
                 AxisAlignedBB axisalignedbb4 = this.getBoundingBox();
                 AxisAlignedBB axisalignedbb5 = axisalignedbb4.a(d6, 0.0D, d8);
@@ -896,7 +895,7 @@ public abstract class Entity implements ICommandListener {
     }
 
     public void b(boolean flag) {
-        this.datawatcher.watch(4, Byte.valueOf((byte) (flag ? 1 : 0)));
+        this.datawatcher.watch(4, (byte) (flag ? 1 : 0));
     }
 
     protected boolean s_() {
@@ -939,7 +938,7 @@ public abstract class Entity implements ICommandListener {
 
     protected void burn(float i) { // CraftBukkit - int -> float
         if (!this.fireProof) {
-            this.damageEntity(DamageSource.FIRE, (float) i);
+            this.damageEntity(DamageSource.FIRE, i);
         }
 
     }
@@ -1025,13 +1024,13 @@ public abstract class Entity implements ICommandListener {
         for (i = 0; (float) i < 1.0F + this.width * 20.0F; ++i) {
             f2 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width;
             f3 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width;
-            this.world.addParticle(EnumParticle.WATER_BUBBLE, this.locX + (double) f2, (double) (f1 + 1.0F), this.locZ + (double) f3, this.motX, this.motY - (double) (this.random.nextFloat() * 0.2F), this.motZ, new int[0]);
+            this.world.addParticle(EnumParticle.WATER_BUBBLE, this.locX + (double) f2, f1 + 1.0F, this.locZ + (double) f3, this.motX, this.motY - (double) (this.random.nextFloat() * 0.2F), this.motZ, new int[0]);
         }
 
         for (i = 0; (float) i < 1.0F + this.width * 20.0F; ++i) {
             f2 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width;
             f3 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width;
-            this.world.addParticle(EnumParticle.WATER_SPLASH, this.locX + (double) f2, (double) (f1 + 1.0F), this.locZ + (double) f3, this.motX, this.motY, this.motZ, new int[0]);
+            this.world.addParticle(EnumParticle.WATER_SPLASH, this.locX + (double) f2, f1 + 1.0F, this.locZ + (double) f3, this.motX, this.motY, this.motZ, new int[0]);
         }
 
     }
@@ -1072,7 +1071,7 @@ public abstract class Entity implements ICommandListener {
             float f1 = (float) (blockposition.getY() + 1) - f;
             boolean flag = d0 < (double) f1;
 
-            return !flag && this instanceof EntityHuman ? false : flag;
+            return (flag || !(this instanceof EntityHuman)) && flag;
         } else {
             return false;
         }
@@ -1102,8 +1101,8 @@ public abstract class Entity implements ICommandListener {
             float f4 = MathHelper.sin(this.yaw * 3.1415927F / 180.0F);
             float f5 = MathHelper.cos(this.yaw * 3.1415927F / 180.0F);
 
-            this.motX += (double) (f * f5 - f1 * f4);
-            this.motZ += (double) (f1 * f5 + f * f4);
+            this.motX += f * f5 - f1 * f4;
+            this.motZ += f1 * f5 + f * f4;
         }
     }
 
@@ -1130,7 +1129,7 @@ public abstract class Entity implements ICommandListener {
         this.lastZ = this.locZ = d2;
         this.lastYaw = this.yaw = f;
         this.lastPitch = this.pitch = f1;
-        double d3 = (double) (this.lastYaw - f);
+        double d3 = this.lastYaw - f;
 
         if (d3 < -180.0D) {
             this.lastYaw += 360.0F;
@@ -1145,7 +1144,7 @@ public abstract class Entity implements ICommandListener {
     }
 
     public void setPositionRotation(BlockPosition blockposition, float f, float f1) {
-        this.setPositionRotation((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, f, f1);
+        this.setPositionRotation((double) blockposition.getX() + 0.5D, blockposition.getY(), (double) blockposition.getZ() + 0.5D, f, f1);
     }
 
     public void setPositionRotation(double d0, double d1, double d2, float f, float f1) {
@@ -1186,7 +1185,7 @@ public abstract class Entity implements ICommandListener {
         double d4 = this.locY - d1;
         double d5 = this.locZ - d2;
 
-        return (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
+        return MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
     }
 
     public double h(Entity entity) {
@@ -1208,7 +1207,7 @@ public abstract class Entity implements ICommandListener {
                 double d2 = MathHelper.a(d0, d1);
 
                 if (d2 >= 0.009999999776482582D) {
-                    d2 = (double) MathHelper.sqrt(d2);
+                    d2 = MathHelper.sqrt(d2);
                     d0 /= d2;
                     d1 /= d2;
                     double d3 = 1.0D / d2;
@@ -1221,8 +1220,8 @@ public abstract class Entity implements ICommandListener {
                     d1 *= d3;
                     d0 *= 0.05000000074505806D;
                     d1 *= 0.05000000074505806D;
-                    d0 *= (double) (1.0F - this.U);
-                    d1 *= (double) (1.0F - this.U);
+                    d0 *= 1.0F - this.U;
+                    d1 *= 1.0F - this.U;
                     if (this.passenger == null) {
                         this.g(-d0, 0.0D, -d1);
                     }
@@ -1273,7 +1272,7 @@ public abstract class Entity implements ICommandListener {
         float f4 = -MathHelper.cos(-f * 0.017453292F);
         float f5 = MathHelper.sin(-f * 0.017453292F);
 
-        return new Vec3D((double) (f3 * f4), (double) f5, (double) (f2 * f4));
+        return new Vec3D(f3 * f4, f5, f2 * f4);
     }
 
     public boolean ad() {
@@ -1507,11 +1506,10 @@ public abstract class Entity implements ICommandListener {
 
     protected NBTTagList a(double... adouble) {
         NBTTagList nbttaglist = new NBTTagList();
-        double[] adouble1 = adouble;
         int i = adouble.length;
 
         for (int j = 0; j < i; ++j) {
-            double d0 = adouble1[j];
+            double d0 = adouble[j];
 
             nbttaglist.add(new NBTTagDouble(d0));
         }
@@ -1521,11 +1519,10 @@ public abstract class Entity implements ICommandListener {
 
     protected NBTTagList a(float... afloat) {
         NBTTagList nbttaglist = new NBTTagList();
-        float[] afloat1 = afloat;
         int i = afloat.length;
 
         for (int j = 0; j < i; ++j) {
-            float f = afloat1[j];
+            float f = afloat[j];
 
             nbttaglist.add(new NBTTagFloat(f));
         }
@@ -1570,7 +1567,7 @@ public abstract class Entity implements ICommandListener {
             BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE);
 
             for (int i = 0; i < 8; ++i) {
-                int j = MathHelper.floor(this.locY + (double) (((float) ((i >> 0) % 2) - 0.5F) * 0.1F) + (double) this.getHeadHeight());
+                int j = MathHelper.floor(this.locY + (double) (((float) ((i) % 2) - 0.5F) * 0.1F) + (double) this.getHeadHeight());
                 int k = MathHelper.floor(this.locX + (double) (((float) ((i >> 1) % 2) - 0.5F) * this.width * 0.8F));
                 int l = MathHelper.floor(this.locZ + (double) (((float) ((i >> 2) % 2) - 0.5F) * this.width * 0.8F));
 
@@ -1604,10 +1601,9 @@ public abstract class Entity implements ICommandListener {
             this.t_();
             if (this.vehicle != null) {
                 this.vehicle.al();
-                this.as += (double) (this.vehicle.yaw - this.vehicle.lastYaw);
+                this.as += this.vehicle.yaw - this.vehicle.lastYaw;
 
-                for (this.ar += (double) (this.vehicle.pitch - this.vehicle.lastPitch); this.as >= 180.0D; this.as -= 360.0D) {
-                    ;
+                for (this.ar += this.vehicle.pitch - this.vehicle.lastPitch; this.as >= 180.0D; this.as -= 360.0D) {
                 }
 
                 while (this.as < -180.0D) {
@@ -1627,19 +1623,19 @@ public abstract class Entity implements ICommandListener {
                 float f = 10.0F;
 
                 if (d0 > (double) f) {
-                    d0 = (double) f;
+                    d0 = f;
                 }
 
                 if (d0 < (double) (-f)) {
-                    d0 = (double) (-f);
+                    d0 = -f;
                 }
 
                 if (d1 > (double) f) {
-                    d1 = (double) f;
+                    d1 = f;
                 }
 
                 if (d1 < (double) (-f)) {
-                    d1 = (double) (-f);
+                    d1 = -f;
                 }
 
                 this.as -= d0;
@@ -1779,7 +1775,7 @@ public abstract class Entity implements ICommandListener {
                 double d1 = shapedetector_shapedetectorcollection.b().k() == EnumDirection.EnumAxis.X ? this.locZ : this.locX;
 
                 d1 = Math.abs(MathHelper.c(d1 - (double) (shapedetector_shapedetectorcollection.b().e().c() == EnumDirection.EnumAxisDirection.NEGATIVE ? 1 : 0), d0, d0 - (double) shapedetector_shapedetectorcollection.d()));
-                double d2 = MathHelper.c(this.locY - 1.0D, (double) shapedetector_shapedetectorcollection.a().getY(), (double) (shapedetector_shapedetectorcollection.a().getY() - shapedetector_shapedetectorcollection.e()));
+                double d2 = MathHelper.c(this.locY - 1.0D, shapedetector_shapedetectorcollection.a().getY(), shapedetector_shapedetectorcollection.a().getY() - shapedetector_shapedetectorcollection.e());
 
                 this.ao = new Vec3D(d1, d2, 0.0D);
                 this.ap = shapedetector_shapedetectorcollection.b();
@@ -1845,9 +1841,9 @@ public abstract class Entity implements ICommandListener {
         byte b0 = this.datawatcher.getByte(0);
 
         if (flag) {
-            this.datawatcher.watch(0, Byte.valueOf((byte) (b0 | 1 << i)));
+            this.datawatcher.watch(0, (byte) (b0 | 1 << i));
         } else {
-            this.datawatcher.watch(0, Byte.valueOf((byte) (b0 & ~(1 << i))));
+            this.datawatcher.watch(0, (byte) (b0 & ~(1 << i)));
         }
 
     }
@@ -1857,7 +1853,7 @@ public abstract class Entity implements ICommandListener {
     }
 
     public void setAirTicks(int i) {
-        this.datawatcher.watch(1, Short.valueOf((short) i));
+        this.datawatcher.watch(1, (short) i);
     }
 
     public void onLightningStrike(EntityLightning entitylightning) {
@@ -1951,23 +1947,23 @@ public abstract class Entity implements ICommandListener {
             float f = this.random.nextFloat() * 0.2F + 0.1F;
 
             if (b0 == 0) {
-                this.motX = (double) (-f);
+                this.motX = -f;
             }
 
             if (b0 == 1) {
-                this.motX = (double) f;
+                this.motX = f;
             }
 
             if (b0 == 3) {
-                this.motY = (double) f;
+                this.motY = f;
             }
 
             if (b0 == 4) {
-                this.motZ = (double) (-f);
+                this.motZ = -f;
             }
 
             if (b0 == 5) {
-                this.motZ = (double) f;
+                this.motZ = f;
             }
 
             return true;
@@ -2018,7 +2014,7 @@ public abstract class Entity implements ICommandListener {
     }
 
     public String toString() {
-        return String.format("%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getName(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)});
+        return String.format("%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getName(), this.id, this.world == null ? "~NULL~" : this.world.getWorldData().getName(), this.locX, this.locY, this.locZ});
     }
 
     public boolean isInvulnerable(DamageSource damagesource) {
@@ -2089,10 +2085,9 @@ public abstract class Entity implements ICommandListener {
         if (true) {
             WorldServer worldserver = ((CraftWorld) getBukkitEntity().getLocation().getWorld()).getHandle();
             WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle();
-            int i = worldserver1.dimension;
             // CraftBukkit end
 
-            this.dimension = i;
+            this.dimension = worldserver1.dimension;
             /* CraftBukkit start - TODO: Check if we need this
             if (j == 1 && i == 1) {
                 worldserver1 = minecraftserver.getWorldServer(0);
@@ -2176,7 +2171,7 @@ public abstract class Entity implements ICommandListener {
                 return this.a();
             }
         });
-        crashreportsystemdetails.a("Entity ID", (Object) Integer.valueOf(this.id));
+        crashreportsystemdetails.a("Entity ID", this.id);
         crashreportsystemdetails.a("Entity Name", new Callable() {
             public String a() throws Exception {
                 return Entity.this.getName();
@@ -2186,9 +2181,9 @@ public abstract class Entity implements ICommandListener {
                 return this.a();
             }
         });
-        crashreportsystemdetails.a("Entity\'s Exact location", (Object) String.format("%.2f, %.2f, %.2f", new Object[] { Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)}));
-        crashreportsystemdetails.a("Entity\'s Block location", (Object) CrashReportSystemDetails.a((double) MathHelper.floor(this.locX), (double) MathHelper.floor(this.locY), (double) MathHelper.floor(this.locZ)));
-        crashreportsystemdetails.a("Entity\'s Momentum", (Object) String.format("%.2f, %.2f, %.2f", new Object[] { Double.valueOf(this.motX), Double.valueOf(this.motY), Double.valueOf(this.motZ)}));
+        crashreportsystemdetails.a("Entity\'s Exact location", String.format("%.2f, %.2f, %.2f", new Object[] {this.locX, this.locY, this.locZ}));
+        crashreportsystemdetails.a("Entity\'s Block location", CrashReportSystemDetails.a(MathHelper.floor(this.locX), MathHelper.floor(this.locY), MathHelper.floor(this.locZ)));
+        crashreportsystemdetails.a("Entity\'s Momentum", String.format("%.2f, %.2f, %.2f", new Object[] {this.motX, this.motY, this.motZ}));
         crashreportsystemdetails.a("Entity\'s Rider", new Callable() {
             public String a() throws Exception {
                 return Entity.this.passenger.toString();
@@ -2243,7 +2238,7 @@ public abstract class Entity implements ICommandListener {
     }
 
     public void setCustomNameVisible(boolean flag) {
-        this.datawatcher.watch(3, Byte.valueOf((byte) (flag ? 1 : 0)));
+        this.datawatcher.watch(3, (byte) (flag ? 1 : 0));
     }
 
     public boolean getCustomNameVisible() {
@@ -2372,7 +2367,7 @@ public abstract class Entity implements ICommandListener {
 
     protected void a(EntityLiving entityliving, Entity entity) {
         if (entity instanceof EntityLiving) {
-            EnchantmentManager.a((EntityLiving) entity, (Entity) entityliving);
+            EnchantmentManager.a((EntityLiving) entity, entityliving);
         }
 
         EnchantmentManager.b(entityliving, entity);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityAgeable.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityAgeable.java
index 09d4335..e6f32ea 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityAgeable.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityAgeable.java
@@ -61,7 +61,7 @@ public abstract class EntityAgeable extends EntityCreature {
                         if (!entityhuman.abilities.canInstantlyBuild) {
                             --itemstack.count;
                             if (itemstack.count == 0) { // CraftBukkit - allow less than 0 stacks as "infinite"
-                                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
                             }
                         }
                     }
@@ -76,7 +76,7 @@ public abstract class EntityAgeable extends EntityCreature {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(12, Byte.valueOf((byte) 0));
+        this.datawatcher.a(12, (byte) 0);
     }
 
     public int getAge() {
@@ -116,7 +116,7 @@ public abstract class EntityAgeable extends EntityCreature {
     }
 
     public void setAgeRaw(int i) {
-        this.datawatcher.watch(12, Byte.valueOf((byte) MathHelper.clamp(i, -1, 1)));
+        this.datawatcher.watch(12, (byte) MathHelper.clamp(i, -1, 1));
         this.a = i;
         this.a(this.isBaby());
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityAnimal.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityAnimal.java
index a831529..c725368 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityAnimal.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityAnimal.java
@@ -87,7 +87,7 @@ public abstract class EntityAnimal extends EntityAgeable implements IAnimal {
     }
 
     public boolean d(ItemStack itemstack) {
-        return itemstack == null ? false : itemstack.getItem() == Items.WHEAT;
+        return itemstack != null && itemstack.getItem() == Items.WHEAT;
     }
 
     public boolean a(EntityHuman entityhuman) {
@@ -114,7 +114,7 @@ public abstract class EntityAnimal extends EntityAgeable implements IAnimal {
         if (!entityhuman.abilities.canInstantlyBuild) {
             --itemstack.count;
             if (itemstack.count <= 0) {
-                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
             }
         }
 
@@ -139,6 +139,6 @@ public abstract class EntityAnimal extends EntityAgeable implements IAnimal {
     }
 
     public boolean mate(EntityAnimal entityanimal) {
-        return entityanimal == this ? false : (entityanimal.getClass() != this.getClass() ? false : this.isInLove() && entityanimal.isInLove());
+        return entityanimal != this && (entityanimal.getClass() == this.getClass() && this.isInLove() && entityanimal.isInLove());
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityArmorStand.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityArmorStand.java
index bdbd2ed..ed4b3bd 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -56,7 +56,7 @@ public class EntityArmorStand extends EntityLiving {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(10, Byte.valueOf((byte) 0));
+        this.datawatcher.a(10, (byte) 0);
         this.datawatcher.a(11, EntityArmorStand.a);
         this.datawatcher.a(12, EntityArmorStand.b);
         this.datawatcher.a(13, EntityArmorStand.c);
@@ -105,11 +105,11 @@ public class EntityArmorStand extends EntityLiving {
         super.b(nbttagcompound);
         NBTTagList nbttaglist = new NBTTagList();
 
-        for (int i = 0; i < this.items.length; ++i) {
+        for (ItemStack item : this.items) {
             NBTTagCompound nbttagcompound1 = new NBTTagCompound();
 
-            if (this.items[i] != null) {
-                this.items[i].save(nbttagcompound1);
+            if (item != null) {
+                item.save(nbttagcompound1);
             }
 
             nbttaglist.add(nbttagcompound1);
@@ -253,8 +253,8 @@ public class EntityArmorStand extends EntityLiving {
         List list = this.world.getEntities(this, this.getBoundingBox());
 
         if (list != null && !list.isEmpty()) {
-            for (int i = 0; i < list.size(); ++i) {
-                Entity entity = (Entity) list.get(i);
+            for (Object o : list) {
+                Entity entity = (Entity) o;
 
                 if (entity instanceof EntityMinecartAbstract && ((EntityMinecartAbstract) entity).s() == EntityMinecartAbstract.EnumMinecartType.RIDEABLE && this.h(entity) <= 0.2D) {
                     entity.collide(this);
@@ -447,7 +447,7 @@ public class EntityArmorStand extends EntityLiving {
 
     private void A() {
         if (this.world instanceof WorldServer) {
-            ((WorldServer) this.world).a(EnumParticle.BLOCK_DUST, this.locX, this.locY + (double) this.length / 1.5D, this.locZ, 10, (double) (this.width / 4.0F), (double) (this.length / 4.0F), (double) (this.width / 4.0F), 0.05D, new int[] { Block.getCombinedId(Blocks.PLANKS.getBlockData())});
+            ((WorldServer) this.world).a(EnumParticle.BLOCK_DUST, this.locX, this.locY + (double) this.length / 1.5D, this.locZ, 10, this.width / 4.0F, this.length / 4.0F, this.width / 4.0F, 0.05D, new int[] { Block.getCombinedId(Blocks.PLANKS.getBlockData())});
         }
 
     }
@@ -596,7 +596,7 @@ public class EntityArmorStand extends EntityLiving {
             b0 &= -2;
         }
 
-        this.datawatcher.watch(10, Byte.valueOf(b0));
+        this.datawatcher.watch(10, b0);
     }
 
     public boolean isSmall() {
@@ -612,7 +612,7 @@ public class EntityArmorStand extends EntityLiving {
             b0 &= -3;
         }
 
-        this.datawatcher.watch(10, Byte.valueOf(b0));
+        this.datawatcher.watch(10, b0);
     }
 
     public boolean hasGravity() {
@@ -628,7 +628,7 @@ public class EntityArmorStand extends EntityLiving {
             b0 &= -5;
         }
 
-        this.datawatcher.watch(10, Byte.valueOf(b0));
+        this.datawatcher.watch(10, b0);
     }
 
     public boolean hasArms() {
@@ -644,7 +644,7 @@ public class EntityArmorStand extends EntityLiving {
             b0 &= -9;
         }
 
-        this.datawatcher.watch(10, Byte.valueOf(b0));
+        this.datawatcher.watch(10, b0);
     }
 
     public boolean hasBasePlate() {
@@ -661,7 +661,7 @@ public class EntityArmorStand extends EntityLiving {
             b0 &= -17;
         }
 
-        this.datawatcher.watch(10, Byte.valueOf(b0));
+        this.datawatcher.watch(10, b0);
     }
 
     // PAIL
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityArrow.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityArrow.java
index a4c41bf..69e9068 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityArrow.java
@@ -68,7 +68,7 @@ public class EntityArrow extends Entity implements IProjectile {
         double d0 = entityliving1.locX - entityliving.locX;
         double d1 = entityliving1.getBoundingBox().b + (double) (entityliving1.length / 3.0F) - this.locY;
         double d2 = entityliving1.locZ - entityliving.locZ;
-        double d3 = (double) MathHelper.sqrt(d0 * d0 + d2 * d2);
+        double d3 = MathHelper.sqrt(d0 * d0 + d2 * d2);
 
         if (d3 >= 1.0E-7D) {
             float f2 = (float) (MathHelper.b(d2, d0) * 180.0D / 3.1415927410125732D) - 90.0F;
@@ -94,39 +94,39 @@ public class EntityArrow extends Entity implements IProjectile {
 
         this.setSize(0.5F, 0.5F);
         this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight(), entityliving.locZ, entityliving.yaw, entityliving.pitch);
-        this.locX -= (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F);
+        this.locX -= MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F;
         this.locY -= 0.10000000149011612D;
-        this.locZ -= (double) (MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * 0.16F);
+        this.locZ -= MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * 0.16F;
         this.setPosition(this.locX, this.locY, this.locZ);
-        this.motX = (double) (-MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F));
-        this.motZ = (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F));
-        this.motY = (double) (-MathHelper.sin(this.pitch / 180.0F * 3.1415927F));
+        this.motX = -MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F);
+        this.motZ = MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F);
+        this.motY = -MathHelper.sin(this.pitch / 180.0F * 3.1415927F);
         this.shoot(this.motX, this.motY, this.motZ, f * 1.5F, 1.0F);
     }
 
     protected void h() {
-        this.datawatcher.a(16, Byte.valueOf((byte) 0));
+        this.datawatcher.a(16, (byte) 0);
     }
 
     public void shoot(double d0, double d1, double d2, float f, float f1) {
         float f2 = MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
 
-        d0 /= (double) f2;
-        d1 /= (double) f2;
-        d2 /= (double) f2;
+        d0 /= f2;
+        d1 /= f2;
+        d2 /= f2;
         d0 += this.random.nextGaussian() * (double) (this.random.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) f1;
         d1 += this.random.nextGaussian() * (double) (this.random.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) f1;
         d2 += this.random.nextGaussian() * (double) (this.random.nextBoolean() ? -1 : 1) * 0.007499999832361937D * (double) f1;
-        d0 *= (double) f;
-        d1 *= (double) f;
-        d2 *= (double) f;
+        d0 *= f;
+        d1 *= f;
+        d2 *= f;
         this.motX = d0;
         this.motY = d1;
         this.motZ = d2;
         float f3 = MathHelper.sqrt(d0 * d0 + d2 * d2);
 
         this.lastYaw = this.yaw = (float) (MathHelper.b(d0, d2) * 180.0D / 3.1415927410125732D);
-        this.lastPitch = this.pitch = (float) (MathHelper.b(d1, (double) f3) * 180.0D / 3.1415927410125732D);
+        this.lastPitch = this.pitch = (float) (MathHelper.b(d1, f3) * 180.0D / 3.1415927410125732D);
         this.ar = 0;
     }
 
@@ -136,7 +136,7 @@ public class EntityArrow extends Entity implements IProjectile {
             float f = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
 
             this.lastYaw = this.yaw = (float) (MathHelper.b(this.motX, this.motZ) * 180.0D / 3.1415927410125732D);
-            this.lastPitch = this.pitch = (float) (MathHelper.b(this.motY, (double) f) * 180.0D / 3.1415927410125732D);
+            this.lastPitch = this.pitch = (float) (MathHelper.b(this.motY, f) * 180.0D / 3.1415927410125732D);
         }
 
         BlockPosition blockposition = new BlockPosition(this.d, this.e, this.f);
@@ -166,9 +166,9 @@ public class EntityArrow extends Entity implements IProjectile {
                 }
             } else {
                 this.inGround = false;
-                this.motX *= (double) (this.random.nextFloat() * 0.2F);
-                this.motY *= (double) (this.random.nextFloat() * 0.2F);
-                this.motZ *= (double) (this.random.nextFloat() * 0.2F);
+                this.motX *= this.random.nextFloat() * 0.2F;
+                this.motY *= this.random.nextFloat() * 0.2F;
+                this.motZ *= this.random.nextFloat() * 0.2F;
                 this.ar = 0;
                 this.as = 0;
             }
@@ -197,7 +197,7 @@ public class EntityArrow extends Entity implements IProjectile {
 
                 if (entity1.ad() && (entity1 != this.shooter || this.as >= 5)) {
                     f1 = 0.3F;
-                    AxisAlignedBB axisalignedbb1 = entity1.getBoundingBox().grow((double) f1, (double) f1, (double) f1);
+                    AxisAlignedBB axisalignedbb1 = entity1.getBoundingBox().grow(f1, f1, f1);
                     MovingObjectPosition movingobjectposition1 = axisalignedbb1.a(vec3d, vec3d1);
 
                     if (movingobjectposition1 != null) {
@@ -320,9 +320,9 @@ public class EntityArrow extends Entity implements IProjectile {
 
                     this.g = iblockdata1.getBlock();
                     this.h = this.g.toLegacyData(iblockdata1);
-                    this.motX = (double) ((float) (movingobjectposition.pos.a - this.locX));
-                    this.motY = (double) ((float) (movingobjectposition.pos.b - this.locY));
-                    this.motZ = (double) ((float) (movingobjectposition.pos.c - this.locZ));
+                    this.motX = (float) (movingobjectposition.pos.a - this.locX);
+                    this.motY = (float) (movingobjectposition.pos.b - this.locY);
+                    this.motZ = (float) (movingobjectposition.pos.c - this.locZ);
                     f1 = MathHelper.sqrt(this.motX * this.motX + this.motY * this.motY + this.motZ * this.motZ);
                     this.locX -= this.motX / (double) f1 * 0.05000000074505806D;
                     this.locY -= this.motY / (double) f1 * 0.05000000074505806D;
@@ -332,7 +332,7 @@ public class EntityArrow extends Entity implements IProjectile {
                     this.shake = 7;
                     this.setCritical(false);
                     if (this.g.getMaterial() != Material.AIR) {
-                        this.g.a(this.world, blockposition1, iblockdata1, (Entity) this);
+                        this.g.a(this.world, blockposition1, iblockdata1, this);
                     }
                 }
             }
@@ -349,8 +349,7 @@ public class EntityArrow extends Entity implements IProjectile {
             f2 = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
             this.yaw = (float) (MathHelper.b(this.motX, this.motZ) * 180.0D / 3.1415927410125732D);
 
-            for (this.pitch = (float) (MathHelper.b(this.motY, (double) f2) * 180.0D / 3.1415927410125732D); this.pitch - this.lastPitch < -180.0F; this.lastPitch -= 360.0F) {
-                ;
+            for (this.pitch = (float) (MathHelper.b(this.motY, f2) * 180.0D / 3.1415927410125732D); this.pitch - this.lastPitch < -180.0F; this.lastPitch -= 360.0F) {
             }
 
             while (this.pitch - this.lastPitch >= 180.0F) {
@@ -383,10 +382,10 @@ public class EntityArrow extends Entity implements IProjectile {
                 this.extinguish();
             }
 
-            this.motX *= (double) f4;
-            this.motY *= (double) f4;
-            this.motZ *= (double) f4;
-            this.motY -= (double) f1;
+            this.motX *= f4;
+            this.motY *= f4;
+            this.motZ *= f4;
+            this.motY -= f1;
             this.setPosition(this.locX, this.locY, this.locZ);
             this.checkBlockCollisions();
         }
@@ -397,7 +396,7 @@ public class EntityArrow extends Entity implements IProjectile {
         nbttagcompound.setShort("yTile", (short) this.e);
         nbttagcompound.setShort("zTile", (short) this.f);
         nbttagcompound.setShort("life", (short) this.ar);
-        MinecraftKey minecraftkey = (MinecraftKey) Block.REGISTRY.c(this.g);
+        MinecraftKey minecraftkey = Block.REGISTRY.c(this.g);
 
         nbttagcompound.setString("inTile", minecraftkey == null ? "" : minecraftkey.toString());
         nbttagcompound.setByte("inData", (byte) this.h);
@@ -492,9 +491,9 @@ public class EntityArrow extends Entity implements IProjectile {
         byte b0 = this.datawatcher.getByte(16);
 
         if (flag) {
-            this.datawatcher.watch(16, Byte.valueOf((byte) (b0 | 1)));
+            this.datawatcher.watch(16, (byte) (b0 | 1));
         } else {
-            this.datawatcher.watch(16, Byte.valueOf((byte) (b0 & -2)));
+            this.datawatcher.watch(16, (byte) (b0 & -2));
         }
 
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityBoat.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityBoat.java
index 0e6f8c0..410cfcc 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityBoat.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityBoat.java
@@ -57,9 +57,9 @@ public class EntityBoat extends Entity {
     }
 
     protected void h() {
-        this.datawatcher.a(17, new Integer(0));
-        this.datawatcher.a(18, new Integer(1));
-        this.datawatcher.a(19, new Float(0.0F));
+        this.datawatcher.a(17, 0);
+        this.datawatcher.a(18, 1);
+        this.datawatcher.a(19, 0.0F);
     }
 
     public AxisAlignedBB j(Entity entity) {
@@ -102,7 +102,7 @@ public class EntityBoat extends Entity {
                 Vehicle vehicle = (Vehicle) this.getBukkitEntity();
                 org.bukkit.entity.Entity attacker = (damagesource.getEntity() == null) ? null : damagesource.getEntity().getBukkitEntity();
 
-                VehicleDamageEvent event = new VehicleDamageEvent(vehicle, attacker, (double) f);
+                VehicleDamageEvent event = new VehicleDamageEvent(vehicle, attacker, f);
                 this.world.getServer().getPluginManager().callEvent(event);
 
                 if (event.isCancelled()) {
@@ -192,7 +192,7 @@ public class EntityBoat extends Entity {
             d5 = Math.sin((double) this.yaw * 3.141592653589793D / 180.0D);
 
             for (j = 0; (double) j < 1.0D + d3 * 60.0D; ++j) {
-                double d6 = (double) (this.random.nextFloat() * 2.0F - 1.0F);
+                double d6 = this.random.nextFloat() * 2.0F - 1.0F;
                 double d7 = (double) (this.random.nextInt(2) * 2 - 1) * 0.7D;
                 double d8;
                 double d9;
@@ -255,8 +255,8 @@ public class EntityBoat extends Entity {
                 EntityLiving entityliving = (EntityLiving) this.passenger;
                 float f = this.passenger.yaw + -entityliving.aZ * 90.0F;
 
-                this.motX += -Math.sin((double) (f * 3.1415927F / 180.0F)) * this.b * (double) entityliving.ba * 0.05000000074505806D;
-                this.motZ += Math.cos((double) (f * 3.1415927F / 180.0F)) * this.b * (double) entityliving.ba * 0.05000000074505806D;
+                this.motX += -Math.sin(f * 3.1415927F / 180.0F) * this.b * (double) entityliving.ba * 0.05000000074505806D;
+                this.motZ += Math.cos(f * 3.1415927F / 180.0F) * this.b * (double) entityliving.ba * 0.05000000074505806D;
             }
             // CraftBukkit start - Support unoccupied deceleration
             else if (unoccupiedDeceleration >= 0) {
@@ -351,11 +351,11 @@ public class EntityBoat extends Entity {
             }
 
             this.pitch = 0.0F;
-            d5 = (double) this.yaw;
+            d5 = this.yaw;
             d10 = this.lastX - this.locX;
             d11 = this.lastZ - this.locZ;
             if (d10 * d10 + d11 * d11 > 0.001D) {
-                d5 = (double) ((float) (MathHelper.b(d11, d10) * 180.0D / 3.141592653589793D));
+                d5 = (float) (MathHelper.b(d11, d10) * 180.0D / 3.141592653589793D);
             }
 
             double d12 = MathHelper.g(d5 - (double) this.yaw);
@@ -390,8 +390,8 @@ public class EntityBoat extends Entity {
                 List list = this.world.getEntities(this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D));
 
                 if (list != null && !list.isEmpty()) {
-                    for (int k1 = 0; k1 < list.size(); ++k1) {
-                        Entity entity = (Entity) list.get(k1);
+                    for (Object o : list) {
+                        Entity entity = (Entity) o;
 
                         if (entity != this.passenger && entity.ae() && entity instanceof EntityBoat) {
                             entity.collide(this);
@@ -459,7 +459,7 @@ public class EntityBoat extends Entity {
     }
 
     public void setDamage(float f) {
-        this.datawatcher.watch(19, Float.valueOf(f));
+        this.datawatcher.watch(19, f);
     }
 
     public float j() {
@@ -467,7 +467,7 @@ public class EntityBoat extends Entity {
     }
 
     public void a(int i) {
-        this.datawatcher.watch(17, Integer.valueOf(i));
+        this.datawatcher.watch(17, i);
     }
 
     public int l() {
@@ -475,7 +475,7 @@ public class EntityBoat extends Entity {
     }
 
     public void b(int i) {
-        this.datawatcher.watch(18, Integer.valueOf(i));
+        this.datawatcher.watch(18, i);
     }
 
     public int m() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCow.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCow.java
index b5627b7..c251640 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCow.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCow.java
@@ -10,7 +10,7 @@ public class EntityCow extends EntityAnimal {
     public EntityCow(World world) {
         super(world);
         this.setSize(0.9F, 1.3F);
-        ((Navigation) this.getNavigation()).a(true);
+        this.getNavigation().a(true);
         this.goalSelector.a(0, new PathfinderGoalFloat(this));
         this.goalSelector.a(1, new PathfinderGoalPanic(this, 2.0D));
         this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D));
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCreature.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCreature.java
index 694ba59..3daf7c4 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCreature.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCreature.java
@@ -78,7 +78,7 @@ public abstract class EntityCreature extends EntityInsentient {
     }
 
     public boolean e(BlockPosition blockposition) {
-        return this.b == -1.0F ? true : this.a.i(blockposition) < (double) (this.b * this.b);
+        return this.b == -1.0F || this.a.i(blockposition) < (double) (this.b * this.b);
     }
 
     public void a(BlockPosition blockposition, int i) {
@@ -122,7 +122,7 @@ public abstract class EntityCreature extends EntityInsentient {
             if (!this.bm) {
                 this.goalSelector.a(2, this.c);
                 if (this.getNavigation() instanceof Navigation) {
-                    ((Navigation) this.getNavigation()).a(false);
+                    this.getNavigation().a(false);
                 }
 
                 this.bm = true;
@@ -151,7 +151,7 @@ public abstract class EntityCreature extends EntityInsentient {
             this.bm = false;
             this.goalSelector.a(this.c);
             if (this.getNavigation() instanceof Navigation) {
-                ((Navigation) this.getNavigation()).a(true);
+                this.getNavigation().a(true);
             }
 
             this.cj();
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCreeper.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCreeper.java
index fecf94d..e476017 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -47,9 +47,9 @@ public class EntityCreeper extends EntityMonster {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, Byte.valueOf((byte) -1));
-        this.datawatcher.a(17, Byte.valueOf((byte) 0));
-        this.datawatcher.a(18, Byte.valueOf((byte) 0));
+        this.datawatcher.a(16, (byte) -1);
+        this.datawatcher.a(17, (byte) 0);
+        this.datawatcher.a(18, (byte) 0);
     }
 
     public void b(NBTTagCompound nbttagcompound) {
@@ -65,7 +65,7 @@ public class EntityCreeper extends EntityMonster {
 
     public void a(NBTTagCompound nbttagcompound) {
         super.a(nbttagcompound);
-        this.datawatcher.watch(17, Byte.valueOf((byte) (nbttagcompound.getBoolean("powered") ? 1 : 0)));
+        this.datawatcher.watch(17, (byte) (nbttagcompound.getBoolean("powered") ? 1 : 0));
         if (nbttagcompound.hasKeyOfType("Fuse", 99)) {
             this.maxFuseTicks = nbttagcompound.getShort("Fuse");
         }
@@ -120,11 +120,10 @@ public class EntityCreeper extends EntityMonster {
         if (damagesource.getEntity() instanceof EntitySkeleton) {
             int i = Item.getId(Items.RECORD_13);
             int j = Item.getId(Items.RECORD_WAIT);
-            int k = i + this.random.nextInt(j - i + 1);
 
             // CraftBukkit start - Store record for now, drop in dropDeathLoot
             // this.a(Item.getById(k), 1);
-            this.record = k;
+            this.record = i + this.random.nextInt(j - i + 1);
             // CraftBukkit end
         } else if (damagesource.getEntity() instanceof EntityCreeper && damagesource.getEntity() != this && ((EntityCreeper) damagesource.getEntity()).isPowered() && ((EntityCreeper) damagesource.getEntity()).cp()) {
             ((EntityCreeper) damagesource.getEntity()).cq();
@@ -167,7 +166,7 @@ public class EntityCreeper extends EntityMonster {
     }
 
     public void a(int i) {
-        this.datawatcher.watch(16, Byte.valueOf((byte) i));
+        this.datawatcher.watch(16, (byte) i);
     }
 
     public void onLightningStrike(EntityLightning entitylightning) {
@@ -182,9 +181,9 @@ public class EntityCreeper extends EntityMonster {
 
     public void setPowered(boolean powered) {
         if (!powered) {
-            this.datawatcher.watch(17, Byte.valueOf((byte) 0));
+            this.datawatcher.watch(17, (byte) 0);
         } else {
-            this.datawatcher.watch(17, Byte.valueOf((byte) 1));
+            this.datawatcher.watch(17, (byte) 1);
         }
         // CraftBukkit end
     }
@@ -228,7 +227,7 @@ public class EntityCreeper extends EntityMonster {
     }
 
     public void co() {
-        this.datawatcher.watch(18, Byte.valueOf((byte) 1));
+        this.datawatcher.watch(18, (byte) 1);
     }
 
     public boolean cp() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderCrystal.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderCrystal.java
index 07533e4..91cb876 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderCrystal.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderCrystal.java
@@ -23,7 +23,7 @@ public class EntityEnderCrystal extends Entity {
     }
 
     protected void h() {
-        this.datawatcher.a(8, Integer.valueOf(this.b));
+        this.datawatcher.a(8, this.b);
     }
 
     public void t_() {
@@ -31,7 +31,7 @@ public class EntityEnderCrystal extends Entity {
         this.lastY = this.locY;
         this.lastZ = this.locZ;
         ++this.a;
-        this.datawatcher.watch(8, Integer.valueOf(this.b));
+        this.datawatcher.watch(8, this.b);
         int i = MathHelper.floor(this.locX);
         int j = MathHelper.floor(this.locY);
         int k = MathHelper.floor(this.locZ);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderDragon.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderDragon.java
index d246ae7..6aac7ee 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -116,7 +116,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
             } else {
                 if (this.bl < 0) {
                     for (int i = 0; i < this.bk.length; ++i) {
-                        this.bk[i][0] = (double) this.yaw;
+                        this.bk[i][0] = this.yaw;
                         this.bk[i][1] = this.locY;
                     }
                 }
@@ -125,7 +125,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
                     this.bl = 0;
                 }
 
-                this.bk[this.bl][0] = (double) this.yaw;
+                this.bk[this.bl][0] = this.yaw;
                 this.bk[this.bl][1] = this.locY;
                 double d0;
                 double d1;
@@ -174,9 +174,9 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
                         this.cf();
                     }
 
-                    d0 /= (double) MathHelper.sqrt(d3 * d3 + d1 * d1);
+                    d0 /= MathHelper.sqrt(d3 * d3 + d1 * d1);
                     f3 = 0.6F;
-                    d0 = MathHelper.a(d0, (double) (-f3), (double) f3);
+                    d0 = MathHelper.a(d0, -f3, f3);
                     this.motY += d0 * 0.10000000149011612D;
                     this.yaw = MathHelper.g(this.yaw);
                     double d8 = 180.0D - MathHelper.b(d3, d1) * 180.0D / 3.1415927410125732D;
@@ -192,8 +192,8 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
 
                     Vec3D vec3d = (new Vec3D(this.a - this.locX, this.b - this.locY, this.c - this.locZ)).a();
 
-                    d4 = (double) (-MathHelper.cos(this.yaw * 3.1415927F / 180.0F));
-                    Vec3D vec3d1 = (new Vec3D((double) MathHelper.sin(this.yaw * 3.1415927F / 180.0F), this.motY, d4)).a();
+                    d4 = -MathHelper.cos(this.yaw * 3.1415927F / 180.0F);
+                    Vec3D vec3d1 = (new Vec3D(MathHelper.sin(this.yaw * 3.1415927F / 180.0F), this.motY, d4)).a();
                     float f4 = ((float) vec3d1.b(vec3d) + 0.5F) / 1.5F;
 
                     if (f4 < 0.0F) {
@@ -224,8 +224,8 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
                     float f8 = ((float) vec3d2.b(vec3d1) + 1.0F) / 2.0F;
 
                     f8 = 0.8F + 0.15F * f8;
-                    this.motX *= (double) f8;
-                    this.motZ *= (double) f8;
+                    this.motX *= f8;
+                    this.motZ *= f8;
                     this.motY *= 0.9100000262260437D;
                 }
 
@@ -307,7 +307,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
             if (this.bz.dead) {
                 if (!this.world.isClientSide) {
                     CraftEventFactory.entityDamage = this.bz; // CraftBukkit
-                    this.a(this.bn, DamageSource.explosion((Explosion) null), 10.0F);
+                    this.a(this.bn, DamageSource.explosion(null), 10.0F);
                     CraftEventFactory.entityDamage = null; // CraftBukkit
                 }
 
@@ -326,13 +326,12 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
 
         if (this.random.nextInt(10) == 0) {
             float f = 32.0F;
-            List list = this.world.a(EntityEnderCrystal.class, this.getBoundingBox().grow((double) f, (double) f, (double) f));
+            List list = this.world.a(EntityEnderCrystal.class, this.getBoundingBox().grow(f, f, f));
             EntityEnderCrystal entityendercrystal = null;
             double d0 = Double.MAX_VALUE;
-            Iterator iterator = list.iterator();
 
-            while (iterator.hasNext()) {
-                EntityEnderCrystal entityendercrystal1 = (EntityEnderCrystal) iterator.next();
+            for (Object o : list) {
+                EntityEnderCrystal entityendercrystal1 = (EntityEnderCrystal) o;
                 double d1 = entityendercrystal1.h(this);
 
                 if (d1 < d0) {
@@ -349,11 +348,8 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
     private void a(List list) {
         double d0 = (this.bo.getBoundingBox().a + this.bo.getBoundingBox().d) / 2.0D;
         double d1 = (this.bo.getBoundingBox().c + this.bo.getBoundingBox().f) / 2.0D;
-        Iterator iterator = list.iterator();
-
-        while (iterator.hasNext()) {
-            Entity entity = (Entity) iterator.next();
 
+        for (Entity entity : list) {
             if (entity instanceof EntityLiving) {
                 double d2 = entity.locX - d0;
                 double d3 = entity.locZ - d1;
@@ -366,12 +362,12 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
     }
 
     private void b(List list) {
-        for (int i = 0; i < list.size(); ++i) {
-            Entity entity = (Entity) list.get(i);
+        for (Entity value : list) {
+            Entity entity = value;
 
             if (entity instanceof EntityLiving) {
                 entity.damageEntity(DamageSource.mobAttack(this), 10.0F);
-                this.a((EntityLiving) this, entity);
+                this.a(this, entity);
             }
         }
 
@@ -390,7 +386,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
 
         if (this.random.nextInt(2) == 0 && !arraylist.isEmpty()) {
             // CraftBukkit start
-            Entity target = (Entity) this.world.players.get(this.random.nextInt(this.world.players.size()));
+            Entity target = this.world.players.get(this.random.nextInt(this.world.players.size()));
             EntityTargetEvent event = new EntityTargetEvent(this.getBukkitEntity(), target.getBukkitEntity(), EntityTargetEvent.TargetReason.RANDOM_TARGET);
             this.world.getServer().getPluginManager().callEvent(event);
 
@@ -407,10 +403,10 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
 
             do {
                 this.a = 0.0D;
-                this.b = (double) (70.0F + this.random.nextFloat() * 50.0F);
+                this.b = 70.0F + this.random.nextFloat() * 50.0F;
                 this.c = 0.0D;
-                this.a += (double) (this.random.nextFloat() * 120.0F - 60.0F);
-                this.c += (double) (this.random.nextFloat() * 120.0F - 60.0F);
+                this.a += this.random.nextFloat() * 120.0F - 60.0F;
+                this.c += this.random.nextFloat() * 120.0F - 60.0F;
                 double d0 = this.locX - this.a;
                 double d1 = this.locY - this.b;
                 double d2 = this.locZ - this.c;
@@ -438,7 +434,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
         boolean flag1 = false;
 
         // CraftBukkit start - Create a list to hold all the destroyed blocks
-        List destroyedBlocks = new java.util.ArrayList();
+        List destroyedBlocks = new java.util.ArrayList<>();
         org.bukkit.craftbukkit.CraftWorld craftWorld = this.world.getWorld();
         // CraftBukkit end
 
@@ -573,8 +569,8 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
             if (this.by == 1) {
                 // CraftBukkit start - Use relative location for far away sounds
                 // this.world.a(1018, new BlockPosition(this), 0);
-                int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16;
-                for (EntityPlayer player : (List) MinecraftServer.getServer().getPlayerList().players) {
+                int viewDistance = this.world.getServer().getViewDistance() * 16;
+                for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) {
                     double deltaX = this.locX - player.locX;
                     double deltaZ = this.locZ - player.locZ;
                     double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
@@ -622,7 +618,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
         for (int i = -1; i <= 32; ++i) {
             for (int j = -4; j <= 4; ++j) {
                 for (int k = -4; k <= 4; ++k) {
-                    double d2 = (double) (j * j + k * k);
+                    double d2 = j * j + k * k;
 
                     if (d2 <= 12.25D) {
                         BlockPosition blockposition1 = blockposition.a(j, i, k);
@@ -665,8 +661,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
         } else {
             for (BlockState state : event.getBlocks()) {
                 PacketPlayOutBlockChange packet = new PacketPlayOutBlockChange(this.world, new BlockPosition(state.getX(), state.getY(), state.getZ()));
-                for (Iterator it = this.world.players.iterator(); it.hasNext();) {
-                    EntityHuman entity = (EntityHuman) it.next();
+                for (EntityHuman entity : this.world.players) {
                     if (entity instanceof EntityPlayer) {
                         ((EntityPlayer) entity).playerConnection.sendPacket(packet);
                     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderman.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderman.java
index c3f528a..03a6906 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderman.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityEnderman.java
@@ -10,7 +10,6 @@ import java.util.UUID;
 
 // CraftBukkit start
 import org.bukkit.Location;
-import org.bukkit.craftbukkit.event.CraftEventFactory;
 import org.bukkit.event.entity.EntityTeleportEvent;
 // CraftBukkit end
 
@@ -55,9 +54,9 @@ public class EntityEnderman extends EntityMonster {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, new Short((short) 0));
-        this.datawatcher.a(17, new Byte((byte) 0));
-        this.datawatcher.a(18, new Byte((byte) 0));
+        this.datawatcher.a(16, (short) 0);
+        this.datawatcher.a(17, (byte) 0);
+        this.datawatcher.a(18, (byte) 0);
     }
 
     public void b(NBTTagCompound nbttagcompound) {
@@ -94,7 +93,7 @@ public class EntityEnderman extends EntityMonster {
             vec3d1 = vec3d1.a();
             double d1 = vec3d.b(vec3d1);
 
-            return d1 > 1.0D - 0.025D / d0 ? entityhuman.hasLineOfSight(this) : false;
+            return d1 > 1.0D - 0.025D / d0 && entityhuman.hasLineOfSight(this);
         }
     }
 
@@ -126,7 +125,7 @@ public class EntityEnderman extends EntityMonster {
             float f = this.c(1.0F);
 
             if (f > 0.5F && this.world.i(new BlockPosition(this)) && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F) {
-                this.setGoalTarget((EntityLiving) null);
+                this.setGoalTarget(null);
                 this.a(false);
                 this.bm = false;
                 this.n();
@@ -215,7 +214,7 @@ public class EntityEnderman extends EntityMonster {
                 double d8 = d4 + (this.locY - d4) * d6 + this.random.nextDouble() * (double) this.length;
                 double d9 = d5 + (this.locZ - d5) * d6 + (this.random.nextDouble() - 0.5D) * (double) this.width * 2.0D;
 
-                this.world.addParticle(EnumParticle.PORTAL, d7, d8, d9, (double) f, (double) f1, (double) f2, new int[0]);
+                this.world.addParticle(EnumParticle.PORTAL, d7, d8, d9, f, f1, f2, new int[0]);
             }
 
             this.world.makeSound(d3, d4, d5, "mob.endermen.portal", 1.0F, 1.0F);
@@ -261,7 +260,7 @@ public class EntityEnderman extends EntityMonster {
     }
 
     public void setCarried(IBlockData iblockdata) {
-        this.datawatcher.watch(16, Short.valueOf((short) (Block.getCombinedId(iblockdata) & '\uffff')));
+        this.datawatcher.watch(16, (short) (Block.getCombinedId(iblockdata) & '\uffff'));
     }
 
     public IBlockData getCarried() {
@@ -313,7 +312,7 @@ public class EntityEnderman extends EntityMonster {
     }
 
     public void a(boolean flag) {
-        this.datawatcher.watch(18, Byte.valueOf((byte) (flag ? 1 : 0)));
+        this.datawatcher.watch(18, (byte) (flag ? 1 : 0));
     }
 
     static {
@@ -342,7 +341,7 @@ public class EntityEnderman extends EntityMonster {
         }
 
         public boolean a() {
-            return !this.enderman.world.getGameRules().getBoolean("mobGriefing") ? false : (this.enderman.getCarried().getBlock().getMaterial() != Material.AIR ? false : this.enderman.bc().nextInt(20) == 0);
+            return this.enderman.world.getGameRules().getBoolean("mobGriefing") && (this.enderman.getCarried().getBlock().getMaterial() == Material.AIR && this.enderman.bc().nextInt(20) == 0);
         }
 
         public void e() {
@@ -376,7 +375,7 @@ public class EntityEnderman extends EntityMonster {
         }
 
         public boolean a() {
-            return !this.a.world.getGameRules().getBoolean("mobGriefing") ? false : (this.a.getCarried().getBlock().getMaterial() == Material.AIR ? false : this.a.bc().nextInt(2000) == 0);
+            return this.a.world.getGameRules().getBoolean("mobGriefing") && (this.a.getCarried().getBlock().getMaterial() != Material.AIR && this.a.bc().nextInt(2000) == 0);
         }
 
         public void e() {
@@ -401,7 +400,7 @@ public class EntityEnderman extends EntityMonster {
         }
 
         private boolean a(World world, BlockPosition blockposition, Block block, Block block1, Block block2) {
-            return !block.canPlace(world, blockposition) ? false : (block1.getMaterial() != Material.AIR ? false : (block2.getMaterial() == Material.AIR ? false : block2.d()));
+            return block.canPlace(world, blockposition) && (block1.getMaterial() == Material.AIR && (block2.getMaterial() != Material.AIR && block2.d()));
         }
     }
 
@@ -421,7 +420,7 @@ public class EntityEnderman extends EntityMonster {
             double d0 = this.f();
             List list = this.e.world.a(EntityHuman.class, this.e.getBoundingBox().grow(d0, 4.0D, d0), this.c);
 
-            Collections.sort(list, this.b);
+            list.sort(this.b);
             if (list.isEmpty()) {
                 return false;
             } else {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index f16e219..0a6561a 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -21,9 +21,9 @@ public class EntityExperienceOrb extends Entity {
         this.setSize(0.5F, 0.5F);
         this.setPosition(d0, d1, d2);
         this.yaw = (float) (Math.random() * 360.0D);
-        this.motX = (double) ((float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D) * 2.0F);
-        this.motY = (double) ((float) (Math.random() * 0.2D) * 2.0F);
-        this.motZ = (double) ((float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D) * 2.0F);
+        this.motX = (float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D) * 2.0F;
+        this.motY = (float) (Math.random() * 0.2D) * 2.0F;
+        this.motZ = (float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D) * 2.0F;
         this.value = i;
     }
 
@@ -51,8 +51,8 @@ public class EntityExperienceOrb extends Entity {
         this.motY -= 0.029999999329447746D;
         if (this.world.getType(new BlockPosition(this)).getBlock().getMaterial() == Material.LAVA) {
             this.motY = 0.20000000298023224D;
-            this.motX = (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
-            this.motZ = (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
+            this.motX = (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
+            this.motZ = (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
             this.makeSound("random.fizz", 0.4F, 2.0F + this.random.nextFloat() * 0.4F);
         }
 
@@ -122,9 +122,9 @@ public class EntityExperienceOrb extends Entity {
             f = this.world.getType(new BlockPosition(MathHelper.floor(this.locX), MathHelper.floor(this.getBoundingBox().b) - 1, MathHelper.floor(this.locZ))).getBlock().frictionFactor * 0.98F;
         }
 
-        this.motX *= (double) f;
+        this.motX *= f;
         this.motY *= 0.9800000190734863D;
-        this.motZ *= (double) f;
+        this.motZ *= f;
         if (this.onGround) {
             this.motY *= -0.8999999761581421D;
         }
@@ -138,7 +138,7 @@ public class EntityExperienceOrb extends Entity {
     }
 
     public boolean W() {
-        return this.world.a(this.getBoundingBox(), Material.WATER, (Entity) this);
+        return this.world.a(this.getBoundingBox(), Material.WATER, this);
     }
 
     protected void burn(int i) {
@@ -160,7 +160,7 @@ public class EntityExperienceOrb extends Entity {
     }
 
     public void b(NBTTagCompound nbttagcompound) {
-        nbttagcompound.setShort("Health", (short) ((byte) this.d));
+        nbttagcompound.setShort("Health", (byte) this.d);
         nbttagcompound.setShort("Age", (short) this.b);
         nbttagcompound.setInt("Value", (short) this.value);
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFallingBlock.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFallingBlock.java
index e3bfd86..5789de6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFallingBlock.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFallingBlock.java
@@ -113,7 +113,7 @@ public class EntityFallingBlock extends Entity {
                     if (this.world.getType(blockposition).getBlock() != Blocks.PISTON_EXTENSION) {
                         this.die();
                         if (!this.e) {
-                            if (this.world.a(block, blockposition, true, EnumDirection.UP, (Entity) null, (ItemStack) null) && !BlockFalling.canFall(this.world, blockposition.down()) /* mimic the false conditions of setTypeIdAndData */ && blockposition.getX() >= -30000000 && blockposition.getZ() >= -30000000 && blockposition.getX() < 30000000 && blockposition.getZ() < 30000000 && blockposition.getY() >= 0 && blockposition.getY() < (this.world.tacoSpigotConfig.disableFallingBlockStackingAt256 ? 255 : 256) && this.world.getType(blockposition) != this.block) {
+                            if (this.world.a(block, blockposition, true, EnumDirection.UP, null, null) && !BlockFalling.canFall(this.world, blockposition.down()) /* mimic the false conditions of setTypeIdAndData */ && blockposition.getX() >= -30000000 && blockposition.getZ() >= -30000000 && blockposition.getX() < 30000000 && blockposition.getZ() < 30000000 && blockposition.getY() >= 0 && blockposition.getY() < (this.world.tacoSpigotConfig.disableFallingBlockStackingAt256 ? 255 : 256) && this.world.getType(blockposition) != this.block) {
                                 if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this.block.getBlock(), this.block.getBlock().toLegacyData(this.block)).isCancelled()) {
                                     return;
                                 }
@@ -131,10 +131,8 @@ public class EntityFallingBlock extends Entity {
                                         NBTTagCompound nbttagcompound = new NBTTagCompound();
 
                                         tileentity.b(nbttagcompound);
-                                        Iterator iterator = this.tileEntityData.c().iterator();
 
-                                        while (iterator.hasNext()) {
-                                            String s = (String) iterator.next();
+                                        for (String s : this.tileEntityData.c()) {
                                             NBTBase nbtbase = this.tileEntityData.get(s);
 
                                             if (!s.equals("x") && !s.equals("y") && !s.equals("z")) {
@@ -173,10 +171,9 @@ public class EntityFallingBlock extends Entity {
                 ArrayList arraylist = Lists.newArrayList(this.world.getEntities(this, this.getBoundingBox()));
                 boolean flag = block == Blocks.ANVIL;
                 DamageSource damagesource = flag ? DamageSource.ANVIL : DamageSource.FALLING_BLOCK;
-                Iterator iterator = arraylist.iterator();
 
-                while (iterator.hasNext()) {
-                    Entity entity = (Entity) iterator.next();
+                for (Object o : arraylist) {
+                    Entity entity = (Entity) o;
 
                     CraftEventFactory.entityDamage = this; // CraftBukkit
                     entity.damageEntity(damagesource, (float) Math.min(MathHelper.d((float) i * this.fallHurtAmount), this.fallHurtMax));
@@ -184,13 +181,13 @@ public class EntityFallingBlock extends Entity {
                 }
 
                 if (flag && (double) this.random.nextFloat() < 0.05000000074505806D + (double) i * 0.05D) {
-                    int j = ((Integer) this.block.get(BlockAnvil.DAMAGE)).intValue();
+                    int j = this.block.get(BlockAnvil.DAMAGE);
 
                     ++j;
                     if (j > 2) {
                         this.e = true;
                     } else {
-                        this.block = this.block.set(BlockAnvil.DAMAGE, Integer.valueOf(j));
+                        this.block = this.block.set(BlockAnvil.DAMAGE, j);
                     }
                 }
             }
@@ -200,7 +197,7 @@ public class EntityFallingBlock extends Entity {
 
     protected void b(NBTTagCompound nbttagcompound) {
         Block block = this.block != null ? this.block.getBlock() : Blocks.AIR;
-        MinecraftKey minecraftkey = (MinecraftKey) Block.REGISTRY.c(block);
+        MinecraftKey minecraftkey = Block.REGISTRY.c(block);
 
         nbttagcompound.setString("Block", minecraftkey == null ? "" : minecraftkey.toString());
         nbttagcompound.setByte("Data", (byte) block.toLegacyData(this.block));
@@ -273,8 +270,8 @@ public class EntityFallingBlock extends Entity {
         if (this.block != null) {
             Block block = this.block.getBlock();
 
-            crashreportsystemdetails.a("Immitating block ID", (Object) Integer.valueOf(Block.getId(block)));
-            crashreportsystemdetails.a("Immitating block data", (Object) Integer.valueOf(block.toLegacyData(this.block)));
+            crashreportsystemdetails.a("Immitating block ID", Block.getId(block));
+            crashreportsystemdetails.a("Immitating block data", block.toLegacyData(this.block));
         }
 
     }
@@ -292,7 +289,7 @@ public class EntityFallingBlock extends Entity {
         double d4 = this.locY + this.getHeadHeight() - d1;
         double d5 = this.locZ - d2;
 
-        return (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
+        return MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
     }
 
     @Override
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFireball.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFireball.java
index 125f74d..06b54ad 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFireball.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFireball.java
@@ -32,7 +32,7 @@ public abstract class EntityFireball extends Entity {
         this.setSize(1.0F, 1.0F);
         this.setPositionRotation(d0, d1, d2, this.yaw, this.pitch);
         this.setPosition(d0, d1, d2);
-        double d6 = (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
+        double d6 = MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
 
         this.dirX = d3 / d6 * 0.1D;
         this.dirY = d4 / d6 * 0.1D;
@@ -56,7 +56,7 @@ public abstract class EntityFireball extends Entity {
         d0 += this.random.nextGaussian() * 0.4D;
         d1 += this.random.nextGaussian() * 0.4D;
         d2 += this.random.nextGaussian() * 0.4D;
-        double d3 = (double) MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
+        double d3 = MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
 
         this.dirX = d0 / d3 * 0.1D;
         this.dirY = d1 / d3 * 0.1D;
@@ -80,9 +80,9 @@ public abstract class EntityFireball extends Entity {
                 }
 
                 this.i = false;
-                this.motX *= (double) (this.random.nextFloat() * 0.2F);
-                this.motY *= (double) (this.random.nextFloat() * 0.2F);
-                this.motZ *= (double) (this.random.nextFloat() * 0.2F);
+                this.motX *= this.random.nextFloat() * 0.2F;
+                this.motY *= this.random.nextFloat() * 0.2F;
+                this.motZ *= this.random.nextFloat() * 0.2F;
                 this.ar = 0;
                 this.as = 0;
             } else {
@@ -103,12 +103,12 @@ public abstract class EntityFireball extends Entity {
             List list = this.world.getEntities(this, this.getBoundingBox().a(this.motX, this.motY, this.motZ).grow(1.0D, 1.0D, 1.0D));
             double d0 = 0.0D;
 
-            for (int i = 0; i < list.size(); ++i) {
-                Entity entity1 = (Entity) list.get(i);
+            for (Object o : list) {
+                Entity entity1 = (Entity) o;
 
                 if (entity1.ad() && (!entity1.k(this.shooter) || this.as >= 25)) {
                     float f = 0.3F;
-                    AxisAlignedBB axisalignedbb = entity1.getBoundingBox().grow((double) f, (double) f, (double) f);
+                    AxisAlignedBB axisalignedbb = entity1.getBoundingBox().grow(f, f, f);
                     MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
 
                     if (movingobjectposition1 != null) {
@@ -143,8 +143,7 @@ public abstract class EntityFireball extends Entity {
 
             this.yaw = (float) (MathHelper.b(this.motZ, this.motX) * 180.0D / 3.1415927410125732D) + 90.0F;
 
-            for (this.pitch = (float) (MathHelper.b((double) f1, this.motY) * 180.0D / 3.1415927410125732D) - 90.0F; this.pitch - this.lastPitch < -180.0F; this.lastPitch -= 360.0F) {
-                ;
+            for (this.pitch = (float) (MathHelper.b(f1, this.motY) * 180.0D / 3.1415927410125732D) - 90.0F; this.pitch - this.lastPitch < -180.0F; this.lastPitch -= 360.0F) {
             }
 
             while (this.pitch - this.lastPitch >= 180.0F) {
@@ -176,9 +175,9 @@ public abstract class EntityFireball extends Entity {
             this.motX += this.dirX;
             this.motY += this.dirY;
             this.motZ += this.dirZ;
-            this.motX *= (double) f2;
-            this.motY *= (double) f2;
-            this.motZ *= (double) f2;
+            this.motX *= f2;
+            this.motY *= f2;
+            this.motZ *= f2;
             this.world.addParticle(EnumParticle.SMOKE_NORMAL, this.locX, this.locY + 0.5D, this.locZ, 0.0D, 0.0D, 0.0D, new int[0]);
             this.setPosition(this.locX, this.locY, this.locZ);
         }
@@ -194,7 +193,7 @@ public abstract class EntityFireball extends Entity {
         nbttagcompound.setShort("xTile", (short) this.e);
         nbttagcompound.setShort("yTile", (short) this.f);
         nbttagcompound.setShort("zTile", (short) this.g);
-        MinecraftKey minecraftkey = (MinecraftKey) Block.REGISTRY.c(this.h);
+        MinecraftKey minecraftkey = Block.REGISTRY.c(this.h);
 
         nbttagcompound.setString("inTile", minecraftkey == null ? "" : minecraftkey.toString());
         nbttagcompound.setByte("inGround", (byte) (this.i ? 1 : 0));
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFireworks.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFireworks.java
index d7be6c2..2d101a4 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFireworks.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFireworks.java
@@ -59,8 +59,7 @@ public class EntityFireworks extends Entity {
 
         this.yaw = (float) (MathHelper.b(this.motX, this.motZ) * 180.0D / 3.1415927410125732D);
 
-        for (this.pitch = (float) (MathHelper.b(this.motY, (double) f) * 180.0D / 3.1415927410125732D); this.pitch - this.lastPitch < -180.0F; this.lastPitch -= 360.0F) {
-            ;
+        for (this.pitch = (float) (MathHelper.b(this.motY, f) * 180.0D / 3.1415927410125732D); this.pitch - this.lastPitch < -180.0F; this.lastPitch -= 360.0F) {
         }
 
         while (this.pitch - this.lastPitch >= 180.0F) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFishingHook.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFishingHook.java
index 80c5acf..d43ecb2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -52,15 +52,15 @@ public class EntityFishingHook extends Entity {
         this.owner.hookedFish = this;
         this.setSize(0.25F, 0.25F);
         this.setPositionRotation(entityhuman.locX, entityhuman.locY + (double) entityhuman.getHeadHeight(), entityhuman.locZ, entityhuman.yaw, entityhuman.pitch);
-        this.locX -= (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F);
+        this.locX -= MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F;
         this.locY -= 0.10000000149011612D;
-        this.locZ -= (double) (MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * 0.16F);
+        this.locZ -= MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * 0.16F;
         this.setPosition(this.locX, this.locY, this.locZ);
         float f = 0.4F;
 
-        this.motX = (double) (-MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F) * f);
-        this.motZ = (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F) * f);
-        this.motY = (double) (-MathHelper.sin(this.pitch / 180.0F * 3.1415927F) * f);
+        this.motX = -MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F) * f;
+        this.motZ = MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F) * f;
+        this.motY = -MathHelper.sin(this.pitch / 180.0F * 3.1415927F) * f;
         this.c(this.motX, this.motY, this.motZ, 1.5F, 1.0F);
     }
 
@@ -69,22 +69,22 @@ public class EntityFishingHook extends Entity {
     public void c(double d0, double d1, double d2, float f, float f1) {
         float f2 = MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
 
-        d0 /= (double) f2;
-        d1 /= (double) f2;
-        d2 /= (double) f2;
+        d0 /= f2;
+        d1 /= f2;
+        d2 /= f2;
         d0 += this.random.nextGaussian() * 0.007499999832361937D * (double) f1;
         d1 += this.random.nextGaussian() * 0.007499999832361937D * (double) f1;
         d2 += this.random.nextGaussian() * 0.007499999832361937D * (double) f1;
-        d0 *= (double) f;
-        d1 *= (double) f;
-        d2 *= (double) f;
+        d0 *= f;
+        d1 *= f;
+        d2 *= f;
         this.motX = d0;
         this.motY = d1;
         this.motZ = d2;
         float f3 = MathHelper.sqrt(d0 * d0 + d2 * d2);
 
         this.lastYaw = this.yaw = (float) (MathHelper.b(d0, d2) * 180.0D / 3.1415927410125732D);
-        this.lastPitch = this.pitch = (float) (MathHelper.b(d1, (double) f3) * 180.0D / 3.1415927410125732D);
+        this.lastPitch = this.pitch = (float) (MathHelper.b(d1, f3) * 180.0D / 3.1415927410125732D);
         this.at = 0;
     }
 
@@ -114,7 +114,7 @@ public class EntityFishingHook extends Entity {
                 if (this.hooked != null) {
                     if (!this.hooked.dead) {
                         this.locX = this.hooked.locX;
-                        double d4 = (double) this.hooked.length;
+                        double d4 = this.hooked.length;
 
                         this.locY = this.hooked.getBoundingBox().b + d4 * 0.8D;
                         this.locZ = this.hooked.locZ;
@@ -140,9 +140,9 @@ public class EntityFishingHook extends Entity {
                 }
 
                 this.as = false;
-                this.motX *= (double) (this.random.nextFloat() * 0.2F);
-                this.motY *= (double) (this.random.nextFloat() * 0.2F);
-                this.motZ *= (double) (this.random.nextFloat() * 0.2F);
+                this.motX *= this.random.nextFloat() * 0.2F;
+                this.motY *= this.random.nextFloat() * 0.2F;
+                this.motZ *= this.random.nextFloat() * 0.2F;
                 this.at = 0;
                 this.au = 0;
             } else {
@@ -165,12 +165,12 @@ public class EntityFishingHook extends Entity {
 
             double d6;
 
-            for (int i = 0; i < list.size(); ++i) {
-                Entity entity1 = (Entity) list.get(i);
+            for (Object o : list) {
+                Entity entity1 = (Entity) o;
 
                 if (entity1.ad() && (entity1 != this.owner || this.au >= 5)) {
                     float f = 0.3F;
-                    AxisAlignedBB axisalignedbb = entity1.getBoundingBox().grow((double) f, (double) f, (double) f);
+                    AxisAlignedBB axisalignedbb = entity1.getBoundingBox().grow(f, f, f);
                     MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
 
                     if (movingobjectposition1 != null) {
@@ -214,8 +214,7 @@ public class EntityFishingHook extends Entity {
 
                 this.yaw = (float) (MathHelper.b(this.motX, this.motZ) * 180.0D / 3.1415927410125732D);
 
-                for (this.pitch = (float) (MathHelper.b(this.motY, (double) f1) * 180.0D / 3.1415927410125732D); this.pitch - this.lastPitch < -180.0F; this.lastPitch -= 360.0F) {
-                    ;
+                for (this.pitch = (float) (MathHelper.b(this.motY, f1) * 180.0D / 3.1415927410125732D); this.pitch - this.lastPitch < -180.0F; this.lastPitch -= 360.0F) {
                 }
 
                 while (this.pitch - this.lastPitch >= 180.0F) {
@@ -289,8 +288,8 @@ public class EntityFishingHook extends Entity {
                                 this.motY -= 0.20000000298023224D;
                                 this.makeSound("random.splash", 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
                                 f3 = (float) MathHelper.floor(this.getBoundingBox().b);
-                                worldserver.a(EnumParticle.WATER_BUBBLE, this.locX, (double) (f3 + 1.0F), this.locZ, (int) (1.0F + this.width * 20.0F), (double) this.width, 0.0D, (double) this.width, 0.20000000298023224D, new int[0]);
-                                worldserver.a(EnumParticle.WATER_WAKE, this.locX, (double) (f3 + 1.0F), this.locZ, (int) (1.0F + this.width * 20.0F), (double) this.width, 0.0D, (double) this.width, 0.20000000298023224D, new int[0]);
+                                worldserver.a(EnumParticle.WATER_BUBBLE, this.locX, f3 + 1.0F, this.locZ, (int) (1.0F + this.width * 20.0F), this.width, 0.0D, this.width, 0.20000000298023224D, new int[0]);
+                                worldserver.a(EnumParticle.WATER_WAKE, this.locX, f3 + 1.0F, this.locZ, (int) (1.0F + this.width * 20.0F), this.width, 0.0D, this.width, 0.20000000298023224D, new int[0]);
                                 this.av = MathHelper.nextInt(this.random, 10, 30);
                             } else {
                                 this.ay = (float) ((double) this.ay + this.random.nextGaussian() * 4.0D);
@@ -298,19 +297,19 @@ public class EntityFishingHook extends Entity {
                                 f5 = MathHelper.sin(f3);
                                 f4 = MathHelper.cos(f3);
                                 d8 = this.locX + (double) (f5 * (float) this.ax * 0.1F);
-                                d12 = (double) ((float) MathHelper.floor(this.getBoundingBox().b) + 1.0F);
+                                d12 = (float) MathHelper.floor(this.getBoundingBox().b) + 1.0F;
                                 d11 = this.locZ + (double) (f4 * (float) this.ax * 0.1F);
                                 block = worldserver.getType(new BlockPosition((int) d8, (int) d12 - 1, (int) d11)).getBlock();
                                 if (block == Blocks.WATER || block == Blocks.FLOWING_WATER) {
                                     if (this.random.nextFloat() < 0.15F) {
-                                        worldserver.a(EnumParticle.WATER_BUBBLE, d8, d12 - 0.10000000149011612D, d11, 1, (double) f5, 0.1D, (double) f4, 0.0D, new int[0]);
+                                        worldserver.a(EnumParticle.WATER_BUBBLE, d8, d12 - 0.10000000149011612D, d11, 1, f5, 0.1D, f4, 0.0D, new int[0]);
                                     }
 
                                     float f6 = f5 * 0.04F;
                                     float f7 = f4 * 0.04F;
 
-                                    worldserver.a(EnumParticle.WATER_WAKE, d8, d12, d11, 0, (double) f7, 0.01D, (double) (-f6), 1.0D, new int[0]);
-                                    worldserver.a(EnumParticle.WATER_WAKE, d8, d12, d11, 0, (double) (-f7), 0.01D, (double) f6, 1.0D, new int[0]);
+                                    worldserver.a(EnumParticle.WATER_WAKE, d8, d12, d11, 0, f7, 0.01D, -f6, 1.0D, new int[0]);
+                                    worldserver.a(EnumParticle.WATER_WAKE, d8, d12, d11, 0, -f7, 0.01D, f6, 1.0D, new int[0]);
                                 }
                             }
                         } else if (this.aw > 0) {
@@ -328,7 +327,7 @@ public class EntityFishingHook extends Entity {
                                 f5 = MathHelper.a(this.random, 0.0F, 360.0F) * 0.017453292F;
                                 f4 = MathHelper.a(this.random, 25.0F, 60.0F);
                                 d8 = this.locX + (double) (MathHelper.sin(f5) * f4 * 0.1F);
-                                d12 = (double) ((float) MathHelper.floor(this.getBoundingBox().b) + 1.0F);
+                                d12 = (float) MathHelper.floor(this.getBoundingBox().b) + 1.0F;
                                 d11 = this.locZ + (double) (MathHelper.cos(f5) * f4 * 0.1F);
                                 block = worldserver.getType(new BlockPosition((int) d8, (int) d12 - 1, (int) d11)).getBlock();
                                 if (block == Blocks.WATER || block == Blocks.FLOWING_WATER) {
@@ -358,9 +357,9 @@ public class EntityFishingHook extends Entity {
                     this.motY *= 0.8D;
                 }
 
-                this.motX *= (double) f2;
-                this.motY *= (double) f2;
-                this.motZ *= (double) f2;
+                this.motX *= f2;
+                this.motY *= f2;
+                this.motZ *= f2;
                 this.setPosition(this.locX, this.locY, this.locZ);
             }
         }
@@ -370,7 +369,7 @@ public class EntityFishingHook extends Entity {
         nbttagcompound.setShort("xTile", (short) this.g);
         nbttagcompound.setShort("yTile", (short) this.h);
         nbttagcompound.setShort("zTile", (short) this.i);
-        MinecraftKey minecraftkey = (MinecraftKey) Block.REGISTRY.c(this.ar);
+        MinecraftKey minecraftkey = Block.REGISTRY.c(this.ar);
 
         nbttagcompound.setString("inTile", minecraftkey == null ? "" : minecraftkey.toString());
         nbttagcompound.setByte("shake", (byte) this.a);
@@ -410,7 +409,7 @@ public class EntityFishingHook extends Entity {
                 double d0 = this.owner.locX - this.locX;
                 double d1 = this.owner.locY - this.locY;
                 double d2 = this.owner.locZ - this.locZ;
-                double d3 = (double) MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
+                double d3 = MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
                 double d4 = 0.1D;
 
                 this.hooked.motX += d0 * d4;
@@ -431,7 +430,7 @@ public class EntityFishingHook extends Entity {
                 double d5 = this.owner.locX - this.locX;
                 double d6 = this.owner.locY - this.locY;
                 double d7 = this.owner.locZ - this.locZ;
-                double d8 = (double) MathHelper.sqrt(d5 * d5 + d6 * d6 + d7 * d7);
+                double d8 = MathHelper.sqrt(d5 * d5 + d6 * d6 + d7 * d7);
                 double d9 = 0.1D;
 
                 entityitem.motX = d5 * d9;
@@ -484,17 +483,17 @@ public class EntityFishingHook extends Entity {
         f2 = MathHelper.a(f2, 0.0F, 1.0F);
         if (f < f1) {
             this.owner.b(StatisticList.D);
-            return ((PossibleFishingResult) WeightedRandom.a(this.random, EntityFishingHook.d)).a(this.random);
+            return WeightedRandom.a(this.random, EntityFishingHook.d).a(this.random);
         } else {
             f -= f1;
             if (f < f2) {
                 this.owner.b(StatisticList.E);
-                return ((PossibleFishingResult) WeightedRandom.a(this.random, EntityFishingHook.e)).a(this.random);
+                return WeightedRandom.a(this.random, EntityFishingHook.e).a(this.random);
             } else {
                 float f3 = f - f2;
 
                 this.owner.b(StatisticList.C);
-                return ((PossibleFishingResult) WeightedRandom.a(this.random, EntityFishingHook.f)).a(this.random);
+                return WeightedRandom.a(this.random, EntityFishingHook.f).a(this.random);
             }
         }
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityGhast.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityGhast.java
index 51608e9..e3b18c0 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityGhast.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityGhast.java
@@ -19,7 +19,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
     }
 
     public void a(boolean flag) {
-        this.datawatcher.watch(16, Byte.valueOf((byte) (flag ? 1 : 0)));
+        this.datawatcher.watch(16, (byte) (flag ? 1 : 0));
     }
 
     public int cf() {
@@ -39,7 +39,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
             return false;
         } else if ("fireball".equals(damagesource.p()) && damagesource.getEntity() instanceof EntityHuman) {
             super.damageEntity(damagesource, 1000.0F);
-            ((EntityHuman) damagesource.getEntity()).b((Statistic) AchievementList.z);
+            ((EntityHuman) damagesource.getEntity()).b(AchievementList.z);
             return true;
         } else {
             return super.damageEntity(damagesource, f);
@@ -48,7 +48,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, Byte.valueOf((byte) 0));
+        this.datawatcher.a(16, (byte) 0);
     }
 
     protected void initAttributes() {
@@ -149,7 +149,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
 
                 ++this.a;
                 if (this.a == 10) {
-                    world.a((EntityHuman) null, 1007, new BlockPosition(this.b), 0);
+                    world.a(null, 1007, new BlockPosition(this.b), 0);
                 }
 
                 if (this.a == 20) {
@@ -159,7 +159,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
                     double d3 = entityliving.getBoundingBox().b + (double) (entityliving.length / 2.0F) - (0.5D + this.b.locY + (double) (this.b.length / 2.0F));
                     double d4 = entityliving.locZ - (this.b.locZ + vec3d.c * d1);
 
-                    world.a((EntityHuman) null, 1008, new BlockPosition(this.b), 0);
+                    world.a(null, 1008, new BlockPosition(this.b), 0);
                     EntityLargeFireball entitylargefireball = new EntityLargeFireball(world, this.b, d2, d3, d4);
 
 
@@ -267,7 +267,7 @@ public class EntityGhast extends EntityFlying implements IMonster {
 
                 if (this.h-- <= 0) {
                     this.h += this.g.bc().nextInt(5) + 2;
-                    d3 = (double) MathHelper.sqrt(d3);
+                    d3 = MathHelper.sqrt(d3);
                     if (this.b(this.b, this.c, this.d, d3)) {
                         this.g.motX += d0 / d3 * 0.1D;
                         this.g.motY += d1 / d3 * 0.1D;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHanging.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHanging.java
index f374c39..a9ffc62 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHanging.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHanging.java
@@ -60,9 +60,9 @@ public abstract class EntityHanging extends Entity {
 
             d0 += d4 * (double) enumdirection.getAdjacentX();
             d2 += d4 * (double) enumdirection.getAdjacentZ();
-            double d6 = (double) width;
-            double d7 = (double) height;
-            double d8 = (double) width;
+            double d6 = width;
+            double d7 = height;
+            double d8 = width;
 
             if (direction.k() == EnumDirection.EnumAxis.Z) {
                 d8 = 1.0D;
@@ -174,7 +174,7 @@ public abstract class EntityHanging extends Entity {
     }
 
     public boolean l(Entity entity) {
-        return entity instanceof EntityHuman ? this.damageEntity(DamageSource.playerAttack((EntityHuman) entity), 0.0F) : false;
+        return entity instanceof EntityHuman && this.damageEntity(DamageSource.playerAttack((EntityHuman) entity), 0.0F);
     }
 
     public EnumDirection getDirection() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHorse.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHorse.java
index 9ae99f3..a378054 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHorse.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHorse.java
@@ -17,7 +17,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
             return this.a((Entity) object);
         }
     };
-    public static final IAttribute attributeJumpStrength = (new AttributeRanged((IAttribute) null, "horse.jumpStrength", 0.7D, 0.0D, 2.0D)).a("Jump Strength").a(true);
+    public static final IAttribute attributeJumpStrength = (new AttributeRanged(null, "horse.jumpStrength", 0.7D, 0.0D, 2.0D)).a("Jump Strength").a(true);
     private static final String[] bu = new String[] { null, "textures/entity/horse/armor/horse_armor_iron.png", "textures/entity/horse/armor/horse_armor_gold.png", "textures/entity/horse/armor/horse_armor_diamond.png"};
     private static final String[] bv = new String[] { "", "meo", "goo", "dio"};
     private static final int[] bw = new int[] { 0, 5, 7, 11};
@@ -53,7 +53,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
         this.setSize(1.4F, 1.6F);
         this.fireProof = false;
         this.setHasChest(false);
-        ((Navigation) this.getNavigation()).a(true);
+        this.getNavigation().a(true);
         this.goalSelector.a(0, new PathfinderGoalFloat(this));
         this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.2D));
         this.goalSelector.a(1, new PathfinderGoalTame(this, 1.2D));
@@ -67,15 +67,15 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, Integer.valueOf(0));
-        this.datawatcher.a(19, Byte.valueOf((byte) 0));
-        this.datawatcher.a(20, Integer.valueOf(0));
-        this.datawatcher.a(21, String.valueOf(""));
-        this.datawatcher.a(22, Integer.valueOf(0));
+        this.datawatcher.a(16, 0);
+        this.datawatcher.a(19, (byte) 0);
+        this.datawatcher.a(20, 0);
+        this.datawatcher.a(21, "");
+        this.datawatcher.a(22, 0);
     }
 
     public void setType(int i) {
-        this.datawatcher.watch(19, Byte.valueOf((byte) i));
+        this.datawatcher.watch(19, (byte) i);
         this.dc();
     }
 
@@ -84,7 +84,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
     }
 
     public void setVariant(int i) {
-        this.datawatcher.watch(20, Integer.valueOf(i));
+        this.datawatcher.watch(20, i);
         this.dc();
     }
 
@@ -126,9 +126,9 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
         int j = this.datawatcher.getInt(16);
 
         if (flag) {
-            this.datawatcher.watch(16, Integer.valueOf(j | i));
+            this.datawatcher.watch(16, j | i);
         } else {
-            this.datawatcher.watch(16, Integer.valueOf(j & ~i));
+            this.datawatcher.watch(16, j & ~i);
         }
 
     }
@@ -229,7 +229,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
     }
 
     public void e(ItemStack itemstack) {
-        this.datawatcher.watch(22, Integer.valueOf(this.f(itemstack)));
+        this.datawatcher.watch(22, this.f(itemstack));
         this.dc();
     }
 
@@ -267,7 +267,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
     public boolean damageEntity(DamageSource damagesource, float f) {
         Entity entity = damagesource.getEntity();
 
-        return this.passenger != null && this.passenger.equals(entity) ? false : super.damageEntity(damagesource, f);
+        return (this.passenger == null || !this.passenger.equals(entity)) && super.damageEntity(damagesource, f);
     }
 
     public int br() {
@@ -349,7 +349,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
             }
         }
 
-        this.inventoryChest.a((IInventoryListener) this);
+        this.inventoryChest.a(this);
         this.db();
     }
 
@@ -391,10 +391,9 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
         double d1 = Double.MAX_VALUE;
         Entity entity1 = null;
         List list = this.world.a(entity, entity.getBoundingBox().a(d0, d0, d0), EntityHorse.bs);
-        Iterator iterator = list.iterator();
 
-        while (iterator.hasNext()) {
-            Entity entity2 = (Entity) iterator.next();
+        for (Object o : list) {
+            Entity entity2 = (Entity) o;
             double d2 = entity2.e(entity.locX, entity.locY, entity.locZ);
 
             if (d2 < d1) {
@@ -619,7 +618,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
                 }
 
                 if (!this.isTame() && !flag) {
-                    if (itemstack != null && itemstack.a(entityhuman, (EntityLiving) this)) {
+                    if (itemstack != null && itemstack.a(entityhuman, this)) {
                         return true;
                     }
 
@@ -641,7 +640,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
 
                 if (flag) {
                     if (!entityhuman.abilities.canInstantlyBuild && --itemstack.count == 0) {
-                        entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                        entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
                     }
 
                     return true;
@@ -649,7 +648,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
             }
 
             if (this.cp() && this.passenger == null) {
-                if (itemstack != null && itemstack.a(entityhuman, (EntityLiving) this)) {
+                if (itemstack != null && itemstack.a(entityhuman, this)) {
                     return true;
                 } else {
                     this.i(entityhuman);
@@ -683,7 +682,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
     }
 
     protected boolean bD() {
-        return this.passenger != null && this.cG() ? true : this.cy() || this.cz();
+        return this.passenger != null && this.cG() || this.cy() || this.cz();
     }
 
     public boolean cR() {
@@ -748,7 +747,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
             if (this.cA() && !this.cn() && !this.cy()) {
                 EntityHorse entityhorse = this.a(this, 16.0D);
 
-                if (entityhorse != null && this.h((Entity) entityhorse) > 4.0D) {
+                if (entityhorse != null && this.h(entityhorse) > 4.0D) {
                     this.getNavigation().a(entityhorse);
                 }
             }
@@ -874,7 +873,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
     }
 
     public void dropChest() {
-        this.a((Entity) this, this.inventoryChest);
+        this.a(this, this.inventoryChest);
         this.cE();
     }
 
@@ -918,7 +917,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
             if (this.br > 0.0F && !this.cv() && this.onGround) {
                 this.motY = this.getJumpStrength() * (double) this.br;
                 if (this.hasEffect(MobEffectList.JUMP)) {
-                    this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F);
+                    this.motY += (float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F;
                 }
 
                 this.m(true);
@@ -927,8 +926,8 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
                     float f2 = MathHelper.sin(this.yaw * 3.1415927F / 180.0F);
                     float f3 = MathHelper.cos(this.yaw * 3.1415927F / 180.0F);
 
-                    this.motX += (double) (-0.4F * f2 * this.br);
-                    this.motZ += (double) (0.4F * f3 * this.br);
+                    this.motX += -0.4F * f2 * this.br;
+                    this.motZ += 0.4F * f3 * this.br;
                     this.makeSound("mob.horse.jump", 0.4F, 1.0F);
                 }
 
@@ -1188,7 +1187,7 @@ public class EntityHorse extends EntityAnimal implements IInventoryListener {
         }
 
         if (j != 4 && j != 3) {
-            this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) this.di());
+            this.getAttributeInstance(GenericAttributes.maxHealth).setValue(this.di());
             if (j == 0) {
                 this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(this.dk());
             } else {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHuman.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHuman.java
index 5accac6..5d1c850 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityHuman.java
@@ -85,10 +85,10 @@ public abstract class EntityHuman extends EntityLiving {
 
     // PaperSpigot start - SPIGOT-1387: Resolve bed issues on unloaded chunks
     public static BlockPosition getBed(World world, BlockPosition blockposition, boolean flag) {
-        boolean before = ((WorldServer) world).chunkProviderServer.forceChunkLoad;
-        ((WorldServer) world).chunkProviderServer.forceChunkLoad = true;
+        boolean before = world.chunkProviderServer.forceChunkLoad;
+        world.chunkProviderServer.forceChunkLoad = true;
         final BlockPosition result = getBed0(world, blockposition, flag);
-        ((WorldServer) world).chunkProviderServer.forceChunkLoad = before;
+        world.chunkProviderServer.forceChunkLoad = before;
         return result;
     }
 
@@ -138,10 +138,10 @@ public abstract class EntityHuman extends EntityLiving {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, Byte.valueOf((byte) 0));
-        this.datawatcher.a(17, Float.valueOf(0.0F));
-        this.datawatcher.a(18, Integer.valueOf(0));
-        this.datawatcher.a(10, Byte.valueOf((byte) 0));
+        this.datawatcher.a(16, (byte) 0);
+        this.datawatcher.a(17, 0.0F);
+        this.datawatcher.a(18, 0);
+        this.datawatcher.a(10, (byte) 0);
     }
 
     public boolean bS() {
@@ -477,8 +477,8 @@ public abstract class EntityHuman extends EntityLiving {
             List list = this.world.getEntities(this, axisalignedbb);
 
             if (this.ae()) { // Spigot: Add this.ae() condition (second !this.isDead near bottom of EntityLiving)
-                for (int i = 0; i < list.size(); ++i) {
-                    Entity entity = (Entity) list.get(i);
+                for (Object o : list) {
+                    Entity entity = (Entity) o;
 
                     if (!entity.dead) {
                         this.d(entity);
@@ -498,13 +498,13 @@ public abstract class EntityHuman extends EntityLiving {
     }
 
     public void setScore(int i) {
-        this.datawatcher.watch(18, Integer.valueOf(i));
+        this.datawatcher.watch(18, i);
     }
 
     public void addScore(int i) {
         int j = this.getScore();
 
-        this.datawatcher.watch(18, Integer.valueOf(j + i));
+        this.datawatcher.watch(18, j + i);
     }
 
     public void die(DamageSource damagesource) {
@@ -542,7 +542,7 @@ public abstract class EntityHuman extends EntityLiving {
     public void b(Entity entity, int i) {
         this.addScore(i);
         // CraftBukkit - Get our scores instead
-        Collection collection = this.world.getServer().getScoreboardManager().getScoreboardScores(IScoreboardCriteria.f, this.getName(), new java.util.ArrayList());
+        Collection collection = this.world.getServer().getScoreboardManager().getScoreboardScores(IScoreboardCriteria.f, this.getName(), new java.util.ArrayList<>());
 
         if (entity instanceof EntityHuman) {
             this.b(StatisticList.B);
@@ -553,11 +553,8 @@ public abstract class EntityHuman extends EntityLiving {
             this.b(StatisticList.z);
         }
 
-        Iterator iterator = collection.iterator();
-
-        while (iterator.hasNext()) {
-            ScoreboardScore scoreboardscore = (ScoreboardScore) iterator.next(); // CraftBukkit - Use our scores instead
-
+        // CraftBukkit - Use our scores instead
+        for (ScoreboardScore scoreboardscore : collection) {
             scoreboardscore.incrementScore();
         }
 
@@ -570,10 +567,8 @@ public abstract class EntityHuman extends EntityLiving {
             int i = scoreboardteam.l().b();
 
             if (i >= 0 && i < IScoreboardCriteria.i.length) {
-                Iterator iterator = this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.i[i]).iterator();
 
-                while (iterator.hasNext()) {
-                    ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
+                for (ScoreboardObjective scoreboardobjective : this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.i[i])) {
                     ScoreboardScore scoreboardscore = this.getScoreboard().getPlayerScoreForObjective(entity.getName(), scoreboardobjective);
 
                     scoreboardscore.incrementScore();
@@ -894,9 +889,7 @@ public abstract class EntityHuman extends EntityLiving {
         ItemStack[] aitemstack = this.inventory.armor;
         int j = aitemstack.length;
 
-        for (int k = 0; k < j; ++k) {
-            ItemStack itemstack = aitemstack[k];
-
+        for (ItemStack itemstack : aitemstack) {
             if (itemstack != null) {
                 ++i;
             }
@@ -1304,7 +1297,7 @@ public abstract class EntityHuman extends EntityLiving {
         IBlockData iblockdata = this.world.getType(this.bx);
 
         if (this.bx != null && iblockdata.getBlock() == Blocks.BED) {
-            this.world.setTypeAndData(this.bx, iblockdata.set(BlockBed.OCCUPIED, Boolean.valueOf(false)), 4);
+            this.world.setTypeAndData(this.bx, iblockdata.set(BlockBed.OCCUPIED, Boolean.FALSE), 4);
             BlockPosition blockposition = BlockBed.a(this.world, this.bx, 0);
 
             if (blockposition == null) {
@@ -1519,7 +1512,7 @@ public abstract class EntityHuman extends EntityLiving {
             this.b(AchievementList.s);
         }
 
-        EntityTypes.MonsterEggInfo entitytypes_monsteregginfo = EntityTypes.eggInfo.get(Integer.valueOf(EntityTypes.a(entityliving)));
+        EntityTypes.MonsterEggInfo entitytypes_monsteregginfo = EntityTypes.eggInfo.get(EntityTypes.a(entityliving));
 
         if (entitytypes_monsteregginfo != null) {
             this.b(entitytypes_monsteregginfo.killEntityStatistic);
@@ -1676,7 +1669,7 @@ public abstract class EntityHuman extends EntityLiving {
 
         this.f = entityhuman.f;
         this.enderChest = entityhuman.enderChest;
-        this.getDataWatcher().watch(10, Byte.valueOf(entityhuman.getDataWatcher().getByte(10)));
+        this.getDataWatcher().watch(10, entityhuman.getDataWatcher().getByte(10));
     }
 
     protected boolean s_() {
@@ -1760,7 +1753,7 @@ public abstract class EntityHuman extends EntityLiving {
             f = 0.0F;
         }
         float previous = getAbsorptionHearts(); // ImHacking
-        this.getDataWatcher().watch(17, Float.valueOf(f));
+        this.getDataWatcher().watch(17, f);
         // ImHacking Start - Player Health Change Event
         if (previous != f) {
             Bukkit.getPluginManager().callEvent(new PlayerHealthChangeEvent(((CraftPlayer) getBukkitEntity()), previous, getHealth()));
@@ -1834,10 +1827,8 @@ public abstract class EntityHuman extends EntityLiving {
             EntityHuman.EnumChatVisibility[] aentityhuman_enumchatvisibility = values();
             int i = aentityhuman_enumchatvisibility.length;
 
-            for (int j = 0; j < i; ++j) {
-                EntityHuman.EnumChatVisibility entityhuman_enumchatvisibility = aentityhuman_enumchatvisibility[j];
-
-                EntityHuman.EnumChatVisibility.d[entityhuman_enumchatvisibility.e] = entityhuman_enumchatvisibility;
+            for (EnumChatVisibility entityhuman_enumchatvisibility : aentityhuman_enumchatvisibility) {
+                EnumChatVisibility.d[entityhuman_enumchatvisibility.e] = entityhuman_enumchatvisibility;
             }
 
         }
@@ -1866,22 +1857,22 @@ public abstract class EntityHuman extends EntityLiving {
         static {
             try {
                 EntityHuman.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityHuman.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityHuman.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityHuman.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityInsentient.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityInsentient.java
index c4ba464..f9e8cae 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -132,7 +132,7 @@ public abstract class EntityInsentient extends EntityLiving {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(15, Byte.valueOf((byte) 0));
+        this.datawatcher.a(15, (byte) 0);
     }
 
     public int w() {
@@ -245,10 +245,10 @@ public abstract class EntityInsentient extends EntityLiving {
 
         NBTTagCompound nbttagcompound1;
 
-        for (int i = 0; i < this.equipment.length; ++i) {
+        for (ItemStack itemStack : this.equipment) {
             nbttagcompound1 = new NBTTagCompound();
-            if (this.equipment[i] != null) {
-                this.equipment[i].save(nbttagcompound1);
+            if (itemStack != null) {
+                itemStack.save(nbttagcompound1);
             }
 
             nbttaglist.add(nbttagcompound1);
@@ -257,8 +257,8 @@ public abstract class EntityInsentient extends EntityLiving {
         nbttagcompound.set("Equipment", nbttaglist);
         NBTTagList nbttaglist1 = new NBTTagList();
 
-        for (int j = 0; j < this.dropChances.length; ++j) {
-            nbttaglist1.add(new NBTTagFloat(this.dropChances[j]));
+        for (float dropChance : this.dropChances) {
+            nbttaglist1.add(new NBTTagFloat(dropChance));
         }
 
         nbttagcompound.set("DropChances", nbttaglist1);
@@ -347,10 +347,9 @@ public abstract class EntityInsentient extends EntityLiving {
         this.world.methodProfiler.a("looting");
         if (!this.world.isClientSide && this.bY() && !this.aP && this.world.getGameRules().getBoolean("mobGriefing")) {
             List list = this.world.a(EntityItem.class, this.getBoundingBox().grow(1.0D, 0.0D, 1.0D));
-            Iterator iterator = list.iterator();
 
-            while (iterator.hasNext()) {
-                EntityItem entityitem = (EntityItem) iterator.next();
+            for (Object o : list) {
+                EntityItem entityitem = (EntityItem) o;
 
                 if (!entityitem.dead && entityitem.getItemStack() != null && !entityitem.s()) {
                     this.a(entityitem);
@@ -412,7 +411,7 @@ public abstract class EntityInsentient extends EntityLiving {
                     EntityHuman entityhuman = this.world.a(entityitem.n());
 
                     if (entityhuman != null) {
-                        entityhuman.b((Statistic) AchievementList.x);
+                        entityhuman.b(AchievementList.x);
                     }
                 }
 
@@ -522,7 +521,7 @@ public abstract class EntityInsentient extends EntityLiving {
             d2 = (entity.getBoundingBox().b + entity.getBoundingBox().e) / 2.0D - (this.locY + (double) this.getHeadHeight());
         }
 
-        double d3 = (double) MathHelper.sqrt(d0 * d0 + d1 * d1);
+        double d3 = MathHelper.sqrt(d0 * d0 + d1 * d1);
         float f2 = (float) (MathHelper.b(d1, d0) * 180.0D / 3.1415927410125732D) - 90.0F;
         float f3 = (float) (-(MathHelper.b(d2, d3) * 180.0D / 3.1415927410125732D));
 
@@ -549,7 +548,7 @@ public abstract class EntityInsentient extends EntityLiving {
     }
 
     public boolean canSpawn() {
-        return this.world.a(this.getBoundingBox(), (Entity) this) && this.world.getCubes(this, this.getBoundingBox()).isEmpty() && !this.world.containsLiquid(this.getBoundingBox());
+        return this.world.a(this.getBoundingBox(), this) && this.world.getCubes(this, this.getBoundingBox()).isEmpty() && !this.world.containsLiquid(this.getBoundingBox());
     }
 
     public int bV() {
@@ -822,7 +821,7 @@ public abstract class EntityInsentient extends EntityLiving {
                 }
             }
 
-            return this.a(entityhuman) ? true : super.e(entityhuman);
+            return this.a(entityhuman) || super.e(entityhuman);
         }
     }
 
@@ -857,7 +856,7 @@ public abstract class EntityInsentient extends EntityLiving {
             }
 
             if (!this.world.isClientSide && flag && this.world instanceof WorldServer) {
-                ((WorldServer) this.world).getTracker().a((Entity) this, (Packet) (new PacketPlayOutAttachEntity(1, this, (Entity) null)));
+                ((WorldServer) this.world).getTracker().a(this, new PacketPlayOutAttachEntity(1, this, null));
             }
         }
 
@@ -879,7 +878,7 @@ public abstract class EntityInsentient extends EntityLiving {
         this.bo = true;
         this.bp = entity;
         if (!this.world.isClientSide && flag && this.world instanceof WorldServer) {
-            ((WorldServer) this.world).getTracker().a((Entity) this, (Packet) (new PacketPlayOutAttachEntity(1, this, this.bp)));
+            ((WorldServer) this.world).getTracker().a(this, new PacketPlayOutAttachEntity(1, this, this.bp));
         }
 
     }
@@ -889,10 +888,9 @@ public abstract class EntityInsentient extends EntityLiving {
             if (this.bq.hasKeyOfType("UUIDMost", 4) && this.bq.hasKeyOfType("UUIDLeast", 4)) {
                 UUID uuid = new UUID(this.bq.getLong("UUIDMost"), this.bq.getLong("UUIDLeast"));
                 List list = this.world.a(EntityLiving.class, this.getBoundingBox().grow(10.0D, 10.0D, 10.0D));
-                Iterator iterator = list.iterator();
 
-                while (iterator.hasNext()) {
-                    EntityLiving entityliving = (EntityLiving) iterator.next();
+                for (Object o : list) {
+                    EntityLiving entityliving = (EntityLiving) o;
 
                     if (entityliving.getUniqueID().equals(uuid)) {
                         this.setLeashHolder(entityliving, true); // Migot
@@ -944,7 +942,7 @@ public abstract class EntityInsentient extends EntityLiving {
     }
 
     public void k(boolean flag) {
-        this.datawatcher.watch(15, Byte.valueOf((byte) (flag ? 1 : 0)));
+        this.datawatcher.watch(15, (byte) (flag ? 1 : 0));
     }
 
     public boolean ce() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityIronGolem.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityIronGolem.java
index ba09cb2..f9bbd78 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityIronGolem.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityIronGolem.java
@@ -12,7 +12,7 @@ public class EntityIronGolem extends EntityGolem {
     public EntityIronGolem(World world) {
         super(world);
         this.setSize(1.4F, 2.9F);
-        ((Navigation) this.getNavigation()).a(true);
+        this.getNavigation().a(true);
         this.goalSelector.a(1, new PathfinderGoalMeleeAttack(this, 1.0D, true));
         this.goalSelector.a(2, new PathfinderGoalMoveTowardsTarget(this, 0.9D, 32.0F));
         this.goalSelector.a(3, new PathfinderGoalMoveThroughVillage(this, 0.6D, true));
@@ -28,7 +28,7 @@ public class EntityIronGolem extends EntityGolem {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, Byte.valueOf((byte) 0));
+        this.datawatcher.a(16, (byte) 0);
     }
 
     protected void E() {
@@ -90,7 +90,7 @@ public class EntityIronGolem extends EntityGolem {
     }
 
     public boolean a(Class oclass) {
-        return this.isPlayerCreated() && EntityHuman.class.isAssignableFrom(oclass) ? false : (oclass == EntityCreeper.class ? false : super.a(oclass));
+        return (!this.isPlayerCreated() || !EntityHuman.class.isAssignableFrom(oclass)) && (oclass != EntityCreeper.class && super.a(oclass));
     }
 
     public void b(NBTTagCompound nbttagcompound) {
@@ -110,7 +110,7 @@ public class EntityIronGolem extends EntityGolem {
 
         if (flag) {
             entity.motY += 0.4000000059604645D;
-            this.a((EntityLiving) this, entity);
+            this.a(this, entity);
         }
 
         this.makeSound("mob.irongolem.throw", 1.0F, 1.0F);
@@ -167,9 +167,9 @@ public class EntityIronGolem extends EntityGolem {
         byte b0 = this.datawatcher.getByte(16);
 
         if (flag) {
-            this.datawatcher.watch(16, Byte.valueOf((byte) (b0 | 1)));
+            this.datawatcher.watch(16, (byte) (b0 | 1));
         } else {
-            this.datawatcher.watch(16, Byte.valueOf((byte) (b0 & -2)));
+            this.datawatcher.watch(16, (byte) (b0 & -2));
         }
 
     }
@@ -207,7 +207,7 @@ public class EntityIronGolem extends EntityGolem {
                                     f = 0.1F;
                                 }
 
-                                d0 *= (double) (0.7F * f);
+                                d0 *= 0.7F * f;
                             }
 
                             if ((double) t0.g(entitycreature) > d0) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityItem.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityItem.java
index bb2710f..573591b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityItem.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityItem.java
@@ -30,9 +30,9 @@ public class EntityItem extends Entity implements HopperPusher {
         this.setSize(0.25F, 0.25F);
         this.setPosition(d0, d1, d2);
         this.yaw = (float) (Math.random() * 360.0D);
-        this.motX = (double) ((float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D));
+        this.motX = (float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D);
         this.motY = 0.20000000298023224D;
-        this.motZ = (double) ((float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D));
+        this.motZ = (float) (Math.random() * 0.20000000298023224D - 0.10000000149011612D);
     }
 
     public EntityItem(World world, double d0, double d1, double d2, ItemStack itemstack) {
@@ -86,8 +86,8 @@ public class EntityItem extends Entity implements HopperPusher {
             if (flag || this.ticksLived % 25 == 0) {
                 if (this.world.getType(new BlockPosition(this)).getBlock().getMaterial() == Material.LAVA) {
                     this.motY = 0.20000000298023224D;
-                    this.motX = (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
-                    this.motZ = (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.2F);
+                    this.motX = (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
+                    this.motZ = (this.random.nextFloat() - this.random.nextFloat()) * 0.2F;
                     this.makeSound("random.fizz", 0.4F, 2.0F + this.random.nextFloat() * 0.4F);
                 }
 
@@ -102,9 +102,9 @@ public class EntityItem extends Entity implements HopperPusher {
                 f = this.world.getType(new BlockPosition(MathHelper.floor(this.locX), MathHelper.floor(this.getBoundingBox().b) - 1, MathHelper.floor(this.locZ))).getBlock().frictionFactor * 0.98F;
             }
 
-            this.motX *= (double) f;
+            this.motX *= f;
             this.motY *= 0.9800000190734863D;
-            this.motZ *= (double) f;
+            this.motZ *= f;
             if (this.onGround) {
                 this.motY *= -0.5D;
             }
@@ -158,12 +158,9 @@ public class EntityItem extends Entity implements HopperPusher {
     private void w() {
         // Spigot start
         double radius = world.spigotConfig.itemMerge;
-        Iterator iterator = this.world.a(EntityItem.class, this.getBoundingBox().grow(radius, radius, radius)).iterator();
         // Spigot end
 
-        while (iterator.hasNext()) {
-            EntityItem entityitem = (EntityItem) iterator.next();
-
+        for (EntityItem entityitem : this.world.a(EntityItem.class, this.getBoundingBox().grow(radius, radius, radius))) {
             this.a(entityitem);
         }
 
@@ -219,7 +216,7 @@ public class EntityItem extends Entity implements HopperPusher {
     }
 
     public boolean W() {
-        if (this.world.a(this.getBoundingBox(), Material.WATER, (Entity) this)) {
+        if (this.world.a(this.getBoundingBox(), Material.WATER, this)) {
             if (!this.inWater && !this.justCreated) {
                 this.X();
             }
@@ -258,7 +255,7 @@ public class EntityItem extends Entity implements HopperPusher {
     }
 
     public void b(NBTTagCompound nbttagcompound) {
-        nbttagcompound.setShort("Health", (short) ((byte) this.e));
+        nbttagcompound.setShort("Health", (byte) this.e);
         nbttagcompound.setShort("Age", (short) this.age);
         nbttagcompound.setShort("PickupDelay", (short) this.pickupDelay);
         if (this.n() != null) {
@@ -337,30 +334,30 @@ public class EntityItem extends Entity implements HopperPusher {
 
             if (this.pickupDelay == 0 && (this.g == null || 6000 - this.age <= 200 || this.g.equals(entityhuman.getName())) && entityhuman.inventory.pickup(itemstack)) {
                 if (itemstack.getItem() == Item.getItemOf(Blocks.LOG)) {
-                    entityhuman.b((Statistic) AchievementList.g);
+                    entityhuman.b(AchievementList.g);
                 }
 
                 if (itemstack.getItem() == Item.getItemOf(Blocks.LOG2)) {
-                    entityhuman.b((Statistic) AchievementList.g);
+                    entityhuman.b(AchievementList.g);
                 }
 
                 if (itemstack.getItem() == Items.LEATHER) {
-                    entityhuman.b((Statistic) AchievementList.t);
+                    entityhuman.b(AchievementList.t);
                 }
 
                 if (itemstack.getItem() == Items.DIAMOND) {
-                    entityhuman.b((Statistic) AchievementList.w);
+                    entityhuman.b(AchievementList.w);
                 }
 
                 if (itemstack.getItem() == Items.BLAZE_ROD) {
-                    entityhuman.b((Statistic) AchievementList.A);
+                    entityhuman.b(AchievementList.A);
                 }
 
                 if (itemstack.getItem() == Items.DIAMOND && this.n() != null) {
                     EntityHuman entityhuman1 = this.world.a(this.n());
 
                     if (entityhuman1 != null && entityhuman1 != entityhuman) {
-                        entityhuman1.b((Statistic) AchievementList.x);
+                        entityhuman1.b(AchievementList.x);
                     }
                 }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityItemFrame.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityItemFrame.java
index 1008567..374b822 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityItemFrame.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityItemFrame.java
@@ -18,7 +18,7 @@ public class EntityItemFrame extends EntityHanging {
 
     protected void h() {
         this.getDataWatcher().add(8, 5);
-        this.getDataWatcher().a(9, Byte.valueOf((byte) 0));
+        this.getDataWatcher().a(9, (byte) 0);
     }
 
     public float ao() {
@@ -36,7 +36,7 @@ public class EntityItemFrame extends EntityHanging {
                 }
                 // CraftBukkit end
                 this.a(damagesource.getEntity(), false);
-                this.setItem((ItemStack) null);
+                this.setItem(null);
             }
 
             return true;
@@ -127,7 +127,7 @@ public class EntityItemFrame extends EntityHanging {
     }
 
     private void setRotation(int i, boolean flag) {
-        this.getDataWatcher().watch(9, Byte.valueOf((byte) (i % 8)));
+        this.getDataWatcher().watch(9, (byte) (i % 8));
         if (flag && this.blockPosition != null) {
             this.world.updateAdjacentComparators(this.blockPosition, Blocks.AIR);
         }
@@ -169,7 +169,7 @@ public class EntityItemFrame extends EntityHanging {
             if (itemstack != null && !this.world.isClientSide) {
                 this.setItem(itemstack);
                 if (!entityhuman.abilities.canInstantlyBuild && --itemstack.count <= 0) {
-                    entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                    entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
                 }
             }
         } else if (!this.world.isClientSide) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityLightning.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityLightning.java
index 286fdef..b5874c2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityLightning.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityLightning.java
@@ -70,7 +70,7 @@ public class EntityLightning extends EntityWeather {
             // CraftBukkit start - Use relative location for far away sounds
             //this.world.makeSound(this.locX, this.locY, this.locZ, "ambient.weather.thunder", 10000.0F, 0.8F + this.random.nextFloat() * 0.2F);
             float pitch = 0.8F + this.random.nextFloat() * 0.2F;
-            int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16;
+            int viewDistance = this.world.getServer().getViewDistance() * 16;
             for (EntityPlayer player : (List) (List) this.world.players) {
                 double deltaX = this.locX - player.locX;
                 double deltaZ = this.locZ - player.locZ;
@@ -116,8 +116,8 @@ public class EntityLightning extends EntityWeather {
                 double d0 = 3.0D;
                 List list = this.world.getEntities(this, new AxisAlignedBB(this.locX - d0, this.locY - d0, this.locZ - d0, this.locX + d0, this.locY + 6.0D + d0, this.locZ + d0));
 
-                for (int i = 0; i < list.size(); ++i) {
-                    Entity entity = (Entity) list.get(i);
+                for (Object o : list) {
+                    Entity entity = (Entity) o;
 
                     entity.onLightningStrike(this);
                 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityLiving.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityLiving.java
index 57431b8..2d8e90b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityLiving.java
@@ -126,10 +126,10 @@ public abstract class EntityLiving extends Entity {
     }
 
     protected void h() {
-        this.datawatcher.a(7, Integer.valueOf(0));
-        this.datawatcher.a(8, Byte.valueOf((byte) 0));
-        this.datawatcher.a(9, Byte.valueOf((byte) 0));
-        this.datawatcher.a(6, Float.valueOf(1.0F));
+        this.datawatcher.a(7, 0);
+        this.datawatcher.a(8, (byte) 0);
+        this.datawatcher.a(9, (byte) 0);
+        this.datawatcher.a(6, 1.0F);
     }
 
     protected void initAttributes() {
@@ -149,7 +149,7 @@ public abstract class EntityLiving extends Entity {
             float f = (float) MathHelper.f(this.fallDistance - 3.0F);
 
             if (block1.getMaterial() != Material.AIR) {
-                double d1 = (double) Math.min(0.2F + f / 15.0F, 10.0F);
+                double d1 = Math.min(0.2F + f / 15.0F, 10.0F);
 
                 if (d1 > 2.5D) {
                     d1 = 2.5D;
@@ -188,7 +188,7 @@ public abstract class EntityLiving extends Entity {
             if (this.inBlock()) {
                 this.damageEntity(DamageSource.STUCK, 1.0F);
             } else if (flag && !this.world.getWorldBorder().a(this.getBoundingBox())) {
-                double d0 = this.world.getWorldBorder().a((Entity) this) + this.world.getWorldBorder().getDamageBuffer();
+                double d0 = this.world.getWorldBorder().a(this) + this.world.getWorldBorder().getDamageBuffer();
 
                 if (d0 < 0.0D) {
                     this.damageEntity(DamageSource.STUCK, (float) Math.max(1, MathHelper.floor(-d0 * this.world.getWorldBorder().getDamageAmount())));
@@ -222,7 +222,7 @@ public abstract class EntityLiving extends Entity {
                 }
 
                 if (!this.world.isClientSide && this.au() && this.vehicle instanceof EntityLiving) {
-                    this.mount((Entity) null);
+                    this.mount(null);
                 }
             } else {
                 // CraftBukkit start - Only set if needed to work around a DataWatcher inefficiency
@@ -380,7 +380,7 @@ public abstract class EntityLiving extends Entity {
 
     public void b(NBTTagCompound nbttagcompound) {
         nbttagcompound.setFloat("HealF", this.getHealth());
-        nbttagcompound.setShort("Health", (short) ((int) Math.ceil((double) this.getHealth())));
+        nbttagcompound.setShort("Health", (short) ((int) Math.ceil(this.getHealth())));
         nbttagcompound.setShort("HurtTime", (short) this.hurtTicks);
         nbttagcompound.setInt("HurtByTimestamp", this.hurtTimestamp);
         nbttagcompound.setShort("DeathTime", (short) this.deathTicks);
@@ -411,11 +411,8 @@ public abstract class EntityLiving extends Entity {
 
         if (!this.effects.isEmpty()) {
             NBTTagList nbttaglist = new NBTTagList();
-            Iterator iterator = this.effects.values().iterator();
-
-            while (iterator.hasNext()) {
-                MobEffect mobeffect = (MobEffect) iterator.next();
 
+            for (MobEffect mobeffect : this.effects.values()) {
                 nbttaglist.add(mobeffect.a(new NBTTagCompound()));
             }
 
@@ -438,7 +435,7 @@ public abstract class EntityLiving extends Entity {
                 MobEffect mobeffect = MobEffect.b(nbttagcompound1);
 
                 if (mobeffect != null) {
-                    this.effects.put(Integer.valueOf(mobeffect.getEffectId()), mobeffect);
+                    this.effects.put(mobeffect.getEffectId(), mobeffect);
                 }
             }
         }
@@ -449,7 +446,7 @@ public abstract class EntityLiving extends Entity {
             if (nbtbase.getTypeId() == 5) {
                 this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) ((NBTTagFloat) nbtbase).c());
             } else if (nbtbase.getTypeId() == 3) {
-                this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) ((NBTTagInt) nbtbase).d());
+                this.getAttributeInstance(GenericAttributes.maxHealth).setValue(((NBTTagInt) nbtbase).d());
             }
         }
         // CraftBukkit end
@@ -464,7 +461,7 @@ public abstract class EntityLiving extends Entity {
             } else if (nbtbase.getTypeId() == 5) {
                 this.setHealth(((NBTTagFloat) nbtbase).h());
             } else if (nbtbase.getTypeId() == 2) {
-                this.setHealth((float) ((NBTTagShort) nbtbase).e());
+                this.setHealth(((NBTTagShort) nbtbase).e());
             }
         }
 
@@ -484,7 +481,7 @@ public abstract class EntityLiving extends Entity {
         isTickingEffects = true; // CraftBukkit
         while (iterator.hasNext()) {
             Integer integer = (Integer) iterator.next();
-            MobEffect mobeffect = (MobEffect) this.effects.get(integer);
+            MobEffect mobeffect = this.effects.get(integer);
 
             if (!mobeffect.tick(this)) {
                 if (!this.world.isClientSide) {
@@ -540,7 +537,7 @@ public abstract class EntityLiving extends Entity {
             if (flag1 && i > 0) {
                 double d0 = (double) (i >> 16 & 255) / 255.0D;
                 double d1 = (double) (i >> 8 & 255) / 255.0D;
-                double d2 = (double) (i >> 0 & 255) / 255.0D;
+                double d2 = (double) (i & 255) / 255.0D;
 
                 this.world.addParticle(flag ? EnumParticle.SPELL_MOB_AMBIENT : EnumParticle.SPELL_MOB, this.locX + (this.random.nextDouble() - 0.5D) * (double) this.width, this.locY + this.random.nextDouble() * (double) this.length, this.locZ + (this.random.nextDouble() - 0.5D) * (double) this.width, d0, d1, d2, new int[0]);
             }
@@ -555,16 +552,16 @@ public abstract class EntityLiving extends Entity {
         } else {
             int i = PotionBrewer.a(this.effects.values());
 
-            this.datawatcher.watch(8, Byte.valueOf((byte) (PotionBrewer.b(this.effects.values()) ? 1 : 0)));
-            this.datawatcher.watch(7, Integer.valueOf(i));
+            this.datawatcher.watch(8, (byte) (PotionBrewer.b(this.effects.values()) ? 1 : 0));
+            this.datawatcher.watch(7, i);
             this.setInvisible(this.hasEffect(MobEffectList.INVISIBILITY.id));
         }
 
     }
 
     protected void bj() {
-        this.datawatcher.watch(8, Byte.valueOf((byte) 0));
-        this.datawatcher.watch(7, Integer.valueOf(0));
+        this.datawatcher.watch(8, (byte) 0);
+        this.datawatcher.watch(7, 0);
     }
 
     public void removeAllEffects() {
@@ -572,7 +569,7 @@ public abstract class EntityLiving extends Entity {
 
         while (iterator.hasNext()) {
             Integer integer = (Integer) iterator.next();
-            MobEffect mobeffect = (MobEffect) this.effects.get(integer);
+            MobEffect mobeffect = this.effects.get(integer);
 
             if (!this.world.isClientSide) {
                 iterator.remove();
@@ -588,15 +585,15 @@ public abstract class EntityLiving extends Entity {
 
     public boolean hasEffect(int i) {
         // CraftBukkit - Add size check for efficiency
-        return this.effects.size() != 0 && this.effects.containsKey(Integer.valueOf(i));
+        return this.effects.size() != 0 && this.effects.containsKey(i);
     }
 
     public boolean hasEffect(MobEffectList mobeffectlist) {
-        return this.effects.containsKey(Integer.valueOf(mobeffectlist.id));
+        return this.effects.containsKey(mobeffectlist.id);
     }
 
     public MobEffect getEffect(MobEffectList mobeffectlist) {
-        return (MobEffect) this.effects.get(Integer.valueOf(mobeffectlist.id));
+        return this.effects.get(mobeffectlist.id);
     }
 
     public void addEffect(MobEffect mobeffect) {
@@ -632,11 +629,11 @@ public abstract class EntityLiving extends Entity {
                 this.a(mobeffect);
             }
 
-            if (this.effects.containsKey(Integer.valueOf(mobeffect.getEffectId()))) {
-                ((MobEffect) this.effects.get(Integer.valueOf(mobeffect.getEffectId()))).a(mobeffect);
-                this.a((MobEffect) this.effects.get(Integer.valueOf(mobeffect.getEffectId())), true);
+            if (this.effects.containsKey(mobeffect.getEffectId())) {
+                this.effects.get(mobeffect.getEffectId()).a(mobeffect);
+                this.a(this.effects.get(mobeffect.getEffectId()), true);
             } else {
-                this.effects.put(Integer.valueOf(mobeffect.getEffectId()), mobeffect);
+                this.effects.put(mobeffect.getEffectId(), mobeffect);
                 this.a(mobeffect);
             }
 
@@ -666,7 +663,7 @@ public abstract class EntityLiving extends Entity {
             return;
         }
         // CraftBukkit end
-        MobEffect mobeffect = (MobEffect) this.effects.remove(Integer.valueOf(i));
+        MobEffect mobeffect = this.effects.remove(i);
 
         if (mobeffect != null) {
             PotionEffectRemoveEvent event = new PotionEffectRemoveEvent((LivingEntity) this.getBukkitEntity(), CraftPotionUtil.toBukkit(mobeffect));
@@ -747,11 +744,11 @@ public abstract class EntityLiving extends Entity {
                 player.setRealHealth(f);
             }
 
-            this.datawatcher.watch(6, Float.valueOf(player.getScaledHealth()));
+            this.datawatcher.watch(6, player.getScaledHealth());
             return;
         }
         // CraftBukkit end
-        this.datawatcher.watch(6, Float.valueOf(MathHelper.a(f, 0.0F, this.getMaxHealth())));
+        this.datawatcher.watch(6, MathHelper.a(f, 0.0F, this.getMaxHealth()));
     }
 
     public boolean damageEntity(DamageSource damagesource, float f) {
@@ -919,7 +916,7 @@ public abstract class EntityLiving extends Entity {
             }
 
             if (this.ba() && this.world.getGameRules().getBoolean("doMobLoot")) {
-                this.drops = new ArrayList(); // CraftBukkit - Setup drop capture
+                this.drops = new ArrayList<>(); // CraftBukkit - Setup drop capture
                 
                 this.dropDeathLoot(this.lastDamageByPlayerTime > 0, i);
                 this.dropEquipment(this.lastDamageByPlayerTime > 0, i);
@@ -1027,9 +1024,7 @@ public abstract class EntityLiving extends Entity {
         ItemStack[] aitemstack = this.getEquipment();
         int j = aitemstack.length;
 
-        for (int k = 0; k < j; ++k) {
-            ItemStack itemstack = aitemstack[k];
-
+        for (ItemStack itemstack : aitemstack) {
             if (itemstack != null && itemstack.getItem() instanceof ItemArmor) {
                 int l = ((ItemArmor) itemstack.getItem()).c;
 
@@ -1094,71 +1089,47 @@ public abstract class EntityLiving extends Entity {
        if (!this.isInvulnerable(damagesource)) {
             final boolean human = this instanceof EntityHuman;
             float originalDamage = f;
-            Function hardHat = new Function() {
-                @Override
-                public Double apply(Double f) {
-                    if ((damagesource == DamageSource.ANVIL || damagesource == DamageSource.FALLING_BLOCK) && EntityLiving.this.getEquipment(4) != null) {
-                        return -(f - (f * 0.75F));
-                    }
-                    return -0.0;
+            Function hardHat = f17 -> {
+                if ((damagesource == DamageSource.ANVIL || damagesource == DamageSource.FALLING_BLOCK) && EntityLiving.this.getEquipment(4) != null) {
+                    return -(f17 - (f17 * 0.75F));
                 }
+                return -0.0;
             };
             float hardHatModifier = hardHat.apply((double) f).floatValue();
             f += hardHatModifier;
 
-            Function blocking = new Function() {
-                @Override
-                public Double apply(Double f) {
-                    if (human) {
-                        if (!damagesource.ignoresArmor() && ((EntityHuman) EntityLiving.this).isBlocking() && f > 0.0F) {
-                            return -(f - ((1.0F + f) * 0.5F));
-                        }
+            Function blocking = f16 -> {
+                if (human) {
+                    if (!damagesource.ignoresArmor() && ((EntityHuman) EntityLiving.this).isBlocking() && f16 > 0.0F) {
+                        return -(f16 - ((1.0F + f16) * 0.5F));
                     }
-                    return -0.0;
                 }
+                return -0.0;
             };
             float blockingModifier = blocking.apply((double) f).floatValue();
             f += blockingModifier;
 
-            Function armor = new Function() {
-                @Override
-                public Double apply(Double f) {
-                    return -(f - EntityLiving.this.applyArmorModifier(damagesource, f.floatValue()));
-                }
-            };
+            Function armor = f15 -> -(f15 - EntityLiving.this.applyArmorModifier(damagesource, f15.floatValue()));
             float armorModifier = armor.apply((double) f).floatValue();
             f += armorModifier;
 
-            Function resistance = new Function() {
-                @Override
-                public Double apply(Double f) {
-                    if (!damagesource.isStarvation() && EntityLiving.this.hasEffect(MobEffectList.RESISTANCE) && damagesource != DamageSource.OUT_OF_WORLD) {
-                        int i = (EntityLiving.this.getEffect(MobEffectList.RESISTANCE).getAmplifier() + 1) * 5;
-                        int j = 25 - i;
-                        float f1 = f.floatValue() * (float) j;
-                        return -(f - (f1 / 25.0F));
-                    }
-                    return -0.0;
+            Function resistance = f14 -> {
+                if (!damagesource.isStarvation() && EntityLiving.this.hasEffect(MobEffectList.RESISTANCE) && damagesource != DamageSource.OUT_OF_WORLD) {
+                    int i = (EntityLiving.this.getEffect(MobEffectList.RESISTANCE).getAmplifier() + 1) * 5;
+                    int j = 25 - i;
+                    float f1 = f14.floatValue() * (float) j;
+                    return -(f14 - (f1 / 25.0F));
                 }
+                return -0.0;
             };
             float resistanceModifier = resistance.apply((double) f).floatValue();
             f += resistanceModifier;
 
-            Function magic = new Function() {
-                @Override
-                public Double apply(Double f) {
-                    return -(f - EntityLiving.this.applyMagicModifier(damagesource, f.floatValue()));
-                }
-            };
+            Function magic = f13 -> -(f13 - EntityLiving.this.applyMagicModifier(damagesource, f13.floatValue()));
             float magicModifier = magic.apply((double) f).floatValue();
             f += magicModifier;
 
-            Function absorption = new Function() {
-                @Override
-                public Double apply(Double f) {
-                    return -(Math.max(f - Math.max(f - EntityLiving.this.getAbsorptionHearts(), 0.0F), 0.0F));
-                }
-            };
+            Function absorption = f12 -> -(Math.max(f12 - Math.max(f12 - EntityLiving.this.getAbsorptionHearts(), 0.0F), 0.0F));
             float absorptionModifier = absorption.apply((double) f).floatValue();
 
             EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
@@ -1214,7 +1185,7 @@ public abstract class EntityLiving extends Entity {
     }
 
     public EntityLiving bt() {
-        return (EntityLiving) (this.combatTracker.c() != null ? this.combatTracker.c() : (this.killer != null ? this.killer : (this.lastDamager != null ? this.lastDamager : null)));
+        return this.combatTracker.c() != null ? this.combatTracker.c() : (this.killer != null ? this.killer : (this.lastDamager != null ? this.lastDamager : null));
     }
 
     public final float getMaxHealth() {
@@ -1237,7 +1208,7 @@ public abstract class EntityLiving extends Entity {
     }
     // TacoSpigot end
     public final void o(int i) {
-        this.datawatcher.watch(9, Byte.valueOf((byte) i));
+        this.datawatcher.watch(9, (byte) i);
     }
 
     private int n() {
@@ -1249,7 +1220,7 @@ public abstract class EntityLiving extends Entity {
             this.as = -1;
             this.ar = true;
             if (this.world instanceof WorldServer) {
-                ((WorldServer) this.world).getTracker().a((Entity) this, (Packet) (new PacketPlayOutAnimation(this, 0)));
+                ((WorldServer) this.world).getTracker().a(this, new PacketPlayOutAnimation(this, 0));
             }
         }
 
@@ -1336,15 +1307,15 @@ public abstract class EntityLiving extends Entity {
                 if (i != 0 || j != 0) {
                     int k = (int) (this.locX + (double) i);
                     int l = (int) (this.locZ + (double) j);
-                    AxisAlignedBB axisalignedbb = this.getBoundingBox().c((double) i, 1.0D, (double) j);
+                    AxisAlignedBB axisalignedbb = this.getBoundingBox().c(i, 1.0D, j);
 
                     if (this.world.a(axisalignedbb).isEmpty()) {
-                        if (World.a((IBlockAccess) this.world, new BlockPosition(k, (int) this.locY, l))) {
+                        if (World.a(this.world, new BlockPosition(k, (int) this.locY, l))) {
                             this.enderTeleportTo(this.locX + (double) i, this.locY + 1.0D, this.locZ + (double) j);
                             return;
                         }
 
-                        if (World.a((IBlockAccess) this.world, new BlockPosition(k, (int) this.locY - 1, l)) || this.world.getType(new BlockPosition(k, (int) this.locY - 1, l)).getBlock().getMaterial() == Material.WATER) {
+                        if (World.a(this.world, new BlockPosition(k, (int) this.locY - 1, l)) || this.world.getType(new BlockPosition(k, (int) this.locY - 1, l)).getBlock().getMaterial() == Material.WATER) {
                             d0 = this.locX + (double) i;
                             d1 = this.locY + 1.0D;
                             d2 = this.locZ + (double) j;
@@ -1362,16 +1333,16 @@ public abstract class EntityLiving extends Entity {
     }
 
     protected void bF() {
-        this.motY = (double) this.bE();
+        this.motY = this.bE();
         if (this.hasEffect(MobEffectList.JUMP)) {
-            this.motY += (double) ((float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F);
+            this.motY += (float) (this.getEffect(MobEffectList.JUMP).getAmplifier() + 1) * 0.1F;
         }
 
         if (this.isSprinting()) {
             float f = this.yaw * 0.017453292F;
 
-            this.motX -= (double) (MathHelper.sin(f) * 0.2F);
-            this.motZ += (double) (MathHelper.cos(f) * 0.2F);
+            this.motX -= MathHelper.sin(f) * 0.2F;
+            this.motZ += MathHelper.cos(f) * 0.2F;
         }
 
         this.ai = true;
@@ -1413,9 +1384,9 @@ public abstract class EntityLiving extends Entity {
 
                 this.a(f, f1, f4);
                 this.move(this.motX, this.motY, this.motZ);
-                this.motX *= (double) f3;
+                this.motX *= f3;
                 this.motY *= 0.800000011920929D;
-                this.motZ *= (double) f3;
+                this.motZ *= f3;
                 this.motY -= 0.02D;
                 if (this.positionChanged && this.c(this.motX, this.motY + 0.6000000238418579D - this.locY + d0, this.motZ)) {
                     this.motY = 0.30000001192092896D;
@@ -1454,8 +1425,8 @@ public abstract class EntityLiving extends Entity {
 
                 if (this.k_()) {
                     f4 = 0.15F;
-                    this.motX = MathHelper.a(this.motX, (double) (-f4), (double) f4);
-                    this.motZ = MathHelper.a(this.motZ, (double) (-f4), (double) f4);
+                    this.motX = MathHelper.a(this.motX, -f4, f4);
+                    this.motZ = MathHelper.a(this.motZ, -f4, f4);
                     this.fallDistance = 0.0F;
                     if (this.motY < -0.15D) {
                         this.motY = -0.15D;
@@ -1484,8 +1455,8 @@ public abstract class EntityLiving extends Entity {
                 }
 
                 this.motY *= 0.9800000190734863D;
-                this.motX *= (double) f5;
-                this.motZ *= (double) f5;
+                this.motX *= f5;
+                this.motZ *= f5;
             }
         }
 
@@ -1540,7 +1511,7 @@ public abstract class EntityLiving extends Entity {
                 ItemStack itemstack1 = this.getEquipment(j);
 
                 if (!ItemStack.matches(itemstack1, itemstack)) {
-                    ((WorldServer) this.world).getTracker().a((Entity) this, (Packet) (new PacketPlayOutEntityEquipment(this.getId(), j, itemstack1)));
+                    ((WorldServer) this.world).getTracker().a(this, new PacketPlayOutEntityEquipment(this.getId(), j, itemstack1));
                     if (itemstack != null) {
                         this.c.a(itemstack.B());
                     }
@@ -1570,7 +1541,7 @@ public abstract class EntityLiving extends Entity {
 
         if (f > 0.0025000002F) {
             f3 = 1.0F;
-            f2 = (float) Math.sqrt((double) f) * 3.0F;
+            f2 = (float) Math.sqrt(f) * 3.0F;
             // CraftBukkit - Math -> TrigMath
             f1 = (float) org.bukkit.craftbukkit.TrigMath.atan2(d1, d0) * 180.0F / 3.1415927F - 90.0F;
         }
@@ -1736,7 +1707,7 @@ public abstract class EntityLiving extends Entity {
         if (!eSpigotFeature.ENTITY_COLLISION.isEnabled())
             return;
 
-        List list = this.world.a((Entity) this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D), Predicates.and(IEntitySelector.d, new Predicate() {
+        List list = this.world.a(this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D), Predicates.and(IEntitySelector.d, new Predicate() {
             public boolean a(Entity entity) {
                 return entity.ae();
             }
@@ -1748,9 +1719,11 @@ public abstract class EntityLiving extends Entity {
 
         if (this.ad() && !list.isEmpty()) { // Spigot: Add this.ad() condition
             numCollisions -= world.spigotConfig.maxCollisionsPerEntity; // Spigot
-            for (int i = 0; i < list.size(); ++i) {
-                if (numCollisions > world.spigotConfig.maxCollisionsPerEntity) { break; } // Spigot
-                Entity entity = (Entity) list.get(i);
+            for (Object o : list) {
+                if (numCollisions > world.spigotConfig.maxCollisionsPerEntity) {
+                    break;
+                } // Spigot
+                Entity entity = (Entity) o;
 
                 // TODO better check now?
                 // CraftBukkit start - Only handle mob (non-player) collisions every other tick
@@ -1824,15 +1797,15 @@ public abstract class EntityLiving extends Entity {
             EntityTracker entitytracker = ((WorldServer) this.world).getTracker();
 
             if (entity instanceof EntityItem) {
-                entitytracker.a(entity, (Packet) (new PacketPlayOutCollect(entity.getId(), this.getId())));
+                entitytracker.a(entity, new PacketPlayOutCollect(entity.getId(), this.getId()));
             }
 
             if (entity instanceof EntityArrow) {
-                entitytracker.a(entity, (Packet) (new PacketPlayOutCollect(entity.getId(), this.getId())));
+                entitytracker.a(entity, new PacketPlayOutCollect(entity.getId(), this.getId()));
             }
 
             if (entity instanceof EntityExperienceOrb) {
-                entitytracker.a(entity, (Packet) (new PacketPlayOutCollect(entity.getId(), this.getId())));
+                entitytracker.a(entity, new PacketPlayOutCollect(entity.getId(), this.getId()));
             }
         }
 
@@ -1907,7 +1880,7 @@ public abstract class EntityLiving extends Entity {
     }
 
     public boolean a(ScoreboardTeamBase scoreboardteambase) {
-        return this.getScoreboardTeam() != null ? this.getScoreboardTeam().isAlly(scoreboardteambase) : false;
+        return this.getScoreboardTeam() != null && this.getScoreboardTeam().isAlly(scoreboardteambase);
     }
 
     public void enterCombat() {}
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
index 4bf790c..f5ada58 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
@@ -72,12 +72,12 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
     }
 
     protected void h() {
-        this.datawatcher.a(17, new Integer(0));
-        this.datawatcher.a(18, new Integer(1));
-        this.datawatcher.a(19, new Float(0.0F));
-        this.datawatcher.a(20, new Integer(0));
-        this.datawatcher.a(21, new Integer(6));
-        this.datawatcher.a(22, Byte.valueOf((byte) 0));
+        this.datawatcher.a(17, 0);
+        this.datawatcher.a(18, 1);
+        this.datawatcher.a(19, 0.0F);
+        this.datawatcher.a(20, 0);
+        this.datawatcher.a(21, 6);
+        this.datawatcher.a(22, (byte) 0);
     }
 
     public AxisAlignedBB j(Entity entity) {
@@ -144,7 +144,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
                     }
                     // CraftBukkit end
                     if (this.passenger != null) {
-                        this.passenger.mount((Entity) null);
+                        this.passenger.mount(null);
                     }
 
                     if (flag && !this.hasCustomName()) {
@@ -283,7 +283,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
             if (BlockMinecartTrackAbstract.d(iblockdata)) {
                 this.a(blockposition, iblockdata);
                 if (iblockdata.getBlock() == Blocks.ACTIVATOR_RAIL) {
-                    this.a(j, i, k, ((Boolean) iblockdata.get(BlockPoweredRail.POWERED)).booleanValue());
+                    this.a(j, i, k, iblockdata.get(BlockPoweredRail.POWERED));
                 }
             } else {
                 this.n();
@@ -301,7 +301,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
                 }
             }
 
-            double d6 = (double) MathHelper.g(this.yaw - this.lastYaw);
+            double d6 = MathHelper.g(this.yaw - this.lastYaw);
 
             if (d6 < -170.0D || d6 >= 170.0D) {
                 this.yaw += 180.0F;
@@ -323,11 +323,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
             }
             // CraftBukkit end
 
-            Iterator iterator = this.world.getEntities(this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D)).iterator();
-
-            while (iterator.hasNext()) {
-                Entity entity = (Entity) iterator.next();
-
+            for (Entity entity : this.world.getEntities(this, this.getBoundingBox().grow(0.20000000298023224D, 0.0D, 0.20000000298023224D))) {
                 if (entity != this.passenger && entity.ae() && entity instanceof EntityMinecartAbstract) {
                     entity.collide(this);
                 }
@@ -379,18 +375,18 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
         this.fallDistance = 0.0F;
         Vec3D vec3d = this.k(this.locX, this.locY, this.locZ);
 
-        this.locY = (double) blockposition.getY();
+        this.locY = blockposition.getY();
         boolean flag = false;
         boolean flag1 = false;
         BlockMinecartTrackAbstract blockminecarttrackabstract = (BlockMinecartTrackAbstract) iblockdata.getBlock();
 
         if (blockminecarttrackabstract == Blocks.GOLDEN_RAIL) {
-            flag = ((Boolean) iblockdata.get(BlockPoweredRail.POWERED)).booleanValue();
+            flag = iblockdata.get(BlockPoweredRail.POWERED);
             flag1 = !flag;
         }
 
         double d0 = 0.0078125D;
-        BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = (BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(blockminecarttrackabstract.n());
+        BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.get(blockminecarttrackabstract.n());
 
         switch (EntityMinecartAbstract.SyntheticClass_1.b[blockminecarttrackabstract_enumtrackposition.ordinal()]) {
         case 1:
@@ -414,8 +410,8 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
         }
 
         int[][] aint = EntityMinecartAbstract.matrix[blockminecarttrackabstract_enumtrackposition.a()];
-        double d1 = (double) (aint[1][0] - aint[0][0]);
-        double d2 = (double) (aint[1][2] - aint[0][2]);
+        double d1 = aint[1][0] - aint[0][0];
+        double d2 = aint[1][2] - aint[0][2];
         double d3 = Math.sqrt(d1 * d1 + d2 * d2);
         double d4 = this.motX * d1 + this.motZ * d2;
 
@@ -438,10 +434,10 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
         double d9;
 
         if (this.passenger instanceof EntityLiving) {
-            d6 = (double) ((EntityLiving) this.passenger).ba;
+            d6 = ((EntityLiving) this.passenger).ba;
             if (d6 > 0.0D) {
-                d7 = -Math.sin((double) (this.passenger.yaw * 3.1415927F / 180.0F));
-                d8 = Math.cos((double) (this.passenger.yaw * 3.1415927F / 180.0F));
+                d7 = -Math.sin(this.passenger.yaw * 3.1415927F / 180.0F);
+                d8 = Math.cos(this.passenger.yaw * 3.1415927F / 180.0F);
                 d9 = this.motX * this.motX + this.motZ * this.motZ;
                 if (d9 < 0.01D) {
                     this.motX += d7 * 0.1D;
@@ -592,7 +588,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
         IBlockData iblockdata = this.world.getType(new BlockPosition(i, j, k));
 
         if (BlockMinecartTrackAbstract.d(iblockdata)) {
-            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = (BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(((BlockMinecartTrackAbstract) iblockdata.getBlock()).n());
+            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.get(((BlockMinecartTrackAbstract) iblockdata.getBlock()).n());
             int[][] aint = EntityMinecartAbstract.matrix[blockminecarttrackabstract_enumtrackposition.a()];
             double d3 = 0.0D;
             double d4 = (double) i + 0.5D + (double) aint[0][0] * 0.5D;
@@ -669,7 +665,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
         if (this.x()) {
             nbttagcompound.setBoolean("CustomDisplayTile", true);
             IBlockData iblockdata = this.getDisplayBlock();
-            MinecraftKey minecraftkey = (MinecraftKey) Block.REGISTRY.c(iblockdata.getBlock());
+            MinecraftKey minecraftkey = Block.REGISTRY.c(iblockdata.getBlock());
 
             nbttagcompound.setString("DisplayTile", minecraftkey == null ? "" : minecraftkey.toString());
             nbttagcompound.setInt("DisplayData", iblockdata.getBlock().toLegacyData(iblockdata));
@@ -707,7 +703,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
 
                     // CraftBukkit - collision
                     if (d2 >= 9.999999747378752E-5D && !collisionEvent.isCollisionCancelled()) {
-                        d2 = (double) MathHelper.sqrt(d2);
+                        d2 = MathHelper.sqrt(d2);
                         d0 /= d2;
                         d1 /= d2;
                         double d3 = 1.0D / d2;
@@ -720,15 +716,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
                         d1 *= d3;
                         d0 *= 0.10000000149011612D;
                         d1 *= 0.10000000149011612D;
-                        d0 *= (double) (1.0F - this.U);
-                        d1 *= (double) (1.0F - this.U);
+                        d0 *= 1.0F - this.U;
+                        d1 *= 1.0F - this.U;
                         d0 *= 0.5D;
                         d1 *= 0.5D;
                         if (entity instanceof EntityMinecartAbstract) {
                             double d4 = entity.locX - this.locX;
                             double d5 = entity.locZ - this.locZ;
                             Vec3D vec3d = (new Vec3D(d4, 0.0D, d5)).a();
-                            Vec3D vec3d1 = (new Vec3D((double) MathHelper.cos(this.yaw * 3.1415927F / 180.0F), 0.0D, (double) MathHelper.sin(this.yaw * 3.1415927F / 180.0F))).a();
+                            Vec3D vec3d1 = (new Vec3D(MathHelper.cos(this.yaw * 3.1415927F / 180.0F), 0.0D, MathHelper.sin(this.yaw * 3.1415927F / 180.0F))).a();
                             double d6 = Math.abs(vec3d.b(vec3d1));
 
                             if (d6 < 0.800000011920929D) {
@@ -772,7 +768,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
     }
 
     public void setDamage(float f) {
-        this.datawatcher.watch(19, Float.valueOf(f));
+        this.datawatcher.watch(19, f);
     }
 
     public float getDamage() {
@@ -780,7 +776,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
     }
 
     public void j(int i) {
-        this.datawatcher.watch(17, Integer.valueOf(i));
+        this.datawatcher.watch(17, i);
     }
 
     public int getType() {
@@ -788,7 +784,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
     }
 
     public void k(int i) {
-        this.datawatcher.watch(18, Integer.valueOf(i));
+        this.datawatcher.watch(18, i);
     }
 
     public int r() {
@@ -814,12 +810,12 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
     }
 
     public void setDisplayBlock(IBlockData iblockdata) {
-        this.getDataWatcher().watch(20, Integer.valueOf(Block.getCombinedId(iblockdata)));
+        this.getDataWatcher().watch(20, Block.getCombinedId(iblockdata));
         this.a(true);
     }
 
     public void SetDisplayBlockOffset(int i) {
-        this.getDataWatcher().watch(21, Integer.valueOf(i));
+        this.getDataWatcher().watch(21, i);
         this.a(true);
     }
 
@@ -828,7 +824,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
     }
 
     public void a(boolean flag) {
-        this.getDataWatcher().watch(22, Byte.valueOf((byte) (flag ? 1 : 0)));
+        this.getDataWatcher().watch(22, (byte) (flag ? 1 : 0));
     }
 
     public void setCustomName(String s) {
@@ -871,64 +867,54 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
         static {
             try {
                 EntityMinecartAbstract.SyntheticClass_1.b[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_EAST.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityMinecartAbstract.SyntheticClass_1.b[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_WEST.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityMinecartAbstract.SyntheticClass_1.b[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_NORTH.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityMinecartAbstract.SyntheticClass_1.b[BlockMinecartTrackAbstract.EnumTrackPosition.ASCENDING_SOUTH.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             a = new int[EntityMinecartAbstract.EnumMinecartType.values().length];
 
             try {
                 EntityMinecartAbstract.SyntheticClass_1.a[EntityMinecartAbstract.EnumMinecartType.CHEST.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityMinecartAbstract.SyntheticClass_1.a[EntityMinecartAbstract.EnumMinecartType.FURNACE.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror5) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityMinecartAbstract.SyntheticClass_1.a[EntityMinecartAbstract.EnumMinecartType.TNT.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror6) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityMinecartAbstract.SyntheticClass_1.a[EntityMinecartAbstract.EnumMinecartType.SPAWNER.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror7) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityMinecartAbstract.SyntheticClass_1.a[EntityMinecartAbstract.EnumMinecartType.HOPPER.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror8) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 EntityMinecartAbstract.SyntheticClass_1.a[EntityMinecartAbstract.EnumMinecartType.COMMAND_BLOCK.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror9) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
@@ -956,7 +942,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
         }
 
         public static EntityMinecartAbstract.EnumMinecartType a(int i) {
-            EntityMinecartAbstract.EnumMinecartType entityminecartabstract_enumminecarttype = (EntityMinecartAbstract.EnumMinecartType) EntityMinecartAbstract.EnumMinecartType.h.get(Integer.valueOf(i));
+            EntityMinecartAbstract.EnumMinecartType entityminecartabstract_enumminecarttype = EnumMinecartType.h.get(i);
 
             return entityminecartabstract_enumminecarttype == null ? EntityMinecartAbstract.EnumMinecartType.RIDEABLE : entityminecartabstract_enumminecarttype;
         }
@@ -965,10 +951,8 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
             EntityMinecartAbstract.EnumMinecartType[] aentityminecartabstract_enumminecarttype = values();
             int i = aentityminecartabstract_enumminecarttype.length;
 
-            for (int j = 0; j < i; ++j) {
-                EntityMinecartAbstract.EnumMinecartType entityminecartabstract_enumminecarttype = aentityminecartabstract_enumminecarttype[j];
-
-                EntityMinecartAbstract.EnumMinecartType.h.put(Integer.valueOf(entityminecartabstract_enumminecarttype.a()), entityminecartabstract_enumminecarttype);
+            for (EnumMinecartType entityminecartabstract_enumminecarttype : aentityminecartabstract_enumminecarttype) {
+                EnumMinecartType.h.put(entityminecartabstract_enumminecarttype.a(), entityminecartabstract_enumminecarttype);
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartCommandBlock.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartCommandBlock.java
index 44ae155..1bcb56c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartCommandBlock.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartCommandBlock.java
@@ -4,7 +4,7 @@ public class EntityMinecartCommandBlock extends EntityMinecartAbstract {
 
     private final CommandBlockListenerAbstract a = new CommandBlockListenerAbstract() {
         {
-            this.sender = (org.bukkit.craftbukkit.entity.CraftMinecartCommand) EntityMinecartCommandBlock.this.getBukkitEntity(); // CraftBukkit - Set the sender
+            this.sender = EntityMinecartCommandBlock.this.getBukkitEntity(); // CraftBukkit - Set the sender
         }
         public void h() {
             EntityMinecartCommandBlock.this.getDataWatcher().watch(23, this.getCommand());
@@ -85,8 +85,7 @@ public class EntityMinecartCommandBlock extends EntityMinecartAbstract {
         if (i == 24) {
             try {
                 this.a.b(IChatBaseComponent.ChatSerializer.a(this.getDataWatcher().getString(24)));
-            } catch (Throwable throwable) {
-                ;
+            } catch (Throwable ignored) {
             }
         } else if (i == 23) {
             this.a.setCommand(this.getDataWatcher().getString(23));
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartContainer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartContainer.java
index 7368f16..9678c94 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartContainer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartContainer.java
@@ -22,7 +22,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
     private boolean b = true;
 
     // CraftBukkit start
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     private int maxStack = MAX_STACK;
 
     public ItemStack[] getContents() {
@@ -129,7 +129,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
     public void update() {}
 
     public boolean a(EntityHuman entityhuman) {
-        return this.dead ? false : entityhuman.h(this) <= 64.0D;
+        return !this.dead && entityhuman.h(this) <= 64.0D;
     }
 
     public void startOpen(EntityHuman entityhuman) {}
@@ -150,7 +150,7 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
 
     public void c(int i) {
         // Spigot Start
-        for ( HumanEntity human : new java.util.ArrayList( transaction ) )
+        for ( HumanEntity human : new java.util.ArrayList<>(transaction) )
         {
             human.closeInventory();
         }
@@ -210,12 +210,12 @@ public abstract class EntityMinecartContainer extends EntityMinecartAbstract imp
     }
 
     protected void o() {
-        int i = 15 - Container.b((IInventory) this);
+        int i = 15 - Container.b(this);
         float f = 0.98F + (float) i * 0.001F;
 
-        this.motX *= (double) f;
+        this.motX *= f;
         this.motY *= 0.0D;
-        this.motZ *= (double) f;
+        this.motZ *= f;
     }
 
     public int getProperty(int i) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartFurnace.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartFurnace.java
index 908620d..ccc59d9 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartFurnace.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartFurnace.java
@@ -20,7 +20,7 @@ public class EntityMinecartFurnace extends EntityMinecartAbstract {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, new Byte((byte) 0));
+        this.datawatcher.a(16, (byte) 0);
     }
 
     public void t_() {
@@ -57,10 +57,10 @@ public class EntityMinecartFurnace extends EntityMinecartAbstract {
         double d0 = this.a * this.a + this.b * this.b;
 
         if (d0 > 1.0E-4D && this.motX * this.motX + this.motZ * this.motZ > 0.001D) {
-            d0 = (double) MathHelper.sqrt(d0);
+            d0 = MathHelper.sqrt(d0);
             // PaperSpigot - Don't lose all your velocity on corners
             // https://bugs.mojang.com/browse/MC-51053?focusedCommentId=223854
-            double d1 = (double) MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
+            double d1 = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
             this.a = (motX / d1) * d0;
             this.b = (motZ / d1) * d0;
             // PaperSpigot end
@@ -72,7 +72,7 @@ public class EntityMinecartFurnace extends EntityMinecartAbstract {
         double d0 = this.a * this.a + this.b * this.b;
 
         if (d0 > 1.0E-4D) {
-            d0 = (double) MathHelper.sqrt(d0);
+            d0 = MathHelper.sqrt(d0);
             this.a /= d0;
             this.b /= d0;
             double d1 = 1.0D;
@@ -96,7 +96,7 @@ public class EntityMinecartFurnace extends EntityMinecartAbstract {
 
         if (itemstack != null && itemstack.getItem() == Items.COAL) {
             if (!entityhuman.abilities.canInstantlyBuild && --itemstack.count == 0) {
-                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
             }
 
             this.c += 3600;
@@ -127,9 +127,9 @@ public class EntityMinecartFurnace extends EntityMinecartAbstract {
 
     protected void i(boolean flag) {
         if (flag) {
-            this.datawatcher.watch(16, Byte.valueOf((byte) (this.datawatcher.getByte(16) | 1)));
+            this.datawatcher.watch(16, (byte) (this.datawatcher.getByte(16) | 1));
         } else {
-            this.datawatcher.watch(16, Byte.valueOf((byte) (this.datawatcher.getByte(16) & -2)));
+            this.datawatcher.watch(16, (byte) (this.datawatcher.getByte(16) & -2));
         }
 
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMonster.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMonster.java
index 419cd16..d0e4f59 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMonster.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityMonster.java
@@ -66,14 +66,14 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
 
         if (entity instanceof EntityLiving) {
             f += EnchantmentManager.a(this.bA(), ((EntityLiving) entity).getMonsterType());
-            i += EnchantmentManager.a((EntityLiving) this);
+            i += EnchantmentManager.a(this);
         }
 
         boolean flag = entity.damageEntity(DamageSource.mobAttack(this), f);
 
         if (flag) {
             if (i > 0) {
-                entity.g((double) (-MathHelper.sin(this.yaw * 3.1415927F / 180.0F) * (float) i * 0.5F), 0.1D, (double) (MathHelper.cos(this.yaw * 3.1415927F / 180.0F) * (float) i * 0.5F));
+                entity.g(-MathHelper.sin(this.yaw * 3.1415927F / 180.0F) * (float) i * 0.5F, 0.1D, MathHelper.cos(this.yaw * 3.1415927F / 180.0F) * (float) i * 0.5F);
                 this.motX *= 0.6D;
                 this.motZ *= 0.6D;
             }
@@ -91,7 +91,7 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
                 // CraftBukkit end
             }
 
-            this.a((EntityLiving) this, entity);
+            this.a(this, entity);
         }
 
         return flag;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityOcelot.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityOcelot.java
index edcb307..0128b23 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityOcelot.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityOcelot.java
@@ -11,7 +11,7 @@ public class EntityOcelot extends EntityTameableAnimal {
     public EntityOcelot(World world) {
         super(world);
         this.setSize(0.6F, 0.7F);
-        ((Navigation) this.getNavigation()).a(true);
+        this.getNavigation().a(true);
         this.goalSelector.a(1, new PathfinderGoalFloat(this));
         this.goalSelector.a(2, this.bm);
         this.goalSelector.a(3, this.bp = new PathfinderGoalTempt(this, 0.6D, Items.FISH, true));
@@ -22,12 +22,12 @@ public class EntityOcelot extends EntityTameableAnimal {
         this.goalSelector.a(9, new PathfinderGoalBreed(this, 0.8D));
         this.goalSelector.a(10, new PathfinderGoalRandomStroll(this, 0.8D));
         this.goalSelector.a(11, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 10.0F));
-        this.targetSelector.a(1, new PathfinderGoalRandomTargetNonTamed(this, EntityChicken.class, false, (Predicate) null));
+        this.targetSelector.a(1, new PathfinderGoalRandomTargetNonTamed(this, EntityChicken.class, false, null));
     }
 
     protected void h() {
         super.h();
-        this.datawatcher.a(18, Byte.valueOf((byte) 0));
+        this.datawatcher.a(18, (byte) 0);
     }
 
     public void E() {
@@ -125,7 +125,7 @@ public class EntityOcelot extends EntityTameableAnimal {
             }
 
             if (itemstack.count <= 0) {
-                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
             }
 
             if (!this.world.isClientSide) {
@@ -175,7 +175,7 @@ public class EntityOcelot extends EntityTameableAnimal {
         } else {
             EntityOcelot entityocelot = (EntityOcelot) entityanimal;
 
-            return !entityocelot.isTamed() ? false : this.isInLove() && entityocelot.isInLove();
+            return entityocelot.isTamed() && this.isInLove() && entityocelot.isInLove();
         }
     }
 
@@ -184,7 +184,7 @@ public class EntityOcelot extends EntityTameableAnimal {
     }
 
     public void setCatType(int i) {
-        this.datawatcher.watch(18, Byte.valueOf((byte) i));
+        this.datawatcher.watch(18, (byte) i);
     }
 
     public boolean bR() {
@@ -192,7 +192,7 @@ public class EntityOcelot extends EntityTameableAnimal {
     }
 
     public boolean canSpawn() {
-        if (this.world.a(this.getBoundingBox(), (Entity) this) && this.world.getCubes(this, this.getBoundingBox()).isEmpty() && !this.world.containsLiquid(this.getBoundingBox())) {
+        if (this.world.a(this.getBoundingBox(), this) && this.world.getCubes(this, this.getBoundingBox()).isEmpty() && !this.world.containsLiquid(this.getBoundingBox())) {
             BlockPosition blockposition = new BlockPosition(this.locX, this.getBoundingBox().b, this.locZ);
 
             if (blockposition.getY() < this.world.F()) {
@@ -222,7 +222,7 @@ public class EntityOcelot extends EntityTameableAnimal {
             this.bo = new PathfinderGoalAvoidTarget(this, EntityHuman.class, 16.0F, 0.8D, 1.33D);
         }
 
-        this.goalSelector.a((PathfinderGoal) this.bo);
+        this.goalSelector.a(this.bo);
         if (!this.isTamed()) {
             this.goalSelector.a(4, this.bo);
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPainting.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPainting.java
index ac94184..e29307c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPainting.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPainting.java
@@ -18,9 +18,7 @@ public class EntityPainting extends EntityHanging {
         EntityPainting.EnumArt[] aentitypainting_enumart = EntityPainting.EnumArt.values();
         int i = aentitypainting_enumart.length;
 
-        for (int j = 0; j < i; ++j) {
-            EntityPainting.EnumArt entitypainting_enumart = aentitypainting_enumart[j];
-
+        for (EnumArt entitypainting_enumart : aentitypainting_enumart) {
             this.art = entitypainting_enumart;
             this.setDirection(enumdirection);
             if (this.survives()) {
@@ -45,9 +43,7 @@ public class EntityPainting extends EntityHanging {
         EntityPainting.EnumArt[] aentitypainting_enumart = EntityPainting.EnumArt.values();
         int i = aentitypainting_enumart.length;
 
-        for (int j = 0; j < i; ++j) {
-            EntityPainting.EnumArt entitypainting_enumart = aentitypainting_enumart[j];
-
+        for (EnumArt entitypainting_enumart : aentitypainting_enumart) {
             if (entitypainting_enumart.B.equals(s)) {
                 this.art = entitypainting_enumart;
             }
@@ -85,7 +81,7 @@ public class EntityPainting extends EntityHanging {
     public void setPositionRotation(double d0, double d1, double d2, float f, float f1) {
         BlockPosition blockposition = this.blockPosition.a(d0 - this.locX, d1 - this.locY, d2 - this.locZ);
 
-        this.setPosition((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
+        this.setPosition(blockposition.getX(), blockposition.getY(), blockposition.getZ());
     }
 
     public static enum EnumArt {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPig.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPig.java
index 3f2ce15..f632baf 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPig.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPig.java
@@ -9,7 +9,7 @@ public class EntityPig extends EntityAnimal {
     public EntityPig(World world) {
         super(world);
         this.setSize(0.9F, 0.9F);
-        ((Navigation) this.getNavigation()).a(true);
+        this.getNavigation().a(true);
         this.goalSelector.a(0, new PathfinderGoalFloat(this));
         this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.25D));
         this.goalSelector.a(2, this.bm = new PathfinderGoalPassengerCarrotStick(this, 0.3F));
@@ -36,7 +36,7 @@ public class EntityPig extends EntityAnimal {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, Byte.valueOf((byte) 0));
+        this.datawatcher.a(16, (byte) 0);
     }
 
     public void b(NBTTagCompound nbttagcompound) {
@@ -103,9 +103,9 @@ public class EntityPig extends EntityAnimal {
 
     public void setSaddle(boolean flag) {
         if (flag) {
-            this.datawatcher.watch(16, Byte.valueOf((byte) 1));
+            this.datawatcher.watch(16, (byte) 1);
         } else {
-            this.datawatcher.watch(16, Byte.valueOf((byte) 0));
+            this.datawatcher.watch(16, (byte) 0);
         }
 
     }
@@ -137,7 +137,7 @@ public class EntityPig extends EntityAnimal {
     public void e(float f, float f1) {
         super.e(f, f1);
         if (f > 5.0F && this.passenger instanceof EntityHuman) {
-            ((EntityHuman) this.passenger).b((Statistic) AchievementList.u);
+            ((EntityHuman) this.passenger).b(AchievementList.u);
         }
 
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPlayer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPlayer.java
index a2e1977..e49172b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -96,7 +96,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
 
         if (!worldserver.worldProvider.o() && worldserver.getWorldData().getGameType() != WorldSettings.EnumGamemode.ADVENTURE) {
             int i = Math.max(5, minecraftserver.getSpawnProtection() - 6);
-            int j = MathHelper.floor(worldserver.getWorldBorder().b((double) blockposition.getX(), (double) blockposition.getZ()));
+            int j = MathHelper.floor(worldserver.getWorldBorder().b(blockposition.getX(), blockposition.getZ()));
 
             if (j < i) {
                 i = j;
@@ -212,7 +212,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
             containerUpdateDelay = world.paperSpigotConfig.containerUpdateTickRate;
         }
         // PaperSpigot end
-        if (!this.world.isClientSide && !this.activeContainer.a((EntityHuman) this)) {
+        if (!this.world.isClientSide && !this.activeContainer.a(this)) {
             this.closeInventory();
             this.activeContainer = this.defaultContainer;
         }
@@ -224,7 +224,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
             int j = 0;
 
             while (iterator.hasNext() && j < i) {
-                aint[j++] = ((Integer) iterator.next()).intValue();
+                aint[j++] = (Integer) iterator.next();
                 iterator.remove();
             }
 
@@ -322,12 +322,11 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
             if (this.getHealth() + this.getAbsorptionHearts() != this.bL) {
                 this.bL = this.getHealth() + this.getAbsorptionHearts();
                 Collection collection = this.getScoreboard().getObjectivesForCriteria(IScoreboardCriteria.g);
-                Iterator iterator = collection.iterator();
 
-                while (iterator.hasNext()) {
-                    ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
+                for (Object o : collection) {
+                    ScoreboardObjective scoreboardobjective = (ScoreboardObjective) o;
 
-                    this.getScoreboard().getPlayerScoreForObjective(this.getName(), scoreboardobjective).updateForList(Arrays.asList(new EntityHuman[] { this}));
+                    this.getScoreboard().getPlayerScoreForObjective(this.getName(), scoreboardobjective).updateForList(Arrays.asList(new EntityHuman[]{this}));
                 }
                 // CraftBukkit - Update ALL the scores!
                 this.world.getServer().getScoreboardManager().updateAllScoresForList(IScoreboardCriteria.g, this.getName(), com.google.common.collect.ImmutableList.of(this));
@@ -353,7 +352,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
             }
 
             if (this.oldLevel != this.expLevel) {
-                CraftEventFactory.callPlayerLevelChangeEvent(this.world.getServer().getPlayer((EntityPlayer) this), this.oldLevel, this.expLevel);
+                CraftEventFactory.callPlayerLevelChangeEvent(this.world.getServer().getPlayer(this), this.oldLevel, this.expLevel);
                 this.oldLevel = this.expLevel;
             }
             // CraftBukkit end
@@ -369,19 +368,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
     protected void i_() {
         BiomeBase biomebase = this.world.getBiome(new BlockPosition(MathHelper.floor(this.locX), 0, MathHelper.floor(this.locZ)));
         String s = biomebase.ah;
-        AchievementSet achievementset = (AchievementSet) this.getStatisticManager().b((Statistic) AchievementList.L);
+        AchievementSet achievementset = this.getStatisticManager().b((Statistic) AchievementList.L);
 
         if (achievementset == null) {
-            achievementset = (AchievementSet) this.getStatisticManager().a(AchievementList.L, new AchievementSet());
+            achievementset = this.getStatisticManager().a(AchievementList.L, new AchievementSet());
         }
 
         achievementset.add(s);
         if (this.getStatisticManager().b(AchievementList.L) && achievementset.size() >= BiomeBase.n.size()) {
             HashSet hashset = Sets.newHashSet(BiomeBase.n);
-            Iterator iterator = achievementset.iterator();
 
-            while (iterator.hasNext()) {
-                String s1 = (String) iterator.next();
+            for (String s1 : achievementset) {
                 Iterator iterator1 = hashset.iterator();
 
                 while (iterator1.hasNext()) {
@@ -398,7 +395,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
             }
 
             if (hashset.isEmpty()) {
-                this.b((Statistic) AchievementList.L);
+                this.b(AchievementList.L);
             }
         }
 
@@ -409,7 +406,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
         if (this.dead) {
             return;
         }
-        java.util.List loot = new java.util.ArrayList();
+        java.util.List loot = new java.util.ArrayList<>();
         boolean keepInventory = this.world.getGameRules().getBoolean("keepInventory");
 
         if (!keepInventory) {
@@ -457,11 +454,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
         // CraftBukkit end
 
         // CraftBukkit - Get our scores instead
-        Collection collection = this.world.getServer().getScoreboardManager().getScoreboardScores(IScoreboardCriteria.d, this.getName(), new java.util.ArrayList());
-        Iterator iterator = collection.iterator();
+        Collection collection = this.world.getServer().getScoreboardManager().getScoreboardScores(IScoreboardCriteria.d, this.getName(), new java.util.ArrayList<>());
 
-        while (iterator.hasNext()) {
-            ScoreboardScore scoreboardscore = (ScoreboardScore) iterator.next(); // CraftBukkit - Use our scores instead
+        for (Object o : collection) {
+            ScoreboardScore scoreboardscore = (ScoreboardScore) o; // CraftBukkit - Use our scores instead
 
             scoreboardscore.incrementScore();
         }
@@ -469,7 +465,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
         EntityLiving entityliving = this.bt();
 
         if (entityliving != null) {
-            EntityTypes.MonsterEggInfo entitytypes_monsteregginfo = (EntityTypes.MonsterEggInfo) EntityTypes.eggInfo.get(Integer.valueOf(EntityTypes.a(entityliving)));
+            EntityTypes.MonsterEggInfo entitytypes_monsteregginfo = EntityTypes.eggInfo.get(EntityTypes.a(entityliving));
 
             if (entitytypes_monsteregginfo != null) {
                 this.b(entitytypes_monsteregginfo.e);
@@ -514,7 +510,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
     }
 
     public boolean a(EntityHuman entityhuman) {
-        return !this.cr() ? false : super.a(entityhuman);
+        return this.cr() && super.a(entityhuman);
     }
 
     private boolean cr() {
@@ -532,7 +528,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
         // PaperSpigot start - Allow configurable end portal credits
         boolean endPortal = this.dimension == 1 && i == 1;
         if (endPortal) {
-            this.b((Statistic) AchievementList.D);
+            this.b(AchievementList.D);
             if (!world.paperSpigotConfig.disableEndCredits) {
                 this.world.kill(this);
                 this.viewingCredits = true;
@@ -541,7 +537,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
             // PaperSpigot end
         } else {
             if (this.dimension == 0 && i == 1) {
-                this.b((Statistic) AchievementList.C);
+                this.b(AchievementList.C);
                 // CraftBukkit start - Rely on custom portal management
                 /*
                 BlockPosition blockposition = this.server.getWorldServer(i).getDimensionSpawn();
@@ -554,7 +550,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
                 */
                 // CraftBukkit end
             } else {
-                this.b((Statistic) AchievementList.y);
+                this.b(AchievementList.y);
             }
         }
 
@@ -572,7 +568,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
     }
 
     public boolean a(EntityPlayer entityplayer) {
-        return entityplayer.isSpectator() ? this.C() == this : (this.isSpectator() ? false : super.a(entityplayer));
+        return entityplayer.isSpectator() ? this.C() == this : (!this.isSpectator() && super.a(entityplayer));
     }
 
     private void a(TileEntity tileentity) {
@@ -597,7 +593,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
         if (entityhuman_enumbedresult == EntityHuman.EnumBedResult.OK) {
             PacketPlayOutBed packetplayoutbed = new PacketPlayOutBed(this, blockposition);
 
-            this.u().getTracker().a((Entity) this, (Packet) packetplayoutbed);
+            this.u().getTracker().a(this, packetplayoutbed);
             this.playerConnection.a(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
             this.playerConnection.sendPacket(packetplayoutbed);
         }
@@ -651,7 +647,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
     }
 
     public void openSign(TileEntitySign tileentitysign) {
-        tileentitysign.a((EntityHuman) this);
+        tileentitysign.a(this);
         this.playerConnection.sendPacket(new PacketPlayOutOpenSignEditor(tileentitysign.getPosition()));
     }
 
@@ -825,7 +821,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
     }
 
     public void p() {
-        this.activeContainer.b((EntityHuman) this);
+        this.activeContainer.b(this);
         this.activeContainer = this.defaultContainer;
     }
 
@@ -848,11 +844,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
     public void a(Statistic statistic, int i) {
         if (statistic != null) {
             this.bK.b(this, statistic, i);
-            Iterator iterator = this.getScoreboard().getObjectivesForCriteria(statistic.k()).iterator();
-
-            while (iterator.hasNext()) {
-                ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
 
+            for (ScoreboardObjective scoreboardobjective : this.getScoreboard().getObjectivesForCriteria(statistic.k())) {
                 this.getScoreboard().getPlayerScoreForObjective(this.getName(), scoreboardobjective).addScore(i);
             }
 
@@ -866,11 +859,8 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
     public void a(Statistic statistic) {
         if (statistic != null) {
             this.bK.setStatistic(this, statistic, 0);
-            Iterator iterator = this.getScoreboard().getObjectivesForCriteria(statistic.k()).iterator();
-
-            while (iterator.hasNext()) {
-                ScoreboardObjective scoreboardobjective = (ScoreboardObjective) iterator.next();
 
+            for (ScoreboardObjective scoreboardobjective : this.getScoreboard().getObjectivesForCriteria(statistic.k())) {
                 this.getScoreboard().getPlayerScoreForObjective(this.getName(), scoreboardobjective).setScore(0);
             }
 
@@ -1033,7 +1023,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
         // PaperSpigot end
         this.bR = packetplayinsettings.c();
         this.bS = packetplayinsettings.d();
-        this.getDataWatcher().watch(10, Byte.valueOf((byte) packetplayinsettings.e()));
+        this.getDataWatcher().watch(10, (byte) packetplayinsettings.e());
     }
 
     public EntityHuman.EnumChatVisibility getChatFlags() {
@@ -1060,7 +1050,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
         if (entity instanceof EntityHuman) {
             this.playerConnection.sendPacket(new PacketPlayOutEntityDestroy(new int[] { entity.getId()}));
         } else {
-            this.removeQueue.add(Integer.valueOf(entity.getId()));
+            this.removeQueue.add(entity.getId());
         }
 
     }
@@ -1077,13 +1067,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
     }
 
     public Entity C() {
-        return (Entity) (this.bU == null ? this : this.bU);
+        return this.bU == null ? this : this.bU;
     }
 
     public void setSpectatorTarget(Entity entity) {
         Entity entity1 = this.C();
 
-        this.bU = (Entity) (entity == null ? this : entity);
+        this.bU = entity == null ? this : entity;
         if (entity1 != this.bU) {
             this.playerConnection.sendPacket(new PacketPlayOutCamera(this.bU));
             this.enderTeleportTo(this.bU.locX, this.bU.locY, this.bU.locZ);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPotion.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPotion.java
index 4518ad3..e255204 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPotion.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityPotion.java
@@ -78,7 +78,7 @@ public class EntityPotion extends EntityProjectile {
                     Iterator iterator = list1.iterator();
 
                     // CraftBukkit
-                    HashMap affected = new HashMap();
+                    HashMap affected = new HashMap<>();
 
                     while (iterator.hasNext()) {
                         EntityLiving entityliving = (EntityLiving) iterator.next();
@@ -115,16 +115,15 @@ public class EntityPotion extends EntityProjectile {
                             double d1 = event.getIntensity(victim);
                             // CraftBukkit end
 
-                            Iterator iterator1 = list.iterator();
-
-                            while (iterator1.hasNext()) {
-                                MobEffect mobeffect = (MobEffect) iterator1.next();
+                            for (Object o : list) {
+                                MobEffect mobeffect = (MobEffect) o;
                                 int i = mobeffect.getEffectId();
 
                                 // CraftBukkit start - Abide by PVP settings - for players only!
                                 if (!this.world.pvpMode && this.getShooter() instanceof EntityPlayer && entityliving instanceof EntityPlayer && entityliving != this.getShooter()) {
                                     // Block SLOWER_MOVEMENT, SLOWER_DIG, HARM, BLINDNESS, HUNGER, WEAKNESS and POISON potions
-                                    if (i == 2 || i == 4 || i == 7 || i == 15 || i == 17 || i == 18 || i == 19) continue;
+                                    if (i == 2 || i == 4 || i == 7 || i == 15 || i == 17 || i == 18 || i == 19)
+                                        continue;
                                 }
                                 // CraftBukkit end
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityProjectile.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityProjectile.java
index 18ed9a2..ce4a98c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -35,15 +35,15 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
         this.projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
         this.setSize(0.25F, 0.25F);
         this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight(), entityliving.locZ, entityliving.yaw, entityliving.pitch);
-        this.locX -= (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F);
+        this.locX -= MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F;
         this.locY -= 0.10000000149011612D;
-        this.locZ -= (double) (MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * 0.16F);
+        this.locZ -= MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * 0.16F;
         this.setPosition(this.locX, this.locY, this.locZ);
         float f = 0.4F;
 
-        this.motX = (double) (-MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F) * f);
-        this.motZ = (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F) * f);
-        this.motY = (double) (-MathHelper.sin((this.pitch + this.l()) / 180.0F * 3.1415927F) * f);
+        this.motX = -MathHelper.sin(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F) * f;
+        this.motZ = MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * MathHelper.cos(this.pitch / 180.0F * 3.1415927F) * f;
+        this.motY = -MathHelper.sin((this.pitch + this.l()) / 180.0F * 3.1415927F) * f;
         this.shoot(this.motX, this.motY, this.motZ, this.j(), 1.0F);
     }
 
@@ -65,22 +65,22 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
     public void shoot(double d0, double d1, double d2, float f, float f1) {
         float f2 = MathHelper.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
 
-        d0 /= (double) f2;
-        d1 /= (double) f2;
-        d2 /= (double) f2;
+        d0 /= f2;
+        d1 /= f2;
+        d2 /= f2;
         d0 += this.random.nextGaussian() * 0.007499999832361937D * (double) f1;
         d1 += this.random.nextGaussian() * 0.007499999832361937D * (double) f1;
         d2 += this.random.nextGaussian() * 0.007499999832361937D * (double) f1;
-        d0 *= (double) f;
-        d1 *= (double) f;
-        d2 *= (double) f;
+        d0 *= f;
+        d1 *= f;
+        d2 *= f;
         this.motX = d0;
         this.motY = d1;
         this.motZ = d2;
         float f3 = MathHelper.sqrt(d0 * d0 + d2 * d2);
 
         this.lastYaw = this.yaw = (float) (MathHelper.b(d0, d2) * 180.0D / 3.1415927410125732D);
-        this.lastPitch = this.pitch = (float) (MathHelper.b(d1, (double) f3) * 180.0D / 3.1415927410125732D);
+        this.lastPitch = this.pitch = (float) (MathHelper.b(d1, f3) * 180.0D / 3.1415927410125732D);
         this.i = 0;
     }
 
@@ -104,9 +104,9 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
             }
 
             this.inGround = false;
-            this.motX *= (double) (this.random.nextFloat() * 0.2F);
-            this.motY *= (double) (this.random.nextFloat() * 0.2F);
-            this.motZ *= (double) (this.random.nextFloat() * 0.2F);
+            this.motX *= this.random.nextFloat() * 0.2F;
+            this.motY *= this.random.nextFloat() * 0.2F;
+            this.motZ *= this.random.nextFloat() * 0.2F;
             this.i = 0;
             this.ar = 0;
         } else {
@@ -129,12 +129,12 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
             double d0 = 0.0D;
             EntityLiving entityliving = this.getShooter();
 
-            for (int i = 0; i < list.size(); ++i) {
-                Entity entity1 = (Entity) list.get(i);
+            for (Object o : list) {
+                Entity entity1 = (Entity) o;
 
                 if (entity1.ad() && (entity1 != entityliving || this.ar >= 5)) {
                     float f = 0.3F;
-                    AxisAlignedBB axisalignedbb = entity1.getBoundingBox().grow((double) f, (double) f, (double) f);
+                    AxisAlignedBB axisalignedbb = entity1.getBoundingBox().grow(f, f, f);
                     MovingObjectPosition movingobjectposition1 = axisalignedbb.a(vec3d, vec3d1);
 
                     if (movingobjectposition1 != null) {
@@ -183,8 +183,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
 
         this.yaw = (float) (MathHelper.b(this.motX, this.motZ) * 180.0D / 3.1415927410125732D);
 
-        for (this.pitch = (float) (MathHelper.b(this.motY, (double) f1) * 180.0D / 3.1415927410125732D); this.pitch - this.lastPitch < -180.0F; this.lastPitch -= 360.0F) {
-            ;
+        for (this.pitch = (float) (MathHelper.b(this.motY, f1) * 180.0D / 3.1415927410125732D); this.pitch - this.lastPitch < -180.0F; this.lastPitch -= 360.0F) {
         }
 
         while (this.pitch - this.lastPitch >= 180.0F) {
@@ -214,10 +213,10 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
             f2 = 0.8F;
         }
 
-        this.motX *= (double) f2;
-        this.motY *= (double) f2;
-        this.motZ *= (double) f2;
-        this.motY -= (double) f3;
+        this.motX *= f2;
+        this.motY *= f2;
+        this.motZ *= f2;
+        this.motY -= f3;
         this.setPosition(this.locX, this.locY, this.locZ);
     }
 
@@ -231,7 +230,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
         nbttagcompound.setShort("xTile", (short) this.blockX);
         nbttagcompound.setShort("yTile", (short) this.blockY);
         nbttagcompound.setShort("zTile", (short) this.blockZ);
-        MinecraftKey minecraftkey = (MinecraftKey) Block.REGISTRY.c(this.inBlockId);
+        MinecraftKey minecraftkey = Block.REGISTRY.c(this.inBlockId);
 
         nbttagcompound.setString("inTile", minecraftkey == null ? "" : minecraftkey.toString());
         nbttagcompound.setByte("shake", (byte) this.shake);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityRabbit.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityRabbit.java
index 68845e0..f624ab7 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityRabbit.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityRabbit.java
@@ -20,7 +20,7 @@ public class EntityRabbit extends EntityAnimal {
         this.setSize(0.6F, 0.7F);
         this.g = new EntityRabbit.ControllerJumpRabbit(this);
         this.moveController = new EntityRabbit.ControllerMoveRabbit(this);
-        ((Navigation) this.getNavigation()).a(true);
+        this.getNavigation().a(true);
         this.initializePathFinderGoals(); // CraftBukkit - moved code
         this.b(0.0D);
     }
@@ -81,7 +81,7 @@ public class EntityRabbit extends EntityAnimal {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(18, Byte.valueOf((byte) 0));
+        this.datawatcher.a(18, (byte) 0);
     }
 
     public void E() {
@@ -127,7 +127,7 @@ public class EntityRabbit extends EntityAnimal {
                     Vec3D vec3d = new Vec3D(this.moveController.d(), this.moveController.e(), this.moveController.f());
 
                     if (pathentity != null && pathentity.e() < pathentity.d()) {
-                        vec3d = pathentity.a((Entity) this);
+                        vec3d = pathentity.a(this);
                     }
 
                     this.a(vec3d.a, vec3d.c);
@@ -227,7 +227,7 @@ public class EntityRabbit extends EntityAnimal {
     }
 
     public boolean damageEntity(DamageSource damagesource, float f) {
-        return this.isInvulnerable(damagesource) ? false : super.damageEntity(damagesource, f);
+        return !this.isInvulnerable(damagesource) && super.damageEntity(damagesource, f);
     }
 
     protected void getRareDrop() {
@@ -279,7 +279,7 @@ public class EntityRabbit extends EntityAnimal {
 
     public void setRabbitType(int i) {
         if (i == 99) {
-            this.goalSelector.a((PathfinderGoal) this.bm);
+            this.goalSelector.a(this.bm);
             this.goalSelector.a(4, new EntityRabbit.PathfinderGoalKillerRabbitMeleeAttack(this));
             this.targetSelector.a(1, new PathfinderGoalHurtByTarget(this, false, new Class[0]));
             this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget(this, EntityHuman.class, true));
@@ -289,7 +289,7 @@ public class EntityRabbit extends EntityAnimal {
             }
         }
 
-        this.datawatcher.watch(18, Byte.valueOf((byte) i));
+        this.datawatcher.watch(18, (byte) i);
     }
 
     public GroupDataEntity prepare(DifficultyDamageScaler difficultydamagescaler, GroupDataEntity groupdataentity) {
@@ -369,7 +369,7 @@ public class EntityRabbit extends EntityAnimal {
         }
 
         protected double a(EntityLiving entityliving) {
-            return (double) (4.0F + entityliving.width);
+            return 4.0F + entityliving.width;
         }
     }
 
@@ -426,14 +426,14 @@ public class EntityRabbit extends EntityAnimal {
 
         public void e() {
             super.e();
-            this.c.getControllerLook().a((double) this.b.getX() + 0.5D, (double) (this.b.getY() + 1), (double) this.b.getZ() + 0.5D, 10.0F, (float) this.c.bQ());
+            this.c.getControllerLook().a((double) this.b.getX() + 0.5D, this.b.getY() + 1, (double) this.b.getZ() + 0.5D, 10.0F, (float) this.c.bQ());
             if (this.f()) {
                 World world = this.c.world;
                 BlockPosition blockposition = this.b.up();
                 IBlockData iblockdata = world.getType(blockposition);
                 Block block = iblockdata.getBlock();
 
-                if (this.e && block instanceof BlockCarrots && ((Integer) iblockdata.get(BlockCarrots.AGE)).intValue() == 7) {
+                if (this.e && block instanceof BlockCarrots && iblockdata.get(BlockCarrots.AGE) == 7) {
                     world.setTypeAndData(blockposition, Blocks.AIR.getBlockData(), 2);
                     world.setAir(blockposition, true);
                     this.c.cp();
@@ -453,7 +453,7 @@ public class EntityRabbit extends EntityAnimal {
                 IBlockData iblockdata = world.getType(blockposition);
 
                 block = iblockdata.getBlock();
-                if (block instanceof BlockCarrots && ((Integer) iblockdata.get(BlockCarrots.AGE)).intValue() == 7 && this.d && !this.e) {
+                if (block instanceof BlockCarrots && iblockdata.get(BlockCarrots.AGE) == 7 && this.d && !this.e) {
                     this.e = true;
                     return true;
                 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySheep.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySheep.java
index 29611a1..0a24520 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySheep.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySheep.java
@@ -29,13 +29,13 @@ public class EntitySheep extends EntityAnimal {
     private PathfinderGoalEatTile bq = new PathfinderGoalEatTile(this);
 
     public static float[] a(EnumColor enumcolor) {
-        return (float[]) EntitySheep.bo.get(enumcolor);
+        return EntitySheep.bo.get(enumcolor);
     }
 
     public EntitySheep(World world) {
         super(world);
         this.setSize(0.9F, 1.3F);
-        ((Navigation) this.getNavigation()).a(true);
+        this.getNavigation().a(true);
         this.goalSelector.a(0, new PathfinderGoalFloat(this));
         this.goalSelector.a(1, new PathfinderGoalPanic(this, 1.25D));
         this.goalSelector.a(2, new PathfinderGoalBreed(this, 1.0D));
@@ -71,7 +71,7 @@ public class EntitySheep extends EntityAnimal {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, new Byte((byte) 0));
+        this.datawatcher.a(16, (byte) 0);
     }
 
     protected void dropDeathLoot(boolean flag, int i) {
@@ -115,9 +115,9 @@ public class EntitySheep extends EntityAnimal {
                 for (int j = 0; j < i; ++j) {
                     EntityItem entityitem = this.a(new ItemStack(Item.getItemOf(Blocks.WOOL), 1, this.getColor().getColorIndex()), 1.0F);
 
-                    entityitem.motY += (double) (this.random.nextFloat() * 0.05F);
-                    entityitem.motX += (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F);
-                    entityitem.motZ += (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F);
+                    entityitem.motY += this.random.nextFloat() * 0.05F;
+                    entityitem.motX += (this.random.nextFloat() - this.random.nextFloat()) * 0.1F;
+                    entityitem.motZ += (this.random.nextFloat() - this.random.nextFloat()) * 0.1F;
                 }
             }
 
@@ -163,7 +163,7 @@ public class EntitySheep extends EntityAnimal {
     public void setColor(EnumColor enumcolor) {
         byte b0 = this.datawatcher.getByte(16);
 
-        this.datawatcher.watch(16, Byte.valueOf((byte) (b0 & 240 | enumcolor.getColorIndex() & 15)));
+        this.datawatcher.watch(16, (byte) (b0 & 240 | enumcolor.getColorIndex() & 15));
     }
 
     public boolean isSheared() {
@@ -174,9 +174,9 @@ public class EntitySheep extends EntityAnimal {
         byte b0 = this.datawatcher.getByte(16);
 
         if (flag) {
-            this.datawatcher.watch(16, Byte.valueOf((byte) (b0 | 16)));
+            this.datawatcher.watch(16, (byte) (b0 | 16));
         } else {
-            this.datawatcher.watch(16, Byte.valueOf((byte) (b0 & -17)));
+            this.datawatcher.watch(16, (byte) (b0 & -17));
         }
 
     }
@@ -191,7 +191,7 @@ public class EntitySheep extends EntityAnimal {
         EntitySheep entitysheep = (EntitySheep) entityageable;
         EntitySheep entitysheep1 = new EntitySheep(this.world);
 
-        entitysheep1.setColor(this.a((EntityAnimal) this, (EntityAnimal) entitysheep));
+        entitysheep1.setColor(this.a(this, entitysheep));
         return entitysheep1;
     }
 
@@ -222,7 +222,7 @@ public class EntitySheep extends EntityAnimal {
 
         this.bm.getItem(0).setData(i);
         this.bm.getItem(1).setData(j);
-        ItemStack itemstack = CraftingManager.getInstance().craft(this.bm, ((EntitySheep) entityanimal).world);
+        ItemStack itemstack = CraftingManager.getInstance().craft(this.bm, entityanimal.world);
         int k;
 
         if (itemstack != null && itemstack.getItem() == Items.DYE) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySilverfish.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySilverfish.java
index b982154..3ae9a2b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -132,7 +132,7 @@ public class EntitySilverfish extends EntityMonster {
         }
 
         public boolean b() {
-            return this.c ? false : super.b();
+            return !this.c && super.b();
         }
 
         public void c() {
@@ -200,7 +200,7 @@ public class EntitySilverfish extends EntityMonster {
                                 if (world.getGameRules().getBoolean("mobGriefing")) {
                                     world.setAir(blockposition1, true);
                                 } else {
-                                    world.setTypeAndData(blockposition1, ((BlockMonsterEggs.EnumMonsterEggVarient) iblockdata.get(BlockMonsterEggs.VARIANT)).d(), 3);
+                                    world.setTypeAndData(blockposition1, iblockdata.get(BlockMonsterEggs.VARIANT).d(), 3);
                                 }
 
                                 if (random.nextBoolean()) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySkeleton.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySkeleton.java
index 46bff95..01654ac 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySkeleton.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySkeleton.java
@@ -34,7 +34,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(13, new Byte((byte) 0));
+        this.datawatcher.a(13, (byte) 0);
     }
 
     protected String z() {
@@ -83,7 +83,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
                         itemstack.setData(itemstack.h() + this.random.nextInt(2));
                         if (itemstack.h() >= itemstack.j()) {
                             this.b(itemstack);
-                            this.setEquipment(4, (ItemStack) null);
+                            this.setEquipment(4, null);
                         }
                     }
 
@@ -128,7 +128,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
             double d1 = entityhuman.locZ - this.locZ;
 
             if (d0 * d0 + d1 * d1 >= 2500.0D) {
-                entityhuman.b((Statistic) AchievementList.v);
+                entityhuman.b(AchievementList.v);
             }
         } else if (damagesource.getEntity() instanceof EntityCreeper && ((EntityCreeper) damagesource.getEntity()).isPowered() && ((EntityCreeper) damagesource.getEntity()).cp()) {
             ((EntityCreeper) damagesource.getEntity()).cq();
@@ -215,8 +215,8 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
     }
 
     public void n() {
-        this.goalSelector.a((PathfinderGoal) this.b);
-        this.goalSelector.a((PathfinderGoal) this.a);
+        this.goalSelector.a(this.b);
+        this.goalSelector.a(this.a);
         ItemStack itemstack = this.bA();
 
         if (itemstack != null && itemstack.getItem() == Items.BOW) {
@@ -273,7 +273,7 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
     }
 
     public void setSkeletonType(int i) {
-        this.datawatcher.watch(13, Byte.valueOf((byte) i));
+        this.datawatcher.watch(13, (byte) i);
         this.fireProof = i == 1;
         if (i == 1) {
             this.setSize(0.72F, 2.535F);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySlice.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySlice.java
index ae6c52f..cd678d9 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySlice.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySlice.java
@@ -22,10 +22,9 @@ public class EntitySlice extends AbstractSet {
         this.d = oclass;
         this.c.add(oclass);
         this.b.put(oclass, this.e);
-        Iterator iterator = EntitySlice.a.iterator();
 
-        while (iterator.hasNext()) {
-            Class oclass1 = (Class) iterator.next();
+        for (Class aClass : EntitySlice.a) {
+            Class oclass1 = aClass;
 
             this.a(oclass1);
         }
@@ -34,11 +33,8 @@ public class EntitySlice extends AbstractSet {
 
     protected void a(Class oclass) {
         EntitySlice.a.add(oclass);
-        Iterator iterator = this.e.iterator();
-
-        while (iterator.hasNext()) {
-            Object object = iterator.next();
 
+        for (Object object : this.e) {
             if (oclass.isAssignableFrom(object.getClass())) {
                 this.a((T) object, oclass);
             }
@@ -60,10 +56,9 @@ public class EntitySlice extends AbstractSet {
     }
 
     public boolean add(T t0) {
-        Iterator iterator = this.c.iterator();
 
-        while (iterator.hasNext()) {
-            Class oclass = (Class) iterator.next();
+        for (Class aClass : this.c) {
+            Class oclass = aClass;
 
             if (oclass.isAssignableFrom(t0.getClass())) {
                 this.a(t0, oclass);
@@ -74,7 +69,7 @@ public class EntitySlice extends AbstractSet {
     }
 
     private void a(T t0, Class oclass) {
-        List list = (List) this.b.get(oclass);
+        List list = this.b.get(oclass);
 
         if (list == null) {
             this.b.put(oclass, Lists.newArrayList(t0));
@@ -85,17 +80,15 @@ public class EntitySlice extends AbstractSet {
     }
 
     public boolean remove(Object object) {
-        Object object1 = object;
         boolean flag = false;
-        Iterator iterator = this.c.iterator();
 
-        while (iterator.hasNext()) {
-            Class oclass = (Class) iterator.next();
+        for (Class aClass : this.c) {
+            Class oclass = aClass;
 
-            if (oclass.isAssignableFrom(object1.getClass())) {
-                List list = (List) this.b.get(oclass);
+            if (oclass.isAssignableFrom(object.getClass())) {
+                List list = this.b.get(oclass);
 
-                if (list != null && list.remove(object1)) {
+                if (list != null && list.remove(object)) {
                     flag = true;
                 }
             }
@@ -109,17 +102,15 @@ public class EntitySlice extends AbstractSet {
     }
 
     public  Iterable c(final Class oclass) {
-        return new Iterable() {
-            public Iterator iterator() {
-                List list = (List) EntitySlice.this.b.get(EntitySlice.this.b(oclass));
+        return (Iterable) () -> {
+            List list = EntitySlice.this.b.get(EntitySlice.this.b(oclass));
 
-                if (list == null) {
-                    return Iterators.emptyIterator();
-                } else {
-                    Iterator iterator = list.iterator();
+            if (list == null) {
+                return Iterators.emptyIterator();
+            } else {
+                Iterator iterator = list.iterator();
 
-                    return Iterators.filter(iterator, oclass);
-                }
+                return Iterators.filter(iterator, oclass);
             }
         };
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySlime.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySlime.java
index c927832..aee272e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySlime.java
@@ -24,15 +24,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, Byte.valueOf((byte) 1));
+        this.datawatcher.a(16, (byte) 1);
     }
 
     public void setSize(int i) {
-        this.datawatcher.watch(16, Byte.valueOf((byte) i));
+        this.datawatcher.watch(16, (byte) i);
         this.setSize(0.51000005F * (float) i, 0.51000005F * (float) i);
         this.setPosition(this.locX, this.locY, this.locZ);
-        this.getAttributeInstance(GenericAttributes.maxHealth).setValue((double) (i * i));
-        this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue((double) (0.2F + 0.1F * (float) i));
+        this.getAttributeInstance(GenericAttributes.maxHealth).setValue(i * i);
+        this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(0.2F + 0.1F * (float) i);
         this.setHealth(this.getMaxHealth());
         this.b_ = i;
     }
@@ -191,7 +191,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
 
         if (this.hasLineOfSight(entityliving) && this.h(entityliving) < 0.6D * (double) i * 0.6D * (double) i && entityliving.damageEntity(DamageSource.mobAttack(this), (float) this.cj())) {
             this.makeSound("mob.attack", 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
-            this.a((EntityLiving) this, (Entity) entityliving);
+            this.a(this, entityliving);
         }
 
     }
@@ -304,7 +304,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
         public PathfinderGoalSlimeRandomJump(EntitySlime entityslime) {
             this.a = entityslime;
             this.a(5);
-            ((Navigation) entityslime.getNavigation()).d(true);
+            entityslime.getNavigation().d(true);
         }
 
         public boolean a() {
@@ -358,7 +358,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
         public boolean a() {
             EntityLiving entityliving = this.a.getGoalTarget();
 
-            return entityliving == null ? false : (!entityliving.isAlive() ? false : !(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.isInvulnerable);
+            return entityliving != null && (entityliving.isAlive() && (!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.isInvulnerable));
         }
 
         public void c() {
@@ -369,7 +369,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
         public boolean b() {
             EntityLiving entityliving = this.a.getGoalTarget();
 
-            return entityliving == null ? false : (!entityliving.isAlive() ? false : (entityliving instanceof EntityHuman && ((EntityHuman) entityliving).abilities.isInvulnerable ? false : --this.b > 0));
+            return entityliving != null && (entityliving.isAlive() && ((!(entityliving instanceof EntityHuman) || !((EntityHuman) entityliving).abilities.isInvulnerable) && --this.b > 0));
         }
 
         public void e() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySmallFireball.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySmallFireball.java
index f769de5..0be6cd5 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySmallFireball.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySmallFireball.java
@@ -29,7 +29,7 @@ public class EntitySmallFireball extends EntityFireball {
                     this.a(this.shooter, movingobjectposition.entity);
                     if (!movingobjectposition.entity.isFireProof()) {
                         // CraftBukkit start - Entity damage by entity event + combust event
-                        EntityCombustByEntityEvent event = new EntityCombustByEntityEvent((org.bukkit.entity.Projectile) this.getBukkitEntity(), movingobjectposition.entity.getBukkitEntity(), 5);
+                        EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), movingobjectposition.entity.getBukkitEntity(), 5);
                         movingobjectposition.entity.world.getServer().getPluginManager().callEvent(event);
 
                         if (!event.isCancelled()) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySnowman.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySnowman.java
index cb875c7..fb719a9 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySnowman.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySnowman.java
@@ -11,7 +11,7 @@ public class EntitySnowman extends EntityGolem implements IRangedEntity {
     public EntitySnowman(World world) {
         super(world);
         this.setSize(0.7F, 1.9F);
-        ((Navigation) this.getNavigation()).a(true);
+        this.getNavigation().a(true);
         this.goalSelector.a(1, new PathfinderGoalArrowAttack(this, 1.25D, 20, 10.0F));
         this.goalSelector.a(2, new PathfinderGoalRandomStroll(this, 1.0D));
         this.goalSelector.a(3, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 6.0F));
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySpider.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySpider.java
index 68a253c..b9cc849 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySpider.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySpider.java
@@ -20,7 +20,7 @@ public class EntitySpider extends EntityMonster {
     }
 
     public double an() {
-        return (double) (this.length * 0.5F);
+        return this.length * 0.5F;
     }
 
     protected NavigationAbstract b(World world) {
@@ -29,7 +29,7 @@ public class EntitySpider extends EntityMonster {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, new Byte((byte) 0));
+        this.datawatcher.a(16, (byte) 0);
     }
 
     public void t_() {
@@ -85,7 +85,7 @@ public class EntitySpider extends EntityMonster {
     }
 
     public boolean d(MobEffect mobeffect) {
-        return mobeffect.getEffectId() == MobEffectList.POISON.id ? false : super.d(mobeffect);
+        return mobeffect.getEffectId() != MobEffectList.POISON.id && super.d(mobeffect);
     }
 
     public boolean n() {
@@ -101,7 +101,7 @@ public class EntitySpider extends EntityMonster {
             b0 &= -2;
         }
 
-        this.datawatcher.watch(16, Byte.valueOf(b0));
+        this.datawatcher.watch(16, b0);
     }
 
     public GroupDataEntity prepare(DifficultyDamageScaler difficultydamagescaler, GroupDataEntity groupdataentity) {
@@ -111,7 +111,7 @@ public class EntitySpider extends EntityMonster {
             EntitySkeleton entityskeleton = new EntitySkeleton(this.world);
 
             entityskeleton.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
-            entityskeleton.prepare(difficultydamagescaler, (GroupDataEntity) null);
+            entityskeleton.prepare(difficultydamagescaler, null);
             this.world.addEntity(entityskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.JOCKEY); // CraftBukkit - add SpawnReason
             entityskeleton.mount(this);
         }
@@ -147,7 +147,7 @@ public class EntitySpider extends EntityMonster {
         public boolean a() {
             float f = this.e.c(1.0F);
 
-            return f >= 0.5F ? false : super.a();
+            return !(f >= 0.5F) && super.a();
         }
     }
 
@@ -161,7 +161,7 @@ public class EntitySpider extends EntityMonster {
             float f = this.b.c(1.0F);
 
             if (f >= 0.5F && this.b.bc().nextInt(100) == 0) {
-                this.b.setGoalTarget((EntityLiving) null);
+                this.b.setGoalTarget(null);
                 return false;
             } else {
                 return super.b();
@@ -169,7 +169,7 @@ public class EntitySpider extends EntityMonster {
         }
 
         protected double a(EntityLiving entityliving) {
-            return (double) (4.0F + entityliving.width);
+            return 4.0F + entityliving.width;
         }
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySquid.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySquid.java
index 7ba2444..e603150 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntitySquid.java
@@ -111,16 +111,16 @@ public class EntitySquid extends EntityWaterAnimal {
             }
 
             if (!this.world.isClientSide) {
-                this.motX = (double) (this.bs * this.bp);
-                this.motY = (double) (this.bt * this.bp);
-                this.motZ = (double) (this.bu * this.bp);
+                this.motX = this.bs * this.bp;
+                this.motY = this.bt * this.bp;
+                this.motZ = this.bu * this.bp;
             }
 
             f = MathHelper.sqrt(this.motX * this.motX + this.motZ * this.motZ);
             this.aI += (-((float) MathHelper.b(this.motX, this.motZ)) * 180.0F / 3.1415927F - this.aI) * 0.1F;
             this.yaw = this.aI;
             this.c = (float) ((double) this.c + 3.141592653589793D * (double) this.br * 1.5D);
-            this.a += (-((float) MathHelper.b((double) f, this.motY)) * 180.0F / 3.1415927F - this.a) * 0.1F;
+            this.a += (-((float) MathHelper.b(f, this.motY)) * 180.0F / 3.1415927F - this.a) * 0.1F;
         } else {
             this.bn = MathHelper.e(MathHelper.sin(this.bl)) * 3.1415927F * 0.25F;
             if (!this.world.isClientSide) {
@@ -141,7 +141,7 @@ public class EntitySquid extends EntityWaterAnimal {
 
     public boolean bR() {
         // PaperSpigot - Configurable squid spawn range
-        return this.locY > this.world.paperSpigotConfig.squidMinSpawnHeight && this.locY < (double) this.world.paperSpigotConfig.squidMaxSpawnHeight && super.bR();
+        return this.locY > this.world.paperSpigotConfig.squidMinSpawnHeight && this.locY < this.world.paperSpigotConfig.squidMaxSpawnHeight && super.bR();
     }
 
     public void b(float f, float f1, float f2) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTNTPrimed.java
index 872d965..4874dbc 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTNTPrimed.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTNTPrimed.java
@@ -29,9 +29,9 @@ public class EntityTNTPrimed extends Entity {
         this.setPosition(d0, d1, d2);
         float f = (float) (Math.random() * 3.1415927410125732D * 2.0D);
 
-        this.motX = (double) (-((float) Math.sin((double) f)) * 0.02F);
+        this.motX = -((float) Math.sin(f)) * 0.02F;
         this.motY = 0.20000000298023224D;
-        this.motZ = (double) (-((float) Math.cos((double) f)) * 0.02F);
+        this.motZ = -((float) Math.cos(f)) * 0.02F;
         this.fuseTicks = 80;
         this.lastX = d0;
         this.lastY = d1;
@@ -160,7 +160,7 @@ public class EntityTNTPrimed extends Entity {
         double d4 = this.locY + this.getHeadHeight() - d1;
         double d5 = this.locZ - d2;
 
-        return (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
+        return MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
     }
 
     @Override
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTracker.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTracker.java
index 5d993ac..ef704e7 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTracker.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTracker.java
@@ -122,7 +122,7 @@ public class EntityTracker {
                 CrashReport crashreport = CrashReport.a(throwable, "Adding entity to track");
                 CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity To Track");
 
-                crashreportsystemdetails.a("Tracking range", (Object) (finalI + " blocks"));
+                crashreportsystemdetails.a("Tracking range", finalI + " blocks");
                 crashreportsystemdetails.a("Update interval", new Callable() {
                     public String a() throws Exception {
                         String s = "Once per " + finalI + " ticks"; // CraftBukkit
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index b9a2fca..e5241cb 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -92,8 +92,7 @@ public class EntityTrackerEntry {
                 // CraftBukkit
 
                 for (EntityPlayer trackedPlayer : this.trackedPlayers) {
-                    EntityHuman entityhuman = (EntityHuman) trackedPlayer;
-                    EntityPlayer entityplayer = (EntityPlayer) entityhuman;
+                    EntityPlayer entityplayer = trackedPlayer;
 
                     worldmap.a(entityplayer, itemstack);
                     Packet packet = Items.FILLED_MAP.c(itemstack, this.tracker.world, entityplayer);
@@ -274,7 +273,7 @@ public class EntityTrackerEntry {
 
         if (datawatcher.a()) {
             if (eSpigotFeature.OBFUSCATE_HEALTH.isEnabled()) {
-                List changedMetadata = datawatcher.b();
+                List changedMetadata = datawatcher.c();
                 Iterator iter = changedMetadata.iterator();
                 boolean found = false;
 
@@ -290,12 +289,10 @@ public class EntityTrackerEntry {
                     changedMetadata.add(new DataWatcher.WatchableObject(3, 6, 1.0F));
                 }
 
-                PacketPlayOutEntityMetadata metadataPacket = new PacketPlayOutEntityMetadata(this.tracker.getId(), changedMetadata);
+                PacketPlayOutEntityMetadata modifiedPacket = new PacketPlayOutEntityMetadata(this.tracker.getId(), changedMetadata);
 
-                // Beanes - Broadcast the modified metadata packet to everyone
-                this.broadcast(metadataPacket);
-
-                // Beanes - Send the correct metadata packet to the player
+                // Beanes - Broadcast the modified metadata packet to everyone and send the correct packet to the player
+                this.broadcast(modifiedPacket);
                 if (this.tracker instanceof EntityPlayer)
                     ((EntityPlayer) this.tracker).playerConnection.sendPacket(new PacketPlayOutEntityMetadata(this.tracker.getId(), datawatcher, false));
             } else {
@@ -333,11 +330,8 @@ public class EntityTrackerEntry {
     }
 
     public void a() {
-        Iterator iterator = this.trackedPlayers.iterator();
-
-        while (iterator.hasNext()) {
-            EntityPlayer entityplayer = (EntityPlayer) iterator.next();
 
+        for (EntityPlayer entityplayer : this.trackedPlayers) {
             entityplayer.d(this.tracker);
         }
 
@@ -441,11 +435,8 @@ public class EntityTrackerEntry {
 
                     if (this.tracker instanceof EntityLiving) {
                         EntityLiving entityliving = (EntityLiving) this.tracker;
-                        Iterator iterator = entityliving.getEffects().iterator();
-
-                        while (iterator.hasNext()) {
-                            MobEffect mobeffect = (MobEffect) iterator.next();
 
+                        for (MobEffect mobeffect : entityliving.getEffects()) {
                             entityplayer.playerConnection.sendPacket(new PacketPlayOutEntityEffect(this.tracker.getId(), mobeffect));
                         }
                     }
@@ -472,8 +463,8 @@ public class EntityTrackerEntry {
     }
 
     public void scanPlayers(List list) {
-        for (int i = 0; i < list.size(); ++i) {
-            this.updatePlayer((EntityPlayer) list.get(i));
+        for (EntityHuman entityHuman : list) {
+            this.updatePlayer((EntityPlayer) entityHuman);
         }
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityVillager.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityVillager.java
index 6f5620e..299dd97 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityVillager.java
@@ -101,11 +101,8 @@ public class EntityVillager extends EntityAgeable implements IMerchant, NPC {
             --this.bs;
             if (this.bs <= 0) {
                 if (this.bt) {
-                    Iterator iterator = this.br.iterator();
-
-                    while (iterator.hasNext()) {
-                        MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next();
 
+                    for (MerchantRecipe merchantrecipe : this.br) {
                         if (merchantrecipe.h()) {
                             merchantrecipe.a(this.random.nextInt(6) + this.random.nextInt(6) + 2);
                         }
@@ -145,7 +142,7 @@ public class EntityVillager extends EntityAgeable implements IMerchant, NPC {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(16, Integer.valueOf(0));
+        this.datawatcher.a(16, 0);
     }
 
     public void b(NBTTagCompound nbttagcompound) {
@@ -394,11 +391,10 @@ public class EntityVillager extends EntityAgeable implements IMerchant, NPC {
 
         if (j >= 0 && j < aentityvillager_imerchantrecipeoption1.length) {
             EntityVillager.IMerchantRecipeOption[] aentityvillager_imerchantrecipeoption2 = aentityvillager_imerchantrecipeoption1[j];
-            EntityVillager.IMerchantRecipeOption[] aentityvillager_imerchantrecipeoption3 = aentityvillager_imerchantrecipeoption2;
             int k = aentityvillager_imerchantrecipeoption2.length;
 
             for (int l = 0; l < k; ++l) {
-                EntityVillager.IMerchantRecipeOption entityvillager_imerchantrecipeoption = aentityvillager_imerchantrecipeoption3[l];
+                EntityVillager.IMerchantRecipeOption entityvillager_imerchantrecipeoption = aentityvillager_imerchantrecipeoption2[l];
 
                 entityvillager_imerchantrecipeoption.a(this.br, this.random);
             }
@@ -510,7 +506,7 @@ public class EntityVillager extends EntityAgeable implements IMerchant, NPC {
             EntityWitch entitywitch = new EntityWitch(this.world);
 
             entitywitch.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
-            entitywitch.prepare(this.world.E(new BlockPosition(entitywitch)), (GroupDataEntity) null);
+            entitywitch.prepare(this.world.E(new BlockPosition(entitywitch)), null);
             entitywitch.k(this.ce());
             if (this.hasCustomName()) {
                 entitywitch.setCustomName(this.getCustomName());
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWither.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWither.java
index fb19bad..03183b9 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWither.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWither.java
@@ -35,7 +35,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
         this.setHealth(this.getMaxHealth());
         this.setSize(0.9F, 3.5F);
         this.fireProof = true;
-        ((Navigation) this.getNavigation()).d(true);
+        this.getNavigation().d(true);
         this.goalSelector.a(0, new PathfinderGoalFloat(this));
         this.goalSelector.a(2, new PathfinderGoalArrowAttack(this, 1.0D, 40, 20.0F));
         this.goalSelector.a(5, new PathfinderGoalRandomStroll(this, 1.0D));
@@ -48,10 +48,10 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
 
     protected void h() {
         super.h();
-        this.datawatcher.a(17, new Integer(0));
-        this.datawatcher.a(18, new Integer(0));
-        this.datawatcher.a(19, new Integer(0));
-        this.datawatcher.a(20, new Integer(0));
+        this.datawatcher.a(17, 0);
+        this.datawatcher.a(18, 0);
+        this.datawatcher.a(19, 0);
+        this.datawatcher.a(20, 0);
     }
 
     public void b(NBTTagCompound nbttagcompound) {
@@ -99,7 +99,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
                 d0 = entity.locZ - this.locZ;
                 d1 = d3 * d3 + d0 * d0;
                 if (d1 > 9.0D) {
-                    d2 = (double) MathHelper.sqrt(d1);
+                    d2 = MathHelper.sqrt(d1);
                     this.motX += (d3 / d2 * 0.5D - this.motX) * 0.6000000238418579D;
                     this.motZ += (d0 / d2 * 0.5D - this.motZ) * 0.6000000238418579D;
                 }
@@ -136,7 +136,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
                 double d4 = entity1.locX - d0;
                 double d5 = entity1.locY + (double) entity1.getHeadHeight() - d1;
                 double d6 = entity1.locZ - d2;
-                double d7 = (double) MathHelper.sqrt(d4 * d4 + d6 * d6);
+                double d7 = MathHelper.sqrt(d4 * d4 + d6 * d6);
                 float f = (float) (MathHelper.b(d6, d4) * 180.0D / 3.1415927410125732D) - 90.0F;
                 float f1 = (float) (-(MathHelper.b(d5, d7) * 180.0D / 3.1415927410125732D));
 
@@ -186,8 +186,8 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
 
                 // CraftBukkit start - Use relative location for far away sounds
                 // this.world.a(1013, new BlockPosition(this), 0);
-                int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16;
-                for (EntityPlayer player : (List) MinecraftServer.getServer().getPlayerList().players) {
+                int viewDistance = this.world.getServer().getViewDistance() * 16;
+                for (EntityPlayer player : MinecraftServer.getServer().getPlayerList().players) {
                     double deltaX = this.locX - player.locX;
                     double deltaZ = this.locZ - player.locZ;
                     double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
@@ -308,7 +308,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
                     }
 
                     if (flag) {
-                        this.world.a((EntityHuman) null, 1012, new BlockPosition(this), 0);
+                        this.world.a(null, 1012, new BlockPosition(this), 0);
                     }
                 }
             }
@@ -380,7 +380,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
     }
 
     private void a(int i, double d0, double d1, double d2, boolean flag) {
-        this.world.a((EntityHuman) null, 1014, new BlockPosition(this), 0);
+        this.world.a(null, 1014, new BlockPosition(this), 0);
         double d3 = this.t(i);
         double d4 = this.u(i);
         double d5 = this.v(i);
@@ -447,12 +447,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
         }
 
         if (!this.world.isClientSide) {
-            Iterator iterator = this.world.a(EntityHuman.class, this.getBoundingBox().grow(50.0D, 100.0D, 50.0D)).iterator();
 
-            while (iterator.hasNext()) {
-                EntityHuman entityhuman = (EntityHuman) iterator.next();
-
-                entityhuman.b((Statistic) AchievementList.J);
+            for (EntityHuman entityhuman : this.world.a(EntityHuman.class, this.getBoundingBox().grow(50.0D, 100.0D, 50.0D))) {
+                entityhuman.b(AchievementList.J);
             }
         }
 
@@ -478,7 +475,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
     }
 
     public void r(int i) {
-        this.datawatcher.watch(20, Integer.valueOf(i));
+        this.datawatcher.watch(20, i);
     }
 
     public int s(int i) {
@@ -486,7 +483,7 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
     }
 
     public void b(int i, int j) {
-        this.datawatcher.watch(17 + i, Integer.valueOf(j));
+        this.datawatcher.watch(17 + i, j);
     }
 
     public boolean cm() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWitherSkull.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWitherSkull.java
index f0e627b..61b1208 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWitherSkull.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWitherSkull.java
@@ -90,7 +90,7 @@ public class EntityWitherSkull extends EntityFireball {
     }
 
     protected void h() {
-        this.datawatcher.a(10, Byte.valueOf((byte) 0));
+        this.datawatcher.a(10, (byte) 0);
     }
 
     public boolean isCharged() {
@@ -98,6 +98,6 @@ public class EntityWitherSkull extends EntityFireball {
     }
 
     public void setCharged(boolean flag) {
-        this.datawatcher.watch(10, Byte.valueOf((byte) (flag ? 1 : 0)));
+        this.datawatcher.watch(10, (byte) (flag ? 1 : 0));
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWolf.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWolf.java
index 89b5953..ae0a219 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWolf.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityWolf.java
@@ -19,7 +19,7 @@ public class EntityWolf extends EntityTameableAnimal {
     public EntityWolf(World world) {
         super(world);
         this.setSize(0.6F, 0.8F);
-        ((Navigation) this.getNavigation()).a(true);
+        this.getNavigation().a(true);
         this.goalSelector.a(1, new PathfinderGoalFloat(this));
         this.goalSelector.a(2, this.bm);
         this.goalSelector.a(3, new PathfinderGoalLeapAtTarget(this, 0.4F));
@@ -82,14 +82,14 @@ public class EntityWolf extends EntityTameableAnimal {
     // CraftBukkit end
 
     protected void E() {
-        this.datawatcher.watch(18, Float.valueOf(this.getHealth()));
+        this.datawatcher.watch(18, this.getHealth());
     }
 
     protected void h() {
         super.h();
-        this.datawatcher.a(18, new Float(this.getHealth()));
-        this.datawatcher.a(19, new Byte((byte) 0));
-        this.datawatcher.a(20, new Byte((byte) EnumColor.RED.getColorIndex()));
+        this.datawatcher.a(18, this.getHealth());
+        this.datawatcher.a(19, (byte) 0);
+        this.datawatcher.a(20, (byte) EnumColor.RED.getColorIndex());
     }
 
     protected void a(BlockPosition blockposition, Block block) {
@@ -183,7 +183,7 @@ public class EntityWolf extends EntityTameableAnimal {
                     float f1 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F;
                     float f2 = (this.random.nextFloat() * 2.0F - 1.0F) * this.width * 0.5F;
 
-                    this.world.addParticle(EnumParticle.WATER_SPLASH, this.locX + (double) f1, (double) (f + 0.8F), this.locZ + (double) f2, this.motX, this.motY, this.motZ, new int[0]);
+                    this.world.addParticle(EnumParticle.WATER_SPLASH, this.locX + (double) f1, f + 0.8F, this.locZ + (double) f2, this.motX, this.motY, this.motZ, new int[0]);
                 }
             }
         }
@@ -218,7 +218,7 @@ public class EntityWolf extends EntityTameableAnimal {
         boolean flag = entity.damageEntity(DamageSource.mobAttack(this), (float) ((int) this.getAttributeInstance(GenericAttributes.ATTACK_DAMAGE).getValue()));
 
         if (flag) {
-            this.a((EntityLiving) this, entity);
+            this.a(this, entity);
         }
 
         return flag;
@@ -250,7 +250,7 @@ public class EntityWolf extends EntityTameableAnimal {
 
                         this.heal((float) itemfood.getNutrition(itemstack), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // CraftBukkit
                         if (itemstack.count <= 0) {
-                            entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                            entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
                         }
 
                         return true;
@@ -261,7 +261,7 @@ public class EntityWolf extends EntityTameableAnimal {
                     if (enumcolor != this.getCollarColor()) {
                         this.setCollarColor(enumcolor);
                         if (!entityhuman.abilities.canInstantlyBuild && --itemstack.count <= 0) {
-                            entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                            entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
                         }
 
                         return true;
@@ -281,7 +281,7 @@ public class EntityWolf extends EntityTameableAnimal {
             }
 
             if (itemstack.count <= 0) {
-                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
             }
 
             if (!this.world.isClientSide) {
@@ -308,7 +308,7 @@ public class EntityWolf extends EntityTameableAnimal {
     }
 
     public boolean d(ItemStack itemstack) {
-        return itemstack == null ? false : (!(itemstack.getItem() instanceof ItemFood) ? false : ((ItemFood) itemstack.getItem()).g());
+        return itemstack != null && (itemstack.getItem() instanceof ItemFood && ((ItemFood) itemstack.getItem()).g());
     }
 
     public int bV() {
@@ -323,9 +323,9 @@ public class EntityWolf extends EntityTameableAnimal {
         byte b0 = this.datawatcher.getByte(16);
 
         if (flag) {
-            this.datawatcher.watch(16, Byte.valueOf((byte) (b0 | 2)));
+            this.datawatcher.watch(16, (byte) (b0 | 2));
         } else {
-            this.datawatcher.watch(16, Byte.valueOf((byte) (b0 & -3)));
+            this.datawatcher.watch(16, (byte) (b0 & -3));
         }
 
     }
@@ -335,7 +335,7 @@ public class EntityWolf extends EntityTameableAnimal {
     }
 
     public void setCollarColor(EnumColor enumcolor) {
-        this.datawatcher.watch(20, Byte.valueOf((byte) (enumcolor.getInvColorIndex() & 15)));
+        this.datawatcher.watch(20, (byte) (enumcolor.getInvColorIndex() & 15));
     }
 
     public EntityWolf b(EntityAgeable entityageable) {
@@ -352,9 +352,9 @@ public class EntityWolf extends EntityTameableAnimal {
 
     public void p(boolean flag) {
         if (flag) {
-            this.datawatcher.watch(19, Byte.valueOf((byte) 1));
+            this.datawatcher.watch(19, (byte) 1);
         } else {
-            this.datawatcher.watch(19, Byte.valueOf((byte) 0));
+            this.datawatcher.watch(19, (byte) 0);
         }
 
     }
@@ -369,7 +369,7 @@ public class EntityWolf extends EntityTameableAnimal {
         } else {
             EntityWolf entitywolf = (EntityWolf) entityanimal;
 
-            return !entitywolf.isTamed() ? false : (entitywolf.isSitting() ? false : this.isInLove() && entitywolf.isInLove());
+            return entitywolf.isTamed() && (!entitywolf.isSitting() && this.isInLove() && entitywolf.isInLove());
         }
     }
 
@@ -391,7 +391,7 @@ public class EntityWolf extends EntityTameableAnimal {
                 }
             }
 
-            return entityliving instanceof EntityHuman && entityliving1 instanceof EntityHuman && !((EntityHuman) entityliving1).a((EntityHuman) entityliving) ? false : !(entityliving instanceof EntityHorse) || !((EntityHorse) entityliving).isTame();
+            return (!(entityliving instanceof EntityHuman) || !(entityliving1 instanceof EntityHuman) || ((EntityHuman) entityliving1).a((EntityHuman) entityliving)) && (!(entityliving instanceof EntityHorse) || !((EntityHorse) entityliving).isTame());
         } else {
             return false;
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityZombie.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityZombie.java
index 6c6a13a..a7daf95 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/EntityZombie.java
@@ -5,7 +5,6 @@ import java.util.List;
 import java.util.UUID;
 
 //CraftBukkit start
-import org.bukkit.craftbukkit.entity.CraftLivingEntity;
 import org.bukkit.event.entity.CreatureSpawnEvent;
 import org.bukkit.event.entity.EntityCombustByEntityEvent;
 import org.bukkit.event.entity.EntityCombustEvent;
@@ -14,7 +13,7 @@ import org.bukkit.event.entity.EntityTargetEvent;
 
 public class EntityZombie extends EntityMonster {
 
-    protected static final IAttribute a = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
+    protected static final IAttribute a = (new AttributeRanged(null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
     private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
     private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", org.github.paperspigot.PaperSpigotConfig.babyZombieMovementSpeed, 1); // PaperSpigot - Configurable baby zombie movement speed
     private final PathfinderGoalBreakDoor bm = new PathfinderGoalBreakDoor(this);
@@ -26,7 +25,7 @@ public class EntityZombie extends EntityMonster {
 
     public EntityZombie(World world) {
         super(world);
-        ((Navigation) this.getNavigation()).b(true);
+        this.getNavigation().b(true);
         this.goalSelector.a(0, new PathfinderGoalFloat(this));
         this.goalSelector.a(2, new PathfinderGoalMeleeAttack(this, EntityHuman.class, 1.0D, false));
         this.goalSelector.a(5, new PathfinderGoalMoveTowardsRestriction(this, 1.0D));
@@ -57,9 +56,9 @@ public class EntityZombie extends EntityMonster {
 
     protected void h() {
         super.h();
-        this.getDataWatcher().a(12, Byte.valueOf((byte) 0));
-        this.getDataWatcher().a(13, Byte.valueOf((byte) 0));
-        this.getDataWatcher().a(14, Byte.valueOf((byte) 0));
+        this.getDataWatcher().a(12, (byte) 0);
+        this.getDataWatcher().a(13, (byte) 0);
+        this.getDataWatcher().a(14, (byte) 0);
     }
 
     public int br() {
@@ -82,7 +81,7 @@ public class EntityZombie extends EntityMonster {
             if (flag) {
                 this.goalSelector.a(1, this.bm);
             } else {
-                this.goalSelector.a((PathfinderGoal) this.bm);
+                this.goalSelector.a(this.bm);
             }
         }
 
@@ -101,7 +100,7 @@ public class EntityZombie extends EntityMonster {
     }
 
     public void setBaby(boolean flag) {
-        this.getDataWatcher().watch(12, Byte.valueOf((byte) (flag ? 1 : 0)));
+        this.getDataWatcher().watch(12, (byte) (flag ? 1 : 0));
         if (this.world != null && !this.world.isClientSide) {
             AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
 
@@ -119,7 +118,7 @@ public class EntityZombie extends EntityMonster {
     }
 
     public void setVillager(boolean flag) {
-        this.getDataWatcher().watch(13, Byte.valueOf((byte) (flag ? 1 : 0)));
+        this.getDataWatcher().watch(13, (byte) (flag ? 1 : 0));
     }
 
     public void m() {
@@ -136,7 +135,7 @@ public class EntityZombie extends EntityMonster {
                         itemstack.setData(itemstack.h() + this.random.nextInt(2));
                         if (itemstack.h() >= itemstack.j()) {
                             this.b(itemstack);
-                            this.setEquipment(4, (ItemStack) null);
+                            this.setEquipment(4, null);
                         }
                     }
 
@@ -183,11 +182,11 @@ public class EntityZombie extends EntityMonster {
                     int k1 = k + MathHelper.nextInt(this.random, 7, 40) * MathHelper.nextInt(this.random, -1, 1);
 
                     if (World.a(this.world, new BlockPosition(i1, j1 - 1, k1)) && !this.world.isLightLevel(new BlockPosition(i1, j1, k1), 10)) { // Paper
-                        entityzombie.setPosition((double) i1, (double) j1, (double) k1);
-                        if (!this.world.isPlayerNearby((double) i1, (double) j1, (double) k1, 7.0D) && this.world.a(entityzombie.getBoundingBox(), (Entity) entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
+                        entityzombie.setPosition(i1, j1, k1);
+                        if (!this.world.isPlayerNearby(i1, j1, k1, 7.0D) && this.world.a(entityzombie.getBoundingBox(), entityzombie) && this.world.getCubes(entityzombie, entityzombie.getBoundingBox()).isEmpty() && !this.world.containsLiquid(entityzombie.getBoundingBox())) {
                             this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
                             entityzombie.setGoalTarget(entityliving, EntityTargetEvent.TargetReason.REINFORCEMENT_TARGET, true);
-                            entityzombie.prepare(this.world.E(new BlockPosition(entityzombie)), (GroupDataEntity) null);
+                            entityzombie.prepare(this.world.E(new BlockPosition(entityzombie)), null);
                             this.getAttributeInstance(EntityZombie.a).b(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0));
                             entityzombie.getAttributeInstance(EntityZombie.a).b(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0));
                             break;
@@ -339,7 +338,7 @@ public class EntityZombie extends EntityMonster {
 
             entityzombie.m(entityliving);
             this.world.kill(entityliving);
-            entityzombie.prepare(this.world.E(new BlockPosition(entityzombie)), (GroupDataEntity) null);
+            entityzombie.prepare(this.world.E(new BlockPosition(entityzombie)), null);
             entityzombie.setVillager(true);
             if (entityliving.isBaby()) {
                 entityzombie.setBaby(true);
@@ -352,7 +351,7 @@ public class EntityZombie extends EntityMonster {
             }
 
             this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.INFECTION); // CraftBukkit - add SpawnReason
-            this.world.a((EntityHuman) null, 1016, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0);
+            this.world.a(null, 1016, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0);
         }
 
     }
@@ -368,7 +367,7 @@ public class EntityZombie extends EntityMonster {
     }
 
     protected boolean a(ItemStack itemstack) {
-        return itemstack.getItem() == Items.EGG && this.isBaby() && this.au() ? false : super.a(itemstack);
+        return (itemstack.getItem() != Items.EGG || !this.isBaby() || !this.au()) && super.a(itemstack);
     }
 
     public GroupDataEntity prepare(DifficultyDamageScaler difficultydamagescaler, GroupDataEntity groupdataentity) {
@@ -377,7 +376,7 @@ public class EntityZombie extends EntityMonster {
 
         this.j(this.random.nextFloat() < 0.55F * f);
         if (object == null) {
-            object = new EntityZombie.GroupDataZombie(this.world.random.nextFloat() < 0.05F, this.world.random.nextFloat() < 0.05F, (EntityZombie.SyntheticClass_1) null);
+            object = new EntityZombie.GroupDataZombie(this.world.random.nextFloat() < 0.05F, this.world.random.nextFloat() < 0.05F, null);
         }
 
         if (object instanceof EntityZombie.GroupDataZombie) {
@@ -402,7 +401,7 @@ public class EntityZombie extends EntityMonster {
                     EntityChicken entitychicken1 = new EntityChicken(this.world);
 
                     entitychicken1.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
-                    entitychicken1.prepare(difficultydamagescaler, (GroupDataEntity) null);
+                    entitychicken1.prepare(difficultydamagescaler, null);
                     entitychicken1.l(true);
                     this.world.addEntity(entitychicken1, CreatureSpawnEvent.SpawnReason.MOUNT);
                     this.mount(entitychicken1);
@@ -447,7 +446,7 @@ public class EntityZombie extends EntityMonster {
             }
 
             if (itemstack.count <= 0) {
-                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
+                entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, null);
             }
 
             if (!this.world.isClientSide) {
@@ -462,7 +461,7 @@ public class EntityZombie extends EntityMonster {
 
     protected void a(int i) {
         this.bn = i;
-        this.getDataWatcher().watch(14, Byte.valueOf((byte) 1));
+        this.getDataWatcher().watch(14, (byte) 1);
         this.removeEffect(MobEffectList.WEAKNESS.id);
         this.addEffect(new MobEffect(MobEffectList.INCREASE_DAMAGE.id, i, Math.min(this.world.getDifficulty().a() - 1, 0)));
         this.world.broadcastEntityEffect(this, (byte) 16);
@@ -480,7 +479,7 @@ public class EntityZombie extends EntityMonster {
         EntityVillager entityvillager = new EntityVillager(this.world);
 
         entityvillager.m(this);
-        entityvillager.prepare(this.world.E(new BlockPosition(entityvillager)), (GroupDataEntity) null);
+        entityvillager.prepare(this.world.E(new BlockPosition(entityvillager)), null);
         entityvillager.cp();
         if (this.isBaby()) {
             entityvillager.setAgeRaw(-24000);
@@ -495,7 +494,7 @@ public class EntityZombie extends EntityMonster {
 
         this.world.addEntity(entityvillager, CreatureSpawnEvent.SpawnReason.CURED); // CraftBukkit - add SpawnReason
         entityvillager.addEffect(new MobEffect(MobEffectList.CONFUSION.id, 200, 0));
-        this.world.a((EntityHuman) null, 1017, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0);
+        this.world.a(null, 1017, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0);
     }
 
     protected int cr() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ExpirableListEntry.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ExpirableListEntry.java
index e643741..b9b82b6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ExpirableListEntry.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ExpirableListEntry.java
@@ -56,7 +56,7 @@ public abstract class ExpirableListEntry extends JsonListEntry {
     }
 
     boolean hasExpired() {
-        return this.d == null ? false : this.d.before(new Date());
+        return this.d != null && this.d.before(new Date());
     }
 
     protected void a(JsonObject jsonobject) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/Explosion.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/Explosion.java
index 3c280f2..3c891d9 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/Explosion.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/Explosion.java
@@ -63,9 +63,9 @@ public class Explosion {
             for (i = 0; i < 16; ++i) {
                 for (j = 0; j < 16; ++j) {
                     if (k == 0 || k == 15 || i == 0 || i == 15 || j == 0 || j == 15) {
-                        double d0 = (double) ((float) k / 15.0F * 2.0F - 1.0F);
-                        double d1 = (double) ((float) i / 15.0F * 2.0F - 1.0F);
-                        double d2 = (double) ((float) j / 15.0F * 2.0F - 1.0F);
+                        double d0 = (float) k / 15.0F * 2.0F - 1.0F;
+                        double d1 = (float) i / 15.0F * 2.0F - 1.0F;
+                        double d2 = (float) j / 15.0F * 2.0F - 1.0F;
                         double d3 = Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2);
 
                         d0 /= d3;
@@ -110,17 +110,12 @@ public class Explosion {
         int j1 = MathHelper.floor(this.posZ - (double) f3 - 1.0D);
         int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D);
         // PaperSpigot start - Fix lag from explosions processing dead entities
-        List list = this.world.a(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate() {
-            @Override
-            public boolean apply(Entity entity) {
-                return IEntitySelector.d.apply(entity) && !entity.dead;
-            }
-        });
+        List list = this.world.a(this.source, new AxisAlignedBB(i, l, j1, j, i1, k1), entity -> IEntitySelector.d.apply(entity) && !entity.dead);
         // PaperSpigot end
         Vec3D vec3d = new Vec3D(this.posX, this.posY, this.posZ);
 
-        for (int l1 = 0; l1 < list.size(); ++l1) {
-            Entity entity = (Entity) list.get(l1);
+        for (Object o : list) {
+            Entity entity = (Entity) o;
 
             if (!entity.aW()) {
                 double d7 = entity.f(this.posX, this.posY, this.posZ) / (double) f3;
@@ -129,7 +124,7 @@ public class Explosion {
                     double d8 = entity.locX - this.posX;
                     double d9 = entity.locY + (double) entity.getHeadHeight() - this.posY;
                     double d10 = entity.locZ - this.posZ;
-                    double d11 = (double) MathHelper.sqrt(d8 * d8 + d9 * d9 + d10 * d10);
+                    double d11 = MathHelper.sqrt(d8 * d8 + d9 * d9 + d10 * d10);
 
                     if (d11 != 0.0D) {
                         d8 /= d11;
@@ -191,7 +186,7 @@ public class Explosion {
 
             List blockList = Lists.newArrayList();
             for (int i1 = this.blocks.size() - 1; i1 >= 0; i1--) {
-                BlockPosition cpos = (BlockPosition) this.blocks.get(i1);
+                BlockPosition cpos = this.blocks.get(i1);
                 org.bukkit.block.Block bblock = bworld.getBlockAt(cpos.getX(), cpos.getY(), cpos.getZ());
                 if (bblock.getType() != org.bukkit.Material.AIR) {
                     blockList.add(bblock);
@@ -236,20 +231,20 @@ public class Explosion {
 
                 world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, blockposition); // Spigot
                 if (flag) {
-                    double d0 = (double) ((float) blockposition.getX() + this.world.random.nextFloat());
-                    double d1 = (double) ((float) blockposition.getY() + this.world.random.nextFloat());
-                    double d2 = (double) ((float) blockposition.getZ() + this.world.random.nextFloat());
+                    double d0 = (float) blockposition.getX() + this.world.random.nextFloat();
+                    double d1 = (float) blockposition.getY() + this.world.random.nextFloat();
+                    double d2 = (float) blockposition.getZ() + this.world.random.nextFloat();
                     double d3 = d0 - this.posX;
                     double d4 = d1 - this.posY;
                     double d5 = d2 - this.posZ;
-                    double d6 = (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
+                    double d6 = MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
 
                     d3 /= d6;
                     d4 /= d6;
                     d5 /= d6;
                     double d7 = 0.5D / (d6 / (double) this.size + 0.1D);
 
-                    d7 *= (double) (this.world.random.nextFloat() * this.world.random.nextFloat() + 0.3F);
+                    d7 *= this.world.random.nextFloat() * this.world.random.nextFloat() + 0.3F;
                     d3 *= d7;
                     d4 *= d7;
                     d5 *= d7;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/FileIOThread.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/FileIOThread.java
index 4476f3b..1dfa011 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/FileIOThread.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/FileIOThread.java
@@ -41,7 +41,7 @@ public class FileIOThread implements Runnable {
 
     private void c() {
         for (int i = 0; i < this.b.size(); ++i) {
-            IAsyncChunkSaver iasyncchunksaver = (IAsyncChunkSaver) this.b.get(i);
+            IAsyncChunkSaver iasyncchunksaver = this.b.get(i);
             boolean flag = iasyncchunksaver.c();
 
             if (!flag) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/GameProfileBanEntry.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/GameProfileBanEntry.java
index 16fe481..daa1bc3 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/GameProfileBanEntry.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/GameProfileBanEntry.java
@@ -8,7 +8,7 @@ import java.util.UUID;
 public class GameProfileBanEntry extends ExpirableListEntry {
 
     public GameProfileBanEntry(GameProfile gameprofile) {
-        this(gameprofile, (Date) null, (String) null, (Date) null, (String) null);
+        this(gameprofile, null, null, null, null);
     }
 
     public GameProfileBanEntry(GameProfile gameprofile, Date date, String s, Date date1, String s1) {
@@ -21,8 +21,8 @@ public class GameProfileBanEntry extends ExpirableListEntry {
 
     protected void a(JsonObject jsonobject) {
         if (this.getKey() != null) {
-            jsonobject.addProperty("uuid", ((GameProfile) this.getKey()).getId() == null ? "" : ((GameProfile) this.getKey()).getId().toString());
-            jsonobject.addProperty("name", ((GameProfile) this.getKey()).getName());
+            jsonobject.addProperty("uuid", this.getKey().getId() == null ? "" : this.getKey().getId().toString());
+            jsonobject.addProperty("name", this.getKey().getName());
             super.a(jsonobject);
         }
     }
@@ -37,7 +37,7 @@ public class GameProfileBanEntry extends ExpirableListEntry {
 
             try {
                 uuid = UUID.fromString(s);
-            } catch (Throwable throwable) {
+            } catch (Throwable ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/GenericAttributes.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/GenericAttributes.java
index 0cc3e2f..d0476fe 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/GenericAttributes.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/GenericAttributes.java
@@ -10,20 +10,17 @@ public class GenericAttributes {
 
     private static final Logger f = LogManager.getLogger();
     // Spigot start
-    public static final IAttribute maxHealth = (new AttributeRanged((IAttribute) null, "generic.maxHealth", 20.0D, 0.1D,  org.spigotmc.SpigotConfig.maxHealth)).a("Max Health").a(true);
-    public static final IAttribute FOLLOW_RANGE = (new AttributeRanged((IAttribute) null, "generic.followRange", 32.0D, 0.0D, 2048.0D)).a("Follow Range");
-    public static final IAttribute c = (new AttributeRanged((IAttribute) null, "generic.knockbackResistance", 0.0D, 0.0D, 1.0D)).a("Knockback Resistance");
-    public static final IAttribute MOVEMENT_SPEED = (new AttributeRanged((IAttribute) null, "generic.movementSpeed", 0.699999988079071D, 0.0D, org.spigotmc.SpigotConfig.movementSpeed)).a("Movement Speed").a(true);
-    public static final IAttribute ATTACK_DAMAGE = new AttributeRanged((IAttribute) null, "generic.attackDamage", 2.0D, 0.0D, org.spigotmc.SpigotConfig.attackDamage);
+    public static final IAttribute maxHealth = (new AttributeRanged(null, "generic.maxHealth", 20.0D, 0.1D,  org.spigotmc.SpigotConfig.maxHealth)).a("Max Health").a(true);
+    public static final IAttribute FOLLOW_RANGE = (new AttributeRanged(null, "generic.followRange", 32.0D, 0.0D, 2048.0D)).a("Follow Range");
+    public static final IAttribute c = (new AttributeRanged(null, "generic.knockbackResistance", 0.0D, 0.0D, 1.0D)).a("Knockback Resistance");
+    public static final IAttribute MOVEMENT_SPEED = (new AttributeRanged(null, "generic.movementSpeed", 0.699999988079071D, 0.0D, org.spigotmc.SpigotConfig.movementSpeed)).a("Movement Speed").a(true);
+    public static final IAttribute ATTACK_DAMAGE = new AttributeRanged(null, "generic.attackDamage", 2.0D, 0.0D, org.spigotmc.SpigotConfig.attackDamage);
     // Spigot end
 
     public static NBTTagList a(AttributeMapBase attributemapbase) {
         NBTTagList nbttaglist = new NBTTagList();
-        Iterator iterator = attributemapbase.a().iterator();
-
-        while (iterator.hasNext()) {
-            AttributeInstance attributeinstance = (AttributeInstance) iterator.next();
 
+        for (AttributeInstance attributeinstance : attributemapbase.a()) {
             nbttaglist.add(a(attributeinstance));
         }
 
@@ -40,10 +37,9 @@ public class GenericAttributes {
 
         if (collection != null && !collection.isEmpty()) {
             NBTTagList nbttaglist = new NBTTagList();
-            Iterator iterator = collection.iterator();
 
-            while (iterator.hasNext()) {
-                AttributeModifier attributemodifier = (AttributeModifier) iterator.next();
+            for (Object o : collection) {
+                AttributeModifier attributemodifier = (AttributeModifier) o;
 
                 if (attributemodifier.e()) {
                     nbttaglist.add(a(attributemodifier));
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/HandshakeListener.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/HandshakeListener.java
index 64f6a9b..7ff8cae 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/HandshakeListener.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/HandshakeListener.java
@@ -9,7 +9,7 @@ public class HandshakeListener implements PacketHandshakingInListener {
 
     private static final com.google.gson.Gson gson = new com.google.gson.Gson(); // Spigot
     // CraftBukkit start - add fields
-    private static final HashMap throttleTracker = new HashMap();
+    private static final HashMap throttleTracker = new HashMap<>();
     private static int throttleCounter = 0;
     // CraftBukkit end
 
@@ -71,7 +71,7 @@ public class HandshakeListener implements PacketHandshakingInListener {
                 this.b.handle(new PacketLoginOutDisconnect(chatcomponenttext));
                 this.b.close(chatcomponenttext);
             } else {
-                this.b.a((PacketListener) (new LoginListener(this.a, this.b)));
+                this.b.a(new LoginListener(this.a, this.b));
                 // Spigot Start
                 if (org.spigotmc.SpigotConfig.bungee) {
                     String[] split = packethandshakinginsetprotocol.hostname.split("\00");
@@ -98,7 +98,7 @@ public class HandshakeListener implements PacketHandshakingInListener {
 
         case 2:
             this.b.a(EnumProtocol.STATUS);
-            this.b.a((PacketListener) (new PacketStatusListener(this.a, this.b)));
+            this.b.a(new PacketStatusListener(this.a, this.b));
             break;
 
         default:
@@ -116,14 +116,12 @@ public class HandshakeListener implements PacketHandshakingInListener {
         static {
             try {
                 HandshakeListener.SyntheticClass_1.a[EnumProtocol.LOGIN.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 HandshakeListener.SyntheticClass_1.a[EnumProtocol.STATUS.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/IBlockState.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/IBlockState.java
index fdb0cf8..42a8469 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/IBlockState.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/IBlockState.java
@@ -18,19 +18,19 @@ public interface IBlockState> {
 
     // TacoSpigot start
     @SuppressWarnings("Convert2Lambda") // We have to use anon for performance reasons :/
-    public static final Indexer INDEXER = new Indexer() {
+    Indexer INDEXER = new Indexer() {
         @Override
         public int getId(IBlockState state) {
             return state.getId();
         }
     };
 
-    public default void tryInitId() {}
+    default void tryInitId() {}
 
-    public int getId();
+    int getId();
 
-    public int getValueId(T value);
+    int getValueId(T value);
 
-    public T getByValueId(int id);
+    T getByValueId(int id);
     // TacoSpigot end
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/IntCache.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/IntCache.java
index 3cab644..a55e209 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/IntCache.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/IntCache.java
@@ -17,13 +17,13 @@ public class IntCache {
         protected IntCache initialValue() {
             IntCache cache = new IntCache();
             synchronized(allCaches) {
-                allCaches.add(new WeakReference(cache));
+                allCaches.add(new WeakReference<>(cache));
             }
             return new IntCache();
         }
     };
 
-    private static List> allCaches = new ArrayList>();
+    private static List> allCaches = new ArrayList<>();
 
     private int a = 256;
     private List b = Lists.newArrayList();
@@ -44,7 +44,7 @@ public class IntCache {
                 if (c.size() < org.spigotmc.SpigotConfig.intCacheLimit) this.c.add(aint);
                 return aint;
             } else {
-                aint = (int[]) this.b.remove(this.b.size() - 1);
+                aint = this.b.remove(this.b.size() - 1);
                 if (c.size() < org.spigotmc.SpigotConfig.intCacheLimit) this.c.add(aint);
                 return aint;
             }
@@ -60,7 +60,7 @@ public class IntCache {
             if (e.size() < org.spigotmc.SpigotConfig.intCacheLimit) this.e.add(aint);
             return aint;
         } else {
-            aint = (int[]) this.d.remove(this.d.size() - 1);
+            aint = this.d.remove(this.d.size() - 1);
             if (e.size() < org.spigotmc.SpigotConfig.intCacheLimit) this.e.add(aint);
             return aint;
         }
@@ -109,7 +109,7 @@ public class IntCache {
             }
         }
 
-        return String.valueOf(numberOfCaches) + " IntCaches. In Total => cache: " + cache + ", tcache: " + tcache + ", allocated: " + allocated + ", tallocated: " + tallocated;
+        return numberOfCaches + " IntCaches. In Total => cache: " + cache + ", tcache: " + tcache + ", allocated: " + allocated + ", tallocated: " + tallocated;
     }
     // Migot end
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryCraftResult.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryCraftResult.java
index 7802503..b035406 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryCraftResult.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryCraftResult.java
@@ -24,7 +24,7 @@ public class InventoryCraftResult implements IInventory {
     public void onOpen(CraftHumanEntity who) {}
     public void onClose(CraftHumanEntity who) {}
     public java.util.List getViewers() {
-        return new java.util.ArrayList();
+        return new java.util.ArrayList<>();
     }
 
     public void setMaxStackSize(int size) {
@@ -51,7 +51,7 @@ public class InventoryCraftResult implements IInventory {
     }
 
     public IChatBaseComponent getScoreboardDisplayName() {
-        return (IChatBaseComponent) (this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]));
+        return this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]);
     }
 
     public ItemStack splitStack(int i, int j) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryCrafting.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryCrafting.java
index 933d39c..3220d8c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryCrafting.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryCrafting.java
@@ -16,7 +16,7 @@ public class InventoryCrafting implements IInventory {
     private final Container d;
 
     // CraftBukkit start - add fields
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     public IRecipe currentRecipe;
     public IInventory resultInventory;
     private EntityHuman owner;
@@ -87,7 +87,7 @@ public class InventoryCrafting implements IInventory {
     }
 
     public IChatBaseComponent getScoreboardDisplayName() {
-        return (IChatBaseComponent) (this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]));
+        return this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]);
     }
 
     public ItemStack splitWithoutUpdate(int i) {
@@ -108,7 +108,7 @@ public class InventoryCrafting implements IInventory {
             if (this.items[i].count <= j) {
                 itemstack = this.items[i];
                 this.items[i] = null;
-                this.d.a((IInventory) this);
+                this.d.a(this);
                 return itemstack;
             } else {
                 itemstack = this.items[i].cloneAndSubtract(j);
@@ -116,7 +116,7 @@ public class InventoryCrafting implements IInventory {
                     this.items[i] = null;
                 }
 
-                this.d.a((IInventory) this);
+                this.d.a(this);
                 return itemstack;
             }
         } else {
@@ -126,7 +126,7 @@ public class InventoryCrafting implements IInventory {
 
     public void setItem(int i, ItemStack itemstack) {
         this.items[i] = itemstack;
-        this.d.a((IInventory) this);
+        this.d.a(this);
     }
 
     public int getMaxStackSize() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryEnderChest.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryEnderChest.java
index 22c9b0b..b50f131 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryEnderChest.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryEnderChest.java
@@ -11,7 +11,7 @@ public class InventoryEnderChest extends InventorySubcontainer {
     private TileEntityEnderChest a;
 
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     public org.bukkit.entity.Player player;
     private int maxStack = MAX_STACK;
 
@@ -56,7 +56,7 @@ public class InventoryEnderChest extends InventorySubcontainer {
         int i;
 
         for (i = 0; i < this.getSize(); ++i) {
-            this.setItem(i, (ItemStack) null);
+            this.setItem(i, null);
         }
 
         for (i = 0; i < nbttaglist.size(); ++i) {
@@ -89,7 +89,7 @@ public class InventoryEnderChest extends InventorySubcontainer {
     }
 
     public boolean a(EntityHuman entityhuman) {
-        return this.a != null && !this.a.a(entityhuman) ? false : super.a(entityhuman);
+        return (this.a == null || this.a.a(entityhuman)) && super.a(entityhuman);
     }
 
     public void startOpen(EntityHuman entityhuman) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryHorseChest.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryHorseChest.java
index 5e913a5..dd1069b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryHorseChest.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryHorseChest.java
@@ -13,7 +13,7 @@ public class InventoryHorseChest extends InventorySubcontainer {
     }
 
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     private EntityHorse horse;
     private int maxStack = MAX_STACK;
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryLargeChest.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryLargeChest.java
index 7e83ce3..58d92e7 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryLargeChest.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryLargeChest.java
@@ -14,7 +14,7 @@ public class InventoryLargeChest implements ITileInventory {
     public ITileInventory right;
 
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
 
     public ItemStack[] getContents() {
         ItemStack[] result = new ItemStack[this.getSize()];
@@ -87,7 +87,7 @@ public class InventoryLargeChest implements ITileInventory {
     }
 
     public IChatBaseComponent getScoreboardDisplayName() {
-        return (IChatBaseComponent) (this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]));
+        return this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]);
     }
 
     public ItemStack getItem(int i) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryMerchant.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryMerchant.java
index 66a3bab..ceb653c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryMerchant.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventoryMerchant.java
@@ -16,7 +16,7 @@ public class InventoryMerchant implements IInventory {
     private int e;
 
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     private int maxStack = MAX_STACK;
 
     public ItemStack[] getContents() {
@@ -126,7 +126,7 @@ public class InventoryMerchant implements IInventory {
     }
 
     public IChatBaseComponent getScoreboardDisplayName() {
-        return (IChatBaseComponent) (this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]));
+        return this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]);
     }
 
     public int getMaxStackSize() {
@@ -160,7 +160,7 @@ public class InventoryMerchant implements IInventory {
         }
 
         if (itemstack == null) {
-            this.setItem(2, (ItemStack) null);
+            this.setItem(2, null);
         } else {
             MerchantRecipeList merchantrecipelist = this.merchant.getOffers(this.player);
 
@@ -176,10 +176,10 @@ public class InventoryMerchant implements IInventory {
                         this.recipe = merchantrecipe;
                         this.setItem(2, merchantrecipe.getBuyItem3().cloneItemStack());
                     } else {
-                        this.setItem(2, (ItemStack) null);
+                        this.setItem(2, null);
                     }
                 } else {
-                    this.setItem(2, (ItemStack) null);
+                    this.setItem(2, null);
                 }
             }
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventorySubcontainer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventorySubcontainer.java
index 0e45148..2570c7d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/InventorySubcontainer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/InventorySubcontainer.java
@@ -1,7 +1,6 @@
 package net.minecraft.server;
 
 import com.google.common.collect.Lists;
-import java.util.List;
 
 // CraftBukkit start
 import java.util.List;
@@ -18,7 +17,7 @@ public class InventorySubcontainer implements IInventory {
     private boolean e;
 
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     private int maxStack = MAX_STACK;
     protected org.bukkit.inventory.InventoryHolder bukkitOwner;
 
@@ -170,7 +169,7 @@ public class InventorySubcontainer implements IInventory {
     }
 
     public IChatBaseComponent getScoreboardDisplayName() {
-        return (IChatBaseComponent) (this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]));
+        return this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]);
     }
 
     public int getMaxStackSize() {
@@ -179,8 +178,8 @@ public class InventorySubcontainer implements IInventory {
 
     public void update() {
         if (this.d != null) {
-            for (int i = 0; i < this.d.size(); ++i) {
-                ((IInventoryListener) this.d.get(i)).a(this);
+            for (IInventoryListener iInventoryListener : this.d) {
+                iInventoryListener.a(this);
             }
         }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemArmor.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemArmor.java
index cd77ba5..46cbfe2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemArmor.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemArmor.java
@@ -18,7 +18,7 @@ public class ItemArmor extends Item {
             int i = blockposition.getX();
             int j = blockposition.getY();
             int k = blockposition.getZ();
-            AxisAlignedBB axisalignedbb = new AxisAlignedBB((double) i, (double) j, (double) k, (double) (i + 1), (double) (j + 1), (double) (k + 1));
+            AxisAlignedBB axisalignedbb = new AxisAlignedBB(i, j, k, i + 1, j + 1, k + 1);
             List list = isourceblock.getWorld().a(EntityLiving.class, axisalignedbb, Predicates.and(IEntitySelector.d, new IEntitySelector.EntitySelectorEquipable(itemstack)));
 
             if (list.size() > 0) {
@@ -46,7 +46,7 @@ public class ItemArmor extends Item {
                     itemstack.count++;
                     // Chain to handler for new item
                     ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                    IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                     if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                         idispensebehavior.a(isourceblock, eventStack);
                         return itemstack;
@@ -92,7 +92,7 @@ public class ItemArmor extends Item {
     }
 
     public boolean d_(ItemStack itemstack) {
-        return this.m != ItemArmor.EnumArmorMaterial.LEATHER ? false : (!itemstack.hasTag() ? false : (!itemstack.getTag().hasKeyOfType("display", 10) ? false : itemstack.getTag().getCompound("display").hasKeyOfType("color", 3)));
+        return this.m == EnumArmorMaterial.LEATHER && (itemstack.hasTag() && (itemstack.getTag().hasKeyOfType("display", 10) && itemstack.getTag().getCompound("display").hasKeyOfType("color", 3)));
     }
 
     public int b(ItemStack itemstack) {
@@ -150,7 +150,7 @@ public class ItemArmor extends Item {
     }
 
     public boolean a(ItemStack itemstack, ItemStack itemstack1) {
-        return this.m.b() == itemstack1.getItem() ? true : super.a(itemstack, itemstack1);
+        return this.m.b() == itemstack1.getItem() || super.a(itemstack, itemstack1);
     }
 
     public ItemStack a(ItemStack itemstack, World world, EntityHuman entityhuman) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBlock.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBlock.java
index 0cd4175..f25f165 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBlock.java
@@ -36,7 +36,7 @@ public class ItemBlock extends Item {
                     this.a.postPlace(world, blockposition, iblockdata1, entityhuman, itemstack);
                 }
 
-                world.makeSound((double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 0.5F), (double) ((float) blockposition.getZ() + 0.5F), this.a.stepSound.getPlaceSound(), (this.a.stepSound.getVolume1() + 1.0F) / 2.0F, this.a.stepSound.getVolume2() * 0.8F);
+                world.makeSound((float) blockposition.getX() + 0.5F, (float) blockposition.getY() + 0.5F, (float) blockposition.getZ() + 0.5F, this.a.stepSound.getPlaceSound(), (this.a.stepSound.getVolume1() + 1.0F) / 2.0F, this.a.stepSound.getVolume2() * 0.8F);
                 --itemstack.count;
             }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
index eb62bbb..1c4512f 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java
@@ -33,14 +33,14 @@ public class ItemBoat extends Item {
             Vec3D vec3d2 = entityhuman.d(f);
             boolean flag = false;
             float f9 = 1.0F;
-            List list = world.getEntities(entityhuman, entityhuman.getBoundingBox().a(vec3d2.a * d3, vec3d2.b * d3, vec3d2.c * d3).grow((double) f9, (double) f9, (double) f9));
+            List list = world.getEntities(entityhuman, entityhuman.getBoundingBox().a(vec3d2.a * d3, vec3d2.b * d3, vec3d2.c * d3).grow(f9, f9, f9));
 
-            for (int i = 0; i < list.size(); ++i) {
-                Entity entity = (Entity) list.get(i);
+            for (Object o : list) {
+                Entity entity = (Entity) o;
 
                 if (entity.ad()) {
                     float f10 = entity.ao();
-                    AxisAlignedBB axisalignedbb = entity.getBoundingBox().grow((double) f10, (double) f10, (double) f10);
+                    AxisAlignedBB axisalignedbb = entity.getBoundingBox().grow(f10, f10, f10);
 
                     if (axisalignedbb.a(vec3d)) {
                         flag = true;
@@ -66,7 +66,7 @@ public class ItemBoat extends Item {
                         blockposition = blockposition.down();
                     }
 
-                    EntityBoat entityboat = new EntityBoat(world, (double) ((float) blockposition.getX() + 0.5F), (double) ((float) blockposition.getY() + 1.0F), (double) ((float) blockposition.getZ() + 0.5F));
+                    EntityBoat entityboat = new EntityBoat(world, (float) blockposition.getX() + 0.5F, (float) blockposition.getY() + 1.0F, (float) blockposition.getZ() + 0.5F);
 
                     entityboat.yaw = (float) (((MathHelper.floor((double) (entityhuman.yaw * 4.0F / 360.0F) + 0.5D) & 3) - 1) * 90);
                     if (!world.getCubes(entityboat, entityboat.getBoundingBox().grow(-0.1D, -0.1D, -0.1D)).isEmpty()) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBucket.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBucket.java
index b62ea42..af0f2ed 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBucket.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemBucket.java
@@ -41,7 +41,7 @@ public class ItemBucket extends Item {
                     IBlockData iblockdata = world.getType(blockposition);
                     Material material = iblockdata.getBlock().getMaterial();
 
-                    if (material == Material.WATER && ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue() == 0) {
+                    if (material == Material.WATER && iblockdata.get(BlockFluids.LEVEL) == 0) {
                         // CraftBukkit start
                         PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman, blockposition.getX(), blockposition.getY(), blockposition.getZ(), null, itemstack, Items.WATER_BUCKET);
 
@@ -54,7 +54,7 @@ public class ItemBucket extends Item {
                         return this.a(itemstack, entityhuman, Items.WATER_BUCKET, event.getItemStack()); // CraftBukkit - added Event stack
                     }
 
-                    if (material == Material.LAVA && ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue() == 0) {
+                    if (material == Material.LAVA && iblockdata.get(BlockFluids.LEVEL) == 0) {
                         // CraftBukkit start
                         PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent(entityhuman, blockposition.getX(), blockposition.getY(), blockposition.getZ(), null, itemstack, Items.LAVA_BUCKET);
 
@@ -146,7 +146,7 @@ public class ItemBucket extends Item {
                     int j = blockposition.getY();
                     int k = blockposition.getZ();
 
-                    world.makeSound((double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), "random.fizz", 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
+                    world.makeSound((float) i + 0.5F, (float) j + 0.5F, (float) k + 0.5F, "random.fizz", 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
 
                     for (int l = 0; l < 8; ++l) {
                         world.addParticle(EnumParticle.SMOKE_LARGE, (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 0.0D, 0.0D, 0.0D, new int[0]);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemDoor.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemDoor.java
index 6e92cab..f3fbbba 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemDoor.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemDoor.java
@@ -25,7 +25,7 @@ public class ItemDoor extends Item {
             } else if (!this.a.canPlace(world, blockposition)) {
                 return false;
             } else {
-                a(world, blockposition, EnumDirection.fromAngle((double) entityhuman.yaw), this.a);
+                a(world, blockposition, EnumDirection.fromAngle(entityhuman.yaw), this.a);
                 --itemstack.count;
                 return true;
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemDye.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemDye.java
index 81fde59..d0b0f53 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemDye.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemDye.java
@@ -100,7 +100,7 @@ public class ItemDye extends Item {
                     return false;
                 }
 
-                enumcolor = EnumColor.fromColorIndex((byte) event.getColor().getWoolData());
+                enumcolor = EnumColor.fromColorIndex(event.getColor().getWoolData());
                 // CraftBukkit end
                 entitysheep.setColor(enumcolor);
                 --itemstack.count;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemHanging.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemHanging.java
index 946a3a7..9bac60d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemHanging.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemHanging.java
@@ -62,6 +62,6 @@ public class ItemHanging extends Item {
     }
 
     private EntityHanging a(World world, BlockPosition blockposition, EnumDirection enumdirection) {
-        return (EntityHanging) (this.a == EntityPainting.class ? new EntityPainting(world, blockposition, enumdirection) : (this.a == EntityItemFrame.class ? new EntityItemFrame(world, blockposition, enumdirection) : null));
+        return this.a == EntityPainting.class ? new EntityPainting(world, blockposition, enumdirection) : (this.a == EntityItemFrame.class ? new EntityItemFrame(world, blockposition, enumdirection) : null);
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemLeash.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemLeash.java
index 346cd18..1c8eaa4 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemLeash.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemLeash.java
@@ -34,10 +34,9 @@ public class ItemLeash extends Item {
         int j = blockposition.getY();
         int k = blockposition.getZ();
         List list = world.a(EntityInsentient.class, new AxisAlignedBB((double) i - d0, (double) j - d0, (double) k - d0, (double) i + d0, (double) j + d0, (double) k + d0));
-        Iterator iterator = list.iterator();
 
-        while (iterator.hasNext()) {
-            EntityInsentient entityinsentient = (EntityInsentient) iterator.next();
+        for (Object o : list) {
+            EntityInsentient entityinsentient = (EntityInsentient) o;
 
             if (entityinsentient.cc() && entityinsentient.getLeashHolder() == entityhuman) {
                 if (entityleash == null) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMapEmpty.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMapEmpty.java
index 6bf90c4..27f10e2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMapEmpty.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMapEmpty.java
@@ -12,7 +12,7 @@ public class ItemMapEmpty extends ItemWorldMapBase {
         String s = "map_" + itemstack1.getData();
         WorldMap worldmap = new WorldMap(s);
 
-        worldMain.a(s, (PersistentBase) worldmap); // CraftBukkit
+        worldMain.a(s, worldmap); // CraftBukkit
         worldmap.scale = 0;
         worldmap.a(entityhuman.locX, entityhuman.locZ, worldmap.scale);
         worldmap.map = (byte) ((WorldServer) world).dimension; // CraftBukkit - use bukkit dimension
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMinecart.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMinecart.java
index e9fc40e..8734faf 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMinecart.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMinecart.java
@@ -18,7 +18,7 @@ public class ItemMinecart extends Item {
             double d2 = isourceblock.getZ() + (double) enumdirection.getAdjacentZ() * 1.125D;
             BlockPosition blockposition = isourceblock.getBlockPosition().shift(enumdirection);
             IBlockData iblockdata = world.getType(blockposition);
-            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.getBlock() instanceof BlockMinecartTrackAbstract ? (BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(((BlockMinecartTrackAbstract) iblockdata.getBlock()).n()) : BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH;
+            BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.getBlock() instanceof BlockMinecartTrackAbstract ? iblockdata.get(((BlockMinecartTrackAbstract) iblockdata.getBlock()).n()) : BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH;
             double d3;
 
             if (BlockMinecartTrackAbstract.d(iblockdata)) {
@@ -33,7 +33,7 @@ public class ItemMinecart extends Item {
                 }
 
                 IBlockData iblockdata1 = world.getType(blockposition.down());
-                BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition1 = iblockdata1.getBlock() instanceof BlockMinecartTrackAbstract ? (BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata1.get(((BlockMinecartTrackAbstract) iblockdata1.getBlock()).n()) : BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH;
+                BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition1 = iblockdata1.getBlock() instanceof BlockMinecartTrackAbstract ? iblockdata1.get(((BlockMinecartTrackAbstract) iblockdata1.getBlock()).n()) : BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH;
 
                 if (enumdirection != EnumDirection.DOWN && blockminecarttrackabstract_enumtrackposition1.c()) {
                     d3 = -0.4D;
@@ -62,7 +62,7 @@ public class ItemMinecart extends Item {
                 itemstack.count++;
                 // Chain to handler for new item
                 ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-                IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.REGISTRY.get(eventStack.getItem());
+                IDispenseBehavior idispensebehavior = BlockDispenser.REGISTRY.get(eventStack.getItem());
                 if (idispensebehavior != IDispenseBehavior.NONE && idispensebehavior != this) {
                     idispensebehavior.a(isourceblock, eventStack);
                     return itemstack;
@@ -100,7 +100,7 @@ public class ItemMinecart extends Item {
 
         if (BlockMinecartTrackAbstract.d(iblockdata)) {
             if (!world.isClientSide) {
-                BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.getBlock() instanceof BlockMinecartTrackAbstract ? (BlockMinecartTrackAbstract.EnumTrackPosition) iblockdata.get(((BlockMinecartTrackAbstract) iblockdata.getBlock()).n()) : BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH;
+                BlockMinecartTrackAbstract.EnumTrackPosition blockminecarttrackabstract_enumtrackposition = iblockdata.getBlock() instanceof BlockMinecartTrackAbstract ? iblockdata.get(((BlockMinecartTrackAbstract) iblockdata.getBlock()).n()) : BlockMinecartTrackAbstract.EnumTrackPosition.NORTH_SOUTH;
                 double d0 = 0.0D;
 
                 if (blockminecarttrackabstract_enumtrackposition.c()) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMonsterEgg.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMonsterEgg.java
index 84f5da5..443b161 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMonsterEgg.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemMonsterEgg.java
@@ -91,7 +91,7 @@ public class ItemMonsterEgg extends Item {
 
                         if (entity != null) {
                             if (entity instanceof EntityLiving && itemstack.hasName()) {
-                                ((EntityInsentient) entity).setCustomName(itemstack.getName());
+                                entity.setCustomName(itemstack.getName());
                             }
 
                             if (!entityhuman.abilities.canInstantlyBuild) {
@@ -115,7 +115,7 @@ public class ItemMonsterEgg extends Item {
 
     public static Entity spawnCreature(World world, int i, double d0, double d1, double d2, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
         // CraftBukkit end
-        if (!EntityTypes.eggInfo.containsKey(Integer.valueOf(i))) {
+        if (!EntityTypes.eggInfo.containsKey(i)) {
             return null;
         } else {
             Entity entity = null;
@@ -128,7 +128,7 @@ public class ItemMonsterEgg extends Item {
                     entity.setPositionRotation(d0, d1, d2, MathHelper.g(world.random.nextFloat() * 360.0F), 0.0F);
                     entityinsentient.aK = entityinsentient.yaw;
                     entityinsentient.aI = entityinsentient.yaw;
-                    entityinsentient.prepare(world.E(new BlockPosition(entityinsentient)), (GroupDataEntity) null);
+                    entityinsentient.prepare(world.E(new BlockPosition(entityinsentient)), null);
                     // CraftBukkit start - don't return an entity when CreatureSpawnEvent is canceled
                     if (!world.addEntity(entity, spawnReason)) {
                         entity = null;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemRecord.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemRecord.java
index 7b943fd..2cd8fe8 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemRecord.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemRecord.java
@@ -18,7 +18,7 @@ public class ItemRecord extends Item {
     public boolean interactWith(ItemStack itemstack, EntityHuman entityhuman, World world, BlockPosition blockposition, EnumDirection enumdirection, float f, float f1, float f2) {
         IBlockData iblockdata = world.getType(blockposition);
 
-        if (iblockdata.getBlock() == Blocks.JUKEBOX && !((Boolean) iblockdata.get(BlockJukeBox.HAS_RECORD)).booleanValue()) {
+        if (iblockdata.getBlock() == Blocks.JUKEBOX && !(Boolean) iblockdata.get(BlockJukeBox.HAS_RECORD)) {
             if (world.isClientSide) {
                 return true;
             } else {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemSkull.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemSkull.java
index 519574b..c43144d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemSkull.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemSkull.java
@@ -62,7 +62,7 @@ public class ItemSkull extends Item {
                                 if (nbttagcompound.hasKeyOfType("SkullOwner", 10)) {
                                     gameprofile = GameProfileSerializer.deserialize(nbttagcompound.getCompound("SkullOwner"));
                                 } else if (nbttagcompound.hasKeyOfType("SkullOwner", 8) && nbttagcompound.getString("SkullOwner").length() > 0) {
-                                    gameprofile = new GameProfile((UUID) null, nbttagcompound.getString("SkullOwner"));
+                                    gameprofile = new GameProfile(null, nbttagcompound.getString("SkullOwner"));
                                 }
                             }
 
@@ -118,16 +118,12 @@ public class ItemSkull extends Item {
     public boolean a(final NBTTagCompound nbttagcompound) { // Spigot - make final
         super.a(nbttagcompound);
         if (nbttagcompound.hasKeyOfType("SkullOwner", 8) && nbttagcompound.getString("SkullOwner").length() > 0) {
-            GameProfile gameprofile = new GameProfile((UUID) null, nbttagcompound.getString("SkullOwner"));
+            GameProfile gameprofile = new GameProfile(null, nbttagcompound.getString("SkullOwner"));
 
             // Spigot start
-            TileEntitySkull.b(gameprofile, new com.google.common.base.Predicate() {
-
-                @Override
-                public boolean apply(GameProfile gameprofile) {
-                    nbttagcompound.set("SkullOwner", GameProfileSerializer.serialize(new NBTTagCompound(), gameprofile));                    
-                    return false;
-                }
+            TileEntitySkull.b(gameprofile, gameprofile1 -> {
+                nbttagcompound.set("SkullOwner", GameProfileSerializer.serialize(new NBTTagCompound(), gameprofile1));
+                return false;
             });
             // Spigot end
             return true;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemStack.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemStack.java
index 015ce28..418e965 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemStack.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemStack.java
@@ -196,7 +196,7 @@ public final class ItemStack {
                 // Special case juke boxes as they update their tile entity. Copied from ItemRecord.
                 if (this.getItem() instanceof ItemRecord) {
                     ((BlockJukeBox) Blocks.JUKEBOX).a(world, blockposition, world.getType(blockposition), this);
-                    world.a((EntityHuman) null, 1005, blockposition, Item.getId(this.getItem()));
+                    world.a(null, 1005, blockposition, Item.getId(this.getItem()));
                     --this.count;
                     entityhuman.b(StatisticList.X);
                 }
@@ -241,7 +241,7 @@ public final class ItemStack {
     }
 
     public NBTTagCompound save(NBTTagCompound nbttagcompound) {
-        MinecraftKey minecraftkey = (MinecraftKey) Item.REGISTRY.c(this.item);
+        MinecraftKey minecraftkey = Item.REGISTRY.c(this.item);
 
         nbttagcompound.setString("id", minecraftkey == null ? "minecraft:air" : minecraftkey.toString());
         nbttagcompound.setByte("Count", (byte) this.count);
@@ -422,7 +422,7 @@ public final class ItemStack {
     }
 
     public void a(EntityLiving entityliving, EntityHuman entityhuman) {
-        boolean flag = this.item.a(this, entityliving, (EntityLiving) entityhuman);
+        boolean flag = this.item.a(this, entityliving, entityhuman);
 
         if (flag) {
             entityhuman.b(StatisticList.USE_ITEM_COUNT[Item.getId(this.item)]);
@@ -458,7 +458,7 @@ public final class ItemStack {
     }
 
     public static boolean equals(ItemStack itemstack, ItemStack itemstack1) {
-        return itemstack == null && itemstack1 == null ? true : (itemstack != null && itemstack1 != null ? (itemstack.tag == null && itemstack1.tag != null ? false : itemstack.tag == null || itemstack.tag.equals(itemstack1.tag)) : false);
+        return itemstack == null && itemstack1 == null || (itemstack != null && itemstack1 != null && ((itemstack.tag != null || itemstack1.tag == null) && (itemstack.tag == null || itemstack.tag.equals(itemstack1.tag))));
     }
 
     // Spigot Start
@@ -474,15 +474,15 @@ public final class ItemStack {
     // Spigot End
 
     public static boolean matches(ItemStack itemstack, ItemStack itemstack1) {
-        return itemstack == null && itemstack1 == null ? true : (itemstack != null && itemstack1 != null ? itemstack.d(itemstack1) : false);
+        return itemstack == null && itemstack1 == null || (itemstack != null && itemstack1 != null && itemstack.d(itemstack1));
     }
 
     private boolean d(ItemStack itemstack) {
-        return this.count != itemstack.count ? false : (this.item != itemstack.item ? false : (this.damage != itemstack.damage ? false : (this.tag == null && itemstack.tag != null ? false : this.tag == null || this.tag.equals(itemstack.tag))));
+        return this.count == itemstack.count && (this.item == itemstack.item && (this.damage == itemstack.damage && ((this.tag != null || itemstack.tag == null) && (this.tag == null || this.tag.equals(itemstack.tag)))));
     }
 
     public static boolean c(ItemStack itemstack, ItemStack itemstack1) {
-        return itemstack == null && itemstack1 == null ? true : (itemstack != null && itemstack1 != null ? itemstack.doMaterialsMatch(itemstack1) : false);
+        return itemstack == null && itemstack1 == null || (itemstack != null && itemstack1 != null && itemstack.doMaterialsMatch(itemstack1));
     }
 
     public boolean doMaterialsMatch(ItemStack itemstack) {
@@ -540,7 +540,7 @@ public final class ItemStack {
         } else if (flag) {
             NBTTagCompound nbttagcompound = new NBTTagCompound();
 
-            this.a(s, (NBTBase) nbttagcompound);
+            this.a(s, nbttagcompound);
             return nbttagcompound;
         } else {
             return null;
@@ -591,7 +591,7 @@ public final class ItemStack {
                 if (nbttagcompound.isEmpty()) {
                     this.tag.remove("display");
                     if (this.tag.isEmpty()) {
-                        this.setTag((NBTTagCompound) null);
+                        this.setTag(null);
                     }
                 }
 
@@ -600,7 +600,7 @@ public final class ItemStack {
     }
 
     public boolean hasName() {
-        return this.tag == null ? false : (!this.tag.hasKeyOfType("display", 10) ? false : this.tag.getCompound("display").hasKeyOfType("Name", 8));
+        return this.tag != null && (this.tag.hasKeyOfType("display", 10) && this.tag.getCompound("display").hasKeyOfType("Name", 8));
     }
 
     public EnumItemRarity u() {
@@ -608,7 +608,7 @@ public final class ItemStack {
     }
 
     public boolean v() {
-        return !this.getItem().f_(this) ? false : !this.hasEnchantments();
+        return this.getItem().f_(this) && !this.hasEnchantments();
     }
 
     public void addEnchantment(Enchantment enchantment, int i) {
@@ -624,7 +624,7 @@ public final class ItemStack {
         NBTTagCompound nbttagcompound = new NBTTagCompound();
 
         nbttagcompound.setShort("id", (short) enchantment.id);
-        nbttagcompound.setShort("lvl", (short) ((byte) i));
+        nbttagcompound.setShort("lvl", (byte) i);
         nbttaglist.add(nbttagcompound);
     }
 
@@ -699,7 +699,7 @@ public final class ItemStack {
         ChatComponentText chatcomponenttext = new ChatComponentText(this.getName());
 
         if (this.hasName()) {
-            chatcomponenttext.getChatModifier().setItalic(Boolean.valueOf(true));
+            chatcomponenttext.getChatModifier().setItalic(Boolean.TRUE);
         }
 
         IChatBaseComponent ichatbasecomponent = (new ChatComponentText("[")).addSibling(chatcomponenttext).a("]");
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemWaterLily.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemWaterLily.java
index e8cbf16..a459499 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemWaterLily.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemWaterLily.java
@@ -26,7 +26,7 @@ public class ItemWaterLily extends ItemWithAuxData {
                 BlockPosition blockposition1 = blockposition.up();
                 IBlockData iblockdata = world.getType(blockposition);
 
-                if (iblockdata.getBlock().getMaterial() == Material.WATER && ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue() == 0 && world.isEmpty(blockposition1)) {
+                if (iblockdata.getBlock().getMaterial() == Material.WATER && iblockdata.get(BlockFluids.LEVEL) == 0 && world.isEmpty(blockposition1)) {
                     // CraftBukkit start - special case for handling block placement with water lilies
                     org.bukkit.block.BlockState blockstate = org.bukkit.craftbukkit.block.CraftBlockState.getBlockState(world, blockposition1.getX(), blockposition1.getY(), blockposition1.getZ());
                     world.setTypeUpdate(blockposition1, Blocks.WATERLILY.getBlockData());
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemWorldMap.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemWorldMap.java
index 6473ee5..175dcec 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemWorldMap.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ItemWorldMap.java
@@ -25,10 +25,10 @@ public class ItemWorldMap extends ItemWorldMapBase {
             s = "map_" + itemstack.getData();
             worldmap = new WorldMap(s);
             worldmap.scale = 3;
-            worldmap.a((double) world.getWorldData().c(), (double) world.getWorldData().e(), worldmap.scale);
+            worldmap.a(world.getWorldData().c(), world.getWorldData().e(), worldmap.scale);
             worldmap.map = (byte) ((WorldServer) world).dimension; // CraftBukkit - fixes Bukkit multiworld maps
             worldmap.c();
-            worldMain.a(s, (PersistentBase) worldmap); // CraftBukkit - use primary world for maps
+            worldMain.a(s, worldmap); // CraftBukkit - use primary world for maps
 
             // CraftBukkit start
             MapInitializeEvent event = new MapInitializeEvent(worldmap.mapView);
@@ -134,7 +134,7 @@ public class ItemWorldMap extends ItemWorldMapBase {
                                     b0 = 0;
                                 }
 
-                                MaterialMapColor materialmapcolor = (MaterialMapColor) Iterables.getFirst(Multisets.copyHighestCountFirst(hashmultiset), MaterialMapColor.b);
+                                MaterialMapColor materialmapcolor = Iterables.getFirst(Multisets.copyHighestCountFirst(hashmultiset), MaterialMapColor.b);
 
                                 if (materialmapcolor == MaterialMapColor.n) {
                                     d2 = (double) k3 * 0.1D + (double) (k1 + l1 & 1) * 0.2D;
@@ -203,10 +203,10 @@ public class ItemWorldMap extends ItemWorldMapBase {
                 worldmap1.scale = 4;
             }
 
-            worldmap1.a((double) worldmap.centerX, (double) worldmap.centerZ, worldmap1.scale);
+            worldmap1.a(worldmap.centerX, worldmap.centerZ, worldmap1.scale);
             worldmap1.map = worldmap.map;
             worldmap1.c();
-            world.a("map_" + itemstack.getData(), (PersistentBase) worldmap1);
+            world.a("map_" + itemstack.getData(), worldmap1);
 
             // CraftBukkit start
             MapInitializeEvent event = new MapInitializeEvent(worldmap1.mapView);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/JsonList.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/JsonList.java
index 8e4ecfd..2227150 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/JsonList.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/JsonList.java
@@ -83,7 +83,7 @@ public class JsonList> {
 
     public V get(K k0) {
         this.h();
-        return (V) this.d.get(this.a(k0)); // CraftBukkit - fix decompile error
+        return this.d.get(this.a(k0)); // CraftBukkit - fix decompile error
     }
 
     public void remove(K k0) {
@@ -98,7 +98,7 @@ public class JsonList> {
     }
 
     public String[] getEntries() {
-        return (String[]) this.d.keySet().toArray(new String[this.d.size()]);
+        return this.d.keySet().toArray(new String[0]);
     }
 
     // CraftBukkit start
@@ -142,7 +142,7 @@ public class JsonList> {
     }
 
     protected JsonListEntry a(JsonObject jsonobject) {
-        return new JsonListEntry((Object) null, jsonobject);
+        return new JsonListEntry(null, jsonobject);
     }
 
     protected Map e() {
@@ -169,7 +169,7 @@ public class JsonList> {
 
         try {
             bufferedreader = Files.newReader(this.c, Charsets.UTF_8);
-            collection = (Collection) this.b.fromJson(bufferedreader, JsonList.f);
+            collection = this.b.fromJson(bufferedreader, JsonList.f);
         // Spigot Start
         } catch ( java.io.FileNotFoundException ex )
         {
@@ -187,10 +187,9 @@ public class JsonList> {
 
         if (collection != null) {
             this.d.clear();
-            Iterator iterator = collection.iterator();
 
-            while (iterator.hasNext()) {
-                JsonListEntry jsonlistentry = (JsonListEntry) iterator.next();
+            for (Object o : collection) {
+                JsonListEntry jsonlistentry = (JsonListEntry) o;
 
                 if (jsonlistentry.getKey() != null) {
                     this.d.put(this.a((K) jsonlistentry.getKey()), (V) jsonlistentry); // CraftBukkit - fix decompile error
@@ -214,16 +213,15 @@ public class JsonList> {
         public JsonListEntry a(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
             if (jsonelement.isJsonObject()) {
                 JsonObject jsonobject = jsonelement.getAsJsonObject();
-                JsonListEntry jsonlistentry = JsonList.this.a(jsonobject);
 
-                return jsonlistentry;
+                return JsonList.this.a(jsonobject);
             } else {
                 return null;
             }
         }
 
         public JsonElement serialize(JsonListEntry object, Type type, JsonSerializationContext jsonserializationcontext) { // CraftBukkit - fix decompile error
-            return this.a((JsonListEntry) object, type, jsonserializationcontext);
+            return this.a(object, type, jsonserializationcontext);
         }
 
         public JsonListEntry deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // CraftBukkit - fix decompile error
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/LoginListener.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/LoginListener.java
index 704600b..228a14e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/LoginListener.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/LoginListener.java
@@ -133,7 +133,7 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
                     }
 
                     public void operationComplete(ChannelFuture future) throws Exception { // CraftBukkit - fix decompile error
-                        this.a((ChannelFuture) future);
+                        this.a(future);
                     }
                 }, new GenericFutureListener[0]);
             }
@@ -156,7 +156,7 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
     }
 
     public String d() {
-        return this.i != null ? this.i.toString() + " (" + this.networkManager.getSocketAddress().toString() + ")" : String.valueOf(this.networkManager.getSocketAddress());
+        return this.i != null ? this.i + " (" + this.networkManager.getSocketAddress().toString() + ")" : String.valueOf(this.networkManager.getSocketAddress());
     }
 
     public void a(PacketLoginInStart packetlogininstart) {
@@ -169,15 +169,12 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
             // Spigot start
             initUUID();
             //new Thread(new Runnable() { // KigPaper
-            authenticatorPool.execute(new Runnable() {
-                @Override
-                public void run() {
-                    try{
-                        new LoginHandler().fireEvents();
-                    } catch (Exception ex) {
-                        disconnect("Failed to verify username!");
-                        server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex);
-                    }
+            authenticatorPool.execute(() -> {
+                try{
+                    new LoginHandler().fireEvents();
+                } catch (Exception ex) {
+                    disconnect("Failed to verify username!");
+                    server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + i.getName(), ex);
                 }
             });
             // Spigot end
@@ -200,46 +197,44 @@ public class LoginListener implements PacketLoginInListener, IUpdatePlayerListBo
                 throw new IllegalStateException("Protocol error", ex);
             }
             // (new Thread("User Authenticator #" + LoginListener.b.incrementAndGet()) { // KigPaper - SportPaper-0107
-            authenticatorPool.execute(new Runnable() {
-                public void run() {
-                    GameProfile gameprofile = LoginListener.this.i;
+            authenticatorPool.execute(() -> {
+                GameProfile gameprofile = LoginListener.this.i;
 
-                    try {
-                        String s = (new BigInteger(MinecraftEncryption.a(LoginListener.this.j, LoginListener.this.server.Q().getPublic(), LoginListener.this.loginKey))).toString(16);
+                try {
+                    String s = (new BigInteger(MinecraftEncryption.a(LoginListener.this.j, LoginListener.this.server.Q().getPublic(), LoginListener.this.loginKey))).toString(16);
 
-                        LoginListener.this.i = LoginListener.this.server.aD().hasJoinedServer(new GameProfile((UUID) null, gameprofile.getName()), s);
-                        if (LoginListener.this.i != null) {
-                            // CraftBukkit start - fire PlayerPreLoginEvent
-                            if (!networkManager.g()) {
-                                return;
-                            }
-
-                            new LoginHandler().fireEvents();
-                        } else if (LoginListener.this.server.T()) {
-                            LoginListener.c.warn("Failed to verify username but will let them in anyway!");
-                            LoginListener.this.i = LoginListener.this.a(gameprofile);
-                            LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
-                        } else {
-                            LoginListener.this.disconnect("Failed to verify username!");
-                            LoginListener.c.error("Username \'" + gameprofile.getName() + "\' tried to join with an invalid session"); // CraftBukkit - fix null pointer
+                    LoginListener.this.i = LoginListener.this.server.aD().hasJoinedServer(new GameProfile(null, gameprofile.getName()), s);
+                    if (LoginListener.this.i != null) {
+                        // CraftBukkit start - fire PlayerPreLoginEvent
+                        if (!networkManager.g()) {
+                            return;
                         }
-                    } catch (AuthenticationUnavailableException authenticationunavailableexception) {
-                        if (LoginListener.this.server.T()) {
-                            LoginListener.c.warn("Authentication servers are down but will let them in anyway!");
-                            LoginListener.this.i = LoginListener.this.a(gameprofile);
-                            LoginListener.this.g = LoginListener.EnumProtocolState.READY_TO_ACCEPT;
-                        } else {
-                            LoginListener.this.disconnect("Authentication servers are down. Please try again later, sorry!");
-                            LoginListener.c.error("Couldn\'t verify username because servers are unavailable");
-                        }
-                        // CraftBukkit start - catch all exceptions
-                    } catch (Exception exception) {
-                        disconnect("Failed to verify username!");
-                        server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + gameprofile.getName(), exception);
-                        // CraftBukkit end
+
+                        new LoginHandler().fireEvents();
+                    } else if (LoginListener.this.server.T()) {
+                        LoginListener.c.warn("Failed to verify username but will let them in anyway!");
+                        LoginListener.this.i = LoginListener.this.a(gameprofile);
+                        LoginListener.this.g = EnumProtocolState.READY_TO_ACCEPT;
+                    } else {
+                        LoginListener.this.disconnect("Failed to verify username!");
+                        LoginListener.c.error("Username \'" + gameprofile.getName() + "\' tried to join with an invalid session"); // CraftBukkit - fix null pointer
                     }
-
+                } catch (AuthenticationUnavailableException authenticationunavailableexception) {
+                    if (LoginListener.this.server.T()) {
+                        LoginListener.c.warn("Authentication servers are down but will let them in anyway!");
+                        LoginListener.this.i = LoginListener.this.a(gameprofile);
+                        LoginListener.this.g = EnumProtocolState.READY_TO_ACCEPT;
+                    } else {
+                        LoginListener.this.disconnect("Authentication servers are down. Please try again later, sorry!");
+                        LoginListener.c.error("Couldn\'t verify username because servers are unavailable");
+                    }
+                    // CraftBukkit start - catch all exceptions
+                } catch (Exception exception) {
+                    disconnect("Failed to verify username!");
+                    server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + gameprofile.getName(), exception);
+                    // CraftBukkit end
                 }
+
             });
         }
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/MethodProfiler.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/MethodProfiler.java
index 2aea31b..3f8b1d2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/MethodProfiler.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/MethodProfiler.java
@@ -1,14 +1,6 @@
 package net.minecraft.server;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
 
 // CraftBukkit start - Strip down to empty methods, performance cost
 public class MethodProfiler {
@@ -53,7 +45,7 @@ public class MethodProfiler {
         }
 
         public int compareTo(MethodProfiler.ProfilerInfo object) {
-            return this.a((MethodProfiler.ProfilerInfo) object);
+            return this.a(object);
         }
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
index 47a47c5..0d0858e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -83,27 +83,26 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
     public int g;
     public long[][] i;
     // CraftBukkit start
-    public List worlds = new ArrayList();
+    public List worlds = new ArrayList<>();
     public org.bukkit.craftbukkit.CraftServer server;
     public OptionSet options;
     public org.bukkit.command.ConsoleCommandSender console;
     public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
     public ConsoleReader reader;
-    public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue();
+    public java.util.Queue processQueue = new java.util.concurrent.ConcurrentLinkedQueue<>();
     public int autosavePeriod;
     public double[] recentTps = new double[3]; // PaperSpigot - Fine have your darn compat with bad plugins
 
     // Migot start
-    private LinkedList autoSaveWorlds = new LinkedList();
+    private LinkedList autoSaveWorlds = new LinkedList<>();
     private int autoSaveDelay = 0;
     private boolean autoSaveOrdered = false;
 
     private void queueWorldsForAutoSave() {
         if (!this.N) {
             this.autoSaveWorlds.clear();
-            for (int j = 0; j < this.worlds.size(); ++j) {
-                WorldServer worldserver = this.worlds.get(j);
-                if(worldserver != null) {
+            for (WorldServer worldserver : this.worlds) {
+                if (worldserver != null) {
                     this.autoSaveWorlds.add(new AutoSaveJob(AutoSaveJob.JobDetail.WORLD_SAVE, worldserver));
                     this.autoSaveWorlds.add(new AutoSaveJob(AutoSaveJob.JobDetail.WORLD_SAVEEVENT, worldserver));
                 }
@@ -505,7 +504,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
             }
 
             worlds.add(world);
-            getPlayerList().setPlayerFileData(worlds.toArray(new WorldServer[worlds.size()]));
+            getPlayerList().setPlayerFileData(worlds.toArray(new WorldServer[0]));
         }
 
         // CraftBukkit end
@@ -609,8 +608,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
             int i = aworldserver.length;
 
             // CraftBukkit start
-            for (int j = 0; j < worlds.size(); ++j) {
-                WorldServer worldserver = worlds.get(j);
+            for (WorldServer worldserver : worlds) {
                 // CraftBukkit end
 
                 if (worldserver != null) {
@@ -656,7 +654,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
                 this.v.u();
                 try {
                     Thread.sleep(100);
-                } catch (InterruptedException ex) {
+                } catch (InterruptedException ignored) {
                 } // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
             }
 
@@ -1305,8 +1303,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
 
     public void a(EnumDifficulty enumdifficulty) {
         // CraftBukkit start
-        for (int i = 0; i < this.worlds.size(); ++i) {
-            WorldServer worldserver = this.worlds.get(i);
+        for (WorldServer worldserver : this.worlds) {
             // CraftBukkit end
 
             if (worldserver != null) {
@@ -1350,8 +1347,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
         this.getConvertable().d();
 
         // CraftBukkit start
-        for (int i = 0; i < this.worlds.size(); ++i) {
-            WorldServer worldserver = this.worlds.get(i);
+        for (WorldServer worldserver : this.worlds) {
             // CraftBukkit end
 
             if (worldserver != null) {
@@ -1377,49 +1373,48 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
     }
 
     public void a(MojangStatisticsGenerator mojangstatisticsgenerator) {
-        mojangstatisticsgenerator.a("whitelist_enabled", Boolean.valueOf(false));
-        mojangstatisticsgenerator.a("whitelist_count", Integer.valueOf(0));
+        mojangstatisticsgenerator.a("whitelist_enabled", Boolean.FALSE);
+        mojangstatisticsgenerator.a("whitelist_count", 0);
         if (this.v != null) {
-            mojangstatisticsgenerator.a("players_current", Integer.valueOf(this.I()));
-            mojangstatisticsgenerator.a("players_max", Integer.valueOf(this.J()));
-            mojangstatisticsgenerator.a("players_seen", Integer.valueOf(this.v.getSeenPlayers().length));
+            mojangstatisticsgenerator.a("players_current", this.I());
+            mojangstatisticsgenerator.a("players_max", this.J());
+            mojangstatisticsgenerator.a("players_seen", this.v.getSeenPlayers().length);
         }
 
-        mojangstatisticsgenerator.a("uses_auth", Boolean.valueOf(this.onlineMode));
+        mojangstatisticsgenerator.a("uses_auth", this.onlineMode);
         mojangstatisticsgenerator.a("gui_state", this.as() ? "enabled" : "disabled");
-        mojangstatisticsgenerator.a("run_time", Long.valueOf((az() - mojangstatisticsgenerator.g()) / 60L * 1000L));
-        mojangstatisticsgenerator.a("avg_tick_ms", Integer.valueOf((int) (MathHelper.a(this.h) * 1.0E-6D)));
+        mojangstatisticsgenerator.a("run_time", (az() - mojangstatisticsgenerator.g()) / 60L * 1000L);
+        mojangstatisticsgenerator.a("avg_tick_ms", (int) (MathHelper.a(this.h) * 1.0E-6D));
         int i = 0;
 
         if (this.worldServer != null) {
             // CraftBukkit start
-            for (int j = 0; j < this.worlds.size(); ++j) {
-                WorldServer worldserver = this.worlds.get(j);
+            for (WorldServer worldserver : this.worlds) {
                 if (worldserver != null) {
                     // CraftBukkit end
                     WorldData worlddata = worldserver.getWorldData();
 
-                    mojangstatisticsgenerator.a("world[" + i + "][dimension]", Integer.valueOf(worldserver.worldProvider.getDimension()));
+                    mojangstatisticsgenerator.a("world[" + i + "][dimension]", worldserver.worldProvider.getDimension());
                     mojangstatisticsgenerator.a("world[" + i + "][mode]", worlddata.getGameType());
                     mojangstatisticsgenerator.a("world[" + i + "][difficulty]", worldserver.getDifficulty());
-                    mojangstatisticsgenerator.a("world[" + i + "][hardcore]", Boolean.valueOf(worlddata.isHardcore()));
+                    mojangstatisticsgenerator.a("world[" + i + "][hardcore]", worlddata.isHardcore());
                     mojangstatisticsgenerator.a("world[" + i + "][generator_name]", worlddata.getType().name());
-                    mojangstatisticsgenerator.a("world[" + i + "][generator_version]", Integer.valueOf(worlddata.getType().getVersion()));
-                    mojangstatisticsgenerator.a("world[" + i + "][height]", Integer.valueOf(this.F));
-                    mojangstatisticsgenerator.a("world[" + i + "][chunks_loaded]", Integer.valueOf(worldserver.N().getLoadedChunks()));
+                    mojangstatisticsgenerator.a("world[" + i + "][generator_version]", worlddata.getType().getVersion());
+                    mojangstatisticsgenerator.a("world[" + i + "][height]", this.F);
+                    mojangstatisticsgenerator.a("world[" + i + "][chunks_loaded]", worldserver.N().getLoadedChunks());
                     ++i;
                 }
             }
         }
 
-        mojangstatisticsgenerator.a("worlds", Integer.valueOf(i));
+        mojangstatisticsgenerator.a("worlds", i);
     }
 
     public void b(MojangStatisticsGenerator mojangstatisticsgenerator) {
-        mojangstatisticsgenerator.b("singleplayer", Boolean.valueOf(this.T()));
+        mojangstatisticsgenerator.b("singleplayer", this.T());
         mojangstatisticsgenerator.b("server_brand", this.getServerModName());
         mojangstatisticsgenerator.b("gui_supported", GraphicsEnvironment.isHeadless() ? "headless" : "supported");
-        mojangstatisticsgenerator.b("dedicated", Boolean.valueOf(this.ae()));
+        mojangstatisticsgenerator.b("dedicated", this.ae());
     }
 
     public boolean getSnooperEnabled() {
@@ -1605,8 +1600,7 @@ public abstract class MinecraftServer implements Runnable, ICommandListener, IAs
         int i = aworldserver.length;
 
         // CraftBukkit start
-        for (int j = 0; j < worlds.size(); ++j) {
-            WorldServer worldserver = worlds.get(j);
+        for (WorldServer worldserver : worlds) {
             // CraftBukkit end
 
             if (worldserver != null) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/MobEffectAttackDamage.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
index 175503b..6f13509 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/MobEffectAttackDamage.java
@@ -8,6 +8,6 @@ public class MobEffectAttackDamage extends MobEffectList {
 
     public double a(int i, AttributeModifier attributemodifier) {
         // PaperSpigot - Configurable modifiers for strength and weakness effects
-        return this.id == MobEffectList.WEAKNESS.id ? (double) (org.github.paperspigot.PaperSpigotConfig.weaknessEffectModifier * (float) (i + 1)) : org.github.paperspigot.PaperSpigotConfig.strengthEffectModifier * (double) (i + 1);
+        return this.id == MobEffectList.WEAKNESS.id ? (org.github.paperspigot.PaperSpigotConfig.weaknessEffectModifier * (float) (i + 1)) : org.github.paperspigot.PaperSpigotConfig.strengthEffectModifier * (double) (i + 1);
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/MobEffectList.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/MobEffectList.java
index 863e9d8..64ed4e3 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/MobEffectList.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/MobEffectList.java
@@ -73,7 +73,7 @@ public class MobEffectList {
     }
 
     public static MobEffectList b(String s) {
-        return (MobEffectList) MobEffectList.I.get(new MinecraftKey(s));
+        return MobEffectList.I.get(new MinecraftKey(s));
     }
 
     public static Set c() {
@@ -155,13 +155,13 @@ public class MobEffectList {
 
         if (this.id == MobEffectList.REGENERATION.id) {
             k = 50 >> j;
-            return k > 0 ? i % k == 0 : true;
+            return k <= 0 || i % k == 0;
         } else if (this.id == MobEffectList.POISON.id) {
             k = 25 >> j;
-            return k > 0 ? i % k == 0 : true;
+            return k <= 0 || i % k == 0;
         } else if (this.id == MobEffectList.WITHER.id) {
             k = 40 >> j;
-            return k > 0 ? i % k == 0 : true;
+            return k <= 0 || i % k == 0;
         } else {
             return this.id == MobEffectList.HUNGER.id;
         }
@@ -201,10 +201,9 @@ public class MobEffectList {
     }
 
     public void a(EntityLiving entityliving, AttributeMapBase attributemapbase, int i) {
-        Iterator iterator = this.J.entrySet().iterator();
 
-        while (iterator.hasNext()) {
-            Entry entry = (Entry) iterator.next();
+        for (Entry iAttributeAttributeModifierEntry : this.J.entrySet()) {
+            Entry entry = iAttributeAttributeModifierEntry;
             AttributeInstance attributeinstance = attributemapbase.a((IAttribute) entry.getKey());
 
             if (attributeinstance != null) {
@@ -215,10 +214,9 @@ public class MobEffectList {
     }
 
     public void b(EntityLiving entityliving, AttributeMapBase attributemapbase, int i) {
-        Iterator iterator = this.J.entrySet().iterator();
 
-        while (iterator.hasNext()) {
-            Entry entry = (Entry) iterator.next();
+        for (Entry iAttributeAttributeModifierEntry : this.J.entrySet()) {
+            Entry entry = iAttributeAttributeModifierEntry;
             AttributeInstance attributeinstance = attributemapbase.a((IAttribute) entry.getKey());
 
             if (attributeinstance != null) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index 637bb86..3774b3a 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -58,7 +58,7 @@ public abstract class MobSpawnerAbstract {
     private boolean g() {
         BlockPosition blockposition = this.b();
 
-        return this.a().isPlayerNearbyWhoAffectsSpawning((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, (double) this.requiredPlayerRange); // PaperSpigot - Affects Spawning API
+        return this.a().isPlayerNearbyWhoAffectsSpawning((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, this.requiredPlayerRange); // PaperSpigot - Affects Spawning API
     }
 
     public void c() {
@@ -71,10 +71,10 @@ public abstract class MobSpawnerAbstract {
             double d0;
 
             if (this.a().isClientSide) {
-                double d1 = (double) ((float) blockposition.getX() + this.a().random.nextFloat());
-                double d2 = (double) ((float) blockposition.getY() + this.a().random.nextFloat());
+                double d1 = (float) blockposition.getX() + this.a().random.nextFloat();
+                double d2 = (float) blockposition.getY() + this.a().random.nextFloat();
 
-                d0 = (double) ((float) blockposition.getZ() + this.a().random.nextFloat());
+                d0 = (float) blockposition.getZ() + this.a().random.nextFloat();
                 this.a().addParticle(EnumParticle.SMOKE_NORMAL, d1, d2, d0, 0.0D, 0.0D, 0.0D, new int[0]);
                 this.a().addParticle(EnumParticle.FLAME, d1, d2, d0, 0.0D, 0.0D, 0.0D, new int[0]);
                 if (this.spawnDelay > 0) {
@@ -112,7 +112,7 @@ public abstract class MobSpawnerAbstract {
                         return;
                     }
 
-                    int j = this.a().a(entity.getClass(), (new AxisAlignedBB((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 1), (double) (blockposition.getZ() + 1))).grow((double) this.spawnRange, (double) this.spawnRange, (double) this.spawnRange)).size();
+                    int j = this.a().a(entity.getClass(), (new AxisAlignedBB(blockposition.getX(), blockposition.getY(), blockposition.getZ(), blockposition.getX() + 1, blockposition.getY() + 1, blockposition.getZ() + 1)).grow(this.spawnRange, this.spawnRange, this.spawnRange)).size();
 
                     if (j >= this.maxNearbyEntities) {
                         this.h();
@@ -120,7 +120,7 @@ public abstract class MobSpawnerAbstract {
                     }
 
                     d0 = (double) blockposition.getX() + (this.a().random.nextDouble() - this.a().random.nextDouble()) * (double) this.spawnRange + 0.5D;
-                    double d3 = (double) (blockposition.getY() + this.a().random.nextInt(3) - 1);
+                    double d3 = blockposition.getY() + this.a().random.nextInt(3) - 1;
                     double d4 = (double) blockposition.getZ() + (this.a().random.nextDouble() - this.a().random.nextDouble()) * (double) this.spawnRange + 0.5D;
                     EntityInsentient entityinsentient = entity instanceof EntityInsentient ? (EntityInsentient) entity : null;
 
@@ -157,10 +157,8 @@ public abstract class MobSpawnerAbstract {
             NBTTagCompound nbttagcompound = new NBTTagCompound();
 
             entity.d(nbttagcompound);
-            Iterator iterator = this.i().c.c().iterator();
 
-            while (iterator.hasNext()) {
-                String s = (String) iterator.next();
+            for (String s : this.i().c.c()) {
                 NBTBase nbtbase = this.i().c.get(s);
 
                 nbttagcompound.set(s, nbtbase.clone());
@@ -192,10 +190,8 @@ public abstract class MobSpawnerAbstract {
                     NBTTagCompound nbttagcompound2 = new NBTTagCompound();
 
                     entity2.d(nbttagcompound2);
-                    Iterator iterator1 = nbttagcompound1.c().iterator();
 
-                    while (iterator1.hasNext()) {
-                        String s1 = (String) iterator1.next();
+                    for (String s1 : nbttagcompound1.c()) {
                         NBTBase nbtbase1 = nbttagcompound1.get(s1);
 
                         nbttagcompound2.set(s1, nbtbase1.clone());
@@ -219,7 +215,7 @@ public abstract class MobSpawnerAbstract {
             }
         } else if (entity instanceof EntityLiving && entity.world != null && flag) {
             if (entity instanceof EntityInsentient) {
-                ((EntityInsentient) entity).prepare(entity.world.E(new BlockPosition(entity)), (GroupDataEntity) null);
+                ((EntityInsentient) entity).prepare(entity.world.E(new BlockPosition(entity)), null);
             }
             // Spigot start - call SpawnerSpawnEvent, abort if cancelled
             SpawnerSpawnEvent event = CraftEventFactory.callSpawnerSpawnEvent(entity, this.b().getX(), this.b().getY(), this.b().getZ());
@@ -250,7 +246,7 @@ public abstract class MobSpawnerAbstract {
         this.spawningPenalty = 0; // Migot
 
         if (this.mobs.size() > 0) {
-            this.a((MobSpawnerAbstract.a) WeightedRandom.a(this.a().random, this.mobs));
+            this.a(WeightedRandom.a(this.a().random, this.mobs));
         }
 
         this.a(1);
@@ -315,11 +311,8 @@ public abstract class MobSpawnerAbstract {
                 NBTTagList nbttaglist = new NBTTagList();
 
                 if (this.mobs.size() > 0) {
-                    Iterator iterator = this.mobs.iterator();
-
-                    while (iterator.hasNext()) {
-                        MobSpawnerAbstract.a mobspawnerabstract_a = (MobSpawnerAbstract.a) iterator.next();
 
+                    for (a mobspawnerabstract_a : this.mobs) {
                         nbttaglist.add(mobspawnerabstract_a.a());
                     }
                 } else {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTBase.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTBase.java
index e158c5d..0bc4736 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTBase.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTBase.java
@@ -17,7 +17,7 @@ public abstract class NBTBase {
     public abstract byte getTypeId();
 
     // Migot start
-    protected static java.util.concurrent.ConcurrentHashMap storedStrings = new java.util.concurrent.ConcurrentHashMap(16, 0.75f, 2);
+    protected static java.util.concurrent.ConcurrentHashMap storedStrings = new java.util.concurrent.ConcurrentHashMap<>(16, 0.75f, 2);
 
     public static String getStoredString(String name, boolean store) {
         String str = storedStrings.get(name);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java
index b2d5254..692c48f 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java
@@ -20,7 +20,7 @@ public class NBTCompressedStreamTools {
         NBTTagCompound nbttagcompound;
 
         try {
-            nbttagcompound = a((DataInput) datainputstream, NBTReadLimiter.a);
+            nbttagcompound = a(datainputstream, NBTReadLimiter.a);
         } finally {
             datainputstream.close();
         }
@@ -29,18 +29,15 @@ public class NBTCompressedStreamTools {
     }
 
     public static void a(NBTTagCompound nbttagcompound, OutputStream outputstream) throws IOException {
-        DataOutputStream dataoutputstream = new DataOutputStream(new BufferedOutputStream(new GZIPOutputStream(outputstream)));
 
-        try {
+        try (DataOutputStream dataoutputstream = new DataOutputStream(new BufferedOutputStream(new GZIPOutputStream(outputstream)))) {
             a(nbttagcompound, (DataOutput) dataoutputstream);
-        } finally {
-            dataoutputstream.close();
         }
 
     }
 
     public static NBTTagCompound a(DataInputStream datainputstream) throws IOException {
-        return a((DataInput) datainputstream, NBTReadLimiter.a);
+        return a(datainputstream, NBTReadLimiter.a);
     }
 
     public static NBTTagCompound a(DataInput datainput, NBTReadLimiter nbtreadlimiter) throws IOException {
@@ -87,8 +84,8 @@ public class NBTCompressedStreamTools {
                 CrashReport crashreport = CrashReport.a(ioexception, "Loading NBT data");
                 CrashReportSystemDetails crashreportsystemdetails = crashreport.a("NBT Tag");
 
-                crashreportsystemdetails.a("Tag name", (Object) "[UNNAMED TAG]");
-                crashreportsystemdetails.a("Tag type", (Object) Byte.valueOf(b0));
+                crashreportsystemdetails.a("Tag name", "[UNNAMED TAG]");
+                crashreportsystemdetails.a("Tag type", b0);
                 throw new ReportedException(crashreport);
             }
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagByteArray.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagByteArray.java
index 13e9d0b..8a356f4 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagByteArray.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagByteArray.java
@@ -25,7 +25,7 @@ public class NBTTagByteArray extends NBTBase {
         int j = datainput.readInt();
        com.google.common.base.Preconditions.checkArgument( j < 1 << 24);
 
-        nbtreadlimiter.a((long) (8 * j));
+        nbtreadlimiter.a(8L * j);
         this.data = new byte[j];
         datainput.readFully(this.data);
     }
@@ -46,7 +46,7 @@ public class NBTTagByteArray extends NBTBase {
     }
 
     public boolean equals(Object object) {
-        return super.equals(object) ? Arrays.equals(this.data, ((NBTTagByteArray) object).data) : false;
+        return super.equals(object) && Arrays.equals(this.data, ((NBTTagByteArray) object).data);
     }
 
     public int hashCode() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagCompound.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagCompound.java
index a013256..7239bf2 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagCompound.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagCompound.java
@@ -1,6 +1,5 @@
 package net.minecraft.server;
 
-import com.google.common.collect.Maps;
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -22,11 +21,9 @@ public class NBTTagCompound extends NBTBase {
     }
 
     void write(DataOutput dataoutput) throws IOException {
-        Iterator iterator = this.map.keySet().iterator();
 
-        while (iterator.hasNext()) {
-            String s = (String) iterator.next();
-            NBTBase nbtbase = (NBTBase) this.map.get(s);
+        for (String s : this.map.keySet()) {
+            NBTBase nbtbase = this.map.get(s);
 
             a(s, nbtbase, dataoutput);
         }
@@ -46,7 +43,7 @@ public class NBTTagCompound extends NBTBase {
             while ((b0 = a(datainput, nbtreadlimiter)) != 0) {
                 String s = getStoredString(b(datainput, nbtreadlimiter), true); // Migot
 
-                nbtreadlimiter.a((long) (224 + 16 * s.length()));
+                nbtreadlimiter.a(224 + 16L * s.length());
                 NBTBase nbtbase = a(b0, s, datainput, i + 1, nbtreadlimiter);
 
                 if (this.map.put(s, nbtbase) != null) {
@@ -110,11 +107,11 @@ public class NBTTagCompound extends NBTBase {
     }
 
     public NBTBase get(String s) {
-        return (NBTBase) this.map.get(s);
+        return this.map.get(s);
     }
 
     public byte b(String s) {
-        NBTBase nbtbase = (NBTBase) this.map.get(s);
+        NBTBase nbtbase = this.map.get(s);
 
         return nbtbase != null ? nbtbase.getTypeId() : 0;
     }
@@ -130,7 +127,6 @@ public class NBTTagCompound extends NBTBase {
             return true;
         } else if (i != 99) {
             if (b0 > 0) {
-                ;
             }
 
             return false;
@@ -189,7 +185,7 @@ public class NBTTagCompound extends NBTBase {
 
     public String getString(String s) {
         try {
-            return !this.hasKeyOfType(s, 8) ? "" : ((NBTBase) this.map.get(s)).a_();
+            return !this.hasKeyOfType(s, 8) ? "" : this.map.get(s).a_();
         } catch (ClassCastException classcastexception) {
             return "";
         }
@@ -266,7 +262,7 @@ public class NBTTagCompound extends NBTBase {
 
         crashreportsystemdetails.a("Tag type found", new Callable() {
             public String a() throws Exception {
-                return NBTBase.a[((NBTBase) NBTTagCompound.this.map.get(s)).getTypeId()];
+                return NBTBase.a[NBTTagCompound.this.map.get(s).getTypeId()];
             }
 
             public Object call() throws Exception {
@@ -282,7 +278,7 @@ public class NBTTagCompound extends NBTBase {
                 return this.a();
             }
         });
-        crashreportsystemdetails.a("Tag name", (Object) s);
+        crashreportsystemdetails.a("Tag name", s);
         return crashreport;
     }
 
@@ -338,18 +334,16 @@ public class NBTTagCompound extends NBTBase {
             CrashReport crashreport = CrashReport.a(ioexception, "Loading NBT data");
             CrashReportSystemDetails crashreportsystemdetails = crashreport.a("NBT Tag");
 
-            crashreportsystemdetails.a("Tag name", (Object) s);
-            crashreportsystemdetails.a("Tag type", (Object) Byte.valueOf(b0));
+            crashreportsystemdetails.a("Tag name", s);
+            crashreportsystemdetails.a("Tag type", b0);
             throw new ReportedException(crashreport);
         }
     }
 
     public void a(NBTTagCompound nbttagcompound) {
-        Iterator iterator = nbttagcompound.map.keySet().iterator();
 
-        while (iterator.hasNext()) {
-            String s = (String) iterator.next();
-            NBTBase nbtbase = (NBTBase) nbttagcompound.map.get(s);
+        for (String s : nbttagcompound.map.keySet()) {
+            NBTBase nbtbase = nbttagcompound.map.get(s);
 
             if (nbtbase.getTypeId() == 10) {
                 if (this.hasKeyOfType(s, 10)) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagIntArray.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagIntArray.java
index e206e50..c1c2585 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagIntArray.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagIntArray.java
@@ -18,8 +18,8 @@ public class NBTTagIntArray extends NBTBase {
     void write(DataOutput dataoutput) throws IOException {
         dataoutput.writeInt(this.data.length);
 
-        for (int i = 0; i < this.data.length; ++i) {
-            dataoutput.writeInt(this.data[i]);
+        for (int datum : this.data) {
+            dataoutput.writeInt(datum);
         }
 
     }
@@ -29,7 +29,7 @@ public class NBTTagIntArray extends NBTBase {
         int j = datainput.readInt();
        com.google.common.base.Preconditions.checkArgument( j < 1 << 24);
 
-        nbtreadlimiter.a((long) (32 * j));
+        nbtreadlimiter.a(32L * j);
         this.data = new int[j];
 
         for (int k = 0; k < j; ++k) {
@@ -43,14 +43,12 @@ public class NBTTagIntArray extends NBTBase {
     }
 
     public String toString() {
-        String s = "[";
+        StringBuilder s = new StringBuilder("[");
         int[] aint = this.data;
         int i = aint.length;
 
-        for (int j = 0; j < i; ++j) {
-            int k = aint[j];
-
-            s = s + k + ",";
+        for (int k : aint) {
+            s.append(k).append(",");
         }
 
         return s + "]";
@@ -64,7 +62,7 @@ public class NBTTagIntArray extends NBTBase {
     }
 
     public boolean equals(Object object) {
-        return super.equals(object) ? Arrays.equals(this.data, ((NBTTagIntArray) object).data) : false;
+        return super.equals(object) && Arrays.equals(this.data, ((NBTTagIntArray) object).data);
     }
 
     public int hashCode() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagList.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagList.java
index a0e6b0f..1d91aaf 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagList.java
@@ -19,7 +19,7 @@ public class NBTTagList extends NBTBase {
 
     void write(DataOutput dataoutput) throws IOException {
         if (!this.list.isEmpty()) {
-            this.type = ((NBTBase) this.list.get(0)).getTypeId();
+            this.type = this.list.get(0).getTypeId();
         } else {
             this.type = 0;
         }
@@ -27,8 +27,8 @@ public class NBTTagList extends NBTBase {
         dataoutput.writeByte(this.type);
         dataoutput.writeInt(this.list.size());
 
-        for (int i = 0; i < this.list.size(); ++i) {
-            ((NBTBase) this.list.get(i)).write(dataoutput);
+        for (NBTBase nbtBase : this.list) {
+            nbtBase.write(dataoutput);
         }
 
     }
@@ -40,7 +40,7 @@ public class NBTTagList extends NBTBase {
         } else {
             this.type = datainput.readByte();
             int j = datainput.readInt();
-            nbtreadlimiter.a(j * 8); // CraftBukkit
+            nbtreadlimiter.a(j * 8L); // CraftBukkit
 
             if (this.type == 0 && j > 0) {
                 throw new RuntimeException("Missing type on ListTag");
@@ -110,7 +110,7 @@ public class NBTTagList extends NBTBase {
     }
 
     public NBTBase a(int i) {
-        return (NBTBase) this.list.remove(i);
+        return this.list.remove(i);
     }
 
     public boolean isEmpty() {
@@ -119,7 +119,7 @@ public class NBTTagList extends NBTBase {
 
     public NBTTagCompound get(int i) {
         if (i >= 0 && i < this.list.size()) {
-            NBTBase nbtbase = (NBTBase) this.list.get(i);
+            NBTBase nbtbase = this.list.get(i);
 
             return nbtbase.getTypeId() == 10 ? (NBTTagCompound) nbtbase : new NBTTagCompound();
         } else {
@@ -129,7 +129,7 @@ public class NBTTagList extends NBTBase {
 
     public int[] c(int i) {
         if (i >= 0 && i < this.list.size()) {
-            NBTBase nbtbase = (NBTBase) this.list.get(i);
+            NBTBase nbtbase = this.list.get(i);
 
             return nbtbase.getTypeId() == 11 ? ((NBTTagIntArray) nbtbase).c() : new int[0];
         } else {
@@ -139,7 +139,7 @@ public class NBTTagList extends NBTBase {
 
     public double d(int i) {
         if (i >= 0 && i < this.list.size()) {
-            NBTBase nbtbase = (NBTBase) this.list.get(i);
+            NBTBase nbtbase = this.list.get(i);
 
             return nbtbase.getTypeId() == 6 ? ((NBTTagDouble) nbtbase).g() : 0.0D;
         } else {
@@ -149,7 +149,7 @@ public class NBTTagList extends NBTBase {
 
     public float e(int i) {
         if (i >= 0 && i < this.list.size()) {
-            NBTBase nbtbase = (NBTBase) this.list.get(i);
+            NBTBase nbtbase = this.list.get(i);
 
             return nbtbase.getTypeId() == 5 ? ((NBTTagFloat) nbtbase).h() : 0.0F;
         } else {
@@ -159,7 +159,7 @@ public class NBTTagList extends NBTBase {
 
     public String getString(int i) {
         if (i >= 0 && i < this.list.size()) {
-            NBTBase nbtbase = (NBTBase) this.list.get(i);
+            NBTBase nbtbase = this.list.get(i);
 
             return nbtbase.getTypeId() == 8 ? nbtbase.a_() : nbtbase.toString();
         } else {
@@ -168,7 +168,7 @@ public class NBTTagList extends NBTBase {
     }
 
     public NBTBase g(int i) {
-        return (NBTBase) (i >= 0 && i < this.list.size() ? (NBTBase) this.list.get(i) : new NBTTagEnd());
+        return i >= 0 && i < this.list.size() ? this.list.get(i) : new NBTTagEnd();
     }
 
     public int size() {
@@ -179,10 +179,8 @@ public class NBTTagList extends NBTBase {
         NBTTagList nbttaglist = new NBTTagList();
 
         nbttaglist.type = this.type;
-        Iterator iterator = this.list.iterator();
 
-        while (iterator.hasNext()) {
-            NBTBase nbtbase = (NBTBase) iterator.next();
+        for (NBTBase nbtbase : this.list) {
             NBTBase nbtbase1 = nbtbase.clone();
 
             nbttaglist.list.add(nbtbase1);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagString.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagString.java
index 487a6d8..e234335 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagString.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NBTTagString.java
@@ -26,7 +26,7 @@ public class NBTTagString extends NBTBase {
     void load(DataInput datainput, int i, NBTReadLimiter nbtreadlimiter) throws IOException {
         nbtreadlimiter.a(288L);
         this.data = getStoredString(datainput.readUTF(), true); // Migot
-        nbtreadlimiter.a((long) (16 * this.data.length()));
+        nbtreadlimiter.a(16L * this.data.length());
     }
 
     public byte getTypeId() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index d67539c..959b895 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -11,7 +11,6 @@ import com.mojang.authlib.GameProfile;
 import com.mojang.authlib.ProfileLookupCallback;
 import com.mojang.authlib.yggdrasil.ProfileNotFoundException;
 import java.io.File;
-import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.text.ParseException;
 import java.util.ArrayList;
@@ -36,10 +35,9 @@ public class NameReferencingFileConverter {
 
     static List a(File file, Map map) throws IOException {
         List list = Files.readLines(file, Charsets.UTF_8);
-        Iterator iterator = list.iterator();
 
-        while (iterator.hasNext()) {
-            String s = (String) iterator.next();
+        for (Object o : list) {
+            String s = (String) o;
 
             s = s.trim();
             if (!s.startsWith("#") && s.length() >= 1) {
@@ -53,7 +51,7 @@ public class NameReferencingFileConverter {
     }
 
     private static void a(MinecraftServer minecraftserver, Collection collection, ProfileLookupCallback profilelookupcallback) {
-        String[] astring = (String[]) Iterators.toArray(Iterators.filter(collection.iterator(), new Predicate() {
+        String[] astring = Iterators.toArray(Iterators.filter(collection.iterator(), new Predicate() {
             public boolean a(String s) {
                 return !UtilColor.b(s);
             }
@@ -66,12 +64,11 @@ public class NameReferencingFileConverter {
         if (minecraftserver.getOnlineMode() || org.spigotmc.SpigotConfig.bungee) { // Spigot: bungee = online mode, for now.
             minecraftserver.getGameProfileRepository().findProfilesByNames(astring, Agent.MINECRAFT, profilelookupcallback);
         } else {
-            String[] astring1 = astring;
             int i = astring.length;
 
             for (int j = 0; j < i; ++j) {
-                String s = astring1[j];
-                UUID uuid = EntityHuman.a(new GameProfile((UUID) null, s));
+                String s = astring[j];
+                UUID uuid = EntityHuman.a(new GameProfile(null, s));
                 GameProfile gameprofile = new GameProfile(uuid, s);
 
                 profilelookupcallback.onProfileLookupSucceeded(gameprofile);
@@ -96,7 +93,7 @@ public class NameReferencingFileConverter {
             try {
                 final HashMap hashmap = Maps.newHashMap();
 
-                a(NameReferencingFileConverter.b, (Map) hashmap);
+                a(NameReferencingFileConverter.b, hashmap);
                 ProfileLookupCallback profilelookupcallback = new ProfileLookupCallback() {
                     public void onProfileLookupSucceeded(GameProfile gameprofile) {
                         minecraftserver.getUserCache().a(gameprofile);
@@ -106,9 +103,9 @@ public class NameReferencingFileConverter {
                             NameReferencingFileConverter.e.warn("Could not convert user banlist entry for " + gameprofile.getName());
                             throw new NameReferencingFileConverter.FileConversionException("Profile not in the conversionlist", null);
                         } else {
-                            Date date = astring.length > 1 ? NameReferencingFileConverter.b(astring[1], (Date) null) : null;
+                            Date date = astring.length > 1 ? NameReferencingFileConverter.b(astring[1], null) : null;
                             String s = astring.length > 2 ? astring[2] : null;
-                            Date date1 = astring.length > 3 ? NameReferencingFileConverter.b(astring[3], (Date) null) : null;
+                            Date date1 = astring.length > 3 ? NameReferencingFileConverter.b(astring[3], null) : null;
                             String s1 = astring.length > 4 ? astring[4] : null;
 
                             gameprofilebanlist.add(new GameProfileBanEntry(gameprofile, date, s, date1, s1));
@@ -155,15 +152,14 @@ public class NameReferencingFileConverter {
             try {
                 HashMap hashmap = Maps.newHashMap();
 
-                a(NameReferencingFileConverter.a, (Map) hashmap);
-                Iterator iterator = hashmap.keySet().iterator();
+                a(NameReferencingFileConverter.a, hashmap);
 
-                while (iterator.hasNext()) {
-                    String s = (String) iterator.next();
+                for (Object o : hashmap.keySet()) {
+                    String s = (String) o;
                     String[] astring = (String[]) hashmap.get(s);
-                    Date date = astring.length > 1 ? b(astring[1], (Date) null) : null;
+                    Date date = astring.length > 1 ? b(astring[1], null) : null;
                     String s1 = astring.length > 2 ? astring[2] : null;
-                    Date date1 = astring.length > 3 ? b(astring[3], (Date) null) : null;
+                    Date date1 = astring.length > 3 ? b(astring[3], null) : null;
                     String s2 = astring.length > 4 ? astring[4] : null;
 
                     ipbanlist.add(new IpBanEntry(s, date, s1, date1, s2));
@@ -294,7 +290,7 @@ public class NameReferencingFileConverter {
                 a(minecraftserver, Lists.newArrayList(new String[] { s}), profilelookupcallback);
                 return arraylist.size() > 0 && ((GameProfile) arraylist.get(0)).getId() != null ? ((GameProfile) arraylist.get(0)).getId().toString() : "";
             } else {
-                return EntityHuman.a(new GameProfile((UUID) null, s)).toString();
+                return EntityHuman.a(new GameProfile(null, s)).toString();
             }
         } else {
             return s;
@@ -309,11 +305,10 @@ public class NameReferencingFileConverter {
         if (file.exists() && file.isDirectory()) {
             File[] afile = file.listFiles();
             ArrayList arraylist = Lists.newArrayList();
-            File[] afile1 = afile;
             int i = afile.length;
 
             for (int j = 0; j < i; ++j) {
-                File file3 = afile1[j];
+                File file3 = afile[j];
                 String s = file3.getName();
 
                 if (s.toLowerCase(Locale.ROOT).endsWith(".dat")) {
@@ -326,7 +321,7 @@ public class NameReferencingFileConverter {
             }
 
             try {
-                final String[] astring = (String[]) arraylist.toArray(new String[arraylist.size()]);
+                final String[] astring = (String[]) arraylist.toArray(new String[0]);
                 ProfileLookupCallback profilelookupcallback = new ProfileLookupCallback() {
                     public void onProfileLookupSucceeded(GameProfile gameprofile) {
                         dedicatedserver.getUserCache().a(gameprofile);
@@ -387,9 +382,9 @@ public class NameReferencingFileConverter {
                     private String a(GameProfile gameprofile) {
                         String s = null;
 
-                        for (int i = 0; i < astring.length; ++i) {
-                            if (astring[i] != null && astring[i].equalsIgnoreCase(gameprofile.getName())) {
-                                s = astring[i];
+                        for (String value : astring) {
+                            if (value != null && value.equalsIgnoreCase(gameprofile.getName())) {
+                                s = value;
                                 break;
                             }
                         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/Navigation.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/Navigation.java
index ae463ea..5ef3a8d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/Navigation.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/Navigation.java
@@ -50,7 +50,7 @@ public class Navigation extends NavigationAbstract {
     }
 
     protected Vec3D c() {
-        return new Vec3D(this.b.locX, (double) this.p(), this.b.locZ);
+        return new Vec3D(this.b.locX, this.p(), this.b.locZ);
     }
 
     private int p() {
@@ -187,10 +187,8 @@ public class Navigation extends NavigationAbstract {
     }
 
     private boolean b(int var1, int var2, int var3, int var4, int var5, int var6, Vec3D var7, double var8, double var10) {
-        Iterator var12 = BlockPosition.a(new BlockPosition(var1, var2, var3), new BlockPosition(var1 + var4 - 1, var2 + var5 - 1, var3 + var6 - 1)).iterator();
 
-        while (var12.hasNext()) {
-            BlockPosition var13 = (BlockPosition) var12.next();
+        for (BlockPosition var13 : BlockPosition.a(new BlockPosition(var1, var2, var3), new BlockPosition(var1 + var4 - 1, var2 + var5 - 1, var3 + var6 - 1))) {
             double var14 = (double) var13.getX() + 0.5D - var7.a;
             double var16 = (double) var13.getZ() + 0.5D - var7.c;
             if (!(var14 * var8 + var16 * var10 < 0.0D)) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NavigationAbstract.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NavigationAbstract.java
index 82ea88b..b69e9d7 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NavigationAbstract.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NavigationAbstract.java
@@ -1,10 +1,5 @@
 package net.minecraft.server;
 
-import com.elevatemc.spigot.pathsearch.PositionPathSearchType;
-import com.elevatemc.spigot.pathsearch.jobs.PathSearchJob;
-import com.elevatemc.spigot.pathsearch.jobs.PathSearchJobNavigationEntity;
-import com.elevatemc.spigot.pathsearch.jobs.PathSearchJobNavigationPosition;
-
 import java.util.Iterator;
 import java.util.List;
 
@@ -52,7 +47,7 @@ public abstract class NavigationAbstract {
             BlockPosition blockposition1 = new BlockPosition(this.b);
             int i = (int) (f + 8.0F);
             ChunkCache chunkcache = new ChunkCache(this.c, blockposition1.a(-i, -i, -i), blockposition1.a(i, i, i), 0);
-            PathEntity pathentity = this.j.a((IBlockAccess) chunkcache, (Entity) this.b, blockposition, f);
+            PathEntity pathentity = this.j.a(chunkcache, this.b, blockposition, f);
 
             this.c.methodProfiler.b();
             return pathentity;
@@ -60,7 +55,7 @@ public abstract class NavigationAbstract {
     }
 
     public boolean a(double d0, double d1, double d2, double d3) {
-        PathEntity pathentity = this.a((double) MathHelper.floor(d0), (double) ((int) d1), (double) MathHelper.floor(d2));
+        PathEntity pathentity = this.a(MathHelper.floor(d0), (int) d1, MathHelper.floor(d2));
 
         return this.a(pathentity, d3);
     }
@@ -79,7 +74,7 @@ public abstract class NavigationAbstract {
             BlockPosition blockposition = (new BlockPosition(this.b)).up();
             int i = (int) (f + 16.0F);
             ChunkCache chunkcache = new ChunkCache(this.c, blockposition.a(-i, -i, -i), blockposition.a(i, i, i), 0);
-            PathEntity pathentity = this.j.a((IBlockAccess) chunkcache, (Entity) this.b, entity, f);
+            PathEntity pathentity = this.j.a(chunkcache, this.b, entity, f);
 
             this.c.methodProfiler.b();
             return pathentity;
@@ -151,7 +146,7 @@ public abstract class NavigationAbstract {
             }
 
             if (!this.m()) {
-                vec3d = this.d.a((Entity) this.b);
+                vec3d = this.d.a(this.b);
                 if (vec3d != null) {
                     AxisAlignedBB axisalignedbb = (new AxisAlignedBB(vec3d.a, vec3d.b, vec3d.c, vec3d.a, vec3d.b, vec3d.c)).grow(0.5D, 0.5D, 0.5D);
                     List list = this.c.getCubes(this.b, axisalignedbb.a(0.0D, -1.0D, 0.0D));
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NetworkManager.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NetworkManager.java
index a83817b..d4ca8f3 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NetworkManager.java
@@ -24,7 +24,6 @@ import org.apache.logging.log4j.Logger;
 import org.apache.logging.log4j.Marker;
 import org.apache.logging.log4j.MarkerManager;
 
-import javax.crypto.SecretKey;
 import java.net.SocketAddress;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
@@ -200,8 +199,8 @@ public class NetworkManager extends SimpleChannelInboundHandler {
                         e.printStackTrace();
                     }
                 }
-            } catch (CancelledPacketHandleException cancelledpackethandleexception) {
-            };
+            } catch (CancelledPacketHandleException ignored) {
+            }
         }
 
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/NextTickListEntry.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/NextTickListEntry.java
index 648d255..d1ea3c7 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/NextTickListEntry.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/NextTickListEntry.java
@@ -10,7 +10,7 @@ public class NextTickListEntry implements Comparable {
     private long f;
 
     public NextTickListEntry(BlockPosition blockposition, Block block) {
-        this.f = (long) (NextTickListEntry.d++);
+        this.f = NextTickListEntry.d++;
         this.a = blockposition;
         this.e = block;
     }
@@ -39,7 +39,7 @@ public class NextTickListEntry implements Comparable {
     }
 
     public int a(NextTickListEntry nextticklistentry) {
-        return this.b < nextticklistentry.b ? -1 : (this.b > nextticklistentry.b ? 1 : (this.c != nextticklistentry.c ? this.c - nextticklistentry.c : (this.f < nextticklistentry.f ? -1 : (this.f > nextticklistentry.f ? 1 : 0))));
+        return this.b < nextticklistentry.b ? -1 : (this.b > nextticklistentry.b ? 1 : (this.c != nextticklistentry.c ? this.c - nextticklistentry.c : (Long.compare(this.f, nextticklistentry.f))));
     }
 
     public String toString() {
@@ -51,6 +51,6 @@ public class NextTickListEntry implements Comparable {
     }
 
     public int compareTo(NextTickListEntry object) {
-        return this.a((NextTickListEntry) object);
+        return this.a(object);
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/OldChunkLoader.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/OldChunkLoader.java
index 670d626..ad2e1a7 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/OldChunkLoader.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/OldChunkLoader.java
@@ -20,7 +20,7 @@ public class OldChunkLoader {
         try {
             oldchunkloader_oldchunk.a = nbttagcompound.getLong("LastUpdate");
         } catch (ClassCastException classcastexception) {
-            oldchunkloader_oldchunk.a = (long) nbttagcompound.getInt("LastUpdate");
+            oldchunkloader_oldchunk.a = nbttagcompound.getInt("LastUpdate");
         }
 
         return oldchunkloader_oldchunk;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketDataSerializer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketDataSerializer.java
index 46cdf66..1908185 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketDataSerializer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketDataSerializer.java
@@ -8,7 +8,7 @@ import io.netty.buffer.ByteBufOutputStream;
 import io.netty.buffer.ByteBufProcessor;
 import io.netty.handler.codec.DecoderException;
 import io.netty.handler.codec.EncoderException;
-import io.netty.util.ReferenceCounted;
+
 import java.io.DataInput;
 import java.io.DataOutput;
 import java.io.IOException;
@@ -185,7 +185,7 @@ public class PacketDataSerializer extends ByteBuf {
             return null;
         } else {
             this.readerIndex(i);
-            return NBTCompressedStreamTools.a((DataInput) (new ByteBufInputStream(this)), new NBTReadLimiter(2097152L));
+            return NBTCompressedStreamTools.a(new ByteBufInputStream(this), new NBTReadLimiter(2097152L));
         }
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketDecompressor.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketDecompressor.java
index 659d081..9e8f6af 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketDecompressor.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketDecompressor.java
@@ -49,11 +49,10 @@ public class PacketDecompressor extends ByteToMessageDecoder {
                     this.inflater.reset();
                     return;
                 }
-                int claimedUncompressedSize = var5; // OBFHELPER
                 ByteBuf compatibleIn = MoreByteBufUtils.ensureCompatible(var1.alloc(), this.compressor, var2);
-                ByteBuf uncompressed = MoreByteBufUtils.preferredBuffer(var1.alloc(), this.compressor, claimedUncompressedSize);
+                ByteBuf uncompressed = MoreByteBufUtils.preferredBuffer(var1.alloc(), this.compressor, var5);
                 try {
-                    this.compressor.inflate(compatibleIn, uncompressed, claimedUncompressedSize);
+                    this.compressor.inflate(compatibleIn, uncompressed, var5);
                     var3.add(uncompressed);
                     var2.clear();
                 } catch (Exception e) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInChat.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInChat.java
index 6b71d97..b8ca315 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInChat.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInChat.java
@@ -32,15 +32,7 @@ public class PacketPlayInChat implements Packet {
     public void a(final PacketListenerPlayIn packetlistenerplayin) {
         if ( !a.startsWith("/") )
         {
-            executors.submit( new Runnable()
-            {
-
-                @Override
-                public void run()
-                {
-                    packetlistenerplayin.a( PacketPlayInChat.this );
-                }
-            } );
+            executors.submit(() -> packetlistenerplayin.a( PacketPlayInChat.this ));
             return;
         }
         // Spigot End
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java
index c5e5aa7..73feb12 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInResourcePackStatus.java
@@ -11,12 +11,12 @@ public class PacketPlayInResourcePackStatus implements Packet {
         while (iterator.hasNext()) {
             chunksection1 = (ChunkSection) iterator.next();
             char[] achar = chunksection1.getIdArray();
-            char[] achar1 = achar;
             int k = achar.length;
 
             for (int l = 0; l < k; ++l) {
-                char c0 = achar1[l];
+                char c0 = achar[l];
 
                 packetplayoutmapchunk_chunkmap.a[j++] = (byte) (c0 & 255);
                 packetplayoutmapchunk_chunkmap.a[j++] = (byte) (c0 >> 8 & 255);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
index 00c0538..8227519 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java
@@ -19,10 +19,10 @@ public class PacketPlayOutMapChunkBulk implements Packet
         this.a = new int[i];
         this.b = new int[i];
         this.c = new PacketPlayOutMapChunk.ChunkMap[i];
-        this.d = !((Chunk) list.get(0)).getWorld().worldProvider.o();
+        this.d = !list.get(0).getWorld().worldProvider.o();
 
         for (int j = 0; j < i; ++j) {
-            Chunk chunk = (Chunk) list.get(j);
+            Chunk chunk = list.get(j);
             PacketPlayOutMapChunk.ChunkMap packetplayoutmapchunk_chunkmap = chunk.getChunkMap(true, '\uffff'); // PaperSpigot
 
             this.a[j] = chunk.locX;
@@ -30,7 +30,7 @@ public class PacketPlayOutMapChunkBulk implements Packet
             this.c[j] = packetplayoutmapchunk_chunkmap;
         }
         
-        world = ((Chunk) list.get(0)).getWorld(); // Spigot
+        world = list.get(0).getWorld(); // Spigot
     }
 
     public void a(PacketDataSerializer packetdataserializer) throws IOException {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutPlayerInfo.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutPlayerInfo.java
index 70306a3..2a56728 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutPlayerInfo.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutPlayerInfo.java
@@ -22,11 +22,10 @@ public class PacketPlayOutPlayerInfo implements Packet {
 
     public PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction packetplayoutplayerinfo_enumplayerinfoaction, EntityPlayer... aentityplayer) {
         this.a = packetplayoutplayerinfo_enumplayerinfoaction;
-        EntityPlayer[] aentityplayer1 = aentityplayer;
         int i = aentityplayer.length;
 
         for (int j = 0; j < i; ++j) {
-            EntityPlayer entityplayer = aentityplayer1[j];
+            EntityPlayer entityplayer = aentityplayer[j];
 
             this.b.add(new PacketPlayOutPlayerInfo.PlayerInfoData(entityplayer.getProfile(),
                     entityplayer.ping, entityplayer.playerInteractManager.getGameMode(), entityplayer.getPlayerListName()));
@@ -147,23 +146,17 @@ public class PacketPlayOutPlayerInfo implements Packet {
     }
 
     public void b(PacketDataSerializer packetdataserializer) throws IOException {
-        packetdataserializer.a((Enum) this.a);
+        packetdataserializer.a(this.a);
         packetdataserializer.b(this.b.size());
-        Iterator iterator = this.b.iterator();
 
-        while (iterator.hasNext()) {
-            PacketPlayOutPlayerInfo.PlayerInfoData packetplayoutplayerinfo_playerinfodata = (PacketPlayOutPlayerInfo.PlayerInfoData) iterator.next();
-
-            switch (PacketPlayOutPlayerInfo.SyntheticClass_1.a[this.a.ordinal()]) {
+        for (PlayerInfoData packetplayoutplayerinfo_playerinfodata : this.b) {
+            switch (SyntheticClass_1.a[this.a.ordinal()]) {
                 case 1:
                     packetdataserializer.a(packetplayoutplayerinfo_playerinfodata.a().getId());
                     packetdataserializer.a(packetplayoutplayerinfo_playerinfodata.a().getName());
                     packetdataserializer.b(packetplayoutplayerinfo_playerinfodata.a().getProperties().size());
-                    Iterator iterator1 = packetplayoutplayerinfo_playerinfodata.a().getProperties().values().iterator();
-
-                    while (iterator1.hasNext()) {
-                        Property property = (Property) iterator1.next();
 
+                    for (Property property : packetplayoutplayerinfo_playerinfodata.a().getProperties().values()) {
                         packetdataserializer.a(property.getName());
                         packetdataserializer.a(property.getValue());
                         if (property.hasSignature()) {
@@ -227,31 +220,26 @@ public class PacketPlayOutPlayerInfo implements Packet {
             try {
                 PacketPlayOutPlayerInfo.SyntheticClass_1.a[PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER.ordinal()] = 1;
             } catch (NoSuchFieldError ignored) {
-                ;
             }
 
             try {
                 PacketPlayOutPlayerInfo.SyntheticClass_1.a[PacketPlayOutPlayerInfo.EnumPlayerInfoAction.UPDATE_GAME_MODE.ordinal()] = 2;
             } catch (NoSuchFieldError ignored) {
-                ;
             }
 
             try {
                 PacketPlayOutPlayerInfo.SyntheticClass_1.a[PacketPlayOutPlayerInfo.EnumPlayerInfoAction.UPDATE_LATENCY.ordinal()] = 3;
             } catch (NoSuchFieldError ignored) {
-                ;
             }
 
             try {
                 PacketPlayOutPlayerInfo.SyntheticClass_1.a[PacketPlayOutPlayerInfo.EnumPlayerInfoAction.UPDATE_DISPLAY_NAME.ordinal()] = 4;
             } catch (NoSuchFieldError ignored) {
-                ;
             }
 
             try {
                 PacketPlayOutPlayerInfo.SyntheticClass_1.a[PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER.ordinal()] = 5;
             } catch (NoSuchFieldError ignored) {
-                ;
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
index dfce289..fe672f6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
@@ -102,11 +102,8 @@ public class PacketPlayOutScoreboardTeam implements Packet {
     }
 
     public void a(PacketDataSerializer packetdataserializer) throws IOException {
-        this.a = (EnumTitleAction) packetdataserializer.a(EnumTitleAction.class);
+        this.a = packetdataserializer.a(EnumTitleAction.class);
         if (this.a == EnumTitleAction.TITLE || this.a == EnumTitleAction.SUBTITLE) {
             this.b = packetdataserializer.d();
         }
@@ -55,7 +55,7 @@ public class PacketPlayOutTitle implements Packet {
     }
 
     public void b(PacketDataSerializer packetdataserializer) throws IOException {
-        packetdataserializer.a((Enum) this.a);
+        packetdataserializer.a(this.a);
         if (this.a == EnumTitleAction.TITLE || this.a == EnumTitleAction.SUBTITLE) {
             // Paper start
             if (this.components != null) {
@@ -96,9 +96,7 @@ public class PacketPlayOutTitle implements Packet {
             EnumTitleAction[] apacketplayouttitle_enumtitleaction = values();
             int i = apacketplayouttitle_enumtitleaction.length;
 
-            for (int j = 0; j < i; ++j) {
-                EnumTitleAction packetplayouttitle_enumtitleaction = apacketplayouttitle_enumtitleaction[j];
-
+            for (EnumTitleAction packetplayouttitle_enumtitleaction : apacketplayouttitle_enumtitleaction) {
                 if (packetplayouttitle_enumtitleaction.name().equalsIgnoreCase(s)) {
                     return packetplayouttitle_enumtitleaction;
                 }
@@ -113,9 +111,7 @@ public class PacketPlayOutTitle implements Packet {
             EnumTitleAction[] apacketplayouttitle_enumtitleaction = values();
             int j = apacketplayouttitle_enumtitleaction.length;
 
-            for (int k = 0; k < j; ++k) {
-                EnumTitleAction packetplayouttitle_enumtitleaction = apacketplayouttitle_enumtitleaction[k];
-
+            for (EnumTitleAction packetplayouttitle_enumtitleaction : apacketplayouttitle_enumtitleaction) {
                 astring[i++] = packetplayouttitle_enumtitleaction.name().toLowerCase();
             }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketStatusListener.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketStatusListener.java
index e4bff04..5e6a1ae 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketStatusListener.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PacketStatusListener.java
@@ -2,7 +2,7 @@ package net.minecraft.server;
 
 // CraftBukkit start
 import com.mojang.authlib.GameProfile;
-import io.netty.channel.ChannelFutureListener;
+
 import java.net.InetSocketAddress;
 import java.util.Iterator;
 
@@ -61,9 +61,8 @@ public class PacketStatusListener implements PacketStatusInListener {
                         if (player != null) {
                             return true;
                         }
-                        final Object[] currentPlayers = players;
-                        for (int length = currentPlayers.length, i = this.i; i < length; i++) {
-                            final EntityPlayer player = (EntityPlayer) currentPlayers[i];
+                        for (int length = players.length, i = this.i; i < length; i++) {
+                            final EntityPlayer player = (EntityPlayer) players[i];
                             if (player != null) {
                                 this.i = i + 1;
                                 this.player = player;
@@ -86,12 +85,11 @@ public class PacketStatusListener implements PacketStatusInListener {
 
                     @Override
                     public void remove() {
-                        final Object[] currentPlayers = players;
                         final int i = this.ret;
-                        if (i < 0 || currentPlayers[i] == null) {
+                        if (i < 0 || players[i] == null) {
                             throw new IllegalStateException();
                         }
-                        currentPlayers[i] = null;
+                        players[i] = null;
                     }
                 };
             }
@@ -100,7 +98,7 @@ public class PacketStatusListener implements PacketStatusInListener {
         ServerListPingEvent event = new ServerListPingEvent();
         this.minecraftServer.server.getPluginManager().callEvent(event);
 
-        java.util.List profiles = new java.util.ArrayList(players.length);
+        java.util.List profiles = new java.util.ArrayList<>(players.length);
         for (Object player : players) {
             if (player != null) {
                 profiles.add(((EntityPlayer) player).getProfile());
@@ -115,7 +113,7 @@ public class PacketStatusListener implements PacketStatusInListener {
             profiles = profiles.subList( 0, Math.min( profiles.size(), org.spigotmc.SpigotConfig.playerSample ) ); // Cap the sample to n (or less) displayed players, ie: Vanilla behaviour
         }
         // Spigot End
-        playerSample.a(profiles.toArray(new GameProfile[profiles.size()]));
+        playerSample.a(profiles.toArray(new GameProfile[0]));
 
         ServerPing ping = new ServerPing();
         ping.setFavicon(event.icon.value);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
index cdff6d2..897696f 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
@@ -39,7 +39,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
 
     public void e() {
         this.d.getControllerLook().a(this.e, 10.0F, (float) this.d.bQ());
-        this.d.getNavigation().a((Entity) this.e, this.c);
+        this.d.getNavigation().a(this.e, this.c);
         ++this.b;
         if (this.b >= 60 && this.d.h(this.e) < 9.0D) {
             this.g();
@@ -49,13 +49,12 @@ public class PathfinderGoalBreed extends PathfinderGoal {
 
     private EntityAnimal f() {
         float f = 8.0F;
-        List list = this.a.a(this.d.getClass(), this.d.getBoundingBox().grow((double) f, (double) f, (double) f));
+        List list = this.a.a(this.d.getClass(), this.d.getBoundingBox().grow(f, f, f));
         double d0 = Double.MAX_VALUE;
         EntityAnimal entityanimal = null;
-        Iterator iterator = list.iterator();
 
-        while (iterator.hasNext()) {
-            EntityAnimal entityanimal1 = (EntityAnimal) iterator.next();
+        for (Object o : list) {
+            EntityAnimal entityanimal1 = (EntityAnimal) o;
 
             if (this.d.mate(entityanimal1) && this.d.h(entityanimal1) < d0) {
                 entityanimal = entityanimal1;
@@ -84,7 +83,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
             if (entityhuman != null) {
                 entityhuman.b(StatisticList.A);
                 if (this.d instanceof EntityCow) {
-                    entityhuman.b((Statistic) AchievementList.H);
+                    entityhuman.b(AchievementList.H);
                 }
             }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalDefendVillage.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalDefendVillage.java
index df627d3..d5b8759 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalDefendVillage.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalDefendVillage.java
@@ -17,12 +17,12 @@ public class PathfinderGoalDefendVillage extends PathfinderGoalTarget {
         if (village == null) {
             return false;
         } else {
-            this.b = village.b((EntityLiving) this.a);
+            this.b = village.b(this.a);
             if (this.b instanceof EntityCreeper) {
                 return false;
             } else if (!this.a(this.b, false)) {
                 if (this.e.bc().nextInt(20) == 0) {
-                    this.b = village.c((EntityLiving) this.a);
+                    this.b = village.c(this.a);
                     return this.a(this.b, false);
                 } else {
                     return false;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
index 0582519..668595c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java
@@ -10,7 +10,7 @@ import org.bukkit.Material;
 
 public class PathfinderGoalEatTile extends PathfinderGoal {
 
-    private static final Predicate b = BlockStatePredicate.a((Block) Blocks.TALLGRASS).a(BlockLongGrass.TYPE, Predicates.equalTo(BlockLongGrass.EnumTallGrassType.GRASS));
+    private static final Predicate b = BlockStatePredicate.a(Blocks.TALLGRASS).a(BlockLongGrass.TYPE, Predicates.equalTo(BlockLongGrass.EnumTallGrassType.GRASS));
     private EntityInsentient c;
     private World d;
     int a;
@@ -27,7 +27,7 @@ public class PathfinderGoalEatTile extends PathfinderGoal {
         } else {
             BlockPosition blockposition = new BlockPosition(this.c.locX, this.c.locY, this.c.locZ);
 
-            return PathfinderGoalEatTile.b.apply(this.d.getType(blockposition)) ? true : this.d.getType(blockposition.down()).getBlock() == Blocks.GRASS;
+            return PathfinderGoalEatTile.b.apply(this.d.getType(blockposition)) || this.d.getType(blockposition.down()).getBlock() == Blocks.GRASS;
         }
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalHurtByTarget.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalHurtByTarget.java
index bf9eda8..9ceb587 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalHurtByTarget.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalHurtByTarget.java
@@ -28,19 +28,16 @@ public class PathfinderGoalHurtByTarget extends PathfinderGoalTarget {
         if (this.a) {
             double d0 = this.f();
             List list = this.e.world.a(this.e.getClass(), (new AxisAlignedBB(this.e.locX, this.e.locY, this.e.locZ, this.e.locX + 1.0D, this.e.locY + 1.0D, this.e.locZ + 1.0D)).grow(d0, 10.0D, d0));
-            Iterator iterator = list.iterator();
 
-            while (iterator.hasNext()) {
-                EntityCreature entitycreature = (EntityCreature) iterator.next();
+            for (Object o : list) {
+                EntityCreature entitycreature = (EntityCreature) o;
 
                 if (this.e != entitycreature && entitycreature.getGoalTarget() == null && !entitycreature.c(this.e.getLastDamager())) {
                     boolean flag = false;
                     Class[] aclass = this.c;
                     int i = aclass.length;
 
-                    for (int j = 0; j < i; ++j) {
-                        Class oclass = aclass[j];
-
+                    for (Class oclass : aclass) {
                         if (entitycreature.getClass() == oclass) {
                             flag = true;
                             break;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java
index d8a0204..a3f2681 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java
@@ -57,7 +57,7 @@ public class PathfinderGoalMakeLove extends PathfinderGoal {
         --this.e;
         this.b.getControllerLook().a(this.c, 10.0F, 30.0F);
         if (this.b.h(this.c) > 2.25D) {
-            this.b.getNavigation().a((Entity) this.c, 0.25D);
+            this.b.getNavigation().a(this.c, 0.25D);
         } else if (this.e == 0 && this.c.cm()) {
             this.g();
         }
@@ -79,7 +79,7 @@ public class PathfinderGoalMakeLove extends PathfinderGoal {
     }
 
     private void g() {
-        EntityVillager entityvillager = this.b.b((EntityAgeable) this.c);
+        EntityVillager entityvillager = this.b.b(this.c);
 
         this.c.setAgeRaw(6000);
         this.b.setAgeRaw(6000);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java
index 5cdc263..ef0c5f4 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java
@@ -19,7 +19,7 @@ public class PathfinderGoalNearestAttackableTarget exten
     }
 
     public PathfinderGoalNearestAttackableTarget(EntityCreature entitycreature, Class oclass, boolean flag, boolean flag1) {
-        this(entitycreature, oclass, 10, flag, flag1, (Predicate) null);
+        this(entitycreature, oclass, 10, flag, flag1, null);
     }
 
     public PathfinderGoalNearestAttackableTarget(EntityCreature entitycreature, Class oclass, int i, boolean flag, boolean flag1, final Predicate predicate) {
@@ -47,7 +47,7 @@ public class PathfinderGoalNearestAttackableTarget exten
                                 f = 0.1F;
                             }
 
-                            d0 *= (double) (0.7F * f);
+                            d0 *= 0.7F * f;
                         }
 
                         if ((double) t0.g(PathfinderGoalNearestAttackableTarget.this.e) > d0) {
@@ -70,9 +70,9 @@ public class PathfinderGoalNearestAttackableTarget exten
             return false;
         } else {
             double d0 = this.f();
-            List list = this.e.world.a(this.a, this.e.getBoundingBox().grow(d0, 4.0D, d0), Predicates.and((Predicate) this.c, (Predicate) IEntitySelector.d)); // TacoSpigot - the eclipse compiler can't understand this, so make it generic
+            List list = this.e.world.a(this.a, this.e.getBoundingBox().grow(d0, 4.0D, d0), Predicates.and(this.c, (Predicate) IEntitySelector.d)); // TacoSpigot - the eclipse compiler can't understand this, so make it generic
 
-            Collections.sort(list, this.b);
+            list.sort(this.b);
             if (list.isEmpty()) {
                 return false;
             } else {
@@ -99,11 +99,11 @@ public class PathfinderGoalNearestAttackableTarget exten
             double d0 = this.a.h(entity);
             double d1 = this.a.h(entity1);
 
-            return d0 < d1 ? -1 : (d0 > d1 ? 1 : 0);
+            return Double.compare(d0, d1);
         }
 
         public int compare(Entity object, Entity object1) { // CraftBukkit - fix decompile error
-            return this.a((Entity) object, (Entity) object1);
+            return this.a(object, object1);
         }
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTargetInsentient.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTargetInsentient.java
index b0b95bd..987dd8e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTargetInsentient.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTargetInsentient.java
@@ -30,7 +30,7 @@ public class PathfinderGoalNearestAttackableTargetInsentient extends PathfinderG
                     d0 *= 0.800000011920929D;
                 }
 
-                return entityliving.isInvisible() ? false : ((double) entityliving.g(PathfinderGoalNearestAttackableTargetInsentient.this.b) > d0 ? false : PathfinderGoalTarget.a(PathfinderGoalNearestAttackableTargetInsentient.this.b, entityliving, false, true));
+                return !entityliving.isInvisible() && (!((double) entityliving.g(PathfinderGoalNearestAttackableTargetInsentient.this.b) > d0) && PathfinderGoalTarget.a(PathfinderGoalNearestAttackableTargetInsentient.this.b, entityliving, false, true));
             }
 
             public boolean apply(Object object) {
@@ -44,7 +44,7 @@ public class PathfinderGoalNearestAttackableTargetInsentient extends PathfinderG
         double d0 = this.f();
         List list = this.b.world.a(this.f, this.b.getBoundingBox().grow(d0, 4.0D, d0), this.c);
 
-        Collections.sort(list, this.d);
+        list.sort(this.d);
         if (list.isEmpty()) {
             return false;
         } else {
@@ -63,7 +63,7 @@ public class PathfinderGoalNearestAttackableTargetInsentient extends PathfinderG
         } else {
             double d0 = this.f();
 
-            return this.b.h(entityliving) > d0 * d0 ? false : !(entityliving instanceof EntityPlayer) || !((EntityPlayer) entityliving).playerInteractManager.isCreative();
+            return !(this.b.h(entityliving) > d0 * d0) && (!(entityliving instanceof EntityPlayer) || !((EntityPlayer) entityliving).playerInteractManager.isCreative());
         }
     }
 
@@ -73,7 +73,7 @@ public class PathfinderGoalNearestAttackableTargetInsentient extends PathfinderG
     }
 
     public void d() {
-        this.b.setGoalTarget((EntityLiving) null);
+        this.b.setGoalTarget(null);
         super.c();
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSelector.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
index b03ba85..b690843 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
@@ -1,6 +1,5 @@
 package net.minecraft.server;
 
-import com.google.common.collect.Lists;
 import java.util.Iterator;
 import java.util.List;
 import org.apache.logging.log4j.LogManager;
@@ -11,8 +10,8 @@ import org.bukkit.craftbukkit.util.UnsafeList; // CraftBukkit
 public class PathfinderGoalSelector {
 
     private static final Logger a = LogManager.getLogger();
-    private List b = new UnsafeList();
-    private List c = new UnsafeList();
+    private List b = new UnsafeList<>();
+    private List c = new UnsafeList<>();
     private final MethodProfiler d;
     private int e;
     private int f = 3;
@@ -95,9 +94,8 @@ public class PathfinderGoalSelector {
     }
 
     private boolean a(PathfinderGoalSelector.PathfinderGoalSelectorItem pathfindergoalselector_pathfindergoalselectoritem) {
-        boolean flag = pathfindergoalselector_pathfindergoalselectoritem.a.b();
 
-        return flag;
+        return pathfindergoalselector_pathfindergoalselectoritem.a.b();
     }
 
     private boolean b(PathfinderGoalSelector.PathfinderGoalSelectorItem pathfindergoalselector_pathfindergoalselectoritem) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSit.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSit.java
index 5081b4f..53a743a 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSit.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSit.java
@@ -20,7 +20,7 @@ public class PathfinderGoalSit extends PathfinderGoal {
         } else {
             EntityLiving entityliving = this.entity.getOwner();
 
-            return entityliving == null ? true : (this.entity.h(entityliving) < 144.0D && entityliving.getLastDamager() != null ? false : this.willSit);
+            return entityliving == null || ((!(this.entity.h(entityliving) < 144.0D) || entityliving.getLastDamager() == null) && this.willSit);
         }
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTame.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTame.java
index 123e657..80c494f 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTame.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTame.java
@@ -57,7 +57,7 @@ public class PathfinderGoalTame extends PathfinderGoal {
 
             // CraftBukkit start - Handle dismounting to account for VehicleExitEvent being fired.
             if (this.entity.passenger != null) {
-                this.entity.passenger.mount((Entity) null);
+                this.entity.passenger.mount(null);
                 // If the entity still has a passenger, then a plugin cancelled the event.
                 if (this.entity.passenger != null) {
                     return;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTargetNearestPlayer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTargetNearestPlayer.java
index 4c1f168..1313555 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTargetNearestPlayer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTargetNearestPlayer.java
@@ -40,10 +40,10 @@ public class PathfinderGoalTargetNearestPlayer extends PathfinderGoal {
                             f = 0.1F;
                         }
 
-                        d0 *= (double) (0.7F * f);
+                        d0 *= 0.7F * f;
                     }
 
-                    return (double) entity.g(PathfinderGoalTargetNearestPlayer.this.b) > d0 ? false : PathfinderGoalTarget.a(PathfinderGoalTargetNearestPlayer.this.b, (EntityLiving) entity, false, true);
+                    return !((double) entity.g(PathfinderGoalTargetNearestPlayer.this.b) > d0) && PathfinderGoalTarget.a(PathfinderGoalTargetNearestPlayer.this.b, (EntityLiving) entity, false, true);
                 }
             }
 
@@ -58,7 +58,7 @@ public class PathfinderGoalTargetNearestPlayer extends PathfinderGoal {
         double d0 = this.f();
         List list = this.b.world.a(EntityHuman.class, this.b.getBoundingBox().grow(d0, 4.0D, d0), this.c);
 
-        Collections.sort(list, this.d);
+        list.sort(this.d);
         if (list.isEmpty()) {
             return false;
         } else {
@@ -85,7 +85,7 @@ public class PathfinderGoalTargetNearestPlayer extends PathfinderGoal {
             } else {
                 double d0 = this.f();
 
-                return this.b.h(entityliving) > d0 * d0 ? false : !(entityliving instanceof EntityPlayer) || !((EntityPlayer) entityliving).playerInteractManager.isCreative();
+                return !(this.b.h(entityliving) > d0 * d0) && (!(entityliving instanceof EntityPlayer) || !((EntityPlayer) entityliving).playerInteractManager.isCreative());
             }
         }
     }
@@ -96,7 +96,7 @@ public class PathfinderGoalTargetNearestPlayer extends PathfinderGoal {
     }
 
     public void d() {
-        this.b.setGoalTarget((EntityLiving) null);
+        this.b.setGoalTarget(null);
         super.c();
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTempt.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
index b846c6a..cbf1320 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTempt.java
@@ -61,8 +61,8 @@ public class PathfinderGoalTempt extends PathfinderGoal {
                 this.e = this.h.locZ;
             }
 
-            this.f = (double)this.h.pitch;
-            this.g = (double)this.h.yaw;
+            this.f = this.h.pitch;
+            this.g = this.h.yaw;
         }
 
         return this.a();
@@ -73,8 +73,8 @@ public class PathfinderGoalTempt extends PathfinderGoal {
         this.d = this.h.locY;
         this.e = this.h.locZ;
         this.j = true;
-        this.m = ((Navigation)this.a.getNavigation()).e();
-        ((Navigation)this.a.getNavigation()).a(false);
+        this.m = this.a.getNavigation().e();
+        this.a.getNavigation().a(false);
     }
 
     public void d() {
@@ -82,7 +82,7 @@ public class PathfinderGoalTempt extends PathfinderGoal {
         this.a.getNavigation().n();
         this.i = 100;
         this.j = false;
-        ((Navigation)this.a.getNavigation()).a(this.m);
+        this.a.getNavigation().a(this.m);
     }
 
     public void e() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PersistentCollection.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PersistentCollection.java
index 50e0ec4..c646c7b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PersistentCollection.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PersistentCollection.java
@@ -10,7 +10,6 @@ import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.InputStream;
-import java.io.OutputStream;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -28,7 +27,7 @@ public class PersistentCollection {
     }
 
     public PersistentBase get(Class oclass, String s) {
-        PersistentBase persistentbase = (PersistentBase) this.a.get(s);
+        PersistentBase persistentbase = this.a.get(s);
 
         if (persistentbase != null) {
             return persistentbase;
@@ -39,13 +38,13 @@ public class PersistentCollection {
 
                     if (file != null && file.exists()) {
                         try {
-                            persistentbase = (PersistentBase) oclass.getConstructor(new Class[] { String.class}).newInstance(new Object[] { s});
+                            persistentbase = oclass.getConstructor(new Class[] { String.class}).newInstance(new Object[] { s});
                         } catch (Exception exception) {
                             throw new RuntimeException("Failed to instantiate " + oclass.toString(), exception);
                         }
 
                         FileInputStream fileinputstream = new FileInputStream(file);
-                        NBTTagCompound nbttagcompound = NBTCompressedStreamTools.a((InputStream) fileinputstream);
+                        NBTTagCompound nbttagcompound = NBTCompressedStreamTools.a(fileinputstream);
 
                         fileinputstream.close();
                         persistentbase.a(nbttagcompound.getCompound("data"));
@@ -74,8 +73,8 @@ public class PersistentCollection {
     }
 
     public void a() {
-        for (int i = 0; i < this.c.size(); ++i) {
-            PersistentBase persistentbase = (PersistentBase) this.c.get(i);
+        for (PersistentBase persistentBase : this.c) {
+            PersistentBase persistentbase = persistentBase;
 
             if (persistentbase.d()) {
                 this.a(persistentbase);
@@ -128,17 +127,15 @@ public class PersistentCollection {
                 NBTTagCompound nbttagcompound = NBTCompressedStreamTools.a(datainputstream);
 
                 datainputstream.close();
-                Iterator iterator = nbttagcompound.c().iterator();
 
-                while (iterator.hasNext()) {
-                    String s = (String) iterator.next();
+                for (String s : nbttagcompound.c()) {
                     NBTBase nbtbase = nbttagcompound.get(s);
 
                     if (nbtbase instanceof NBTTagShort) {
                         NBTTagShort nbttagshort = (NBTTagShort) nbtbase;
                         short short0 = nbttagshort.e();
 
-                        this.d.put(s, Short.valueOf(short0));
+                        this.d.put(s, short0);
                     }
                 }
             }
@@ -149,28 +146,26 @@ public class PersistentCollection {
     }
 
     public int a(String s) {
-        Short oshort = (Short) this.d.get(s);
+        Short oshort = this.d.get(s);
 
         if (oshort == null) {
-            oshort = Short.valueOf((short) 0);
+            oshort = (short) 0;
         } else {
-            oshort = Short.valueOf((short) (oshort.shortValue() + 1));
+            oshort = (short) (oshort.shortValue() + 1);
         }
 
         this.d.put(s, oshort);
         if (this.b == null) {
-            return oshort.shortValue();
+            return oshort;
         } else {
             try {
                 File file = this.b.getDataFile("idcounts");
 
                 if (file != null) {
                     NBTTagCompound nbttagcompound = new NBTTagCompound();
-                    Iterator iterator = this.d.keySet().iterator();
 
-                    while (iterator.hasNext()) {
-                        String s1 = (String) iterator.next();
-                        short short0 = ((Short) this.d.get(s1)).shortValue();
+                    for (String s1 : this.d.keySet()) {
+                        short short0 = this.d.get(s1);
 
                         nbttagcompound.setShort(s1, short0);
                     }
@@ -184,7 +179,7 @@ public class PersistentCollection {
                 exception.printStackTrace();
             }
 
-            return oshort.shortValue();
+            return oshort;
         }
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerChunkMap.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 2ee5cb7..ae8dc4f 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -21,8 +21,8 @@ public class PlayerChunkMap {
     private final WorldServer world;
     private final List managedPlayers = Lists.newArrayList();
     private final LongHashMap d = new LongHashMap();
-    private final Queue e = new java.util.concurrent.ConcurrentLinkedQueue(); // CraftBukkit ArrayList -> ConcurrentLinkedQueue
-    private final Queue f = new java.util.concurrent.ConcurrentLinkedQueue(); // CraftBukkit ArrayList -> ConcurrentLinkedQueue
+    private final Queue e = new java.util.concurrent.ConcurrentLinkedQueue<>(); // CraftBukkit ArrayList -> ConcurrentLinkedQueue
+    private final Queue f = new java.util.concurrent.ConcurrentLinkedQueue<>(); // CraftBukkit ArrayList -> ConcurrentLinkedQueue
     private int g;
     private long h;
     private final int[][] i = new int[][] { { 1, 0}, { 0, 1}, { -1, 0}, { 0, -1}};
@@ -46,9 +46,8 @@ public class PlayerChunkMap {
             this.h = i;
 
             // CraftBukkit start - Use iterator
-            java.util.Iterator iterator = this.f.iterator();
-            while (iterator.hasNext()) {
-                playerchunkmap_playerchunk = (PlayerChunk) iterator.next();
+            for (PlayerChunk playerChunk : this.f) {
+                playerchunkmap_playerchunk = playerChunk;
                 playerchunkmap_playerchunk.b();
                 playerchunkmap_playerchunk.a();
             }
@@ -87,7 +86,7 @@ public class PlayerChunkMap {
 
     private PlayerChunkMap.PlayerChunk a(int i, int j, boolean flag) {
         long k = (long) i + 2147483647L | (long) j + 2147483647L << 32;
-        PlayerChunkMap.PlayerChunk playerchunkmap_playerchunk = (PlayerChunkMap.PlayerChunk) this.d.getEntry(k);
+        PlayerChunkMap.PlayerChunk playerchunkmap_playerchunk = this.d.getEntry(k);
 
         if (playerchunkmap_playerchunk == null && flag) {
             playerchunkmap_playerchunk = new PlayerChunkMap.PlayerChunk(i, j);
@@ -127,7 +126,7 @@ public class PlayerChunkMap {
         entityplayer.e = entityplayer.locZ;
 
         // CraftBukkit start - Load nearby chunks first
-        List chunkList = new LinkedList();
+        List chunkList = new LinkedList<>();
 
         // PaperSpigot start - Player view distance API
         for (int k = i - entityplayer.viewDistance; k <= i + entityplayer.viewDistance; ++k) {
@@ -137,7 +136,7 @@ public class PlayerChunkMap {
             }
         }
         
-        Collections.sort(chunkList, new ChunkCoordComparator(entityplayer));
+        chunkList.sort(new ChunkCoordComparator(entityplayer));
         for (ChunkCoordIntPair pair : chunkList) {
             this.a(pair.x, pair.z, true).a(entityplayer);
         }
@@ -215,7 +214,7 @@ public class PlayerChunkMap {
         int j1 = i - k;
         int k1 = j - l;
 
-        return j1 >= -i1 && j1 <= i1 ? k1 >= -i1 && k1 <= i1 : false;
+        return j1 >= -i1 && j1 <= i1 && k1 >= -i1 && k1 <= i1;
     }
 
     public void movePlayer(EntityPlayer entityplayer) {
@@ -231,7 +230,7 @@ public class PlayerChunkMap {
             int i1 = entityplayer.viewDistance; // PaperSpigot - Player view distance API
             int j1 = i - k;
             int k1 = j - l;
-            List chunksToLoad = new LinkedList(); // CraftBukkit
+            List chunksToLoad = new LinkedList<>(); // CraftBukkit
 
             if (j1 != 0 || k1 != 0) {
                 for (int l1 = i - i1; l1 <= i + i1; ++l1) {
@@ -255,13 +254,13 @@ public class PlayerChunkMap {
                 entityplayer.e = entityplayer.locZ;
 
                 // CraftBukkit start - send nearest chunks first
-                Collections.sort(chunksToLoad, new ChunkCoordComparator(entityplayer));
+                chunksToLoad.sort(new ChunkCoordComparator(entityplayer));
                 for (ChunkCoordIntPair pair : chunksToLoad) {
                     this.a(pair.x, pair.z, true).a(entityplayer);
                 }
 
                 if (j1 > 1 || j1 < -1 || k1 > 1 || k1 < -1) {
-                    Collections.sort(entityplayer.chunkCoordIntPairQueue, new ChunkCoordComparator(entityplayer));
+                    entityplayer.chunkCoordIntPairQueue.sort(new ChunkCoordComparator(entityplayer));
                 }
                 // CraftBukkit end
             }
@@ -279,10 +278,9 @@ public class PlayerChunkMap {
         if (i != this.g) {
             int j = i - this.g;
             ArrayList arraylist = Lists.newArrayList(this.managedPlayers);
-            Iterator iterator = arraylist.iterator();
 
-            while (iterator.hasNext()) {
-                EntityPlayer entityplayer = (EntityPlayer) iterator.next();
+            for (Object o : arraylist) {
+                EntityPlayer entityplayer = (EntityPlayer) o;
                 int k = (int) entityplayer.locX >> 4;
                 int l = (int) entityplayer.locZ >> 4;
                 int i1;
@@ -291,7 +289,7 @@ public class PlayerChunkMap {
                 if (j > 0) {
                     for (i1 = k - i; i1 <= k + i; ++i1) {
                         for (j1 = l - i; j1 <= l + i; ++j1) {
-                            PlayerChunkMap.PlayerChunk playerchunkmap_playerchunk = this.a(i1, j1, true);
+                            PlayerChunk playerchunkmap_playerchunk = this.a(i1, j1, true);
 
                             if (!playerchunkmap_playerchunk.b.contains(entityplayer)) {
                                 playerchunkmap_playerchunk.a(entityplayer);
@@ -365,13 +363,9 @@ public class PlayerChunkMap {
         private long g;
 
         // CraftBukkit start - add fields
-        private final HashMap players = new HashMap();
+        private final HashMap players = new HashMap<>();
         private boolean loaded = false;
-        private Runnable loadedRunnable = new Runnable() {
-            public void run() {
-                PlayerChunk.this.loaded = true;
-            }
-        };
+        private Runnable loadedRunnable = () -> PlayerChunk.this.loaded = true;
         // CraftBukkit end
 
         public PlayerChunk(int i, int j) {
@@ -387,7 +381,7 @@ public class PlayerChunkMap {
         }
         public void a(final EntityPlayer entityplayer) {  // CraftBukkit - added final to argument
             if (this.b.contains(entityplayer)) {
-                PlayerChunkMap.a.debug("Failed to add player. {} already is in chunk {}, {}", new Object[] { entityplayer, Integer.valueOf(this.location.x), Integer.valueOf(this.location.z)});
+                PlayerChunkMap.a.debug("Failed to add player. {} already is in chunk {}, {}", new Object[] { entityplayer, this.location.x, this.location.z});
             } else {
                 if (this.b.isEmpty()) {
                     this.g = PlayerChunkMap.this.world.getTime();
@@ -400,11 +394,7 @@ public class PlayerChunkMap {
                     playerRunnable = null;
                     entityplayer.chunkCoordIntPairQueue.add(this.location);
                 } else {
-                    playerRunnable = new Runnable() {
-                        public void run() {
-                            entityplayer.chunkCoordIntPairQueue.add(PlayerChunk.this.location);
-                        }
-                    };
+                    playerRunnable = () -> entityplayer.chunkCoordIntPairQueue.add(PlayerChunk.this.location);
                     PlayerChunkMap.this.a().chunkProviderServer.getChunkAt(this.location.x, this.location.z, playerRunnable);
                 }
 
@@ -486,8 +476,8 @@ public class PlayerChunkMap {
         }
 
         public void a(Packet packet) {
-            for (int i = 0; i < this.b.size(); ++i) {
-                EntityPlayer entityplayer = (EntityPlayer) this.b.get(i);
+            for (EntityPlayer entityPlayer : this.b) {
+                EntityPlayer entityplayer = entityPlayer;
 
                 if (!entityplayer.chunkCoordIntPairQueue.contains(this.location)) {
                     entityplayer.playerConnection.sendPacket(packet);
@@ -508,7 +498,7 @@ public class PlayerChunkMap {
                     k = (this.dirtyBlocks[0] >> 8 & 15) + this.location.z * 16;
                     BlockPosition blockposition = new BlockPosition(i, j, k);
 
-                    this.a((Packet) (new PacketPlayOutBlockChange(PlayerChunkMap.this.world, blockposition)));
+                    this.a(new PacketPlayOutBlockChange(PlayerChunkMap.this.world, blockposition));
                     if (PlayerChunkMap.this.world.getType(blockposition).getBlock().isTileEntity()) {
                         this.a(PlayerChunkMap.this.world.getTileEntity(blockposition));
                     }
@@ -518,20 +508,20 @@ public class PlayerChunkMap {
                     if (this.dirtyCount == 64) {
                         i = this.location.x * 16;
                         j = this.location.z * 16;
-                        this.a((Packet) (new PacketPlayOutMapChunk(PlayerChunkMap.this.world.getChunkAt(this.location.x, this.location.z), false, this.f)));
+                        this.a(new PacketPlayOutMapChunk(PlayerChunkMap.this.world.getChunkAt(this.location.x, this.location.z), false, this.f));
 
                         for (k = 0; k < 16; ++k) {
                             if ((this.f & 1 << k) != 0) {
                                 l = k << 4;
                                 List list = PlayerChunkMap.this.world.getTileEntities(i, l, j, i + 16, l + 16, j + 16);
 
-                                for (int i1 = 0; i1 < list.size(); ++i1) {
-                                    this.a((TileEntity) list.get(i1));
+                                for (Object o : list) {
+                                    this.a((TileEntity) o);
                                 }
                             }
                         }
                     } else {
-                        this.a((Packet) (new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, PlayerChunkMap.this.world.getChunkAt(this.location.x, this.location.z))));
+                        this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, PlayerChunkMap.this.world.getChunkAt(this.location.x, this.location.z)));
 
                         for (i = 0; i < this.dirtyCount; ++i) {
                             j = (this.dirtyBlocks[i] >> 12 & 15) + this.location.x * 16;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java
index bbb070c..4614a47 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -97,7 +97,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
     public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) {
         this.minecraftServer = minecraftserver;
         this.networkManager = networkmanager;
-        networkmanager.a((PacketListener) this);
+        networkmanager.a(this);
         this.player = entityplayer;
         entityplayer.playerConnection = this;
 
@@ -123,9 +123,9 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
     private boolean hasMoved; // Spigot
 
     public CraftPlayer getPlayer() {
-        return (this.player == null) ? null : (CraftPlayer) this.player.getBukkitEntity();
+        return (this.player == null) ? null : this.player.getBukkitEntity();
     }
-    private final static HashSet invalidItems = new HashSet(java.util.Arrays.asList(8, 9, 10, 11, 26, 34, 36, 43, 51, 52, 55, 59, 60, 62, 63, 64, 68, 71, 74, 75, 83, 90, 92, 93, 94, 104, 105, 115, 117, 118, 119, 125, 127, 132, 140, 141, 142, 144)); // TODO: Check after every update.
+    private final static HashSet invalidItems = new HashSet<>(java.util.Arrays.asList(8, 9, 10, 11, 26, 34, 36, 43, 51, 52, 55, 59, 60, 62, 63, 64, 68, 71, 74, 75, 83, 90, 92, 93, 94, 104, 105, 115, 117, 118, 119, 125, 127, 132, 140, 141, 142, 144)); // TODO: Check after every update.
     // CraftBukkit end
 
     public void c() {
@@ -133,7 +133,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
         ++this.e;
         this.minecraftServer.methodProfiler.a("keepAlive");
         if ((long) this.e - this.k > 40L) {
-            this.k = (long) this.e;
+            this.k = this.e;
             this.j = this.d();
             this.i = (int) this.j;
             this.sendPacket(new PacketPlayOutKeepAlive(this.i));
@@ -153,7 +153,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
             --this.m;
         }
 
-        if (this.player.D() > 0L && this.minecraftServer.getIdleTimeout() > 0 && MinecraftServer.az() - this.player.D() > (long) (this.minecraftServer.getIdleTimeout() * 1000 * 60)) {
+        if (this.player.D() > 0L && this.minecraftServer.getIdleTimeout() > 0 && MinecraftServer.az() - this.player.D() > ((long) this.minecraftServer.getIdleTimeout() * 1000 * 60)) {
             this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
             this.disconnect("You have been idle for too long!");
         }
@@ -188,19 +188,13 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
         // CraftBukkit end
         final ChatComponentText chatcomponenttext = new ChatComponentText(s);
 
-        this.networkManager.a(new PacketPlayOutKickDisconnect(chatcomponenttext), new GenericFutureListener() {
-            public void operationComplete(Future future) throws Exception { // CraftBukkit - fix decompile error
-                PlayerConnection.this.networkManager.close(chatcomponenttext);
-            }
+        this.networkManager.a(new PacketPlayOutKickDisconnect(chatcomponenttext), (GenericFutureListener) future -> { // CraftBukkit - fix decompile error
+            PlayerConnection.this.networkManager.close(chatcomponenttext);
         }, new GenericFutureListener[0]);
         this.a(chatcomponenttext); // CraftBukkit - fire quit instantly
         this.networkManager.k();
         // CraftBukkit - Don't wait
-        this.minecraftServer.postToMainThread(new Runnable() {
-             public void run() {
-                 PlayerConnection.this.networkManager.l();
-            }
-        });
+        this.minecraftServer.postToMainThread(PlayerConnection.this.networkManager::l);
     }
 
     public void a(PacketPlayInSteerVehicle packetplayinsteervehicle) {
@@ -436,7 +430,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                     }
 
                     float f4 = 0.0625F;
-                    boolean flag = worldserver.getCubes(this.player, this.player.getBoundingBox().shrink((double) f4, (double) f4, (double) f4)).isEmpty();
+                    boolean flag = worldserver.getCubes(this.player, this.player.getBoundingBox().shrink(f4, f4, f4)).isEmpty();
 
                     if (this.player.onGround && !packetplayinflying.f() && d12 > 0.0D) {
                         this.player.bF();
@@ -465,7 +459,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                     this.player.setLocation(d7, d8, d9, f2, f3);
                     this.player.checkMovement(this.player.locX - d0, this.player.locY - d1, this.player.locZ - d2);
                     if (!this.player.noclip) {
-                        boolean flag2 = worldserver.getCubes(this.player, this.player.getBoundingBox().shrink((double) f4, (double) f4, (double) f4)).isEmpty();
+                        boolean flag2 = worldserver.getCubes(this.player, this.player.getBoundingBox().shrink(f4, f4, f4)).isEmpty();
 
                         if (flag && (flag1 || !flag2) && !this.player.isSleeping()) {
                             this.a(this.o, this.p, this.q, f2, f3);
@@ -473,7 +467,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                         }
                     }
 
-                    AxisAlignedBB axisalignedbb = this.player.getBoundingBox().grow((double) f4, (double) f4, (double) f4).a(0.0D, -0.55D, 0.0D);
+                    AxisAlignedBB axisalignedbb = this.player.getBoundingBox().grow(f4, f4, f4).a(0.0D, -0.55D, 0.0D);
 
                     if (!this.minecraftServer.getAllowFlight() && !this.player.abilities.canFly && !worldserver.c(axisalignedbb)) {
                         if (d16 >= -0.03125D) {
@@ -779,7 +773,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
             always = (itemstack.count != itemstackAmount) || itemstack.getItem() == Item.getItemOf(Blocks.WATERLILY);
             // CraftBukkit end
         } else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight() - 1 && (enumdirection == EnumDirection.UP || blockposition.getY() >= this.minecraftServer.getMaxBuildHeight())) {
-            ChatMessage chatmessage = new ChatMessage("build.tooHigh", new Object[] { Integer.valueOf(this.minecraftServer.getMaxBuildHeight())});
+            ChatMessage chatmessage = new ChatMessage("build.tooHigh", new Object[] {this.minecraftServer.getMaxBuildHeight()});
 
             chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
             this.player.playerConnection.sendPacket(new PacketPlayOutChat(chatmessage));
@@ -850,7 +844,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
 
             if (entity != null) {
                 this.player.setSpectatorTarget(this.player);
-                this.player.mount((Entity) null);
+                this.player.mount(null);
 
                 /* CraftBukkit start - replace with bukkit handling for multi-world
                 if (entity.world != this.player.world) {
@@ -1340,7 +1334,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
 
         case 7:
             if (this.player.vehicle instanceof EntityHorse) {
-                ((EntityHorse) this.player.vehicle).g((EntityHuman) this.player);
+                ((EntityHorse) this.player.vehicle).g(this.player);
             }
             break;
 
@@ -1354,7 +1348,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
         if (this.player.dead) return; // CraftBukkit
         PlayerConnectionUtils.ensureMainThread(packetplayinuseentity, this, this.player.u());
         WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
-        Entity entity = packetplayinuseentity.a((World) worldserver);
+        Entity entity = packetplayinuseentity.a(worldserver);
         // Spigot Start
         if ( entity == player && !player.isSpectator() )
         {
@@ -1423,10 +1417,10 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                     Item origItem = this.player.inventory.getItemInHand() == null ? null : this.player.inventory.getItemInHand().getItem();
                     PlayerInteractEntityEvent event;
                     if (packetplayinuseentity.a() == PacketPlayInUseEntity.EnumEntityUseAction.INTERACT) {
-                        event = new PlayerInteractEntityEvent((Player) this.getPlayer(), entity.getBukkitEntity());
+                        event = new PlayerInteractEntityEvent(this.getPlayer(), entity.getBukkitEntity());
                     } else {
                         Vec3D target = packetplayinuseentity.b();
-                        event = new PlayerInteractAtEntityEvent((Player) this.getPlayer(), entity.getBukkitEntity(), new org.bukkit.util.Vector(target.a, target.b, target.c));
+                        event = new PlayerInteractAtEntityEvent(this.getPlayer(), entity.getBukkitEntity(), new org.bukkit.util.Vector(target.a, target.b, target.c));
                     }
                     this.server.getPluginManager().callEvent(event);
 
@@ -1454,7 +1448,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                     }
                     // CraftBukkit end
                 } else if (packetplayinuseentity.a() == PacketPlayInUseEntity.EnumEntityUseAction.INTERACT_AT) {
-                    entity.a((EntityHuman) this.player, packetplayinuseentity.b());
+                    entity.a(this.player, packetplayinuseentity.b());
 
                     // CraftBukkit start
                     if (itemInHand != null && itemInHand.count <= -1) {
@@ -1496,7 +1490,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                     this.player.playerConnection.disconnect("You have died. Game over, man, it\'s game over!");
                     this.minecraftServer.aa();
                 } else {
-                    GameProfileBanEntry gameprofilebanentry = new GameProfileBanEntry(this.player.getProfile(), (Date) null, "(You just lost the game)", (Date) null, "Death in Hardcore");
+                    GameProfileBanEntry gameprofilebanentry = new GameProfileBanEntry(this.player.getProfile(), null, "(You just lost the game)", null, "Death in Hardcore");
 
                     this.minecraftServer.getPlayerList().getProfileBans().add(gameprofilebanentry);
                     this.player.playerConnection.disconnect("You have died. Game over, man, it\'s game over!");
@@ -1515,7 +1509,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
             break;
 
         case 3:
-            this.player.b((Statistic) AchievementList.f);
+            this.player.b(AchievementList.f);
         }
 
     }
@@ -1539,10 +1533,10 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                 ArrayList arraylist = Lists.newArrayList();
 
                 for (int i = 0; i < this.player.activeContainer.c.size(); ++i) {
-                    arraylist.add(((Slot) this.player.activeContainer.c.get(i)).getItem());
+                    arraylist.add(this.player.activeContainer.c.get(i).getItem());
                 }
 
-                this.player.a(this.player.activeContainer, (List) arraylist);
+                this.player.a(this.player.activeContainer, arraylist);
             } else {
                 // ItemStack itemstack = this.player.activeContainer.clickItem(packetplayinwindowclick.b(), packetplayinwindowclick.c(), packetplayinwindowclick.f(), this.player);
                 // CraftBukkit start - Call InventoryClickEvent
@@ -1829,16 +1823,16 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                     this.player.broadcastCarriedItem();
                     this.player.g = false;
                 } else {
-                    this.n.a(this.player.activeContainer.windowId, Short.valueOf(packetplayinwindowclick.d()));
+                    this.n.a(this.player.activeContainer.windowId, packetplayinwindowclick.d());
                     this.player.playerConnection.sendPacket(new PacketPlayOutTransaction(packetplayinwindowclick.a(), packetplayinwindowclick.d(), false));
                     this.player.activeContainer.a(this.player, false);
                     ArrayList arraylist1 = Lists.newArrayList();
 
                     for (int j = 0; j < this.player.activeContainer.c.size(); ++j) {
-                        arraylist1.add(((Slot) this.player.activeContainer.c.get(j)).getItem());
+                        arraylist1.add(this.player.activeContainer.c.get(j).getItem());
                     }
 
-                    this.player.a(this.player.activeContainer, (List) arraylist1);
+                    this.player.a(this.player.activeContainer, arraylist1);
                 }
             }
         }
@@ -1875,7 +1869,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                         nbttagcompound1.remove("x");
                         nbttagcompound1.remove("y");
                         nbttagcompound1.remove("z");
-                        itemstack.a("BlockEntityTag", (NBTBase) nbttagcompound1);
+                        itemstack.a("BlockEntityTag", nbttagcompound1);
                     }
                 }
             }
@@ -1926,7 +1920,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
 
             if (flag1 && flag2 && flag3) {
                 if (itemstack == null) {
-                    this.player.defaultContainer.setItem(packetplayinsetcreativeslot.a(), (ItemStack) null);
+                    this.player.defaultContainer.setItem(packetplayinsetcreativeslot.a(), null);
                 } else {
                     this.player.defaultContainer.setItem(packetplayinsetcreativeslot.a(), itemstack);
                 }
@@ -1946,9 +1940,9 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
     public void a(PacketPlayInTransaction packetplayintransaction) {
         if (this.player.dead) return; // CraftBukkit
         PlayerConnectionUtils.ensureMainThread(packetplayintransaction, this, this.player.u());
-        Short oshort = (Short) this.n.get(this.player.activeContainer.windowId);
+        Short oshort = this.n.get(this.player.activeContainer.windowId);
 
-        if (oshort != null && packetplayintransaction.b() == oshort.shortValue() && this.player.activeContainer.windowId == packetplayintransaction.a() && !this.player.activeContainer.c(this.player) && !this.player.isSpectator()) {
+        if (oshort != null && packetplayintransaction.b() == oshort && this.player.activeContainer.windowId == packetplayintransaction.a() && !this.player.activeContainer.c(this.player) && !this.player.isSpectator()) {
             this.player.activeContainer.a(this.player, true);
         }
 
@@ -1988,7 +1982,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
             for (int i = 0; i < aichatbasecomponent.length; ++i) {
                 lines[i] = EnumChatFormat.a(aichatbasecomponent[i].c());
             }
-            SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines);
+            SignChangeEvent event = new SignChangeEvent(player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines);
             this.server.getPluginManager().callEvent(event);
 
             if (!event.isCancelled()) {
@@ -2040,15 +2034,12 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
         }
         // CraftBukkit end
         ArrayList arraylist = Lists.newArrayList();
-        Iterator iterator = this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b()).iterator();
-
-        while (iterator.hasNext()) {
-            String s = (String) iterator.next();
 
+        for (String s : this.minecraftServer.tabCompleteCommand(this.player, packetplayintabcomplete.a(), packetplayintabcomplete.b())) {
             arraylist.add(s);
         }
 
-        this.player.playerConnection.sendPacket(new PacketPlayOutTabComplete((String[]) arraylist.toArray(new String[arraylist.size()])));
+        this.player.playerConnection.sendPacket(new PacketPlayOutTabComplete((String[]) arraylist.toArray(new String[0])));
     }
 
     public void a(PacketPlayInSettings packetplayinsettings) {
@@ -2086,7 +2077,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                 if (itemstack1 != null) {
                     if (itemstack.getItem() == Items.WRITABLE_BOOK && itemstack.getItem() == itemstack1.getItem()) {
                         itemstack1 = new ItemStack(Items.WRITABLE_BOOK); // CraftBukkit
-                        itemstack1.a("pages", (NBTBase) itemstack.getTag().getList("pages", 8));
+                        itemstack1.a("pages", itemstack.getTag().getList("pages", 8));
                         CraftEventFactory.handleEditBookEvent(player, itemstack1); // CraftBukkit
                     }
 
@@ -2125,9 +2116,9 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
                     if (itemstack.getItem() == Items.WRITTEN_BOOK && itemstack1.getItem() == Items.WRITABLE_BOOK) {
                         // CraftBukkit start
                         itemstack1 = new ItemStack(Items.WRITTEN_BOOK);
-                        itemstack1.a("author", (NBTBase) (new NBTTagString(this.player.getName())));
-                        itemstack1.a("title", (NBTBase) (new NBTTagString(itemstack.getTag().getString("title"))));
-                        itemstack1.a("pages", (NBTBase) itemstack.getTag().getList("pages", 8));
+                        itemstack1.a("author", new NBTTagString(this.player.getName()));
+                        itemstack1.a("title", new NBTTagString(itemstack.getTag().getString("title")));
+                        itemstack1.a("pages", itemstack.getTag().getList("pages", 8));
                         itemstack1.setItem(Items.WRITTEN_BOOK);
                         CraftEventFactory.handleEditBookEvent(player, itemstack1);
                         // CraftBukkit end
@@ -2277,102 +2268,86 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
         static {
             try {
                 PlayerConnection.SyntheticClass_1.c[PacketPlayInClientCommand.EnumClientCommand.PERFORM_RESPAWN.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.c[PacketPlayInClientCommand.EnumClientCommand.REQUEST_STATS.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.c[PacketPlayInClientCommand.EnumClientCommand.OPEN_INVENTORY_ACHIEVEMENT.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             b = new int[PacketPlayInEntityAction.EnumPlayerAction.values().length];
 
             try {
                 PlayerConnection.SyntheticClass_1.b[PacketPlayInEntityAction.EnumPlayerAction.START_SNEAKING.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.b[PacketPlayInEntityAction.EnumPlayerAction.STOP_SNEAKING.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror4) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.b[PacketPlayInEntityAction.EnumPlayerAction.START_SPRINTING.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror5) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.b[PacketPlayInEntityAction.EnumPlayerAction.STOP_SPRINTING.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror6) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.b[PacketPlayInEntityAction.EnumPlayerAction.STOP_SLEEPING.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror7) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.b[PacketPlayInEntityAction.EnumPlayerAction.RIDING_JUMP.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror8) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.b[PacketPlayInEntityAction.EnumPlayerAction.OPEN_INVENTORY.ordinal()] = 7;
-            } catch (NoSuchFieldError nosuchfielderror9) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             a = new int[PacketPlayInBlockDig.EnumPlayerDigType.values().length];
 
             try {
                 PlayerConnection.SyntheticClass_1.a[PacketPlayInBlockDig.EnumPlayerDigType.DROP_ITEM.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror10) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.a[PacketPlayInBlockDig.EnumPlayerDigType.DROP_ALL_ITEMS.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror11) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.a[PacketPlayInBlockDig.EnumPlayerDigType.RELEASE_USE_ITEM.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror12) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.a[PacketPlayInBlockDig.EnumPlayerDigType.START_DESTROY_BLOCK.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror13) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.a[PacketPlayInBlockDig.EnumPlayerDigType.ABORT_DESTROY_BLOCK.ordinal()] = 5;
-            } catch (NoSuchFieldError nosuchfielderror14) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 PlayerConnection.SyntheticClass_1.a[PacketPlayInBlockDig.EnumPlayerDigType.STOP_DESTROY_BLOCK.ordinal()] = 6;
-            } catch (NoSuchFieldError nosuchfielderror15) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerInteractManager.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerInteractManager.java
index b3b91b3..68c93a8 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -107,7 +107,7 @@ public class PlayerInteractManager {
         PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, blockposition, enumdirection, this.player.inventory.getItemInHand());
         if (event.isCancelled()) {
             // Let the client know the block still exists
-            ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
+            this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
             // Update any tile entity data for this block
             TileEntity tileentity = this.world.getTileEntity(blockposition);
             if (tileentity != null) {
@@ -117,7 +117,7 @@ public class PlayerInteractManager {
         }
         // CraftBukkit end
         if (this.isCreative()) {
-            if (!this.world.douseFire((EntityHuman) null, blockposition, enumdirection)) {
+            if (!this.world.douseFire(null, blockposition, enumdirection)) {
                 this.breakBlock(blockposition);
             }
 
@@ -153,22 +153,22 @@ public class PlayerInteractManager {
                 if (block == Blocks.WOODEN_DOOR) {
                     // For some reason *BOTH* the bottom/top part have to be marked updated.
                     boolean bottom = data.get(BlockDoor.HALF) == BlockDoor.EnumDoorHalf.LOWER;
-                    ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
-                    ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, bottom ? blockposition.up() : blockposition.down()));
+                    this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
+                    this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, bottom ? blockposition.up() : blockposition.down()));
                 } else if (block == Blocks.TRAPDOOR) {
-                    ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
+                    this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
                 }
             } else if (block.getMaterial() != Material.AIR) {
                 block.attack(this.world, blockposition, this.player);
                 f = block.getDamage(this.player, this.player.world, blockposition);
                 // Allow fire punching to be blocked
-                this.world.douseFire((EntityHuman) null, blockposition, enumdirection);
+                this.world.douseFire(null, blockposition, enumdirection);
             }
 
             if (event.useItemInHand() == Event.Result.DENY) {
                 // If we 'insta destroyed' then the client needs to be informed.
                 if (f > 1.0f) {
-                    ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
+                    this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
                 }
                 return;
             }
@@ -176,7 +176,7 @@ public class PlayerInteractManager {
 
             if (blockEvent.isCancelled()) {
                 // Let the client know the block still exists
-                ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
+                this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
                 return;
             }
 
@@ -236,7 +236,7 @@ public class PlayerInteractManager {
     private boolean c(BlockPosition blockposition) {
         IBlockData iblockdata = this.world.getType(blockposition);
 
-        iblockdata.getBlock().a(this.world, blockposition, iblockdata, (EntityHuman) this.player);
+        iblockdata.getBlock().a(this.world, blockposition, iblockdata, this.player);
         boolean flag = this.world.setAir(blockposition);
 
         if (flag) {
@@ -261,7 +261,7 @@ public class PlayerInteractManager {
             if (world.getTileEntity(blockposition) == null && !isSwordNoBreak) {
                 PacketPlayOutBlockChange packet = new PacketPlayOutBlockChange(this.world, blockposition);
                 packet.block = Blocks.AIR.getBlockData();
-                ((EntityPlayer) this.player).playerConnection.sendPacket(packet);
+                this.player.playerConnection.sendPacket(packet);
             }
 
             event = new BlockBreakEvent(block, this.player.getBukkitEntity());
@@ -290,7 +290,7 @@ public class PlayerInteractManager {
                     return false;
                 }
                 // Let the client know the block still exists
-                ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
+                this.player.playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition));
                 // Update any tile entity data for this block
                 TileEntity tileentity = this.world.getTileEntity(blockposition);
                 if (tileentity != null) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerInventory.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerInventory.java
index 76fa51d..36ac818 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerInventory.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerInventory.java
@@ -19,7 +19,7 @@ public class PlayerInventory implements IInventory {
     public boolean e;
 
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     private int maxStack = MAX_STACK;
 
     public ItemStack[] getContents() {
@@ -86,12 +86,12 @@ public class PlayerInventory implements IInventory {
     // CraftBukkit start - Watch method above! :D
     public int canHold(ItemStack itemstack) {
         int remains = itemstack.count;
-        for (int i = 0; i < this.items.length; ++i) {
-            if (this.items[i] == null) return itemstack.count;
+        for (ItemStack item : this.items) {
+            if (item == null) return itemstack.count;
 
             // Taken from firstPartial(ItemStack)
-            if (this.items[i] != null && this.items[i].getItem() == itemstack.getItem() && this.items[i].isStackable() && this.items[i].count < this.items[i].getMaxStackSize() && this.items[i].count < this.getMaxStackSize() && (!this.items[i].usesData() || this.items[i].getData() == itemstack.getData()) && ItemStack.equals(this.items[i], itemstack)) {
-                remains -= (this.items[i].getMaxStackSize() < this.getMaxStackSize() ? this.items[i].getMaxStackSize() : this.getMaxStackSize()) - this.items[i].count;
+            if (item != null && item.getItem() == itemstack.getItem() && item.isStackable() && item.count < item.getMaxStackSize() && item.count < this.getMaxStackSize() && (!item.usesData() || item.getData() == itemstack.getData()) && ItemStack.equals(item, itemstack)) {
+                remains -= (item.getMaxStackSize() < this.getMaxStackSize() ? item.getMaxStackSize() : this.getMaxStackSize()) - item.count;
             }
             if (remains <= 0) return itemstack.count;
         }
@@ -286,8 +286,8 @@ public class PlayerInventory implements IInventory {
                 CrashReport crashreport = CrashReport.a(throwable, "Adding item to inventory");
                 CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Item being added");
 
-                crashreportsystemdetails.a("Item ID", (Object) Integer.valueOf(Item.getId(itemstack.getItem())));
-                crashreportsystemdetails.a("Item data", (Object) Integer.valueOf(itemstack.getData()));
+                crashreportsystemdetails.a("Item ID", Item.getId(itemstack.getItem()));
+                crashreportsystemdetails.a("Item data", itemstack.getData());
                 crashreportsystemdetails.a("Item name", new Callable() {
                     public String a() throws Exception {
                         return itemstack.getName();
@@ -442,7 +442,7 @@ public class PlayerInventory implements IInventory {
     }
 
     public IChatBaseComponent getScoreboardDisplayName() {
-        return (IChatBaseComponent) (this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]));
+        return this.hasCustomName() ? new ChatComponentText(this.getName()) : new ChatMessage(this.getName(), new Object[0]);
     }
 
     public int getMaxStackSize() {
@@ -455,7 +455,7 @@ public class PlayerInventory implements IInventory {
         } else {
             ItemStack itemstack = this.getItem(this.itemInHandIndex);
 
-            return itemstack != null ? itemstack.b(block) : false;
+            return itemstack != null && itemstack.b(block);
         }
     }
 
@@ -466,9 +466,9 @@ public class PlayerInventory implements IInventory {
     public int m() {
         int i = 0;
 
-        for (int j = 0; j < this.armor.length; ++j) {
-            if (this.armor[j] != null && this.armor[j].getItem() instanceof ItemArmor) {
-                int k = ((ItemArmor) this.armor[j].getItem()).c;
+        for (ItemStack itemStack : this.armor) {
+            if (itemStack != null && itemStack.getItem() instanceof ItemArmor) {
+                int k = ((ItemArmor) itemStack.getItem()).c;
 
                 i += k;
             }
@@ -531,7 +531,7 @@ public class PlayerInventory implements IInventory {
     }
 
     public boolean a(EntityHuman entityhuman) {
-        return this.player.dead ? false : entityhuman.h(this.player) <= 64.0D;
+        return !this.player.dead && entityhuman.h(this.player) <= 64.0D;
     }
 
     public boolean c(ItemStack itemstack) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerList.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerList.java
index 4ce613b..62ebc3c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerList.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PlayerList.java
@@ -69,7 +69,7 @@ public abstract class PlayerList {
 
     // CraftBukkit start
     private CraftServer cserver;
-    private final Map playersByName = new org.spigotmc.CaseInsensitiveMap();
+    private final Map playersByName = new org.spigotmc.CaseInsensitiveMap<>();
 
     public PlayerList(MinecraftServer minecraftserver) {
         this.cserver = minecraftserver.server = new CraftServer(minecraftserver, this);
@@ -147,7 +147,7 @@ public abstract class PlayerList {
         WorldData worlddata = worldserver.getWorldData();
         BlockPosition blockposition = worldserver.getSpawn();
 
-        this.a(entityplayer, (EntityPlayer) null, worldserver);
+        this.a(entityplayer, null, worldserver);
         PlayerConnection playerconnection = new PlayerConnection(this.server, networkmanager, entityplayer);
 
         playerconnection.sendPacket(new PacketPlayOutLogin(entityplayer.getId(), entityplayer.playerInteractManager.getGameMode(), worlddata.isHardcore(), worldserver.worldProvider.getDimension(), worldserver.getDifficulty(), Math.min(this.getMaxPlayers(), 60), worlddata.getType(), worldserver.getGameRules().getBoolean("reducedDebugInfo"))); // CraftBukkit - cap player list to 60
@@ -184,17 +184,13 @@ public abstract class PlayerList {
             entityplayer.setResourcePack(this.server.getResourcePack(), this.server.getResourcePackHash());
         }
 
-        Iterator iterator = entityplayer.getEffects().iterator();
-
-        while (iterator.hasNext()) {
-            MobEffect mobeffect = (MobEffect) iterator.next();
-
+        for (MobEffect mobeffect : entityplayer.getEffects()) {
             playerconnection.sendPacket(new PacketPlayOutEntityEffect(entityplayer.getId(), mobeffect));
         }
 
         entityplayer.syncInventory();
         if (nbttagcompound != null && nbttagcompound.hasKeyOfType("Riding", 10)) {
-            Entity entity = EntityTypes.a(nbttagcompound.getCompound("Riding"), (World) worldserver);
+            Entity entity = EntityTypes.a(nbttagcompound.getCompound("Riding"), worldserver);
 
             if (entity != null) {
                 entity.attachedToPlayer = true;
@@ -210,11 +206,8 @@ public abstract class PlayerList {
 
     public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
         HashSet hashset = Sets.newHashSet();
-        Iterator iterator = scoreboardserver.getTeams().iterator();
-
-        while (iterator.hasNext()) {
-            ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next();
 
+        for (ScoreboardTeam scoreboardteam : scoreboardserver.getTeams()) {
             entityplayer.playerConnection.sendPacket(new PacketPlayOutScoreboardTeam(scoreboardteam, 0));
         }
 
@@ -223,10 +216,9 @@ public abstract class PlayerList {
 
             if (scoreboardobjective != null && !hashset.contains(scoreboardobjective)) {
                 List list = scoreboardserver.getScoreboardScorePacketsForObjective(scoreboardobjective);
-                Iterator iterator1 = list.iterator();
 
-                while (iterator1.hasNext()) {
-                    Packet packet = (Packet) iterator1.next();
+                for (Object value : list) {
+                    Packet packet = (Packet) value;
 
                     entityplayer.playerConnection.sendPacket(packet);
                 }
@@ -300,7 +292,7 @@ public abstract class PlayerList {
     protected void savePlayerFile(EntityPlayer entityplayer) {
         if (!PaperSpigotConfig.savePlayerFiles) return; // KigPaper
         this.playerFileData.save(entityplayer);
-        ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) this.o.get(entityplayer.getUniqueID());
+        ServerStatisticManager serverstatisticmanager = this.o.get(entityplayer.getUniqueID());
 
         if (serverstatisticmanager != null) {
             serverstatisticmanager.b();
@@ -333,8 +325,8 @@ public abstract class PlayerList {
         // CraftBukkit start - sendAll above replaced with this loop
         PacketPlayOutPlayerInfo packet = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, entityplayer);
 
-        for (int i = 0; i < this.players.size(); ++i) {
-            EntityPlayer entityplayer1 = (EntityPlayer) this.players.get(i);
+        for (EntityPlayer player : this.players) {
+            EntityPlayer entityplayer1 = player;
 
             if (eSpigotFeature.SHOW_HIDDEN_PLAYERS_IN_TAB.isEnabled() || entityplayer1.getBukkitEntity().canSee(entityplayer.getBukkitEntity())) {
                 entityplayer1.playerConnection.sendPacket(packet);
@@ -344,7 +336,7 @@ public abstract class PlayerList {
                 continue;
             }
 
-            entityplayer.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[] { entityplayer1}));
+            entityplayer.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{entityplayer1}));
         }
         // CraftBukkit end
 
@@ -385,7 +377,7 @@ public abstract class PlayerList {
         this.players.remove(entityplayer);
         this.playersByName.remove(entityplayer.getName()); // Spigot
         UUID uuid = entityplayer.getUniqueID();
-        EntityPlayer entityplayer1 = (EntityPlayer) this.j.get(uuid);
+        EntityPlayer entityplayer1 = this.j.get(uuid);
 
         if (entityplayer1 == entityplayer) {
             this.j.remove(uuid);
@@ -395,8 +387,8 @@ public abstract class PlayerList {
         // CraftBukkit start
         //  this.sendAll(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[] { entityplayer}));
         PacketPlayOutPlayerInfo packet = new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, entityplayer);
-        for (int i = 0; i < players.size(); i++) {
-            EntityPlayer entityplayer2 = (EntityPlayer) this.players.get(i);
+        for (EntityPlayer player : players) {
+            EntityPlayer entityplayer2 = player;
 
             if (entityplayer2.getBukkitEntity().canSee(entityplayer.getBukkitEntity())) {
                 entityplayer2.playerConnection.sendPacket(packet);
@@ -427,17 +419,15 @@ public abstract class PlayerList {
 
         EntityPlayer entityplayer;
 
-        for (int i = 0; i < this.players.size(); ++i) {
-            entityplayer = (EntityPlayer) this.players.get(i);
+        for (EntityPlayer entityPlayer : this.players) {
+            entityplayer = entityPlayer;
             if (entityplayer.getUniqueID().equals(uuid)) {
                 arraylist.add(entityplayer);
             }
         }
 
-        Iterator iterator = arraylist.iterator();
-
-        while (iterator.hasNext()) {
-            entityplayer = (EntityPlayer) iterator.next();
+        for (Object value : arraylist) {
+            entityplayer = (EntityPlayer) value;
             savePlayerFile(entityplayer); // CraftBukkit - Force the player's inventory to be saved
             entityplayer.playerConnection.disconnect("You logged in from another location");
         }
@@ -453,7 +443,7 @@ public abstract class PlayerList {
         String s;
 
         if (getProfileBans().isBanned(gameprofile) && !getProfileBans().get(gameprofile).hasExpired()) {
-            GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.k.get(gameprofile);
+            GameProfileBanEntry gameprofilebanentry = this.k.get(gameprofile);
 
             s = "You are banned from this server!\nReason: " + gameprofilebanentry.getReason();
             if (gameprofilebanentry.getExpires() != null) {
@@ -557,15 +547,14 @@ public abstract class PlayerList {
 
         EntityPlayer entityplayer1 = new EntityPlayer(this.server, this.server.getWorldServer(entityplayer.dimension), entityplayer.getProfile(), (PlayerInteractManager) object);
         // */
-        EntityPlayer entityplayer1 = entityplayer;
         org.bukkit.World fromWorld = entityplayer.getBukkitEntity().getWorld();
         entityplayer.viewingCredits = false;
         // CraftBukkit end
         
-        entityplayer1.playerConnection = entityplayer.playerConnection;
-        entityplayer1.copyTo(entityplayer, flag);
-        entityplayer1.d(entityplayer.getId());
-        entityplayer1.o(entityplayer);
+        entityplayer.playerConnection = entityplayer.playerConnection;
+        entityplayer.copyTo(entityplayer, flag);
+        entityplayer.d(entityplayer.getId());
+        entityplayer.o(entityplayer);
         // WorldServer worldserver = this.server.getWorldServer(entityplayer.dimension);  // CraftBukkit - handled later
 
         // this.a(entityplayer1, entityplayer, worldserver); // CraftBukkit - removed
@@ -581,8 +570,8 @@ public abstract class PlayerList {
                     isBedSpawn = true;
                     location = new Location(cworld, blockposition1.getX() + 0.5, blockposition1.getY(), blockposition1.getZ() + 0.5);
                 } else {
-                    entityplayer1.setRespawnPosition(null, true);
-                    entityplayer1.playerConnection.sendPacket(new PacketPlayOutGameStateChange(0, 0.0F));
+                    entityplayer.setRespawnPosition(null, true);
+                    entityplayer.playerConnection.sendPacket(new PacketPlayOutGameStateChange(0, 0.0F));
                 }
             }
 
@@ -592,7 +581,7 @@ public abstract class PlayerList {
                 location = new Location(cworld, blockposition.getX() + 0.5, blockposition.getY(), blockposition.getZ() + 0.5);
             }
 
-            Player respawnPlayer = cserver.getPlayer(entityplayer1);
+            Player respawnPlayer = cserver.getPlayer(entityplayer);
             PlayerRespawnEvent respawnEvent = new PlayerRespawnEvent(respawnPlayer, location, isBedSpawn);
             cserver.getPluginManager().callEvent(respawnEvent);
             // Spigot Start
@@ -607,38 +596,38 @@ public abstract class PlayerList {
             location.setWorld(server.getWorldServer(i).getWorld());
         }
         WorldServer worldserver = ((CraftWorld) location.getWorld()).getHandle();
-        entityplayer1.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
+        entityplayer.setLocation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
         // CraftBukkit end
 
-        worldserver.chunkProviderServer.getChunkAt(MathHelper.floor(entityplayer1.locX) >> 4, MathHelper.floor(entityplayer1.locZ) >> 4); // Migot - fix rounding error
+        worldserver.chunkProviderServer.getChunkAt(MathHelper.floor(entityplayer.locX) >> 4, MathHelper.floor(entityplayer.locZ) >> 4); // Migot - fix rounding error
 
         // eSpigot - Don't check for entities
-        while (avoidSuffocation && !worldserver.getCubesNoEntities(entityplayer1, entityplayer1.getBoundingBox()).isEmpty() && entityplayer1.locY < 256.0D) {
-            entityplayer1.setPosition(entityplayer1.locX, entityplayer1.locY + 1.0D, entityplayer1.locZ);
+        while (avoidSuffocation && !worldserver.getCubesNoEntities(entityplayer, entityplayer.getBoundingBox()).isEmpty() && entityplayer.locY < 256.0D) {
+            entityplayer.setPosition(entityplayer.locX, entityplayer.locY + 1.0D, entityplayer.locZ);
         }
         // CraftBukkit start
         byte actualDimension = (byte) (worldserver.getWorld().getEnvironment().getId());
         // Force the client to refresh their chunk cache
         if (fromWorld.getEnvironment() == worldserver.getWorld().getEnvironment()) {
-            entityplayer1.playerConnection.sendPacket(new PacketPlayOutRespawn((byte) (actualDimension >= 0 ? -1 : 0), worldserver.getDifficulty(), worldserver.getWorldData().getType(), entityplayer.playerInteractManager.getGameMode()));
+            entityplayer.playerConnection.sendPacket(new PacketPlayOutRespawn((byte) (actualDimension >= 0 ? -1 : 0), worldserver.getDifficulty(), worldserver.getWorldData().getType(), entityplayer.playerInteractManager.getGameMode()));
         }
-        entityplayer1.playerConnection.sendPacket(new PacketPlayOutRespawn(actualDimension, worldserver.getDifficulty(), worldserver.getWorldData().getType(), entityplayer1.playerInteractManager.getGameMode()));
-        entityplayer1.spawnIn(worldserver);
-        entityplayer1.dead = false;
-        entityplayer1.playerConnection.teleport(new Location(worldserver.getWorld(), entityplayer1.locX, entityplayer1.locY, entityplayer1.locZ, entityplayer1.yaw, entityplayer1.pitch));
-        entityplayer1.setSneaking(false);
+        entityplayer.playerConnection.sendPacket(new PacketPlayOutRespawn(actualDimension, worldserver.getDifficulty(), worldserver.getWorldData().getType(), entityplayer.playerInteractManager.getGameMode()));
+        entityplayer.spawnIn(worldserver);
+        entityplayer.dead = false;
+        entityplayer.playerConnection.teleport(new Location(worldserver.getWorld(), entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch));
+        entityplayer.setSneaking(false);
         blockposition1 = worldserver.getSpawn();
         // entityplayer1.playerConnection.a(entityplayer1.locX, entityplayer1.locY, entityplayer1.locZ, entityplayer1.yaw, entityplayer1.pitch);
-        entityplayer1.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition1));
-        entityplayer1.playerConnection.sendPacket(new PacketPlayOutExperience(entityplayer1.exp, entityplayer1.expTotal, entityplayer1.expLevel));
-        this.b(entityplayer1, worldserver);
+        entityplayer.playerConnection.sendPacket(new PacketPlayOutSpawnPosition(blockposition1));
+        entityplayer.playerConnection.sendPacket(new PacketPlayOutExperience(entityplayer.exp, entityplayer.expTotal, entityplayer.expLevel));
+        this.b(entityplayer, worldserver);
 
         if (!entityplayer.playerConnection.isDisconnected()) {
-            worldserver.getPlayerChunkMap().addPlayer(entityplayer1);
-            worldserver.addEntity(entityplayer1);
-            this.players.add(entityplayer1);
-            this.playersByName.put(entityplayer1.getName(), entityplayer1); // Spigot
-            this.j.put(entityplayer1.getUniqueID(), entityplayer1);
+            worldserver.getPlayerChunkMap().addPlayer(entityplayer);
+            worldserver.addEntity(entityplayer);
+            this.players.add(entityplayer);
+            this.playersByName.put(entityplayer.getName(), entityplayer); // Spigot
+            this.j.put(entityplayer.getUniqueID(), entityplayer);
         }
         // Added from changeDimension
         updateClient(entityplayer); // Update health, etc...
@@ -649,7 +638,7 @@ public abstract class PlayerList {
         }
         // entityplayer1.syncInventory();
         // CraftBukkit end
-        entityplayer1.setHealth(entityplayer1.getHealth());
+        entityplayer.setHealth(entityplayer.getHealth());
 
         // CraftBukkit start
         // Don't fire on respawn
@@ -663,7 +652,7 @@ public abstract class PlayerList {
             this.savePlayerFile(entityplayer);
         }
         // CraftBukkit end
-        return entityplayer1;
+        return entityplayer;
     }
 
     // CraftBukkit start - Replaced the standard handling of portals with a more customised method.
@@ -684,7 +673,7 @@ public abstract class PlayerList {
         if (exitWorld != null) {
             if ((cause == TeleportCause.END_PORTAL) && (i == 0)) {
                 // THE_END -> NORMAL; use bed if available, otherwise default spawn
-                exit = ((org.bukkit.craftbukkit.entity.CraftPlayer) entityplayer.getBukkitEntity()).getBedSpawnLocation();
+                exit = entityplayer.getBukkitEntity().getBedSpawnLocation();
                 if (exit == null || ((CraftWorld) exit.getWorld()).getHandle().dimension != 0) {
                     exit = exitWorld.getWorld().getSpawnLocation();
                 }
@@ -739,7 +728,7 @@ public abstract class PlayerList {
     // Copy of original changeWorld(Entity, int, WorldServer, WorldServer) method with only location calculation logic
     public Location calculateTarget(Location enter, World target) {
         WorldServer worldserver = ((CraftWorld) enter.getWorld()).getHandle();
-        WorldServer worldserver1 = ((CraftWorld) target.getWorld()).getHandle();
+        WorldServer worldserver1 = target.getWorld().getHandle();
         int i = worldserver.dimension;
 
         double y = enter.getY();
@@ -785,9 +774,9 @@ public abstract class PlayerList {
                 blockposition = worldserver1.getDimensionSpawn();
             }
 
-            d0 = (double) blockposition.getX();
-            y = (double) blockposition.getY();
-            d1 = (double) blockposition.getZ();
+            d0 = blockposition.getX();
+            y = blockposition.getY();
+            d1 = blockposition.getZ();
             /*
             entity.setPositionRotation(d0, entity.locY, d1, 90.0F, 0.0F);
             if (entity.isAlive()) {
@@ -799,8 +788,8 @@ public abstract class PlayerList {
         // worldserver.methodProfiler.b();
         if (i != 1) {
             worldserver.methodProfiler.a("placing");
-            d0 = (double) MathHelper.clamp((int) d0, -29999872, 29999872);
-            d1 = (double) MathHelper.clamp((int) d1, -29999872, 29999872);
+            d0 = MathHelper.clamp((int) d0, -29999872, 29999872);
+            d1 = MathHelper.clamp((int) d1, -29999872, 29999872);
             /*
             if (entity.isAlive()) {
                 entity.setPositionRotation(d0, entity.locY, d1, entity.yaw, entity.pitch);
@@ -910,20 +899,19 @@ public abstract class PlayerList {
     }
 
     public void sendAll(Packet packet) {
-        for (int i = 0; i < this.players.size(); ++i) {
-            ((EntityPlayer) this.players.get(i)).playerConnection.sendPacket(packet);
+        for (EntityPlayer player : this.players) {
+            player.playerConnection.sendPacket(packet);
         }
 
     }
 
     // CraftBukkit start - add a world/entity limited version
     public void sendAll(Packet packet, EntityHuman entityhuman) {
-        for (int i = 0; i < this.players.size(); ++i) {
-            EntityPlayer entityplayer =  this.players.get(i);
+        for (EntityPlayer entityplayer : this.players) {
             if (entityhuman != null && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) {
                 continue;
             }
-            ((EntityPlayer) this.players.get(i)).playerConnection.sendPacket(packet);
+            entityplayer.playerConnection.sendPacket(packet);
         }
     }
 
@@ -936,8 +924,8 @@ public abstract class PlayerList {
     // CraftBukkit end
 
     public void a(Packet packet, int i) {
-        for (int j = 0; j < this.players.size(); ++j) {
-            EntityPlayer entityplayer = (EntityPlayer) this.players.get(j);
+        for (EntityPlayer player : this.players) {
+            EntityPlayer entityplayer = player;
 
             if (entityplayer.dimension == i) {
                 entityplayer.playerConnection.sendPacket(packet);
@@ -951,10 +939,9 @@ public abstract class PlayerList {
 
         if (scoreboardteambase != null) {
             Collection collection = scoreboardteambase.getPlayerNameSet();
-            Iterator iterator = collection.iterator();
 
-            while (iterator.hasNext()) {
-                String s = (String) iterator.next();
+            for (Object value : collection) {
+                String s = (String) value;
                 EntityPlayer entityplayer = this.getPlayer(s);
 
                 if (entityplayer != null && entityplayer != entityhuman) {
@@ -971,8 +958,8 @@ public abstract class PlayerList {
         if (scoreboardteambase == null) {
             this.sendMessage(ichatbasecomponent);
         } else {
-            for (int i = 0; i < this.players.size(); ++i) {
-                EntityPlayer entityplayer = (EntityPlayer) this.players.get(i);
+            for (EntityPlayer player : this.players) {
+                EntityPlayer entityplayer = player;
 
                 if (entityplayer.getScoreboardTeam() != scoreboardteambase) {
                     entityplayer.sendMessage(ichatbasecomponent);
@@ -983,28 +970,28 @@ public abstract class PlayerList {
     }
 
     public String b(boolean flag) {
-        String s = "";
+        StringBuilder s = new StringBuilder();
         ArrayList arraylist = Lists.newArrayList(this.players);
 
         for (int i = 0; i < arraylist.size(); ++i) {
             if (i > 0) {
-                s = s + ", ";
+                s.append(", ");
             }
 
-            s = s + ((EntityPlayer) arraylist.get(i)).getName();
+            s.append(((EntityPlayer) arraylist.get(i)).getName());
             if (flag) {
-                s = s + " (" + ((EntityPlayer) arraylist.get(i)).getUniqueID().toString() + ")";
+                s.append(" (").append(((EntityPlayer) arraylist.get(i)).getUniqueID().toString()).append(")");
             }
         }
 
-        return s;
+        return s.toString();
     }
 
     public String[] f() {
         String[] astring = new String[this.players.size()];
 
         for (int i = 0; i < this.players.size(); ++i) {
-            astring[i] = ((EntityPlayer) this.players.get(i)).getName();
+            astring[i] = this.players.get(i).getName();
         }
 
         return astring;
@@ -1014,7 +1001,7 @@ public abstract class PlayerList {
         GameProfile[] agameprofile = new GameProfile[this.players.size()];
 
         for (int i = 0; i < this.players.size(); ++i) {
-            agameprofile[i] = ((EntityPlayer) this.players.get(i)).getProfile();
+            agameprofile[i] = this.players.get(i).getProfile();
         }
 
         return agameprofile;
@@ -1063,16 +1050,16 @@ public abstract class PlayerList {
     }
 
     public void sendPacketNearby(double d0, double d1, double d2, double d3, int i, Packet packet) {
-        this.sendPacketNearby((EntityHuman) null, d0, d1, d2, d3, i, packet);
+        this.sendPacketNearby(null, d0, d1, d2, d3, i, packet);
     }
 
     public void sendPacketNearby(EntityHuman entityhuman, double d0, double d1, double d2, double d3, int i, Packet packet) {
-        for (int j = 0; j < this.players.size(); ++j) {
-            EntityPlayer entityplayer = (EntityPlayer) this.players.get(j);
+        for (EntityPlayer player : this.players) {
+            EntityPlayer entityplayer = player;
 
             // CraftBukkit start - Test if player receiving packet can see the source of the packet
             if (entityhuman != null && entityplayer != entityhuman && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) {
-               continue;
+                continue;
             }
             // CraftBukkit end
 
@@ -1091,8 +1078,8 @@ public abstract class PlayerList {
 
     // KigPaper start
     public void sendPacketNearbyIncludingSelf(EntityHuman entityhuman, double d0, double d1, double d2, double d3, int i, Packet packet) {
-        for (int j = 0; j < this.players.size(); ++j) {
-            EntityPlayer entityplayer = (EntityPlayer) this.players.get(j);
+        for (EntityPlayer player : this.players) {
+            EntityPlayer entityplayer = player;
 
             // CraftBukkit start - Test if player receiving packet can see the source of the packet
             if (entityhuman != null && entityplayer != entityhuman && entityhuman instanceof EntityPlayer && !entityplayer.getBukkitEntity().canSee(((EntityPlayer) entityhuman).getBukkitEntity())) {
@@ -1115,8 +1102,8 @@ public abstract class PlayerList {
     // KigPaper end
 
     public void savePlayers() {
-        for (int i = 0; i < this.players.size(); ++i) {
-            this.savePlayerFile((EntityPlayer) this.players.get(i));
+        for (EntityPlayer player : this.players) {
+            this.savePlayerFile(player);
         }
 
     }
@@ -1193,11 +1180,8 @@ public abstract class PlayerList {
 
     public List b(String s) {
         ArrayList arraylist = Lists.newArrayList();
-        Iterator iterator = this.players.iterator();
-
-        while (iterator.hasNext()) {
-            EntityPlayer entityplayer = (EntityPlayer) iterator.next();
 
+        for (EntityPlayer entityplayer : this.players) {
             if (entityplayer.w().equals(s)) {
                 arraylist.add(entityplayer);
             }
@@ -1229,8 +1213,8 @@ public abstract class PlayerList {
     }
 
     public void u() {
-        for (int i = 0; i < this.players.size(); ++i) {
-            ((EntityPlayer) this.players.get(i)).playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
+        for (EntityPlayer player : this.players) {
+            player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
         }
 
     }
@@ -1258,7 +1242,7 @@ public abstract class PlayerList {
 
     public ServerStatisticManager a(EntityHuman entityhuman) {
         UUID uuid = entityhuman.getUniqueID();
-        ServerStatisticManager serverstatisticmanager = uuid == null ? null : (ServerStatisticManager) this.o.get(uuid);
+        ServerStatisticManager serverstatisticmanager = uuid == null ? null : this.o.get(uuid);
 
         if (serverstatisticmanager == null) {
             File file = new File(this.server.getWorldServer(0).getDataManager().getDirectory(), "stats");
@@ -1304,7 +1288,7 @@ public abstract class PlayerList {
     }
 
     public EntityPlayer a(UUID uuid) {
-        return (EntityPlayer) this.j.get(uuid);
+        return this.j.get(uuid);
     }
 
     public boolean f(GameProfile gameprofile) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PortalTravelAgent.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PortalTravelAgent.java
index 8e03192..15539ad 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -35,7 +35,7 @@ public class PortalTravelAgent {
             int k = MathHelper.floor(entity.locZ);
             // CraftBukkit start - Modularize end portal creation
             BlockPosition created = this.createEndPortal(entity.locX, entity.locY, entity.locZ);
-            entity.setPositionRotation((double) created.getX(), (double) created.getY(), (double) created.getZ(), entity.yaw, 0.0F);
+            entity.setPositionRotation(created.getX(), created.getY(), created.getZ(), entity.yaw, 0.0F);
             entity.motX = entity.motY = entity.motZ = 0.0D;
         }
     }
@@ -130,7 +130,7 @@ public class PortalTravelAgent {
         long k = ChunkCoordIntPair.a(i, j);
 
         if (this.c.contains(k)) {
-            PortalTravelAgent.ChunkCoordinatesPortal portaltravelagent_chunkcoordinatesportal = (PortalTravelAgent.ChunkCoordinatesPortal) this.c.getEntry(k);
+            PortalTravelAgent.ChunkCoordinatesPortal portaltravelagent_chunkcoordinatesportal = this.c.getEntry(k);
 
             d0 = 0.0D;
             object = portaltravelagent_chunkcoordinatesportal;
@@ -170,7 +170,7 @@ public class PortalTravelAgent {
         if (d0 >= 0.0D) {
             if (flag1) {
                 this.c.put(k, new PortalTravelAgent.ChunkCoordinatesPortal((BlockPosition) object, this.a.getTime()));
-                this.d.add(Long.valueOf(k));
+                this.d.add(k);
             }
             // CraftBukkit start - Move entity teleportation logic into exit
             return (BlockPosition) object;
@@ -196,10 +196,10 @@ public class PortalTravelAgent {
         } else {
             // CraftBukkit end
 
-            double d2 = (double) ((BlockPosition) object).getX() + 0.5D;
-            double d3 = (double) ((BlockPosition) object).getY() + 0.5D;
-            double d4 = (double) ((BlockPosition) object).getZ() + 0.5D;
-            ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection = Blocks.PORTAL.f(this.a, (BlockPosition) object);
+            double d2 = (double) object.getX() + 0.5D;
+            double d3 = (double) object.getY() + 0.5D;
+            double d4 = (double) object.getZ() + 0.5D;
+            ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection = Blocks.PORTAL.f(this.a, object);
             boolean flag2 = shapedetector_shapedetectorcollection.b().e().c() == EnumDirection.EnumAxisDirection.NEGATIVE;
             double d5 = shapedetector_shapedetectorcollection.b().k() == EnumDirection.EnumAxis.X ? (double) shapedetector_shapedetectorcollection.a().getZ() : (double) shapedetector_shapedetectorcollection.a().getX();
 
@@ -472,11 +472,11 @@ public class PortalTravelAgent {
 
             while (iterator.hasNext()) {
                 Long olong = (Long) iterator.next();
-                PortalTravelAgent.ChunkCoordinatesPortal portaltravelagent_chunkcoordinatesportal = (PortalTravelAgent.ChunkCoordinatesPortal) this.c.getEntry(olong.longValue());
+                PortalTravelAgent.ChunkCoordinatesPortal portaltravelagent_chunkcoordinatesportal = this.c.getEntry(olong);
 
                 if (portaltravelagent_chunkcoordinatesportal == null || portaltravelagent_chunkcoordinatesportal.c < j) {
                     iterator.remove();
-                    this.c.remove(olong.longValue());
+                    this.c.remove(olong);
                 }
             }
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/PropertyManager.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/PropertyManager.java
index 0ee7fe8..57b5ac6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/PropertyManager.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/PropertyManager.java
@@ -31,8 +31,7 @@ public class PropertyManager {
                 if (fileinputstream != null) {
                     try {
                         fileinputstream.close();
-                    } catch (IOException ioexception) {
-                        ;
+                    } catch (IOException ignored) {
                     }
                 }
 
@@ -86,8 +85,7 @@ public class PropertyManager {
             if (fileoutputstream != null) {
                 try {
                     fileoutputstream.close();
-                } catch (IOException ioexception) {
-                    ;
+                } catch (IOException ignored) {
                 }
             }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeArmorDye.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeArmorDye.java
index 43a1cf8..1fb6f00 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeArmorDye.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeArmorDye.java
@@ -2,12 +2,13 @@ package net.minecraft.server;
 
 import com.google.common.collect.Lists;
 import java.util.ArrayList;
+import java.util.Collections;
 
 public class RecipeArmorDye extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
 
     // CraftBukkit start - Delegate to new parent class with bogus info
     public RecipeArmorDye() {
-        super(new ItemStack(Items.LEATHER_HELMET, 0, 0), java.util.Arrays.asList(new ItemStack(Items.DYE, 0, 5)));
+        super(new ItemStack(Items.LEATHER_HELMET, 0, 0), Collections.singletonList(new ItemStack(Items.DYE, 0, 5)));
     }
     // CraftBukkit end
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeBookClone.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeBookClone.java
index 264019d..5dd69ff 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeBookClone.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeBookClone.java
@@ -1,10 +1,12 @@
 package net.minecraft.server;
 
+import java.util.Collections;
+
 public class RecipeBookClone extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
 
     // CraftBukkit start - Delegate to new parent class
     public RecipeBookClone() {
-        super(new ItemStack(Items.WRITTEN_BOOK, 0, -1), java.util.Arrays.asList(new ItemStack(Items.WRITABLE_BOOK, 0, 0)));
+        super(new ItemStack(Items.WRITTEN_BOOK, 0, -1), Collections.singletonList(new ItemStack(Items.WRITABLE_BOOK, 0, 0)));
     }
     // CraftBukkit end
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeFireworks.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeFireworks.java
index ba9ce61..fb77bd8 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeFireworks.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeFireworks.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
 
 import com.google.common.collect.Lists;
 import java.util.ArrayList;
+import java.util.Collections;
 
 public class RecipeFireworks extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
 
@@ -9,7 +10,7 @@ public class RecipeFireworks extends ShapelessRecipes implements IRecipe { // Cr
 
     // CraftBukkit start - Delegate to new parent class with bogus info
     public RecipeFireworks() {
-        super(new ItemStack(Items.FIREWORKS, 0, 0), java.util.Arrays.asList(new ItemStack(Items.GUNPOWDER, 0, 5)));
+        super(new ItemStack(Items.FIREWORKS, 0, 0), Collections.singletonList(new ItemStack(Items.GUNPOWDER, 0, 5)));
     }
     // CraftBukkit end
 
@@ -93,7 +94,7 @@ public class RecipeFireworks extends ShapelessRecipes implements IRecipe { // Cr
 
                     if (itemstack2 != null) {
                         if (itemstack2.getItem() == Items.DYE) {
-                            arraylist.add(Integer.valueOf(ItemDye.a[itemstack2.getData() & 15]));
+                            arraylist.add(ItemDye.a[itemstack2.getData() & 15]);
                         } else if (itemstack2.getItem() == Items.GLOWSTONE_DUST) {
                             nbttagcompound1.setBoolean("Flicker", true);
                         } else if (itemstack2.getItem() == Items.DIAMOND) {
@@ -113,7 +114,7 @@ public class RecipeFireworks extends ShapelessRecipes implements IRecipe { // Cr
                 int[] aint = new int[arraylist.size()];
 
                 for (int j2 = 0; j2 < aint.length; ++j2) {
-                    aint[j2] = ((Integer) arraylist.get(j2)).intValue();
+                    aint[j2] = (Integer) arraylist.get(j2);
                 }
 
                 nbttagcompound1.setIntArray("Colors", aint);
@@ -129,7 +130,7 @@ public class RecipeFireworks extends ShapelessRecipes implements IRecipe { // Cr
 
                     if (itemstack3 != null) {
                         if (itemstack3.getItem() == Items.DYE) {
-                            arraylist1.add(Integer.valueOf(ItemDye.a[itemstack3.getData() & 15]));
+                            arraylist1.add(ItemDye.a[itemstack3.getData() & 15]);
                         } else if (itemstack3.getItem() == Items.FIREWORK_CHARGE) {
                             this.a = itemstack3.cloneItemStack();
                             this.a.count = 1;
@@ -140,7 +141,7 @@ public class RecipeFireworks extends ShapelessRecipes implements IRecipe { // Cr
                 int[] aint1 = new int[arraylist1.size()];
 
                 for (int l2 = 0; l2 < aint1.length; ++l2) {
-                    aint1[l2] = ((Integer) arraylist1.get(l2)).intValue();
+                    aint1[l2] = (Integer) arraylist1.get(l2);
                 }
 
                 if (this.a != null && this.a.hasTag()) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeMapClone.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeMapClone.java
index 579f6d1..6020635 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeMapClone.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeMapClone.java
@@ -1,10 +1,12 @@
 package net.minecraft.server;
 
+import java.util.Collections;
+
 public class RecipeMapClone extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
 
     // CraftBukkit start - Delegate to new parent class
     public RecipeMapClone() {
-        super(new ItemStack(Items.MAP, 0, -1), java.util.Arrays.asList(new ItemStack(Items.MAP, 0, 0)));
+        super(new ItemStack(Items.MAP, 0, -1), Collections.singletonList(new ItemStack(Items.MAP, 0, 0)));
     }
     // CraftBukkit end
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeRepair.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeRepair.java
index 187e59a..7cb5817 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeRepair.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipeRepair.java
@@ -2,12 +2,13 @@ package net.minecraft.server;
 
 import com.google.common.collect.Lists;
 import java.util.ArrayList;
+import java.util.Collections;
 
 public class RecipeRepair extends ShapelessRecipes implements IRecipe { // CraftBukkit - added extends
 
     // CraftBukkit start - Delegate to new parent class
     public RecipeRepair() {
-        super(new ItemStack(Items.LEATHER_HELMET), java.util.Arrays.asList(new ItemStack(Items.LEATHER_HELMET)));
+        super(new ItemStack(Items.LEATHER_HELMET), Collections.singletonList(new ItemStack(Items.LEATHER_HELMET)));
     }
     // CraftBukkit end
 
@@ -68,11 +69,10 @@ public class RecipeRepair extends ShapelessRecipes implements IRecipe { // Craft
 
                 // CraftBukkit start - Construct a dummy repair recipe
                 ItemStack result = new ItemStack(itemstack.getItem(), 1, i1);
-                java.util.List ingredients = new ArrayList();
+                java.util.List ingredients = new ArrayList<>();
                 ingredients.add(itemstack2.cloneItemStack());
                 ingredients.add(itemstack.cloneItemStack());
-                ShapelessRecipes recipe = new ShapelessRecipes(result.cloneItemStack(), ingredients);
-                inventorycrafting.currentRecipe = recipe;
+                inventorycrafting.currentRecipe = new ShapelessRecipes(result.cloneItemStack(), ingredients);
                 result = org.bukkit.craftbukkit.event.CraftEventFactory.callPreCraftEvent(inventorycrafting, result, CraftingManager.getInstance().lastCraftView, true);
                 return result;
                 // return new ItemStack(itemstack2.getItem(), 1, i1);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipesBanner.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipesBanner.java
index 4a77c77..ef4812b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipesBanner.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipesBanner.java
@@ -1,5 +1,7 @@
 package net.minecraft.server;
 
+import java.util.Collections;
+
 public class RecipesBanner {
 
     public RecipesBanner() {}
@@ -8,14 +10,12 @@ public class RecipesBanner {
         EnumColor[] aenumcolor = EnumColor.values();
         int i = aenumcolor.length;
 
-        for (int j = 0; j < i; ++j) {
-            EnumColor enumcolor = aenumcolor[j];
-
-            craftingmanager.registerShapedRecipe(new ItemStack(Items.BANNER, 1, enumcolor.getInvColorIndex()), new Object[] { "###", "###", " | ", Character.valueOf('#'), new ItemStack(Blocks.WOOL, 1, enumcolor.getColorIndex()), Character.valueOf('|'), Items.STICK});
+        for (EnumColor enumcolor : aenumcolor) {
+            craftingmanager.registerShapedRecipe(new ItemStack(Items.BANNER, 1, enumcolor.getInvColorIndex()), new Object[]{"###", "###", " | ", '#', new ItemStack(Blocks.WOOL, 1, enumcolor.getColorIndex()), '|', Items.STICK});
         }
 
-        craftingmanager.a(new RecipesBanner.DuplicateRecipe((RecipesBanner.SyntheticClass_1) null));
-        craftingmanager.a(new RecipesBanner.AddRecipe((RecipesBanner.SyntheticClass_1) null));
+        craftingmanager.a(new RecipesBanner.DuplicateRecipe(null));
+        craftingmanager.a(new RecipesBanner.AddRecipe(null));
     }
 
     static class SyntheticClass_1 {    }
@@ -24,7 +24,7 @@ public class RecipesBanner {
 
         // CraftBukkit start - Delegate to new parent class with bogus info
         private AddRecipe() {
-            super(new ItemStack(Items.BANNER, 0, 0), java.util.Arrays.asList(new ItemStack(Items.BANNER)));
+            super(new ItemStack(Items.BANNER, 0, 0), Collections.singletonList(new ItemStack(Items.BANNER)));
         }
         // CraftBukkit end
 
@@ -130,9 +130,7 @@ public class RecipesBanner {
             TileEntityBanner.EnumBannerPatternType[] atileentitybanner_enumbannerpatterntype = TileEntityBanner.EnumBannerPatternType.values();
             int i = atileentitybanner_enumbannerpatterntype.length;
 
-            for (int j = 0; j < i; ++j) {
-                TileEntityBanner.EnumBannerPatternType tileentitybanner_enumbannerpatterntype = atileentitybanner_enumbannerpatterntype[j];
-
+            for (TileEntityBanner.EnumBannerPatternType tileentitybanner_enumbannerpatterntype : atileentitybanner_enumbannerpatterntype) {
                 if (tileentitybanner_enumbannerpatterntype.d()) {
                     boolean flag = true;
                     int k;
@@ -218,7 +216,7 @@ public class RecipesBanner {
 
         // CraftBukkit start - Delegate to new parent class with bogus info
         private DuplicateRecipe() {
-            super(new ItemStack(Items.BANNER, 0, 0), java.util.Arrays.asList(new ItemStack(Items.DYE, 0, 5)));
+            super(new ItemStack(Items.BANNER, 0, 0), Collections.singletonList(new ItemStack(Items.DYE, 0, 5)));
         }
         // CraftBukkit end
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipesFurnace.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipesFurnace.java
index d16fa9e..0a61bab 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipesFurnace.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/RecipesFurnace.java
@@ -40,9 +40,7 @@ public class RecipesFurnace {
         ItemFish.EnumFish[] aitemfish_enumfish = ItemFish.EnumFish.values();
         int i = aitemfish_enumfish.length;
 
-        for (int j = 0; j < i; ++j) {
-            ItemFish.EnumFish itemfish_enumfish = aitemfish_enumfish[j];
-
+        for (ItemFish.EnumFish itemfish_enumfish : aitemfish_enumfish) {
             if (itemfish_enumfish.g()) {
                 this.a(new ItemStack(Items.FISH, 1, itemfish_enumfish.a()), new ItemStack(Items.COOKED_FISH, 1, itemfish_enumfish.a()), 0.35F);
             }
@@ -70,7 +68,7 @@ public class RecipesFurnace {
 
     public void a(ItemStack itemstack, ItemStack itemstack1, float f) {
         this.recipes.put(itemstack, itemstack1);
-        this.c.put(itemstack1, Float.valueOf(f));
+        this.c.put(itemstack1, f);
     }
 
     public ItemStack getResult(ItemStack itemstack) {
@@ -120,6 +118,6 @@ public class RecipesFurnace {
             entry = (Entry) iterator.next();
         } while (!this.a(itemstack, (ItemStack) entry.getKey()));
 
-        return ((Float) entry.getValue()).floatValue();
+        return (Float) entry.getValue();
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/RegionFile.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/RegionFile.java
index f026924..781d5f5 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/RegionFile.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/RegionFile.java
@@ -73,11 +73,11 @@ public class RegionFile {
             int j;
 
             for (j = 0; j < i; ++j) {
-                this.f.add(Boolean.valueOf(true));
+                this.f.add(Boolean.TRUE);
             }
 
-            this.f.set(0, Boolean.valueOf(false));
-            this.f.set(1, Boolean.valueOf(false));
+            this.f.set(0, Boolean.FALSE);
+            this.f.set(1, Boolean.FALSE);
             this.c.seek(0L);
 
             int k;
@@ -97,7 +97,7 @@ public class RegionFile {
                 this.d[j] = k;
                 if (k != 0 && (k >> 8) + (k & 255) <= this.f.size()) {
                     for (int l = 0; l < (k & 255); ++l) {
-                        this.f.set((k >> 8) + l, Boolean.valueOf(false));
+                        this.f.set((k >> 8) + l, Boolean.FALSE);
                     }
                 }
             }
@@ -136,7 +136,7 @@ public class RegionFile {
                         return false;
                     }
 
-                    this.c.seek((long) (l * 4096));
+                    this.c.seek(l * 4096L);
                     int j1 = this.c.readInt();
 
                     if (j1 > 4096 * i1 || j1 <= 0) {
@@ -174,7 +174,7 @@ public class RegionFile {
                     if (l + i1 > this.f.size()) {
                         return null;
                     } else {
-                        this.c.seek((long) (l * 4096));
+                        this.c.seek(l * 4096L);
                         int j1 = this.c.readInt();
 
                         if (j1 > 4096 * i1) {
@@ -272,22 +272,22 @@ public class RegionFile {
                 int l1;
 
                 for (l1 = 0; l1 < j1; ++l1) {
-                    this.f.set(i1 + l1, Boolean.valueOf(true));
+                    this.f.set(i1 + l1, Boolean.TRUE);
                 }
 
-                l1 = this.f.indexOf(Boolean.valueOf(true));
+                l1 = this.f.indexOf(Boolean.TRUE);
                 int i2 = 0;
                 int j2;
 
                 if (l1 != -1) {
                     for (j2 = l1; j2 < this.f.size(); ++j2) {
                         if (i2 != 0) {
-                            if (((Boolean) this.f.get(j2)).booleanValue()) {
+                            if (this.f.get(j2)) {
                                 ++i2;
                             } else {
                                 i2 = 0;
                             }
-                        } else if (((Boolean) this.f.get(j2)).booleanValue()) {
+                        } else if (this.f.get(j2)) {
                             l1 = j2;
                             i2 = 1;
                         }
@@ -303,7 +303,7 @@ public class RegionFile {
                     this.a(i, j, l1 << 8 | k1);
 
                     for (j2 = 0; j2 < k1; ++j2) {
-                        this.f.set(i1 + j2, Boolean.valueOf(false));
+                        this.f.set(i1 + j2, Boolean.FALSE);
                     }
 
                     this.a(i1, abyte, k);
@@ -313,7 +313,7 @@ public class RegionFile {
 
                     for (j2 = 0; j2 < k1; ++j2) {
                         this.c.write(RegionFile.a);
-                        this.f.add(Boolean.valueOf(false));
+                        this.f.add(Boolean.FALSE);
                     }
 
                     this.g += 4096 * k1;
@@ -350,13 +350,13 @@ public class RegionFile {
 
     private void a(int i, int j, int k) throws IOException {
         this.d[i + j * 32] = k;
-        this.c.seek((long) ((i + j * 32) * 4));
+        this.c.seek((i + j * 32L) * 4);
         this.c.writeInt(k);
     }
 
     private void b(int i, int j, int k) throws IOException {
         this.e[i + j * 32] = k;
-        this.c.seek((long) (4096 + (i + j * 32) * 4));
+        this.c.seek(4096 + (i + j * 32L) * 4);
         this.c.writeInt(k);
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/RegionFileCache.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/RegionFileCache.java
index b025458..9065094 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -20,7 +20,7 @@ public class RegionFileCache {
         // PaperSpigot end
         File file1 = new File(file, "region");
         File file2 = new File(file1, "r." + (i >> 5) + "." + (j >> 5) + ".mca");
-        RegionFile regionfile = (RegionFile) RegionFileCache.a.get(file2);
+        RegionFile regionfile = RegionFileCache.a.get(file2);
 
         if (regionfile != null) {
             return regionfile;
@@ -42,11 +42,8 @@ public class RegionFileCache {
     }
 
     public static synchronized void a() {
-        Iterator iterator = RegionFileCache.a.values().iterator();
-
-        while (iterator.hasNext()) {
-            RegionFile regionfile = (RegionFile) iterator.next();
 
+        for (RegionFile regionfile : RegionFileCache.a.values()) {
             try {
                 if (regionfile != null) {
                     regionfile.c();
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ScoreboardServer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ScoreboardServer.java
index 1fe9d93..8ccc8aa 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ScoreboardServer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ScoreboardServer.java
@@ -143,11 +143,7 @@ public class ScoreboardServer extends Scoreboard {
             }
         }
 
-        Iterator iterator = this.getScoresForObjective(scoreboardobjective).iterator();
-
-        while (iterator.hasNext()) {
-            ScoreboardScore scoreboardscore = (ScoreboardScore) iterator.next();
-
+        for (ScoreboardScore scoreboardscore : this.getScoresForObjective(scoreboardobjective)) {
             arraylist.add(new PacketPlayOutScoreboardScore(scoreboardscore));
         }
 
@@ -156,15 +152,13 @@ public class ScoreboardServer extends Scoreboard {
 
     public void e(ScoreboardObjective scoreboardobjective) {
         List list = this.getScoreboardScorePacketsForObjective(scoreboardobjective);
-        Iterator iterator = this.a.getPlayerList().v().iterator();
 
-        while (iterator.hasNext()) {
-            EntityPlayer entityplayer = (EntityPlayer) iterator.next();
-            if (entityplayer.getBukkitEntity().getScoreboard().getHandle() != this) continue; // CraftBukkit - Only players on this board
-            Iterator iterator1 = list.iterator();
+        for (EntityPlayer entityplayer : this.a.getPlayerList().v()) {
+            if (entityplayer.getBukkitEntity().getScoreboard().getHandle() != this)
+                continue; // CraftBukkit - Only players on this board
 
-            while (iterator1.hasNext()) {
-                Packet packet = (Packet) iterator1.next();
+            for (Object o : list) {
+                Packet packet = (Packet) o;
 
                 entityplayer.playerConnection.sendPacket(packet);
             }
@@ -189,15 +183,13 @@ public class ScoreboardServer extends Scoreboard {
 
     public void g(ScoreboardObjective scoreboardobjective) {
         List list = this.f(scoreboardobjective);
-        Iterator iterator = this.a.getPlayerList().v().iterator();
 
-        while (iterator.hasNext()) {
-            EntityPlayer entityplayer = (EntityPlayer) iterator.next();
-            if (entityplayer.getBukkitEntity().getScoreboard().getHandle() != this) continue; // CraftBukkit - Only players on this board
-            Iterator iterator1 = list.iterator();
+        for (EntityPlayer entityplayer : this.a.getPlayerList().v()) {
+            if (entityplayer.getBukkitEntity().getScoreboard().getHandle() != this)
+                continue; // CraftBukkit - Only players on this board
 
-            while (iterator1.hasNext()) {
-                Packet packet = (Packet) iterator1.next();
+            for (Object o : list) {
+                Packet packet = (Packet) o;
 
                 entityplayer.playerConnection.sendPacket(packet);
             }
@@ -220,7 +212,7 @@ public class ScoreboardServer extends Scoreboard {
 
     // CraftBukkit start - Send to players
     private void sendAll(Packet packet) {
-        for (EntityPlayer entityplayer : (List) this.a.getPlayerList().players) {
+        for (EntityPlayer entityplayer : this.a.getPlayerList().players) {
             if (entityplayer.getBukkitEntity().getScoreboard().getHandle() == this) {
                 entityplayer.playerConnection.sendPacket(packet);
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/SecondaryWorldServer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/SecondaryWorldServer.java
index 209eb01..abd6fcf 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/SecondaryWorldServer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/SecondaryWorldServer.java
@@ -55,7 +55,7 @@ public class SecondaryWorldServer extends WorldServer {
             this.worldMaps.a(s, this.villages);
         } else {
             this.villages = persistentvillage;
-            this.villages.a((World) this);
+            this.villages.a(this);
         }
 
         return super.b(); // CraftBukkit
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ServerConnection.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ServerConnection.java
index 7809983..be617ce 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ServerConnection.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ServerConnection.java
@@ -101,12 +101,11 @@ public class ServerConnection {
             MinecraftServer.LOGGER.info("Using " + Natives.cipher.getLoadedVariant() + " cipher from Velocity.");
             // Paper end
 
-            this.g.add(((ServerBootstrap) ((ServerBootstrap) (new ServerBootstrap()).channel(oclass)).childHandler(new ChannelInitializer() {
+            this.g.add((new ServerBootstrap()).channel(oclass).childHandler(new ChannelInitializer() {
                 protected void initChannel(Channel channel) throws Exception {
                     try {
-                        channel.config().setOption(ChannelOption.TCP_NODELAY, Boolean.valueOf(true));
-                    } catch (ChannelException channelexception) {
-                        ;
+                        channel.config().setOption(ChannelOption.TCP_NODELAY, Boolean.TRUE);
+                    } catch (ChannelException ignored) {
                     }
 
                     // KigPaper start
@@ -118,19 +117,16 @@ public class ServerConnection {
                     //ServerConnection.this.h.add(networkmanager);
                     pending.add(networkmanager); // KigPaper
                     channel.pipeline().addLast("packet_handler", networkmanager);
-                    networkmanager.a((PacketListener) (new HandshakeListener(ServerConnection.this.f, networkmanager)));
+                    networkmanager.a(new HandshakeListener(ServerConnection.this.f, networkmanager));
                 }
-            }).group((EventLoopGroup) lazyinitvar.c()).localAddress(inetaddress, i)).bind().syncUninterruptibly());
+            }).group((EventLoopGroup) lazyinitvar.c()).localAddress(inetaddress, i).bind().syncUninterruptibly());
         }
     }
 
     public void b() {
         this.d = false;
-        Iterator iterator = this.g.iterator();
-
-        while (iterator.hasNext()) {
-            ChannelFuture channelfuture = (ChannelFuture) iterator.next();
 
+        for (ChannelFuture channelfuture : this.g) {
             try {
                 channelfuture.channel().close().sync();
             } catch (InterruptedException interruptedexception) {
@@ -196,11 +192,7 @@ public class ServerConnection {
                             ServerConnection.e.warn("Failed to handle packet for " + networkmanager.getSocketAddress(), exception);
                             final ChatComponentText chatcomponenttext = new ChatComponentText("Internal server error");
 
-                            networkmanager.a(new PacketPlayOutKickDisconnect(chatcomponenttext), new GenericFutureListener() {
-                                public void operationComplete(Future future) throws Exception {
-                                    networkmanager.close(chatcomponenttext);
-                                }
-                            }, new GenericFutureListener[0]);
+                            networkmanager.a(new PacketPlayOutKickDisconnect(chatcomponenttext), (GenericFutureListener) future -> networkmanager.close(chatcomponenttext), new GenericFutureListener[0]);
                             networkmanager.k();
                         }
                     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ServerStatisticManager.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ServerStatisticManager.java
index 22c2ffd..36c841d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ServerStatisticManager.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ServerStatisticManager.java
@@ -103,10 +103,9 @@ public class ServerStatisticManager extends StatisticManager {
         } else {
             JsonObject jsonobject = jsonelement.getAsJsonObject();
             HashMap hashmap = Maps.newHashMap();
-            Iterator iterator = jsonobject.entrySet().iterator();
 
-            while (iterator.hasNext()) {
-                Entry entry = (Entry) iterator.next();
+            for (Entry stringJsonElementEntry : jsonobject.entrySet()) {
+                Entry entry = stringJsonElementEntry;
                 Statistic statistic = StatisticList.getStatistic((String) entry.getKey());
 
                 if (statistic != null) {
@@ -136,7 +135,7 @@ public class ServerStatisticManager extends StatisticManager {
 
                     hashmap.put(statistic, statisticwrapper);
                 } else {
-                    ServerStatisticManager.b.warn("Invalid statistic in " + this.d + ": Don\'t know what " + (String) entry.getKey() + " is");
+                    ServerStatisticManager.b.warn("Invalid statistic in " + this.d + ": Don\'t know what " + entry.getKey() + " is");
                 }
             }
 
@@ -146,15 +145,14 @@ public class ServerStatisticManager extends StatisticManager {
 
     public static String a(Map map) {
         JsonObject jsonobject = new JsonObject();
-        Iterator iterator = map.entrySet().iterator();
 
-        while (iterator.hasNext()) {
-            Entry entry = (Entry) iterator.next();
+        for (Entry statisticStatisticWrapperEntry : map.entrySet()) {
+            Entry entry = statisticStatisticWrapperEntry;
 
             if (((StatisticWrapper) entry.getValue()).b() != null) {
                 JsonObject jsonobject1 = new JsonObject();
 
-                jsonobject1.addProperty("value", Integer.valueOf(((StatisticWrapper) entry.getValue()).a()));
+                jsonobject1.addProperty("value", ((StatisticWrapper) entry.getValue()).a());
 
                 try {
                     jsonobject1.add("progress", ((StatisticWrapper) entry.getValue()).b().a());
@@ -164,7 +162,7 @@ public class ServerStatisticManager extends StatisticManager {
 
                 jsonobject.add(((Statistic) entry.getKey()).name, jsonobject1);
             } else {
-                jsonobject.addProperty(((Statistic) entry.getKey()).name, Integer.valueOf(((StatisticWrapper) entry.getValue()).a()));
+                jsonobject.addProperty(((Statistic) entry.getKey()).name, ((StatisticWrapper) entry.getValue()).a());
             }
         }
 
@@ -172,11 +170,8 @@ public class ServerStatisticManager extends StatisticManager {
     }
 
     public void d() {
-        Iterator iterator = this.a.keySet().iterator();
-
-        while (iterator.hasNext()) {
-            Statistic statistic = (Statistic) iterator.next();
 
+        for (Statistic statistic : this.a.keySet()) {
             this.e.add(statistic);
         }
 
@@ -188,12 +183,9 @@ public class ServerStatisticManager extends StatisticManager {
 
         if (this.g || i - this.f > 300) {
             this.f = i;
-            Iterator iterator = this.c().iterator();
 
-            while (iterator.hasNext()) {
-                Statistic statistic = (Statistic) iterator.next();
-
-                hashmap.put(statistic, Integer.valueOf(this.getStatisticValue(statistic)));
+            for (Statistic statistic : this.c()) {
+                hashmap.put(statistic, this.getStatisticValue(statistic));
             }
         }
 
@@ -202,13 +194,10 @@ public class ServerStatisticManager extends StatisticManager {
 
     public void updateStatistics(EntityPlayer entityplayer) {
         HashMap hashmap = Maps.newHashMap();
-        Iterator iterator = AchievementList.e.iterator();
-
-        while (iterator.hasNext()) {
-            Achievement achievement = (Achievement) iterator.next();
 
+        for (Achievement achievement : AchievementList.e) {
             if (this.hasAchievement(achievement)) {
-                hashmap.put(achievement, Integer.valueOf(this.getStatisticValue(achievement)));
+                hashmap.put(achievement, this.getStatisticValue(achievement));
                 this.e.remove(achievement);
             }
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/ShapelessRecipes.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/ShapelessRecipes.java
index e9934f9..6ddbcb6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/ShapelessRecipes.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/ShapelessRecipes.java
@@ -25,7 +25,7 @@ public class ShapelessRecipes implements IRecipe {
     public org.bukkit.inventory.ShapelessRecipe toBukkitRecipe() {
         CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
         CraftShapelessRecipe recipe = new CraftShapelessRecipe(result, this);
-        for (ItemStack stack : (List) this.ingredients) {
+        for (ItemStack stack : this.ingredients) {
             if (stack != null) {
                 recipe.addIngredient(org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(stack.getItem()), stack.getData());
             }
@@ -61,10 +61,9 @@ public class ShapelessRecipes implements IRecipe {
 
                 if (itemstack != null) {
                     boolean flag = false;
-                    Iterator iterator = arraylist.iterator();
 
-                    while (iterator.hasNext()) {
-                        ItemStack itemstack1 = (ItemStack) iterator.next();
+                    for (Object o : arraylist) {
+                        ItemStack itemstack1 = (ItemStack) o;
 
                         if (itemstack.getItem() == itemstack1.getItem() && (itemstack1.getData() == 32767 || itemstack.getData() == itemstack1.getData())) {
                             flag = true;
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/SlotFurnaceResult.java
index 914be4e..20d965d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/SlotFurnaceResult.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/SlotFurnaceResult.java
@@ -76,11 +76,11 @@ public class SlotFurnaceResult extends Slot {
 
         this.b = 0;
         if (itemstack.getItem() == Items.IRON_INGOT) {
-            this.a.b((Statistic) AchievementList.k);
+            this.a.b(AchievementList.k);
         }
 
         if (itemstack.getItem() == Items.COOKED_FISH) {
-            this.a.b((Statistic) AchievementList.p);
+            this.a.b(AchievementList.p);
         }
 
     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/SpawnerCreature.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/SpawnerCreature.java
index 4009e89..a0c3f76 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -1,10 +1,8 @@
 package net.minecraft.server;
 
-import com.google.common.collect.Sets;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Random;
-import java.util.Set;
 
 // CraftBukkit start
 import org.bukkit.craftbukkit.util.LongHash;
@@ -134,7 +132,7 @@ public final class SpawnerCreature {
                         label115:
                         while (iterator1.hasNext() && (moblimit > 0)) { // Spigot - while more allowed
                             // CraftBukkit start = use LongHash and LongObjectHashMap
-                            long key = ((Long) iterator1.next()).longValue();
+                            long key = (Long) iterator1.next();
                             BlockPosition blockposition1 = getRandomPosition(worldserver, LongHash.msw(key), LongHash.lsw(key));
                             // CraftBukkit
                             int i2 = blockposition1.getX();
@@ -165,7 +163,7 @@ public final class SpawnerCreature {
                                                 float f = (float) j3 + 0.5F;
                                                 float f1 = (float) l3 + 0.5F;
 
-                                                if (!worldserver.isPlayerNearbyWhoAffectsSpawning((double) f, (double) k3, (double) f1, 24.0D) && blockposition.c((double) f, (double) k3, (double) f1) >= 576.0D) { // PaperSpigot - Affects Spawning API
+                                                if (!worldserver.isPlayerNearbyWhoAffectsSpawning(f, k3, f1, 24.0D) && blockposition.c(f, k3, f1) >= 576.0D) { // PaperSpigot - Affects Spawning API
                                                     if (biomebase_biomemeta == null) {
                                                         biomebase_biomemeta = worldserver.a(enumcreaturetype, blockposition2);
                                                         if (biomebase_biomemeta == null) {
@@ -177,13 +175,13 @@ public final class SpawnerCreature {
                                                         EntityInsentient entityinsentient;
 
                                                         try {
-                                                            entityinsentient = (EntityInsentient) biomebase_biomemeta.b.getConstructor(new Class[] { World.class}).newInstance(new Object[] { worldserver});
+                                                            entityinsentient = biomebase_biomemeta.b.getConstructor(new Class[] { World.class}).newInstance(new Object[] { worldserver});
                                                         } catch (Exception exception) {
                                                             exception.printStackTrace();
                                                             return j1;
                                                         }
 
-                                                        entityinsentient.setPositionRotation((double) f, (double) k3, (double) f1, worldserver.random.nextFloat() * 360.0F, 0.0F);
+                                                        entityinsentient.setPositionRotation(f, k3, f1, worldserver.random.nextFloat() * 360.0F, 0.0F);
                                                         if (entityinsentient.bR() && entityinsentient.canSpawn()) {
                                                             groupdataentity = entityinsentient.prepare(worldserver.E(new BlockPosition(entityinsentient)), groupdataentity);
                                                             if (entityinsentient.canSpawn()) {
@@ -247,7 +245,7 @@ public final class SpawnerCreature {
             } else {
                 BlockPosition blockposition1 = blockposition.down();
 
-                if (!World.a((IBlockAccess) world, blockposition1)) {
+                if (!World.a(world, blockposition1)) {
                     return false;
                 } else {
                     Block block1 = world.getType(blockposition1).getBlock();
@@ -282,13 +280,13 @@ public final class SpawnerCreature {
                             EntityInsentient entityinsentient;
 
                             try {
-                                entityinsentient = (EntityInsentient) biomebase_biomemeta.b.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world});
+                                entityinsentient = biomebase_biomemeta.b.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world});
                             } catch (Exception exception) {
                                 exception.printStackTrace();
                                 continue;
                             }
 
-                            entityinsentient.setPositionRotation((double) ((float) j1 + 0.5F), (double) blockposition.getY(), (double) ((float) k1 + 0.5F), random.nextFloat() * 360.0F, 0.0F);
+                            entityinsentient.setPositionRotation((float) j1 + 0.5F, blockposition.getY(), (float) k1 + 0.5F, random.nextFloat() * 360.0F, 0.0F);
                             // CraftBukkit start - Added a reason for spawning this creature, moved entityinsentient.prepare(groupdataentity) up
                             groupdataentity = entityinsentient.prepare(world.E(new BlockPosition(entityinsentient)), groupdataentity);
                             world.addEntity(entityinsentient, SpawnReason.CHUNK_GEN);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/StatisticManager.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/StatisticManager.java
index 5d6c3de..9af30b6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/StatisticManager.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/StatisticManager.java
@@ -30,7 +30,7 @@ public class StatisticManager {
     }
 
     public void setStatistic(EntityHuman entityhuman, Statistic statistic, int i) {
-        StatisticWrapper statisticwrapper = (StatisticWrapper) this.a.get(statistic);
+        StatisticWrapper statisticwrapper = this.a.get(statistic);
 
         if (statisticwrapper == null) {
             statisticwrapper = new StatisticWrapper();
@@ -41,19 +41,19 @@ public class StatisticManager {
     }
 
     public int getStatisticValue(Statistic statistic) {
-        StatisticWrapper statisticwrapper = (StatisticWrapper) this.a.get(statistic);
+        StatisticWrapper statisticwrapper = this.a.get(statistic);
 
         return statisticwrapper == null ? 0 : statisticwrapper.a();
     }
 
     public  T b(Statistic statistic) {
-        StatisticWrapper statisticwrapper = (StatisticWrapper) this.a.get(statistic);
+        StatisticWrapper statisticwrapper = this.a.get(statistic);
 
         return statisticwrapper != null ? (T) statisticwrapper.b() : null; // CraftBukkit - fix decompile error
     }
 
     public  T a(Statistic statistic, T t0) {
-        StatisticWrapper statisticwrapper = (StatisticWrapper) this.a.get(statistic);
+        StatisticWrapper statisticwrapper = this.a.get(statistic);
 
         if (statisticwrapper == null) {
             statisticwrapper = new StatisticWrapper();
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/StructureGenerator.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/StructureGenerator.java
index fdfa1fb..5160a62 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -18,14 +18,14 @@ public abstract class StructureGenerator extends WorldGenBase {
 
     protected final void a(World world, final int i, final int j, int k, int l, ChunkSnapshot chunksnapshot) {
         this.a(world);
-        if (!this.e.containsKey(Long.valueOf(ChunkCoordIntPair.a(i, j)))) {
+        if (!this.e.containsKey(ChunkCoordIntPair.a(i, j))) {
             this.b.nextInt();
 
             try {
                 if (this.a(i, j)) {
                     StructureStart structurestart = this.b(i, j);
 
-                    this.e.put(Long.valueOf(ChunkCoordIntPair.a(i, j)), structurestart);
+                    this.e.put(ChunkCoordIntPair.a(i, j), structurestart);
                     this.a(i, j, structurestart);
                 }
 
@@ -42,7 +42,7 @@ public abstract class StructureGenerator extends WorldGenBase {
                         return this.a();
                     }
                 });
-                crashreportsystemdetails.a("Chunk location", (Object) String.format("%d,%d", new Object[] { Integer.valueOf(i), Integer.valueOf(j)}));
+                crashreportsystemdetails.a("Chunk location", String.format("%d,%d", new Object[] {i, j}));
                 crashreportsystemdetails.a("Chunk pos hash", new Callable() {
                     public String a() throws Exception {
                         return String.valueOf(ChunkCoordIntPair.a(i, j));
@@ -71,11 +71,8 @@ public abstract class StructureGenerator extends WorldGenBase {
         int i = (chunkcoordintpair.x << 4) + 8;
         int j = (chunkcoordintpair.z << 4) + 8;
         boolean flag = false;
-        Iterator iterator = this.e.values().iterator();
-
-        while (iterator.hasNext()) {
-            StructureStart structurestart = (StructureStart) iterator.next();
 
+        for (StructureStart structurestart : this.e.values()) {
             if (structurestart.d() && structurestart.a(chunkcoordintpair) && structurestart.a().a(i, j, i + 15, j + 15)) {
                 structurestart.a(world, random, new StructureBoundingBox(i, j, i + 15, j + 15));
                 structurestart.b(chunkcoordintpair);
@@ -94,18 +91,12 @@ public abstract class StructureGenerator extends WorldGenBase {
     }
 
     protected StructureStart c(BlockPosition blockposition) {
-        Iterator iterator = this.e.values().iterator();
 
-        while (iterator.hasNext()) {
-            StructureStart structurestart = (StructureStart) iterator.next();
+        for (StructureStart structurestart : this.e.values()) {
+            if (structurestart.d() && structurestart.a().b(blockposition)) {
 
-            if (structurestart.d() && structurestart.a().b((BaseBlockPosition) blockposition)) {
-                Iterator iterator1 = structurestart.b().iterator();
-
-                while (iterator1.hasNext()) {
-                    StructurePiece structurepiece = (StructurePiece) iterator1.next();
-
-                    if (structurepiece.c().b((BaseBlockPosition) blockposition)) {
+                for (StructurePiece structurepiece : structurestart.b()) {
+                    if (structurepiece.c().b(blockposition)) {
                         return structurestart;
                     }
                 }
@@ -128,7 +119,7 @@ public abstract class StructureGenerator extends WorldGenBase {
             }
 
             structurestart = (StructureStart) iterator.next();
-        } while (!structurestart.d() || !structurestart.a().b((BaseBlockPosition) blockposition));
+        } while (!structurestart.d() || !structurestart.a().b(blockposition));
 
         return true;
     }
@@ -143,7 +134,7 @@ public abstract class StructureGenerator extends WorldGenBase {
         long l = (long) (blockposition.getZ() >> 4) * j;
 
         this.b.setSeed(k ^ l ^ world.getSeed());
-        this.a(world, blockposition.getX() >> 4, blockposition.getZ() >> 4, 0, 0, (ChunkSnapshot) null);
+        this.a(world, blockposition.getX() >> 4, blockposition.getZ() >> 4, 0, 0, null);
         double d0 = Double.MAX_VALUE;
         BlockPosition blockposition1 = null;
         Iterator iterator = this.e.values().iterator();
@@ -155,7 +146,7 @@ public abstract class StructureGenerator extends WorldGenBase {
             StructureStart structurestart = (StructureStart) iterator.next();
 
             if (structurestart.d()) {
-                StructurePiece structurepiece = (StructurePiece) structurestart.b().get(0);
+                StructurePiece structurepiece = structurestart.b().get(0);
 
                 blockposition2 = structurepiece.a();
                 d1 = blockposition2.i(blockposition);
@@ -173,10 +164,9 @@ public abstract class StructureGenerator extends WorldGenBase {
 
             if (list != null) {
                 BlockPosition blockposition3 = null;
-                Iterator iterator1 = list.iterator();
 
-                while (iterator1.hasNext()) {
-                    blockposition2 = (BlockPosition) iterator1.next();
+                for (Object o : list) {
+                    blockposition2 = (BlockPosition) o;
                     d1 = blockposition2.i(blockposition);
                     if (d1 < d0) {
                         d0 = d1;
@@ -208,13 +198,11 @@ public abstract class StructureGenerator extends WorldGenBase {
             // Spigot End
             if (this.d == null) {
                 this.d = new PersistentStructure(this.a());
-                world.a(this.a(), (PersistentBase) this.d);
+                world.a(this.a(), this.d);
             } else {
                 NBTTagCompound nbttagcompound = this.d.a();
-                Iterator iterator = nbttagcompound.c().iterator();
 
-                while (iterator.hasNext()) {
-                    String s = (String) iterator.next();
+                for (String s : nbttagcompound.c()) {
                     NBTBase nbtbase = nbttagcompound.get(s);
 
                     if (nbtbase.getTypeId() == 10) {
@@ -226,7 +214,7 @@ public abstract class StructureGenerator extends WorldGenBase {
                             StructureStart structurestart = WorldGenFactory.a(nbttagcompound1, world);
 
                             if (structurestart != null) {
-                                this.e.put(Long.valueOf(ChunkCoordIntPair.a(i, j)), structurestart);
+                                this.e.put(ChunkCoordIntPair.a(i, j), structurestart);
                             }
                         }
                     }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntity.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntity.java
index 0fddbde..35a0ec0 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntity.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntity.java
@@ -53,7 +53,7 @@ public abstract class TileEntity {
     }
 
     public void b(NBTTagCompound nbttagcompound) {
-        String s = (String) TileEntity.g.get(this.getClass());
+        String s = TileEntity.g.get(this.getClass());
 
         if (s == null) {
             throw new RuntimeException(this.getClass() + " is missing a mapping! This is a bug!");
@@ -69,7 +69,7 @@ public abstract class TileEntity {
         TileEntity tileentity = null;
 
         try {
-            Class oclass = (Class) TileEntity.f.get(nbttagcompound.getString("id"));
+            Class oclass = TileEntity.f.get(nbttagcompound.getString("id"));
 
             if (oclass != null) {
                 tileentity = (TileEntity) oclass.newInstance();
@@ -150,7 +150,7 @@ public abstract class TileEntity {
     public void a(CrashReportSystemDetails crashreportsystemdetails) {
         crashreportsystemdetails.a("Name", new Callable() {
             public String a() throws Exception {
-                return (String) TileEntity.g.get(TileEntity.this.getClass()) + " // " + TileEntity.this.getClass().getCanonicalName();
+                return TileEntity.g.get(TileEntity.this.getClass()) + " // " + TileEntity.this.getClass().getCanonicalName();
             }
 
             public Object call() throws Exception {
@@ -169,7 +169,7 @@ public abstract class TileEntity {
                     int i = Block.getId(TileEntity.this.world.getType(TileEntity.this.position).getBlock());
 
                     try {
-                        return String.format("ID #%d (%s // %s)", new Object[] { Integer.valueOf(i), Block.getById(i).a(), Block.getById(i).getClass().getCanonicalName()});
+                        return String.format("ID #%d (%s // %s)", new Object[] {i, Block.getById(i).a(), Block.getById(i).getClass().getCanonicalName()});
                     } catch (Throwable throwable) {
                         return "ID #" + i;
                     }
@@ -189,7 +189,7 @@ public abstract class TileEntity {
                     } else {
                         String s = String.format("%4s", new Object[] { Integer.toBinaryString(i)}).replace(" ", "0");
 
-                        return String.format("%1$d / 0x%1$X / 0b%2$s", new Object[] { Integer.valueOf(i), s});
+                        return String.format("%1$d / 0x%1$X / 0b%2$s", new Object[] {i, s});
                     }
                 }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBanner.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBanner.java
index aa5ad2e..44f3525 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBanner.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBanner.java
@@ -108,7 +108,7 @@ public class TileEntityBanner extends TileEntity {
                 if (nbttaglist.isEmpty()) {
                     itemstack.getTag().remove("BlockEntityTag");
                     if (itemstack.getTag().isEmpty()) {
-                        itemstack.setTag((NBTTagCompound) null);
+                        itemstack.setTag(null);
                     }
                 }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBeacon.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBeacon.java
index f4717af..5f6a41a 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBeacon.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBeacon.java
@@ -29,7 +29,7 @@ public class TileEntityBeacon extends TileEntityContainer implements IUpdatePlay
     private ItemStack inventorySlot;
     private String n;
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     private int maxStack = MAX_STACK;
 
     public ItemStack[] getContents() {
@@ -69,7 +69,7 @@ public class TileEntityBeacon extends TileEntityContainer implements IUpdatePlay
 
     private void A() {
         if (this.i && this.j > 0 && !this.world.isClientSide && this.k > 0) {
-            double d0 = (double) (this.j * 10 + 10);
+            double d0 = this.j * 10 + 10;
             byte b0 = 0;
 
             if (this.j >= 4 && this.k == this.l) {
@@ -79,7 +79,7 @@ public class TileEntityBeacon extends TileEntityContainer implements IUpdatePlay
             int i = this.position.getX();
             int j = this.position.getY();
             int k = this.position.getZ();
-            AxisAlignedBB axisalignedbb = (new AxisAlignedBB((double) i, (double) j, (double) k, (double) (i + 1), (double) (j + 1), (double) (k + 1))).grow(d0, d0, d0).a(0.0D, (double) this.world.getHeight(), 0.0D);
+            AxisAlignedBB axisalignedbb = (new AxisAlignedBB(i, j, k, i + 1, j + 1, k + 1)).grow(d0, d0, d0).a(0.0D, this.world.getHeight(), 0.0D);
             List list = this.world.a(EntityHuman.class, axisalignedbb);
             Iterator iterator = list.iterator();
 
@@ -141,7 +141,7 @@ public class TileEntityBeacon extends TileEntityContainer implements IUpdatePlay
             float[] afloat;
 
             if (iblockdata.getBlock() == Blocks.STAINED_GLASS) {
-                afloat = EntitySheep.a((EnumColor) iblockdata.get(BlockStainedGlass.COLOR));
+                afloat = EntitySheep.a(iblockdata.get(BlockStainedGlass.COLOR));
             } else {
                 if (iblockdata.getBlock() != Blocks.STAINED_GLASS_PANE) {
                     if (iblockdata.getBlock().p() >= 15 && iblockdata.getBlock() != Blocks.BEDROCK) {
@@ -154,7 +154,7 @@ public class TileEntityBeacon extends TileEntityContainer implements IUpdatePlay
                     continue;
                 }
 
-                afloat = EntitySheep.a((EnumColor) iblockdata.get(BlockStainedGlassPane.COLOR));
+                afloat = EntitySheep.a(iblockdata.get(BlockStainedGlassPane.COLOR));
             }
 
             if (!flag) {
@@ -203,12 +203,9 @@ public class TileEntityBeacon extends TileEntityContainer implements IUpdatePlay
         }
 
         if (!this.world.isClientSide && this.j == 4 && i < this.j) {
-            Iterator iterator = this.world.a(EntityHuman.class, (new AxisAlignedBB((double) j, (double) k, (double) l, (double) j, (double) (k - 4), (double) l)).grow(10.0D, 5.0D, 10.0D)).iterator();
 
-            while (iterator.hasNext()) {
-                EntityHuman entityhuman = (EntityHuman) iterator.next();
-
-                entityhuman.b((Statistic) AchievementList.K);
+            for (EntityHuman entityhuman : this.world.a(EntityHuman.class, (new AxisAlignedBB(j, k, l, j, k - 4, l)).grow(10.0D, 5.0D, 10.0D))) {
+                entityhuman.b(AchievementList.K);
             }
         }
 
@@ -304,7 +301,7 @@ public class TileEntityBeacon extends TileEntityContainer implements IUpdatePlay
     }
 
     public boolean a(EntityHuman entityhuman) {
-        return this.world.getTileEntity(this.position) != this ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
+        return this.world.getTileEntity(this.position) == this && entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
     }
 
     public void startOpen(EntityHuman entityhuman) {}
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBrewingStand.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBrewingStand.java
index 07d5a19..3411b47 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBrewingStand.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityBrewingStand.java
@@ -23,7 +23,7 @@ public class TileEntityBrewingStand extends TileEntityContainer implements IUpda
     public TileEntityBrewingStand() {}
 
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     private int maxStack = 64;
 
     public void onOpen(CraftHumanEntity who) {
@@ -98,7 +98,7 @@ public class TileEntityBrewingStand extends TileEntityContainer implements IUpda
                 }
 
                 for (int i = 0; i < BlockBrewingStand.HAS_BOTTLE.length; ++i) {
-                    iblockdata = iblockdata.set(BlockBrewingStand.HAS_BOTTLE[i], Boolean.valueOf(aboolean[i]));
+                    iblockdata = iblockdata.set(BlockBrewingStand.HAS_BOTTLE[i], aboolean[i]);
                 }
 
                 this.world.setTypeAndData(this.position, iblockdata, 2);
@@ -272,7 +272,7 @@ public class TileEntityBrewingStand extends TileEntityContainer implements IUpda
     }
 
     public boolean a(EntityHuman entityhuman) {
-        return this.world.getTileEntity(this.position) != this ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
+        return this.world.getTileEntity(this.position) == this && entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
     }
 
     public void startOpen(EntityHuman entityhuman) {}
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityChest.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityChest.java
index 5192d95..edf5182 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityChest.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityChest.java
@@ -1,6 +1,5 @@
 package net.minecraft.server;
 
-import java.util.Iterator;
 import java.util.List;
 
 // CraftBukkit start
@@ -26,7 +25,7 @@ public class TileEntityChest extends TileEntityContainer implements IInventory {
     public TileEntityChest() {}
 
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     private int maxStack = MAX_STACK;
 
     public ItemStack[] getContents() {
@@ -160,7 +159,7 @@ public class TileEntityChest extends TileEntityContainer implements IInventory {
 
     public boolean a(EntityHuman entityhuman) {
         if (this.world == null) return true; // CraftBukkit
-        return this.world.getTileEntity(this.position) != this ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
+        return this.world.getTileEntity(this.position) == this && entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
     }
 
     public void E() {
@@ -492,26 +491,22 @@ public class TileEntityChest extends TileEntityContainer implements IInventory {
         static {
             try {
                 TileEntityChest.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 TileEntityChest.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 TileEntityChest.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 TileEntityChest.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityDispenser.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityDispenser.java
index 9be494b..c688142 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityDispenser.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityDispenser.java
@@ -16,7 +16,7 @@ public class TileEntityDispenser extends TileEntityContainer implements IInvento
     protected String a;
 
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     private int maxStack = MAX_STACK;
 
     public ItemStack[] getContents() {
@@ -177,7 +177,7 @@ public class TileEntityDispenser extends TileEntityContainer implements IInvento
     }
 
     public boolean a(EntityHuman entityhuman) {
-        return this.world.getTileEntity(this.position) != this ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
+        return this.world.getTileEntity(this.position) == this && entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
     }
 
     public void startOpen(EntityHuman entityhuman) {}
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityEnderChest.java
index 00fceda..2ce144e 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityEnderChest.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityEnderChest.java
@@ -108,6 +108,6 @@ public class TileEntityEnderChest extends TileEntity { // PaperSpigot - remove I
     }
 
     public boolean a(EntityHuman entityhuman) {
-        return this.world.getTileEntity(this.position) != this ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
+        return this.world.getTileEntity(this.position) == this && entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityFurnace.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityFurnace.java
index ecccf1e..324981c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -26,7 +26,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IUpdatePla
     // CraftBukkit start - add fields and methods
     private int lastTick = MinecraftServer.currentTick;
     private int maxStack = MAX_STACK;
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
 
     public ItemStack[] getContents() {
         return this.items;
@@ -272,10 +272,10 @@ public class TileEntityFurnace extends TileEntityContainer implements IUpdatePla
             return false;
         } else {
             ItemStack itemstack = RecipesFurnace.getInstance().getResult(this.items[0]);
-            if(!this.world.isLoaded(this.position) || ((WorldServer) this.world).chunkProviderServer.unloadQueue.contains(LongHash.toLong(this.position.getX() >> 4, this.position.getZ() >> 4))) { return false; } // Migot
+            if(!this.world.isLoaded(this.position) || this.world.chunkProviderServer.unloadQueue.contains(LongHash.toLong(this.position.getX() >> 4, this.position.getZ() >> 4))) { return false; } // Migot
 
             // CraftBukkit - consider resultant count instead of current count
-            return itemstack == null ? false : (this.items[2] == null ? true : (!this.items[2].doMaterialsMatch(itemstack) ? false : (this.items[2].count + itemstack.count <= this.getMaxStackSize() && this.items[2].count < this.items[2].getMaxStackSize() ? true : this.items[2].count + itemstack.count <= itemstack.getMaxStackSize())));
+            return itemstack != null && (this.items[2] == null || (this.items[2].doMaterialsMatch(itemstack) && (this.items[2].count + itemstack.count <= this.getMaxStackSize() && this.items[2].count < this.items[2].getMaxStackSize() || this.items[2].count + itemstack.count <= itemstack.getMaxStackSize())));
         }
     }
 
@@ -359,7 +359,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IUpdatePla
     }
 
     public boolean a(EntityHuman entityhuman) {
-        return this.world.getTileEntity(this.position) != this ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
+        return this.world.getTileEntity(this.position) == this && entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
     }
 
     public void startOpen(EntityHuman entityhuman) {}
@@ -367,7 +367,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IUpdatePla
     public void closeContainer(EntityHuman entityhuman) {}
 
     public boolean b(int i, ItemStack itemstack) {
-        return i == 2 ? false : (i != 1 ? true : isFuel(itemstack) || SlotFurnaceFuel.c_(itemstack));
+        return i != 2 && (i != 1 || isFuel(itemstack) || SlotFurnaceFuel.c_(itemstack));
     }
 
     public int[] getSlotsForFace(EnumDirection enumdirection) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityHopper.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityHopper.java
index 4d7f160..79e9ac6 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -5,7 +5,6 @@ import java.util.List;
 
 // CraftBukkit start
 import org.bukkit.craftbukkit.entity.CraftHumanEntity;
-import org.bukkit.craftbukkit.entity.CraftItem;
 import org.bukkit.craftbukkit.inventory.CraftItemStack;
 import org.bukkit.entity.HumanEntity;
 import org.bukkit.event.inventory.InventoryMoveItemEvent;
@@ -21,7 +20,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
     private int g = -1;
 
     // CraftBukkit start - add fields and methods
-    public List transaction = new java.util.ArrayList();
+    public List transaction = new java.util.ArrayList<>();
     private int maxStack = MAX_STACK;
 
     public ItemStack[] getContents() {
@@ -160,7 +159,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
     }
 
     public boolean a(EntityHuman entityhuman) {
-        return this.world.getTileEntity(this.position) != this ? false : entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
+        return this.world.getTileEntity(this.position) == this && entityhuman.e((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D) <= 64.0D;
     }
 
     public void startOpen(EntityHuman entityhuman) {}
@@ -192,7 +191,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
                 }
 
                 if (!this.q()) {
-                    flag = a((IHopper) this) || flag;
+                    flag = a(this) || flag;
                 }
 
                 if (flag) {
@@ -216,9 +215,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
         ItemStack[] aitemstack = this.items;
         int i = aitemstack.length;
 
-        for (int j = 0; j < i; ++j) {
-            ItemStack itemstack = aitemstack[j];
-
+        for (ItemStack itemstack : aitemstack) {
             if (itemstack != null) {
                 return false;
             }
@@ -237,9 +234,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
         ItemStack[] aitemstack = this.items;
         int i = aitemstack.length;
 
-        for (int j = 0; j < i; ++j) {
-            ItemStack itemstack = aitemstack[j];
-
+        for (ItemStack itemstack : aitemstack) {
             if (itemstack == null || itemstack.count != itemstack.getMaxStackSize()) {
                 return false;
             }
@@ -322,8 +317,8 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
             IWorldInventory iworldinventory = (IWorldInventory) iinventory;
             int[] aint = iworldinventory.getSlotsForFace(enumdirection);
 
-            for (int i = 0; i < aint.length; ++i) {
-                ItemStack itemstack = iworldinventory.getItem(aint[i]);
+            for (int j : aint) {
+                ItemStack itemstack = iworldinventory.getItem(j);
 
                 if (itemstack == null || itemstack.count != itemstack.getMaxStackSize()) {
                     return false;
@@ -349,8 +344,8 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
             IWorldInventory iworldinventory = (IWorldInventory) iinventory;
             int[] aint = iworldinventory.getSlotsForFace(enumdirection);
 
-            for (int i = 0; i < aint.length; ++i) {
-                if (iworldinventory.getItem(aint[i]) != null) {
+            for (int j : aint) {
+                if (iworldinventory.getItem(j) != null) {
                     return false;
                 }
             }
@@ -393,8 +388,8 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
                 IWorldInventory iworldinventory = (IWorldInventory) iinventory;
                 int[] aint = iworldinventory.getSlotsForFace(enumdirection);
 
-                for (int i = 0; i < aint.length; ++i) {
-                    if (a(ihopper, iinventory, aint[i], enumdirection)) {
+                for (int j : aint) {
+                    if (a(ihopper, iinventory, j, enumdirection)) {
                         return true;
                     }
                 }
@@ -408,12 +403,9 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
                 }
             }
         } else if (!ihopper.getWorld().tacoSpigotConfig.isHopperPushBased || !(ihopper instanceof TileEntityHopper)) { // TacoSpigot - only search for entities in 'pull mode'
-            Iterator iterator = a(ihopper.getWorld(), ihopper.A(), ihopper.B() + 1.0D, ihopper.C()).iterator();
 
-            while (iterator.hasNext()) {
-                EntityItem entityitem = (EntityItem) iterator.next();
-
-                if (a((IInventory) ihopper, entityitem)) {
+            for (EntityItem entityitem : a(ihopper.getWorld(), ihopper.A(), ihopper.B() + 1.0D, ihopper.C())) {
+                if (a(ihopper, entityitem)) {
                     return true;
                 }
             }
@@ -497,7 +489,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
             }
             // CraftBukkit end
             ItemStack itemstack = entityitem.getItemStack().cloneItemStack();
-            ItemStack itemstack1 = addItem(iinventory, itemstack, (EnumDirection) null);
+            ItemStack itemstack1 = addItem(iinventory, itemstack, null);
 
             if (itemstack1 != null && itemstack1.count != 0) {
                 entityitem.setItemStack(itemstack1);
@@ -534,7 +526,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
     }
 
     private static boolean a(IInventory iinventory, ItemStack itemstack, int i, EnumDirection enumdirection) {
-        return !iinventory.b(i, itemstack) ? false : !(iinventory instanceof IWorldInventory) || ((IWorldInventory) iinventory).canPlaceItemThroughFace(i, itemstack, enumdirection);
+        return iinventory.b(i, itemstack) && (!(iinventory instanceof IWorldInventory) || ((IWorldInventory) iinventory).canPlaceItemThroughFace(i, itemstack, enumdirection));
     }
 
     private static boolean b(IInventory iinventory, ItemStack itemstack, int i, EnumDirection enumdirection) {
@@ -581,7 +573,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
     private IInventory H() {
         EnumDirection enumdirection = BlockHopper.b(this.u());
 
-        return b(this.getWorld(), (double) (this.position.getX() + enumdirection.getAdjacentX()), (double) (this.position.getY() + enumdirection.getAdjacentY()), (double) (this.position.getZ() + enumdirection.getAdjacentZ()));
+        return b(this.getWorld(), this.position.getX() + enumdirection.getAdjacentX(), this.position.getY() + enumdirection.getAdjacentY(), this.position.getZ() + enumdirection.getAdjacentZ());
     }
 
     public static IInventory b(IHopper ihopper) {
@@ -605,7 +597,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
             TileEntity tileentity = world.getTileEntity(blockposition);
 
             if (tileentity instanceof IInventory) {
-                object = (IInventory) tileentity;
+                object = tileentity;
                 if (object instanceof TileEntityChest && block instanceof BlockChest) {
                     object = ((BlockChest) block).f(world, blockposition);
                 }
@@ -616,7 +608,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
             List list = world.a((Entity) null, new AxisAlignedBB(d0 - 0.5D, d1 - 0.5D, d2 - 0.5D, d0 + 0.5D, d1 + 0.5D, d2 + 0.5D), IEntitySelector.c);
 
             if (list.size() > 0) {
-                object = (IInventory) list.get(world.random.nextInt(list.size()));
+                object = list.get(world.random.nextInt(list.size()));
             }
         }
 
@@ -636,7 +628,7 @@ public class TileEntityHopper extends TileEntityContainer implements IHopper, IU
     // TacoSpigot end
 
     private static boolean a(ItemStack itemstack, ItemStack itemstack1) {
-        return itemstack.getItem() != itemstack1.getItem() ? false : (itemstack.getData() != itemstack1.getData() ? false : (itemstack.count > itemstack.getMaxStackSize() ? false : ItemStack.equals(itemstack, itemstack1)));
+        return itemstack.getItem() == itemstack1.getItem() && (itemstack.getData() == itemstack1.getData() && (itemstack.count <= itemstack.getMaxStackSize() && ItemStack.equals(itemstack, itemstack1)));
     }
 
     public double A() {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityPiston.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityPiston.java
index 2e11fa1..345b688 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityPiston.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntityPiston.java
@@ -57,30 +57,27 @@ public class TileEntityPiston extends TileEntity implements IUpdatePlayerListBox
         AxisAlignedBB axisalignedbb = Blocks.PISTON_EXTENSION.a(this.world, this.position, this.a, f, this.f);
 
         if (axisalignedbb != null) {
-            List list = this.world.getEntities((Entity) null, axisalignedbb);
+            List list = this.world.getEntities(null, axisalignedbb);
 
             if (!list.isEmpty()) {
                 this.k.addAll(list);
-                Iterator iterator = this.k.iterator();
-
-                while (iterator.hasNext()) {
-                    Entity entity = (Entity) iterator.next();
 
+                for (Entity entity : this.k) {
                     if (this.a.getBlock() == Blocks.SLIME && this.g) {
-                        switch (TileEntityPiston.SyntheticClass_1.a[this.f.k().ordinal()]) {
-                        case 1:
-                            entity.motX = (double) this.f.getAdjacentX();
-                            break;
+                        switch (SyntheticClass_1.a[this.f.k().ordinal()]) {
+                            case 1:
+                                entity.motX = this.f.getAdjacentX();
+                                break;
 
-                        case 2:
-                            entity.motY = (double) this.f.getAdjacentY();
-                            break;
+                            case 2:
+                                entity.motY = this.f.getAdjacentY();
+                                break;
 
-                        case 3:
-                            entity.motZ = (double) this.f.getAdjacentZ();
+                            case 3:
+                                entity.motZ = this.f.getAdjacentZ();
                         }
                     } else {
-                        entity.move((double) (f1 * (float) this.f.getAdjacentX()), (double) (f1 * (float) this.f.getAdjacentY()), (double) (f1 * (float) this.f.getAdjacentZ()));
+                        entity.move(f1 * (float) this.f.getAdjacentX(), f1 * (float) this.f.getAdjacentY(), f1 * (float) this.f.getAdjacentZ());
                     }
                 }
 
@@ -152,20 +149,17 @@ public class TileEntityPiston extends TileEntity implements IUpdatePlayerListBox
         static {
             try {
                 TileEntityPiston.SyntheticClass_1.a[EnumDirection.EnumAxis.X.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 TileEntityPiston.SyntheticClass_1.a[EnumDirection.EnumAxis.Y.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 TileEntityPiston.SyntheticClass_1.a[EnumDirection.EnumAxis.Z.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
index e927fd2..29691ce 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -93,7 +93,7 @@ public class TileEntitySign extends TileEntity {
                 // CraftBukkit end
 
                 try {
-                    this.lines[i] = ChatComponentUtils.filterForDisplay(icommandlistener, ichatbasecomponent, (Entity) null);
+                    this.lines[i] = ChatComponentUtils.filterForDisplay(icommandlistener, ichatbasecomponent, null);
                 } catch (CommandException commandexception) {
                     this.lines[i] = ichatbasecomponent;
                 }
@@ -169,8 +169,8 @@ public class TileEntitySign extends TileEntity {
             }
         };
 
-        for (int i = 0; i < this.lines.length; ++i) {
-            ChatModifier chatmodifier = this.lines[i] == null ? null : this.lines[i].getChatModifier();
+        for (IChatBaseComponent line : this.lines) {
+            ChatModifier chatmodifier = line == null ? null : line.getChatModifier();
 
             if (chatmodifier != null && chatmodifier.h() != null) {
                 ChatClickable chatclickable = chatmodifier.h();
@@ -178,7 +178,7 @@ public class TileEntitySign extends TileEntity {
                 if (chatclickable.a() == ChatClickable.EnumClickAction.RUN_COMMAND) {
                     // CraftBukkit start
                     // MinecraftServer.getServer().getCommandHandler().a(tileentitysignplayerwrapper, chatclickable.b());
-                    CommandBlockListenerAbstract.executeCommand(entityhuman, (org.bukkit.entity.Player) entityhuman.getBukkitEntity(), chatclickable.b());
+                    CommandBlockListenerAbstract.executeCommand(entityhuman, entityhuman.getBukkitEntity(), chatclickable.b());
                     // CraftBukkit end
                 }
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySkull.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySkull.java
index 58014c5..e71a71f 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySkull.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/TileEntitySkull.java
@@ -104,7 +104,7 @@ public class TileEntitySkull extends TileEntity {
                 String s = nbttagcompound.getString("ExtraType");
 
                 if (!UtilColor.b(s)) {
-                    this.g = new GameProfile((UUID) null, s);
+                    this.g = new GameProfile(null, s);
                     this.e();
                 }
             }
@@ -138,19 +138,15 @@ public class TileEntitySkull extends TileEntity {
         // Spigot start
         GameProfile profile = this.g;
         setSkullType( 0 ); // Work around client bug
-        b(profile, new Predicate() {
-
-            @Override
-            public boolean apply(GameProfile input) {
-                setSkullType(3); // Work around client bug
-                g = input;
-                update();
-                if (world != null) {
-                    world.notify(position);
-                }
-                return false;
+        b(profile, input -> {
+            setSkullType(3); // Work around client bug
+            g = input;
+            update();
+            if (world != null) {
+                world.notify(position);
             }
-        }); 
+            return false;
+        });
         // Spigot end
     }
 
@@ -166,21 +162,15 @@ public class TileEntitySkull extends TileEntity {
                 if (profile != null && Iterables.getFirst(profile.getProperties().get("textures"), (Object) null) != null) {
                     callback.apply(profile);
                 } else {
-                    executor.execute(new Runnable() {
-                        @Override
-                        public void run() {
-                            final GameProfile profile = skinCache.getUnchecked(gameprofile.getName().toLowerCase());                            
-                            MinecraftServer.getServer().processQueue.add(new Runnable() {
-                                @Override
-                                public void run() {
-                                    if (profile == null) {
-                                        callback.apply(gameprofile);
-                                    } else {
-                                        callback.apply(profile);
-                                    }
-                                }
-                            });
-                        }
+                    executor.execute(() -> {
+                        final GameProfile profile1 = skinCache.getUnchecked(gameprofile.getName().toLowerCase());
+                        MinecraftServer.getServer().processQueue.add(() -> {
+                            if (profile1 == null) {
+                                callback.apply(gameprofile);
+                            } else {
+                                callback.apply(profile1);
+                            }
+                        });
                     });
                 }
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/UserCache.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/UserCache.java
index 0f82e06..6deb220 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/UserCache.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/UserCache.java
@@ -30,7 +30,6 @@ import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.Iterator;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -42,7 +41,7 @@ public class UserCache {
     public static final SimpleDateFormat a = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
     private final Map c = Maps.newHashMap();
     private final Map d = Maps.newHashMap();
-    private final java.util.Deque e = new java.util.concurrent.LinkedBlockingDeque(); // CraftBukkit
+    private final java.util.Deque e = new java.util.concurrent.LinkedBlockingDeque<>(); // CraftBukkit
     private final MinecraftServer f;
     protected final Gson b;
     private final File g;
@@ -84,7 +83,7 @@ public class UserCache {
 
         minecraftserver.getGameProfileRepository().findProfilesByNames(new String[] { s}, Agent.MINECRAFT, profilelookupcallback);
         if (!minecraftserver.getOnlineMode() && agameprofile[0] == null) {
-            UUID uuid = EntityHuman.a(new GameProfile((UUID) null, s));
+            UUID uuid = EntityHuman.a(new GameProfile(null, s));
             GameProfile gameprofile = new GameProfile(uuid, s);
 
             profilelookupcallback.onProfileLookupSucceeded(gameprofile);
@@ -94,7 +93,7 @@ public class UserCache {
     }
 
     public void a(GameProfile gameprofile) {
-        this.a(gameprofile, (Date) null);
+        this.a(gameprofile, null);
     }
 
     private void a(GameProfile gameprofile, Date date) {
@@ -112,7 +111,7 @@ public class UserCache {
         UserCache.UserCacheEntry usercache_usercacheentry = new UserCache.UserCacheEntry(gameprofile, date, null);
 
         if (this.d.containsKey(uuid)) {
-            UserCache.UserCacheEntry usercache_usercacheentry1 = (UserCache.UserCacheEntry) this.d.get(uuid);
+            UserCache.UserCacheEntry usercache_usercacheentry1 = this.d.get(uuid);
 
             this.c.remove(usercache_usercacheentry1.a().getName().toLowerCase(Locale.ROOT));
             this.e.remove(gameprofile);
@@ -126,7 +125,7 @@ public class UserCache {
 
     public GameProfile getProfile(String s) {
         String s1 = s.toLowerCase(Locale.ROOT);
-        UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.c.get(s1);
+        UserCache.UserCacheEntry usercache_usercacheentry = this.c.get(s1);
 
         if (usercache_usercacheentry != null && (new Date()).getTime() >= usercache_usercacheentry.c.getTime()) {
             this.d.remove(usercache_usercacheentry.a().getId());
@@ -145,7 +144,7 @@ public class UserCache {
             gameprofile = a(this.f, s); // Spigot - use correct case for offline players
             if (gameprofile != null) {
                 this.a(gameprofile);
-                usercache_usercacheentry = (UserCache.UserCacheEntry) this.c.get(s1);
+                usercache_usercacheentry = this.c.get(s1);
             }
         }
 
@@ -156,17 +155,17 @@ public class UserCache {
     public String[] a() {
         ArrayList arraylist = Lists.newArrayList(this.c.keySet());
 
-        return (String[]) arraylist.toArray(new String[arraylist.size()]);
+        return (String[]) arraylist.toArray(new String[0]);
     }
 
     public GameProfile a(UUID uuid) {
-        UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.d.get(uuid);
+        UserCache.UserCacheEntry usercache_usercacheentry = this.d.get(uuid);
 
         return usercache_usercacheentry == null ? null : usercache_usercacheentry.a();
     }
 
     private UserCache.UserCacheEntry b(UUID uuid) {
-        UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) this.d.get(uuid);
+        UserCache.UserCacheEntry usercache_usercacheentry = this.d.get(uuid);
 
         if (usercache_usercacheentry != null) {
             GameProfile gameprofile = usercache_usercacheentry.a();
@@ -183,29 +182,26 @@ public class UserCache {
 
         try {
             bufferedreader = Files.newReader(this.g, Charsets.UTF_8);
-            List list = (List) this.b.fromJson(bufferedreader, UserCache.h);
+            List list = this.b.fromJson(bufferedreader, UserCache.h);
 
             this.c.clear();
             this.d.clear();
             this.e.clear();
-            Iterator iterator = Lists.reverse(list).iterator();
 
-            while (iterator.hasNext()) {
-                UserCache.UserCacheEntry usercache_usercacheentry = (UserCache.UserCacheEntry) iterator.next();
+            for (Object o : Lists.reverse(list)) {
+                UserCacheEntry usercache_usercacheentry = (UserCacheEntry) o;
 
                 if (usercache_usercacheentry != null) {
                     this.a(usercache_usercacheentry.a(), usercache_usercacheentry.b());
                 }
             }
         } catch (FileNotFoundException filenotfoundexception) {
-            ;
-        // Spigot Start
+            // Spigot Start
         } catch (com.google.gson.JsonSyntaxException ex) {
             JsonList.a.warn( "Usercache.json is corrupted or has bad formatting. Deleting it to prevent further issues." );
             this.g.delete();
         // Spigot End
-        } catch (JsonParseException jsonparseexception) {
-            ;
+        } catch (JsonParseException ignored) {
         } finally {
             IOUtils.closeQuietly(bufferedreader);
         }
@@ -222,8 +218,7 @@ public class UserCache {
             return;
         } catch (FileNotFoundException filenotfoundexception) {
             return;
-        } catch (IOException ioexception) {
-            ;
+        } catch (IOException ignored) {
         } finally {
             IOUtils.closeQuietly(bufferedwriter);
         }
@@ -233,11 +228,10 @@ public class UserCache {
     private List a(int i) {
         ArrayList arraylist = Lists.newArrayList();
         ArrayList arraylist1 = Lists.newArrayList(Iterators.limit(this.e.iterator(), i));
-        Iterator iterator = arraylist1.iterator();
 
-        while (iterator.hasNext()) {
-            GameProfile gameprofile = (GameProfile) iterator.next();
-            UserCache.UserCacheEntry usercache_usercacheentry = this.b(gameprofile.getId());
+        for (Object o : arraylist1) {
+            GameProfile gameprofile = (GameProfile) o;
+            UserCacheEntry usercache_usercacheentry = this.b(gameprofile.getId());
 
             if (usercache_usercacheentry != null) {
                 arraylist.add(usercache_usercacheentry);
@@ -314,9 +308,7 @@ public class UserCache {
                             return null;
                         }
 
-                        UserCache.UserCacheEntry usercache_usercacheentry = UserCache.this.new UserCacheEntry(new GameProfile(uuid, s1), date, null);
-
-                        return usercache_usercacheentry;
+                        return UserCache.this.new UserCacheEntry(new GameProfile(uuid, s1), date, null);
                     } else {
                         return null;
                     }
@@ -329,7 +321,7 @@ public class UserCache {
         }
 
         public JsonElement serialize(UserCacheEntry object, Type type, JsonSerializationContext jsonserializationcontext) { // CraftBukkit - decompile error
-            return this.a((UserCache.UserCacheEntry) object, type, jsonserializationcontext);
+            return this.a(object, type, jsonserializationcontext);
         }
 
         public UserCacheEntry deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // CraftBukkit - decompile error
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/Village.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/Village.java
index 78b9402..87e7096 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/Village.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/Village.java
@@ -100,7 +100,7 @@ public class Village {
             BlockPosition blockposition1 = blockposition.a(this.a.random.nextInt(16) - 8, this.a.random.nextInt(6) - 3, this.a.random.nextInt(16) - 8);
 
             if (this.a(blockposition1) && this.a(new BlockPosition(i, j, k), blockposition1)) {
-                return new Vec3D((double) blockposition1.getX(), (double) blockposition1.getY(), (double) blockposition1.getZ());
+                return new Vec3D(blockposition1.getX(), blockposition1.getY(), blockposition1.getZ());
             }
         }
 
@@ -108,7 +108,7 @@ public class Village {
     }
 
     private boolean a(BlockPosition blockposition, BlockPosition blockposition1) {
-        if (!World.a((IBlockAccess) this.a, blockposition1.down())) {
+        if (!World.a(this.a, blockposition1.down())) {
             return false;
         } else {
             int i = blockposition1.getX() - blockposition.getX() / 2;
@@ -129,13 +129,13 @@ public class Village {
     }
 
     private void j() {
-        List list = this.a.a(EntityIronGolem.class, new AxisAlignedBB((double) (this.d.getX() - this.e), (double) (this.d.getY() - 4), (double) (this.d.getZ() - this.e), (double) (this.d.getX() + this.e), (double) (this.d.getY() + 4), (double) (this.d.getZ() + this.e)));
+        List list = this.a.a(EntityIronGolem.class, new AxisAlignedBB(this.d.getX() - this.e, this.d.getY() - 4, this.d.getZ() - this.e, this.d.getX() + this.e, this.d.getY() + 4, this.d.getZ() + this.e));
 
         this.l = list.size();
     }
 
     private void k() {
-        List list = this.a.a(EntityVillager.class, new AxisAlignedBB((double) (this.d.getX() - this.e), (double) (this.d.getY() - 4), (double) (this.d.getZ() - this.e), (double) (this.d.getX() + this.e), (double) (this.d.getY() + 4), (double) (this.d.getZ() + this.e)));
+        List list = this.a.a(EntityVillager.class, new AxisAlignedBB(this.d.getX() - this.e, this.d.getY() - 4, this.d.getZ() - this.e, this.d.getX() + this.e, this.d.getY() + 4, this.d.getZ() + this.e));
 
         this.h = list.size();
         if (this.h == 0) {
@@ -175,10 +175,8 @@ public class Village {
     public VillageDoor b(BlockPosition blockposition) {
         VillageDoor villagedoor = null;
         int i = Integer.MAX_VALUE;
-        Iterator iterator = this.b.iterator();
 
-        while (iterator.hasNext()) {
-            VillageDoor villagedoor1 = (VillageDoor) iterator.next();
+        for (VillageDoor villagedoor1 : this.b) {
             int j = villagedoor1.a(blockposition);
 
             if (j < i) {
@@ -193,10 +191,8 @@ public class Village {
     public VillageDoor c(BlockPosition blockposition) {
         VillageDoor villagedoor = null;
         int i = Integer.MAX_VALUE;
-        Iterator iterator = this.b.iterator();
 
-        while (iterator.hasNext()) {
-            VillageDoor villagedoor1 = (VillageDoor) iterator.next();
+        for (VillageDoor villagedoor1 : this.b) {
             int j = villagedoor1.a(blockposition);
 
             if (j > 256) {
@@ -266,8 +262,8 @@ public class Village {
         double d0 = Double.MAX_VALUE;
         Village.Aggressor village_aggressor = null;
 
-        for (int i = 0; i < this.k.size(); ++i) {
-            Village.Aggressor village_aggressor1 = (Village.Aggressor) this.k.get(i);
+        for (Aggressor aggressor : this.k) {
+            Aggressor village_aggressor1 = aggressor;
             double d1 = village_aggressor1.a.h(entityliving);
 
             if (d1 <= d0) {
@@ -282,11 +278,8 @@ public class Village {
     public EntityHuman c(EntityLiving entityliving) {
         double d0 = Double.MAX_VALUE;
         EntityHuman entityhuman = null;
-        Iterator iterator = this.j.keySet().iterator();
-
-        while (iterator.hasNext()) {
-            String s = (String) iterator.next();
 
+        for (String s : this.j.keySet()) {
             if (this.d(s)) {
                 EntityHuman entityhuman1 = this.a.a(s);
 
@@ -352,7 +345,7 @@ public class Village {
         Block block = iblockdata.getBlock();
         // Paper end
 
-        return block instanceof BlockDoor ? block.getMaterial() == Material.WOOD : false;
+        return block instanceof BlockDoor && block.getMaterial() == Material.WOOD;
     }
 
     private void n() {
@@ -371,21 +364,21 @@ public class Village {
                 villagedoor = (VillageDoor) iterator.next();
             }
 
-            this.e = Math.max(32, (int) Math.sqrt((double) j) + 1);
+            this.e = Math.max(32, (int) Math.sqrt(j) + 1);
         }
     }
 
     public int a(String s) {
-        Integer integer = (Integer) this.j.get(s);
+        Integer integer = this.j.get(s);
 
-        return integer != null ? integer.intValue() : 0;
+        return integer != null ? integer : 0;
     }
 
     public int a(String s, int i) {
         int j = this.a(s);
         int k = MathHelper.clamp(j + i, -30, 10);
 
-        this.j.put(s, Integer.valueOf(k));
+        this.j.put(s, k);
         return k;
     }
 
@@ -421,10 +414,10 @@ public class Village {
                 GameProfile gameprofile = usercache.a(UUID.fromString(nbttagcompound2.getString("UUID")));
 
                 if (gameprofile != null) {
-                    this.j.put(gameprofile.getName(), Integer.valueOf(nbttagcompound2.getInt("S")));
+                    this.j.put(gameprofile.getName(), nbttagcompound2.getInt("S"));
                 }
             } else {
-                this.j.put(nbttagcompound2.getString("Name"), Integer.valueOf(nbttagcompound2.getInt("S")));
+                this.j.put(nbttagcompound2.getString("Name"), nbttagcompound2.getInt("S"));
             }
         }
 
@@ -445,10 +438,8 @@ public class Village {
         nbttagcompound.setInt("ACY", this.c.getY());
         nbttagcompound.setInt("ACZ", this.c.getZ());
         NBTTagList nbttaglist = new NBTTagList();
-        Iterator iterator = this.b.iterator();
 
-        while (iterator.hasNext()) {
-            VillageDoor villagedoor = (VillageDoor) iterator.next();
+        for (VillageDoor villagedoor : this.b) {
             NBTTagCompound nbttagcompound1 = new NBTTagCompound();
 
             nbttagcompound1.setInt("X", villagedoor.d().getX());
@@ -462,17 +453,15 @@ public class Village {
 
         nbttagcompound.set("Doors", nbttaglist);
         NBTTagList nbttaglist1 = new NBTTagList();
-        Iterator iterator1 = this.j.keySet().iterator();
 
-        while (iterator1.hasNext()) {
-            String s = (String) iterator1.next();
+        for (String s : this.j.keySet()) {
             NBTTagCompound nbttagcompound2 = new NBTTagCompound();
             UserCache usercache = MinecraftServer.getServer().getUserCache();
             GameProfile gameprofile = usercache.getProfile(s);
 
             if (gameprofile != null) {
                 nbttagcompound2.setString("UUID", gameprofile.getId().toString());
-                nbttagcompound2.setInt("S", ((Integer) this.j.get(s)).intValue());
+                nbttagcompound2.setInt("S", this.j.get(s));
                 nbttaglist1.add(nbttagcompound2);
             }
         }
@@ -489,11 +478,8 @@ public class Village {
     }
 
     public void b(int i) {
-        Iterator iterator = this.j.keySet().iterator();
-
-        while (iterator.hasNext()) {
-            String s = (String) iterator.next();
 
+        for (String s : this.j.keySet()) {
             this.a(s, i);
         }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/VillageSiege.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/VillageSiege.java
index 42d6737..3f86e1c 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/VillageSiege.java
@@ -64,10 +64,9 @@ public class VillageSiege {
 
     private boolean b() {
         List list = this.a.players;
-        Iterator iterator = list.iterator();
 
-        while (iterator.hasNext()) {
-            EntityHuman entityhuman = (EntityHuman) iterator.next();
+        for (Object o : list) {
+            EntityHuman entityhuman = (EntityHuman) o;
 
             if (!entityhuman.isSpectator()) {
                 this.f = this.a.ae().getClosestVillage(new BlockPosition(entityhuman), 1);
@@ -85,11 +84,8 @@ public class VillageSiege {
                             this.h = blockposition.getY();
                             this.i = blockposition.getZ() + (int) ((double) (MathHelper.sin(f1) * f) * 0.9D);
                             flag = false;
-                            Iterator iterator1 = this.a.ae().getVillages().iterator();
-
-                            while (iterator1.hasNext()) {
-                                Village village = (Village) iterator1.next();
 
+                            for (Village village : this.a.ae().getVillages()) {
                                 if (village != this.f && village.a(new BlockPosition(this.g, this.h, this.i))) {
                                     flag = true;
                                     break;
@@ -132,7 +128,7 @@ public class VillageSiege {
 
             try {
                 entityzombie = new EntityZombie(this.a);
-                entityzombie.prepare(this.a.E(new BlockPosition(entityzombie)), (GroupDataEntity) null);
+                entityzombie.prepare(this.a.E(new BlockPosition(entityzombie)), null);
                 entityzombie.setVillager(false);
             } catch (Exception exception) {
                 exception.printStackTrace();
@@ -153,7 +149,7 @@ public class VillageSiege {
             BlockPosition blockposition1 = blockposition.a(this.a.random.nextInt(16) - 8, this.a.random.nextInt(6) - 3, this.a.random.nextInt(16) - 8);
 
             if (this.f.a(blockposition1) && SpawnerCreature.a(EntityInsentient.EnumEntityPositionType.ON_GROUND, this.a, blockposition1)) {
-                return new Vec3D((double) blockposition1.getX(), (double) blockposition1.getY(), (double) blockposition1.getZ());
+                return new Vec3D(blockposition1.getX(), blockposition1.getY(), blockposition1.getZ());
             }
         }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/World.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/World.java
index 2ef88af..afed21d 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/World.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/World.java
@@ -11,12 +11,10 @@ import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.CraftWorld;
 import org.bukkit.craftbukkit.event.CraftEventFactory;
 import org.bukkit.craftbukkit.util.CraftMagicNumbers;
-import org.bukkit.craftbukkit.util.LongHashSet;
 import org.bukkit.event.block.BlockCanBuildEvent;
 import org.bukkit.event.block.BlockPhysicsEvent;
 import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
 import org.bukkit.generator.ChunkGenerator;
-import co.aikar.timings.SpigotTimings;
 
 import java.util.*;
 import java.util.concurrent.Callable;
@@ -114,10 +112,8 @@ public abstract class World implements IBlockAccess {
     public ArrayList capturedBlockStates= new ArrayList(){
         @Override
         public boolean add( BlockState blockState ) {
-            Iterator blockStateIterator = this.iterator();
-            while( blockStateIterator.hasNext() ) {
-                BlockState blockState1 = blockStateIterator.next();
-                if ( blockState1.getLocation().equals( blockState.getLocation() ) ) {
+            for (BlockState blockState1 : this) {
+                if (blockState1.getLocation().equals(blockState.getLocation())) {
                     return false;
                 }
             }
@@ -142,12 +138,12 @@ public abstract class World implements IBlockAccess {
     private org.spigotmc.TickLimiter tileLimiter;
     private int tileTickPosition;
     public ExecutorService lightingExecutor = Executors.newSingleThreadExecutor(new ThreadFactoryBuilder().setNameFormat("PaperSpigot - Lighting Thread").build()); // PaperSpigot - Asynchronous lighting updates
-    public final Map explosionDensityCache = new HashMap(); // PaperSpigot - Optimize explosions
+    public final Map explosionDensityCache = new HashMap<>(); // PaperSpigot - Optimize explosions
     public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here
 
     public static long chunkToKey(int x, int z)
     {
-        long k = ( ( ( (long) x ) & 0xFFFF0000L ) << 16 ) | ( ( ( (long) x ) & 0x0000FFFFL ) << 0 );
+        long k = ( ( ( (long) x ) & 0xFFFF0000L ) << 16 ) | ((((long) x) & 0x0000FFFFL));
         k |= ( ( ( (long) z ) & 0xFFFF0000L ) << 32 ) | ( ( ( (long) z ) & 0x0000FFFFL ) << 16 );
         return k;
     }
@@ -176,7 +172,7 @@ public abstract class World implements IBlockAccess {
     final Object chunkLock = new Object();
     public ChunkProviderServer chunkProviderServer; // moved here from WorldServer
     protected boolean cancelHeavyCalculations = false;
-    private List dimensionChangeQueue = java.util.Collections.synchronizedList(new ArrayList());
+    private List dimensionChangeQueue = java.util.Collections.synchronizedList(new ArrayList<>());
 
     public void queueEntityForDimensionChange(Entity entity) {
         this.dimensionChangeQueue.add(entity);
@@ -308,7 +304,6 @@ public abstract class World implements IBlockAccess {
         BlockPosition blockposition1;
 
         for (blockposition1 = new BlockPosition(blockposition.getX(), this.F(), blockposition.getZ()); !this.isEmpty(blockposition1.up()); blockposition1 = blockposition1.up()) {
-            ;
         }
 
         return this.getType(blockposition1).getBlock();
@@ -328,7 +323,7 @@ public abstract class World implements IBlockAccess {
     }
 
     public boolean a(BlockPosition blockposition, boolean flag) {
-        return !this.isValidLocation(blockposition) ? false : this.isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4, flag);
+        return this.isValidLocation(blockposition) && this.isChunkLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4, flag);
     }
 
     public boolean areChunksLoaded(BlockPosition blockposition, int i) {
@@ -531,8 +526,8 @@ public abstract class World implements IBlockAccess {
     }
 
     public void notify(BlockPosition blockposition) {
-        for (int i = 0; i < this.u.size(); ++i) {
-            ((IWorldAccess) this.u.get(i)).a(blockposition);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.a(blockposition);
         }
 
     }
@@ -572,8 +567,8 @@ public abstract class World implements IBlockAccess {
     }
 
     public void b(int i, int j, int k, int l, int i1, int j1) {
-        for (int k1 = 0; k1 < this.u.size(); ++k1) {
-            ((IWorldAccess) this.u.get(k1)).a(i, j, k, l, i1, j1);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.a(i, j, k, l, i1, j1);
         }
 
     }
@@ -621,7 +616,7 @@ public abstract class World implements IBlockAccess {
 
             try {
                 // CraftBukkit start
-                CraftWorld world = ((WorldServer) this).getWorld();
+                CraftWorld world = this.getWorld();
 				// TacoSpigot start - Add config to disable redstone firing BlockPhysicsEvent 
 				if (world != null && (this.tacoSpigotConfig.isRedstoneFireBPE || !(block instanceof BlockRedstoneWire || block instanceof BlockRedstoneTorch || block instanceof BlockRepeater))) {
 				// TacoSpigot end
@@ -644,7 +639,7 @@ public abstract class World implements IBlockAccess {
                 crashreportsystemdetails.a("Source block type", new Callable() {
                     public String a() throws Exception {
                         try {
-                            return String.format("ID #%d (%s // %s)", new Object[] { Integer.valueOf(Block.getId(block)), block.a(), block.getClass().getCanonicalName()});
+                            return String.format("ID #%d (%s // %s)", new Object[] {Block.getId(block), block.a(), block.getClass().getCanonicalName()});
                         } catch (Throwable throwable) {
                             return "ID #" + Block.getId(block);
                         }
@@ -842,8 +837,8 @@ public abstract class World implements IBlockAccess {
     }
 
     public void n(BlockPosition blockposition) {
-        for (int i = 0; i < this.u.size(); ++i) {
-            ((IWorldAccess) this.u.get(i)).b(blockposition);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.b(blockposition);
         }
 
     }
@@ -853,9 +848,7 @@ public abstract class World implements IBlockAccess {
     }
 
     private IBlockData getCapturedBlockType(int x, int y, int z) {
-        Iterator it = this.capturedBlockStates.iterator();
-        while (it.hasNext()) {
-            BlockState previous = it.next();
+        for (BlockState previous : this.capturedBlockStates) {
             if (previous.getX() == x && previous.getY() == y && previous.getZ() == z) {
                 return CraftMagicNumbers.getBlock(previous.getTypeId()).fromLegacyData(previous.getRawData());
             }
@@ -890,9 +883,7 @@ public abstract class World implements IBlockAccess {
         // CraftBukkit start - tree generation
         if (captureTreeGeneration && useCaptured) {
     // Spigot end
-            Iterator it = capturedBlockStates.iterator();
-            while (it.hasNext()) {
-                BlockState previous = it.next();
+            for (BlockState previous : capturedBlockStates) {
                 if (previous.getX() == blockposition.getX() && previous.getY() == blockposition.getY() && previous.getZ() == blockposition.getZ()) {
                     return CraftMagicNumbers.getBlock(previous.getTypeId()).fromLegacyData(previous.getRawData());
                 }
@@ -1074,22 +1065,22 @@ public abstract class World implements IBlockAccess {
             return;
         }
         // KigPaper end
-        for (int i = 0; i < this.u.size(); ++i) {
-            ((IWorldAccess) this.u.get(i)).a(s, entity.locX, entity.locY, entity.locZ, f, f1);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.a(s, entity.locX, entity.locY, entity.locZ, f, f1);
         }
 
     }
 
     public void a(EntityHuman entityhuman, String s, float f, float f1) {
-        for (int i = 0; i < this.u.size(); ++i) {
-            ((IWorldAccess) this.u.get(i)).a(entityhuman, s, entityhuman.locX, entityhuman.locY, entityhuman.locZ, f, f1);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.a(entityhuman, s, entityhuman.locX, entityhuman.locY, entityhuman.locZ, f, f1);
         }
 
     }
 
     public void makeSound(double d0, double d1, double d2, String s, float f, float f1) {
-        for (int i = 0; i < this.u.size(); ++i) {
-            ((IWorldAccess) this.u.get(i)).a(s, d0, d1, d2, f, f1);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.a(s, d0, d1, d2, f, f1);
         }
 
     }
@@ -1097,8 +1088,8 @@ public abstract class World implements IBlockAccess {
     public void a(double d0, double d1, double d2, String s, float f, float f1, boolean flag) {}
 
     public void a(BlockPosition blockposition, String s) {
-        for (int i = 0; i < this.u.size(); ++i) {
-            ((IWorldAccess) this.u.get(i)).a(s, blockposition);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.a(s, blockposition);
         }
 
     }
@@ -1108,8 +1099,8 @@ public abstract class World implements IBlockAccess {
     }
 
     private void a(int i, boolean flag, double d0, double d1, double d2, double d3, double d4, double d5, int... aint) {
-        for (int j = 0; j < this.u.size(); ++j) {
-            ((IWorldAccess) this.u.get(j)).a(i, flag, d0, d1, d2, d3, d4, d5, aint);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.a(i, flag, d0, d1, d2, d3, d4, d5, aint);
         }
 
     }
@@ -1211,16 +1202,16 @@ public abstract class World implements IBlockAccess {
     }
 
     protected void a(Entity entity) {
-        for (int i = 0; i < this.u.size(); ++i) {
-            ((IWorldAccess) this.u.get(i)).a(entity);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.a(entity);
         }
 
         entity.valid = true; // CraftBukkit
     }
 
     protected void b(Entity entity) {
-        for (int i = 0; i < this.u.size(); ++i) {
-            ((IWorldAccess) this.u.get(i)).b(entity);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.b(entity);
         }
 
         entity.valid = false; // CraftBukkit
@@ -1228,11 +1219,11 @@ public abstract class World implements IBlockAccess {
 
     public void kill(Entity entity) {
         if (entity.passenger != null) {
-            entity.passenger.mount((Entity) null);
+            entity.passenger.mount(null);
         }
 
         if (entity.vehicle != null) {
-            entity.mount((Entity) null);
+            entity.mount(null);
         }
 
         entity.die();
@@ -1245,7 +1236,7 @@ public abstract class World implements IBlockAccess {
                 {
                     WorldMap map = (WorldMap) o;
                     map.i.remove( entity );
-                    for ( Iterator iter = (Iterator) map.g.iterator(); iter.hasNext(); )
+                    for (Iterator iter = map.g.iterator(); iter.hasNext(); )
                     {
                         if ( iter.next().trackee == entity )
                         {
@@ -1526,7 +1517,7 @@ public abstract class World implements IBlockAccess {
                             iblockdata = Blocks.BEDROCK.getBlockData();
                         }
 
-                        iblockdata.getBlock().a(this, blockposition_mutableblockposition, iblockdata, axisalignedbb, arraylist, (Entity) null);
+                        iblockdata.getBlock().a(this, blockposition_mutableblockposition, iblockdata, axisalignedbb, arraylist, null);
                     }
                 }
             }
@@ -1599,7 +1590,7 @@ public abstract class World implements IBlockAccess {
         CrashReportSystemDetails crashreportsystemdetails;
 
         for (i = 0; i < this.k.size(); ++i) {
-            entity = (Entity) this.k.get(i);
+            entity = this.k.get(i);
             // CraftBukkit start - Fixed an NPE
             if (entity == null) {
                 continue;
@@ -1613,7 +1604,7 @@ public abstract class World implements IBlockAccess {
                 crashreport = CrashReport.a(throwable, "Ticking entity");
                 crashreportsystemdetails = crashreport.a("Entity being ticked");
                 if (entity == null) {
-                    crashreportsystemdetails.a("Entity", (Object) "~~NULL~~");
+                    crashreportsystemdetails.a("Entity", "~~NULL~~");
                 } else {
                     entity.appendEntityCrashDetails(crashreportsystemdetails);
                 }
@@ -1662,7 +1653,7 @@ public abstract class World implements IBlockAccess {
         for (tickPosition = 0; tickPosition < entityList.size(); tickPosition++) {
             // PaperSpigot end
             tickPosition = (tickPosition < entityList.size()) ? tickPosition : 0;
-            entity = (Entity) this.entityList.get(this.tickPosition);
+            entity = this.entityList.get(this.tickPosition);
             // CraftBukkit end
             if (entity.vehicle != null) {
                 if (!entity.vehicle.dead && entity.vehicle.passenger == entity) {
@@ -1730,7 +1721,7 @@ public abstract class World implements IBlockAccess {
         int tilesThisCycle = 0;
         for (tileTickPosition = 0; tileTickPosition < tileEntityList.size(); tileTickPosition++) { // PaperSpigot - Disable tick limiters
             tileTickPosition = (tileTickPosition < tileEntityList.size()) ? tileTickPosition : 0;
-            TileEntity tileentity = (TileEntity) this.tileEntityList.get(tileTickPosition);
+            TileEntity tileentity = this.tileEntityList.get(tileTickPosition);
             // Spigot start
             if (tileentity == null) {
                 getServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
@@ -1788,8 +1779,8 @@ public abstract class World implements IBlockAccess {
 
         this.methodProfiler.c("pendingBlockEntities");
         if (!this.b.isEmpty()) {
-            for (int l = 0; l < this.b.size(); ++l) {
-                TileEntity tileentity1 = (TileEntity) this.b.get(l);
+            for (TileEntity tileEntity : this.b) {
+                TileEntity tileentity1 = tileEntity;
 
                 if (!tileentity1.x()) {
                     /* CraftBukkit start - Order matters, moved down
@@ -1830,11 +1821,8 @@ public abstract class World implements IBlockAccess {
         if (this.M) {
             this.b.addAll(collection);
         } else {
-            Iterator iterator = collection.iterator();
-
-            while (iterator.hasNext()) {
-                TileEntity tileentity = (TileEntity) iterator.next();
 
+            for (TileEntity tileentity : collection) {
                 //this.h.add(tileentity); // PaperSpigot - Remove unused list
                 if (tileentity instanceof IUpdatePlayerListBox) {
                     this.tileEntityList.add(tileentity);
@@ -1895,11 +1883,11 @@ public abstract class World implements IBlockAccess {
                 entity.locZ = entity.R;
             }
 
-            if (Double.isNaN((double) entity.pitch) || Double.isInfinite((double) entity.pitch)) {
+            if (Double.isNaN(entity.pitch) || Double.isInfinite(entity.pitch)) {
                 entity.pitch = entity.lastPitch;
             }
 
-            if (Double.isNaN((double) entity.yaw) || Double.isInfinite((double) entity.yaw)) {
+            if (Double.isNaN(entity.yaw) || Double.isInfinite(entity.yaw)) {
                 entity.yaw = entity.lastYaw;
             }
 
@@ -1939,10 +1927,10 @@ public abstract class World implements IBlockAccess {
     }
 
     public boolean a(AxisAlignedBB axisalignedbb, Entity entity) {
-        List list = this.getEntities((Entity) null, axisalignedbb);
+        List list = this.getEntities(null, axisalignedbb);
 
-        for (int i = 0; i < list.size(); ++i) {
-            Entity entity1 = (Entity) list.get(i);
+        for (Object value : list) {
+            Entity entity1 = (Entity) value;
 
             // PaperSpigot start - Allow block placement if the placer cannot see the vanished blocker
             if (entity instanceof EntityPlayer && entity1 instanceof EntityPlayer) {
@@ -2057,7 +2045,7 @@ public abstract class World implements IBlockAccess {
                         Block block = iblockdata.getBlock();
 
                         if (block.getMaterial() == material) {
-                            double d0 = (double) ((float) (l1 + 1) - BlockFluids.b(((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue()));
+                            double d0 = (float) (l1 + 1) - BlockFluids.b(iblockdata.get(BlockFluids.LEVEL));
 
                             if ((double) l >= d0) {
                                 flag = true;
@@ -2143,8 +2131,8 @@ public abstract class World implements IBlockAccess {
                     Block block = iblockdata.getBlock();
 
                     if (block.getMaterial() == material) {
-                        int j2 = ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue();
-                        double d0 = (double) (l1 + 1);
+                        int j2 = iblockdata.get(BlockFluids.LEVEL);
+                        double d0 = l1 + 1;
 
                         if (j2 < 8) {
                             d0 = (double) (l1 + 1) - (double) j2 / 8.0D;
@@ -2235,7 +2223,7 @@ public abstract class World implements IBlockAccess {
 
             if (this.M) {
                 for (i = 0; i < this.b.size(); ++i) {
-                    tileentity1 = (TileEntity) this.b.get(i);
+                    tileentity1 = this.b.get(i);
                     if (!tileentity1.x() && tileentity1.getPosition().equals(blockposition)) {
                         tileentity = tileentity1;
                         break;
@@ -2249,7 +2237,7 @@ public abstract class World implements IBlockAccess {
 
             if (tileentity == null) {
                 for (i = 0; i < this.b.size(); ++i) {
-                    tileentity1 = (TileEntity) this.b.get(i);
+                    tileentity1 = this.b.get(i);
                     if (!tileentity1.x() && tileentity1.getPosition().equals(blockposition)) {
                         tileentity = tileentity1;
                         break;
@@ -2327,7 +2315,7 @@ public abstract class World implements IBlockAccess {
         IBlockData iblockdata = iblockaccess.getType(blockposition);
         Block block = iblockdata.getBlock();
 
-        return block.getMaterial().k() && block.d() ? true : (block instanceof BlockStairs ? iblockdata.get(BlockStairs.HALF) == BlockStairs.EnumHalf.TOP : (block instanceof BlockStepAbstract ? iblockdata.get(BlockStepAbstract.HALF) == BlockStepAbstract.EnumSlabHalf.TOP : (block instanceof BlockHopper ? true : (block instanceof BlockSnow ? ((Integer) iblockdata.get(BlockSnow.LAYERS)).intValue() == 7 : false))));
+        return block.getMaterial().k() && block.d() || (block instanceof BlockStairs ? iblockdata.get(BlockStairs.HALF) == BlockStairs.EnumHalf.TOP : (block instanceof BlockStepAbstract ? iblockdata.get(BlockStepAbstract.HALF) == BlockStepAbstract.EnumSlabHalf.TOP : (block instanceof BlockHopper || (block instanceof BlockSnow && iblockdata.get(BlockSnow.LAYERS).intValue() == 7))));
     }
 
     public boolean d(BlockPosition blockposition, boolean flag) {
@@ -2436,9 +2424,9 @@ public abstract class World implements IBlockAccess {
                 this.p = MathHelper.a(this.p, 0.0F, 1.0F);
 
                 // CraftBukkit start
-                for (int idx = 0; idx < this.players.size(); ++idx) {
-                    if (((EntityPlayer) this.players.get(idx)).world == this) {
-                        ((EntityPlayer) this.players.get(idx)).tickWeather();
+                for (EntityHuman player : this.players) {
+                    if (player.world == this) {
+                        ((EntityPlayer) player).tickWeather();
                     }
                 }
                 // CraftBukkit end
@@ -2469,7 +2457,7 @@ public abstract class World implements IBlockAccess {
         this.growthOdds = this.modifiedOdds = Math.max( 35, Math.min( 100, ( ( chunksPerPlayer + 1 ) * 100F ) / 15F ) );
         // Spigot end
         for (i = 0; i < this.players.size(); ++i) {
-            entityhuman = (EntityHuman) this.players.get(i);
+            entityhuman = this.players.get(i);
             j = MathHelper.floor(entityhuman.locX / 16.0D);
             k = MathHelper.floor(entityhuman.locZ / 16.0D);
             l = this.q();
@@ -2502,7 +2490,7 @@ public abstract class World implements IBlockAccess {
         this.methodProfiler.a("playerCheckLight");
         if (spigotConfig.randomLightUpdates && !this.players.isEmpty()) { // Spigot
             i = this.random.nextInt(this.players.size());
-            entityhuman = (EntityHuman) this.players.get(i);
+            entityhuman = this.players.get(i);
             j = MathHelper.floor(entityhuman.locX) + this.random.nextInt(11) - 5;
             k = MathHelper.floor(entityhuman.locY) + this.random.nextInt(11) - 5;
             l = MathHelper.floor(entityhuman.locZ) + this.random.nextInt(11) - 5;
@@ -2570,7 +2558,7 @@ public abstract class World implements IBlockAccess {
                 IBlockData iblockdata = this.getType(blockposition);
                 Block block = iblockdata.getBlock();
 
-                if ((block == Blocks.WATER || block == Blocks.FLOWING_WATER) && ((Integer) iblockdata.get(BlockFluids.LEVEL)).intValue() == 0) {
+                if ((block == Blocks.WATER || block == Blocks.FLOWING_WATER) && iblockdata.get(BlockFluids.LEVEL) == 0) {
                     if (!flag) {
                         return true;
                     }
@@ -2647,8 +2635,7 @@ public abstract class World implements IBlockAccess {
                 EnumDirection[] aenumdirection = EnumDirection.values();
                 int k = aenumdirection.length;
 
-                for (int l = 0; l < k; ++l) {
-                    EnumDirection enumdirection = aenumdirection[l];
+                for (EnumDirection enumdirection : aenumdirection) {
                     BlockPosition blockposition1 = blockposition.shift(enumdirection);
                     int i1 = this.b(enumskyblock, blockposition1) - j;
 
@@ -2716,8 +2703,7 @@ public abstract class World implements IBlockAccess {
                                 EnumDirection[] aenumdirection = EnumDirection.values();
                                 int i4 = aenumdirection.length;
 
-                                for (int j4 = 0; j4 < i4; ++j4) {
-                                    EnumDirection enumdirection = aenumdirection[j4];
+                                for (EnumDirection enumdirection : aenumdirection) {
                                     int k4 = i2 + enumdirection.getAdjacentX();
                                     int l4 = j2 + enumdirection.getAdjacentY();
                                     int i5 = k2 + enumdirection.getAdjacentZ();
@@ -2725,7 +2711,7 @@ public abstract class World implements IBlockAccess {
                                     blockposition_mutableblockposition.c(k4, l4, i5);
                                     int j5 = Math.max(1, this.getType(blockposition_mutableblockposition).getBlock().p());
 
-                                    l2 = this.b(enumskyblock, (BlockPosition) blockposition_mutableblockposition);
+                                    l2 = this.b(enumskyblock, blockposition_mutableblockposition);
                                     if (l2 == l3 - j5 && j < this.H.length) {
                                         this.H[j++] = k4 - i1 + 32 | l4 - j1 + 32 << 6 | i5 - k1 + 32 << 12 | l3 - j5 << 18;
                                     }
@@ -2820,7 +2806,7 @@ public abstract class World implements IBlockAccess {
         chunk.pendingLightUpdates.incrementAndGet();
         chunk.lightUpdateTime = chunk.world.getTime();
 
-        final List neighbors = new ArrayList();
+        final List neighbors = new ArrayList<>();
         for (int cx = (x >> 4) - 1; cx <= (x >> 4) + 1; ++cx) {
             for (int cz = (z >> 4) - 1; cz <= (z >> 4) + 1; ++cz) {
                 if (cx != x >> 4 && cz != z >> 4) {
@@ -2838,11 +2824,8 @@ public abstract class World implements IBlockAccess {
             return this.c(enumskyblock, position, chunk, neighbors);
         }
 
-        lightingExecutor.submit(new Runnable() {
-            @Override
-            public void run() {
-                World.this.c(enumskyblock, position, chunk, neighbors);
-            }
+        lightingExecutor.submit(() -> {
+            World.this.c(enumskyblock, position, chunk, neighbors);
         });
         return true;
     }
@@ -2883,11 +2866,8 @@ public abstract class World implements IBlockAccess {
 
     public  List a(Class oclass, Predicate predicate) {
         ArrayList arraylist = Lists.newArrayList();
-        Iterator iterator = this.entityList.iterator();
-
-        while (iterator.hasNext()) {
-            Entity entity = (Entity) iterator.next();
 
+        for (Entity entity : this.entityList) {
             if (oclass.isAssignableFrom(entity.getClass()) && predicate.apply((T) entity)) { // CraftBukkit - fix decompile error
                 arraylist.add(entity);
             }
@@ -2898,10 +2878,9 @@ public abstract class World implements IBlockAccess {
 
     public  List b(Class oclass, Predicate predicate) {
         ArrayList arraylist = Lists.newArrayList();
-        Iterator iterator = this.players.iterator();
 
-        while (iterator.hasNext()) {
-            Entity entity = (Entity) iterator.next();
+        for (EntityHuman player : this.players) {
+            Entity entity = player;
 
             if (oclass.isAssignableFrom(entity.getClass()) && predicate.apply((T) entity)) { // CraftBukkit - fix decompile error
                 arraylist.add(entity);
@@ -2938,8 +2917,8 @@ public abstract class World implements IBlockAccess {
         Entity entity = null;
         double d0 = Double.MAX_VALUE;
 
-        for (int i = 0; i < list.size(); ++i) {
-            Entity entity1 = (Entity) list.get(i);
+        for (Object value : list) {
+            Entity entity1 = (Entity) value;
 
             if (entity1 != t0 && IEntitySelector.d.apply(entity1)) {
                 double d1 = t0.h(entity1);
@@ -2955,7 +2934,7 @@ public abstract class World implements IBlockAccess {
     }
 
     public Entity a(int i) {
-        return (Entity) this.entitiesById.get(i);
+        return this.entitiesById.get(i);
     }
 
     public void b(BlockPosition blockposition, TileEntity tileentity) {
@@ -2967,10 +2946,8 @@ public abstract class World implements IBlockAccess {
 
     public int a(Class oclass) {
         int i = 0;
-        Iterator iterator = this.entityList.iterator();
 
-        while (iterator.hasNext()) {
-            Entity entity = (Entity) iterator.next();
+        for (Entity entity : this.entityList) {
             // CraftBukkit start - Split out persistent check, don't apply it to special persistent mobs
             if (entity instanceof EntityInsentient) {
                 EntityInsentient entityinsentient = (EntityInsentient) entity;
@@ -2980,7 +2957,7 @@ public abstract class World implements IBlockAccess {
             }
 
             if (oclass.isAssignableFrom(entity.getClass())) {
-            // if ((!(entity instanceof EntityInsentient) || !((EntityInsentient) entity).isPersistent()) && oclass.isAssignableFrom(entity.getClass())) {
+                // if ((!(entity instanceof EntityInsentient) || !((EntityInsentient) entity).isPersistent()) && oclass.isAssignableFrom(entity.getClass())) {
                 // CraftBukkit end
                 ++i;
             }
@@ -2993,11 +2970,8 @@ public abstract class World implements IBlockAccess {
         org.spigotmc.AsyncCatcher.catchOp( "entity world add"); // Spigot
         // CraftBukkit start
         // this.entityList.addAll(collection);
-        Iterator iterator = collection.iterator();
-
-        while (iterator.hasNext()) {
-            Entity entity = (Entity) iterator.next();
 
+        for (Entity entity : collection) {
             if (entity == null) {
                 continue;
             }
@@ -3017,7 +2991,7 @@ public abstract class World implements IBlockAccess {
         AxisAlignedBB axisalignedbb = flag ? null : block.a(this, blockposition, block.getBlockData());
 
         // CraftBukkit start - store default return
-        boolean defaultReturn = axisalignedbb != null && !this.a(axisalignedbb, entity) ? false : (block1.getMaterial() == Material.ORIENTABLE && block == Blocks.ANVIL ? true : block1.getMaterial().isReplaceable() && block.canPlace(this, blockposition, enumdirection, itemstack));
+        boolean defaultReturn = (axisalignedbb == null || this.a(axisalignedbb, entity)) && (block1.getMaterial() == Material.ORIENTABLE && block == Blocks.ANVIL || block1.getMaterial().isReplaceable() && block.canPlace(this, blockposition, enumdirection, itemstack));
         BlockCanBuildEvent event = new BlockCanBuildEvent(this.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftMagicNumbers.getId(block), defaultReturn);
         this.getServer().getPluginManager().callEvent(event);
 
@@ -3036,7 +3010,7 @@ public abstract class World implements IBlockAccess {
     public int getBlockPower(BlockPosition blockposition, EnumDirection enumdirection) {
         IBlockData iblockdata = this.getType(blockposition);
 
-        return iblockdata.getBlock().b((IBlockAccess) this, blockposition, iblockdata, enumdirection);
+        return iblockdata.getBlock().b(this, blockposition, iblockdata, enumdirection);
     }
 
     public WorldType G() {
@@ -3083,11 +3057,11 @@ public abstract class World implements IBlockAccess {
         IBlockData iblockdata = this.getType(blockposition);
         Block block = iblockdata.getBlock();
 
-        return block.isOccluding() ? this.getBlockPower(blockposition) : block.a((IBlockAccess) this, blockposition, iblockdata, enumdirection);
+        return block.isOccluding() ? this.getBlockPower(blockposition) : block.a(this, blockposition, iblockdata, enumdirection);
     }
 
     public boolean isBlockIndirectlyPowered(BlockPosition blockposition) {
-        return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0))));
+        return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 || (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 || (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 || (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 || (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 || this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0))));
     }
 
     public int A(BlockPosition blockposition) {
@@ -3095,8 +3069,7 @@ public abstract class World implements IBlockAccess {
         EnumDirection[] aenumdirection = EnumDirection.values();
         int j = aenumdirection.length;
 
-        for (int k = 0; k < j; ++k) {
-            EnumDirection enumdirection = aenumdirection[k];
+        for (EnumDirection enumdirection : aenumdirection) {
             int l = this.getBlockFacePower(blockposition.shift(enumdirection), enumdirection);
 
             if (l >= 15) {
@@ -3119,8 +3092,8 @@ public abstract class World implements IBlockAccess {
         double d4 = -1.0D;
         EntityHuman entityhuman = null;
 
-        for (int i = 0; i < this.players.size(); ++i) {
-            EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
+        for (EntityHuman player : this.players) {
+            EntityHuman entityhuman1 = player;
             // CraftBukkit start - Fixed an NPE
             if (entityhuman1 == null || entityhuman1.dead) {
                 continue;
@@ -3141,8 +3114,8 @@ public abstract class World implements IBlockAccess {
     }
 
     public boolean isPlayerNearby(double d0, double d1, double d2, double d3) {
-        for (int i = 0; i < this.players.size(); ++i) {
-            EntityHuman entityhuman = (EntityHuman) this.players.get(i);
+        for (EntityHuman player : this.players) {
+            EntityHuman entityhuman = player;
 
             if (IEntitySelector.d.apply(entityhuman)) {
                 double d4 = entityhuman.e(d0, d1, d2);
@@ -3165,8 +3138,8 @@ public abstract class World implements IBlockAccess {
         double d4 = -1.0D;
         EntityHuman entityhuman = null;
 
-        for (int i = 0; i < this.players.size(); ++i) {
-            EntityHuman entityhuman1 = (EntityHuman) this.players.get(i);
+        for (EntityHuman player : this.players) {
+            EntityHuman entityhuman1 = player;
             // CraftBukkit start - Fixed an NPE
             if (entityhuman1 == null || entityhuman1.dead || !entityhuman1.affectsSpawning) {
                 continue;
@@ -3187,8 +3160,8 @@ public abstract class World implements IBlockAccess {
     }
 
     public boolean isPlayerNearbyWhoAffectsSpawning(double d0, double d1, double d2, double d3) {
-        for (int i = 0; i < this.players.size(); ++i) {
-            EntityHuman entityhuman = (EntityHuman) this.players.get(i);
+        for (EntityHuman player : this.players) {
+            EntityHuman entityhuman = player;
 
             if (IEntitySelector.d.apply(entityhuman)) {
                 double d4 = entityhuman.e(d0, d1, d2);
@@ -3204,8 +3177,8 @@ public abstract class World implements IBlockAccess {
     // PaperSpigot end
 
     public EntityHuman a(String s) {
-        for (int i = 0; i < this.players.size(); ++i) {
-            EntityHuman entityhuman = (EntityHuman) this.players.get(i);
+        for (EntityHuman player : this.players) {
+            EntityHuman entityhuman = player;
 
             if (s.equals(entityhuman.getName())) {
                 return entityhuman;
@@ -3216,8 +3189,8 @@ public abstract class World implements IBlockAccess {
     }
 
     public EntityHuman b(UUID uuid) {
-        for (int i = 0; i < this.players.size(); ++i) {
-            EntityHuman entityhuman = (EntityHuman) this.players.get(i);
+        for (EntityHuman player : this.players) {
+            EntityHuman entityhuman = player;
 
             if (uuid.equals(entityhuman.getUniqueID())) {
                 return entityhuman;
@@ -3325,7 +3298,7 @@ public abstract class World implements IBlockAccess {
         } else {
             BiomeBase biomebase = this.getBiome(blockposition);
 
-            return biomebase.d() ? false : (this.f(blockposition, false) ? false : biomebase.e());
+            return !biomebase.d() && (!this.f(blockposition, false) && biomebase.e());
         }
     }
 
@@ -3352,30 +3325,30 @@ public abstract class World implements IBlockAccess {
     }
 
     public void a(int i, BlockPosition blockposition, int j) {
-        for (int k = 0; k < this.u.size(); ++k) {
-            ((IWorldAccess) this.u.get(k)).a(i, blockposition, j);
+        for (IWorldAccess iWorldAccess : this.u) {
+            iWorldAccess.a(i, blockposition, j);
         }
 
     }
 
     public void triggerEffect(int i, BlockPosition blockposition, int j) {
-        this.a((EntityHuman) null, i, blockposition, j);
+        this.a(null, i, blockposition, j);
     }
 
     public void a(EntityHuman entityhuman, int i, BlockPosition blockposition, int j) {
         try {
-            for (int k = 0; k < this.u.size(); ++k) {
-                ((IWorldAccess) this.u.get(k)).a(entityhuman, i, blockposition, j);
+            for (IWorldAccess iWorldAccess : this.u) {
+                iWorldAccess.a(entityhuman, i, blockposition, j);
             }
 
         } catch (Throwable throwable) {
             CrashReport crashreport = CrashReport.a(throwable, "Playing level event");
             CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Level event being played");
 
-            crashreportsystemdetails.a("Block coordinates", (Object) CrashReportSystemDetails.a(blockposition));
-            crashreportsystemdetails.a("Event source", (Object) entityhuman);
-            crashreportsystemdetails.a("Event type", (Object) Integer.valueOf(i));
-            crashreportsystemdetails.a("Event data", (Object) Integer.valueOf(j));
+            crashreportsystemdetails.a("Block coordinates", CrashReportSystemDetails.a(blockposition));
+            crashreportsystemdetails.a("Event source", entityhuman);
+            crashreportsystemdetails.a("Event type", i);
+            crashreportsystemdetails.a("Event data", j);
             throw new ReportedException(crashreport);
         }
     }
@@ -3402,10 +3375,10 @@ public abstract class World implements IBlockAccess {
     public CrashReportSystemDetails a(CrashReport crashreport) {
         CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Affected level", 1);
 
-        crashreportsystemdetails.a("Level name", (Object) (this.worldData == null ? "????" : this.worldData.getName()));
+        crashreportsystemdetails.a("Level name", this.worldData == null ? "????" : this.worldData.getName());
         crashreportsystemdetails.a("All players", new Callable() {
             public String a() {
-                return World.this.players.size() + " total; " + World.this.players.toString();
+                return World.this.players.size() + " total; " + World.this.players;
             }
 
             public Object call() throws Exception {
@@ -3432,8 +3405,8 @@ public abstract class World implements IBlockAccess {
     }
 
     public void c(int i, BlockPosition blockposition, int j) {
-        for (int k = 0; k < this.u.size(); ++k) {
-            IWorldAccess iworldaccess = (IWorldAccess) this.u.get(k);
+        for (IWorldAccess iWorldAccess : this.u) {
+            IWorldAccess iworldaccess = iWorldAccess;
 
             iworldaccess.b(i, blockposition, j);
         }
@@ -3453,10 +3426,8 @@ public abstract class World implements IBlockAccess {
     }
 
     public void updateAdjacentComparators(BlockPosition blockposition, Block block) {
-        Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
 
-        while (iterator.hasNext()) {
-            EnumDirection enumdirection = (EnumDirection) iterator.next();
+        for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
             BlockPosition blockposition1 = blockposition.shift(enumdirection);
 
             if (this.isLoaded(blockposition1)) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldBorder.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldBorder.java
index 7ea4046..fa397dc 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldBorder.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldBorder.java
@@ -75,7 +75,7 @@ public class WorldBorder {
         double d0 = this.getCenterX() - this.getSize() / 2.0D;
 
         if (d0 < (double) (-this.h)) {
-            d0 = (double) (-this.h);
+            d0 = -this.h;
         }
 
         return d0;
@@ -85,7 +85,7 @@ public class WorldBorder {
         double d0 = this.getCenterZ() - this.getSize() / 2.0D;
 
         if (d0 < (double) (-this.h)) {
-            d0 = (double) (-this.h);
+            d0 = -this.h;
         }
 
         return d0;
@@ -95,7 +95,7 @@ public class WorldBorder {
         double d0 = this.getCenterX() + this.getSize() / 2.0D;
 
         if (d0 > (double) this.h) {
-            d0 = (double) this.h;
+            d0 = this.h;
         }
 
         return d0;
@@ -105,7 +105,7 @@ public class WorldBorder {
         double d0 = this.getCenterZ() + this.getSize() / 2.0D;
 
         if (d0 > (double) this.h) {
-            d0 = (double) this.h;
+            d0 = this.h;
         }
 
         return d0;
@@ -122,11 +122,8 @@ public class WorldBorder {
     public void setCenter(double d0, double d1) {
         this.b = d0;
         this.c = d1;
-        Iterator iterator = this.k().iterator();
-
-        while (iterator.hasNext()) {
-            IWorldBorderListener iworldborderlistener = (IWorldBorderListener) iterator.next();
 
+        for (IWorldBorderListener iworldborderlistener : this.k()) {
             iworldborderlistener.a(this, d0, d1);
         }
 
@@ -134,7 +131,7 @@ public class WorldBorder {
 
     public double getSize() {
         if (this.getState() != EnumWorldBorderState.STATIONARY) {
-            double d0 = (double) ((float) (System.currentTimeMillis() - this.g) / (float) (this.f - this.g));
+            double d0 = (float) (System.currentTimeMillis() - this.g) / (float) (this.f - this.g);
 
             if (d0 < 1.0D) {
                 return this.d + (this.e - this.d) * d0;
@@ -159,11 +156,8 @@ public class WorldBorder {
         this.e = d0;
         this.f = System.currentTimeMillis();
         this.g = this.f;
-        Iterator iterator = this.k().iterator();
-
-        while (iterator.hasNext()) {
-            IWorldBorderListener iworldborderlistener = (IWorldBorderListener) iterator.next();
 
+        for (IWorldBorderListener iworldborderlistener : this.k()) {
             iworldborderlistener.a(this, d0);
         }
 
@@ -174,11 +168,8 @@ public class WorldBorder {
         this.e = d1;
         this.g = System.currentTimeMillis();
         this.f = this.g + i;
-        Iterator iterator = this.k().iterator();
-
-        while (iterator.hasNext()) {
-            IWorldBorderListener iworldborderlistener = (IWorldBorderListener) iterator.next();
 
+        for (IWorldBorderListener iworldborderlistener : this.k()) {
             iworldborderlistener.a(this, d0, d1, i);
         }
 
@@ -207,11 +198,8 @@ public class WorldBorder {
 
     public void setDamageBuffer(double d0) {
         this.j = d0;
-        Iterator iterator = this.k().iterator();
-
-        while (iterator.hasNext()) {
-            IWorldBorderListener iworldborderlistener = (IWorldBorderListener) iterator.next();
 
+        for (IWorldBorderListener iworldborderlistener : this.k()) {
             iworldborderlistener.c(this, d0);
         }
 
@@ -223,11 +211,8 @@ public class WorldBorder {
 
     public void setDamageAmount(double d0) {
         this.i = d0;
-        Iterator iterator = this.k().iterator();
-
-        while (iterator.hasNext()) {
-            IWorldBorderListener iworldborderlistener = (IWorldBorderListener) iterator.next();
 
+        for (IWorldBorderListener iworldborderlistener : this.k()) {
             iworldborderlistener.b(this, d0);
         }
 
@@ -239,11 +224,8 @@ public class WorldBorder {
 
     public void setWarningTime(int i) {
         this.k = i;
-        Iterator iterator = this.k().iterator();
-
-        while (iterator.hasNext()) {
-            IWorldBorderListener iworldborderlistener = (IWorldBorderListener) iterator.next();
 
+        for (IWorldBorderListener iworldborderlistener : this.k()) {
             iworldborderlistener.a(this, i);
         }
 
@@ -255,11 +237,8 @@ public class WorldBorder {
 
     public void setWarningDistance(int i) {
         this.l = i;
-        Iterator iterator = this.k().iterator();
-
-        while (iterator.hasNext()) {
-            IWorldBorderListener iworldborderlistener = (IWorldBorderListener) iterator.next();
 
+        for (IWorldBorderListener iworldborderlistener : this.k()) {
             iworldborderlistener.b(this, i);
         }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldData.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldData.java
index c4f3e89..630830b 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldData.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldData.java
@@ -332,8 +332,8 @@ public class WorldData {
         nbttagcompound.setDouble("BorderSafeZone", this.G);
         nbttagcompound.setDouble("BorderDamagePerBlock", this.H);
         nbttagcompound.setDouble("BorderSizeLerpTarget", this.F);
-        nbttagcompound.setDouble("BorderWarningBlocks", (double) this.I);
-        nbttagcompound.setDouble("BorderWarningTime", (double) this.J);
+        nbttagcompound.setDouble("BorderWarningBlocks", this.I);
+        nbttagcompound.setDouble("BorderWarningTime", this.J);
         if (this.z != null) {
             nbttagcompound.setByte("Difficulty", (byte) this.z.a());
         }
@@ -634,7 +634,7 @@ public class WorldData {
         });
         crashreportsystemdetails.a("Level generator", new Callable() {
             public String a() throws Exception {
-                return String.format("ID %02d - %s, ver %d. Features enabled: %b", new Object[] { Integer.valueOf(WorldData.this.c.g()), WorldData.this.c.name(), Integer.valueOf(WorldData.this.c.getVersion()), Boolean.valueOf(WorldData.this.v)});
+                return String.format("ID %02d - %s, ver %d. Features enabled: %b", new Object[] {WorldData.this.c.g(), WorldData.this.c.name(), WorldData.this.c.getVersion(), WorldData.this.v});
             }
 
             public Object call() throws Exception {
@@ -652,7 +652,7 @@ public class WorldData {
         });
         crashreportsystemdetails.a("Level spawn location", new Callable() {
             public String a() throws Exception {
-                return CrashReportSystemDetails.a((double) WorldData.this.e, (double) WorldData.this.f, (double) WorldData.this.g);
+                return CrashReportSystemDetails.a(WorldData.this.e, WorldData.this.f, WorldData.this.g);
             }
 
             public Object call() throws Exception {
@@ -661,7 +661,7 @@ public class WorldData {
         });
         crashreportsystemdetails.a("Level time", new Callable() {
             public String a() throws Exception {
-                return String.format("%d game time, %d day time", new Object[] { Long.valueOf(WorldData.this.h), Long.valueOf(WorldData.this.i)});
+                return String.format("%d game time, %d day time", new Object[] {WorldData.this.h, WorldData.this.i});
             }
 
             public Object call() throws Exception {
@@ -690,11 +690,10 @@ public class WorldData {
                     case 19133:
                         s = "Anvil";
                     }
-                } catch (Throwable throwable) {
-                    ;
+                } catch (Throwable ignored) {
                 }
 
-                return String.format("0x%05X - %s", new Object[] { Integer.valueOf(WorldData.this.o), s});
+                return String.format("0x%05X - %s", new Object[] {WorldData.this.o, s});
             }
 
             public Object call() throws Exception {
@@ -703,7 +702,7 @@ public class WorldData {
         });
         crashreportsystemdetails.a("Level weather", new Callable() {
             public String a() throws Exception {
-                return String.format("Rain time: %d (now: %b), thunder time: %d (now: %b)", new Object[] { Integer.valueOf(WorldData.this.r), Boolean.valueOf(WorldData.this.q), Integer.valueOf(WorldData.this.t), Boolean.valueOf(WorldData.this.s)});
+                return String.format("Rain time: %d (now: %b), thunder time: %d (now: %b)", new Object[] {WorldData.this.r, WorldData.this.q, WorldData.this.t, WorldData.this.s});
             }
 
             public Object call() throws Exception {
@@ -712,7 +711,7 @@ public class WorldData {
         });
         crashreportsystemdetails.a("Level game mode", new Callable() {
             public String a() throws Exception {
-                return String.format("Game mode: %s (ID %d). Hardcore: %b. Cheats: %b", new Object[] { WorldData.this.u.b(), Integer.valueOf(WorldData.this.u.getId()), Boolean.valueOf(WorldData.this.w), Boolean.valueOf(WorldData.this.x)});
+                return String.format("Game mode: %s (ID %d). Hardcore: %b. Cheats: %b", new Object[] { WorldData.this.u.b(), WorldData.this.u.getId(), WorldData.this.w, WorldData.this.x});
             }
 
             public Object call() throws Exception {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenForestTree.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenForestTree.java
index ffbc47d..882bf99 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenForestTree.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenForestTree.java
@@ -5,7 +5,7 @@ import java.util.Random;
 public class WorldGenForestTree extends WorldGenTreeAbstract {
 
     private static final IBlockData a = Blocks.LOG2.getBlockData().set(BlockLog2.VARIANT, BlockWood.EnumLogVariant.DARK_OAK);
-    private static final IBlockData b = Blocks.LEAVES2.getBlockData().set(BlockLeaves2.VARIANT, BlockWood.EnumLogVariant.DARK_OAK).set(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
+    private static final IBlockData b = Blocks.LEAVES2.getBlockData().set(BlockLeaves2.VARIANT, BlockWood.EnumLogVariant.DARK_OAK).set(BlockLeaves.CHECK_DECAY, Boolean.FALSE);
 
     public WorldGenForestTree(boolean flag) {
         super(flag);
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenLargeFeature.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenLargeFeature.java
index 171be82..6619580 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenLargeFeature.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenLargeFeature.java
@@ -24,12 +24,11 @@ public class WorldGenLargeFeature extends StructureGenerator {
 
     public WorldGenLargeFeature(Map map) {
         this();
-        Iterator iterator = map.entrySet().iterator();
 
-        while (iterator.hasNext()) {
-            Entry entry = (Entry) iterator.next();
+        for (Entry stringStringEntry : map.entrySet()) {
+            Entry entry = stringStringEntry;
 
-            if (((String) entry.getKey()).equals("distance")) {
+            if (entry.getKey().equals("distance")) {
                 this.g = MathHelper.a((String) entry.getValue(), this.g, this.h + 1);
             }
         }
@@ -67,11 +66,7 @@ public class WorldGenLargeFeature extends StructureGenerator {
                 return false;
             }
 
-            Iterator iterator = WorldGenLargeFeature.d.iterator();
-
-            while (iterator.hasNext()) {
-                BiomeBase biomebase1 = (BiomeBase) iterator.next();
-
+            for (BiomeBase biomebase1 : WorldGenLargeFeature.d) {
                 if (biomebase == biomebase1) {
                     return true;
                 }
@@ -89,7 +84,7 @@ public class WorldGenLargeFeature extends StructureGenerator {
         StructureStart structurestart = this.c(blockposition);
 
         if (structurestart != null && structurestart instanceof WorldGenLargeFeature.WorldGenLargeFeatureStart && !structurestart.a.isEmpty()) {
-            StructurePiece structurepiece = (StructurePiece) structurestart.a.getFirst();
+            StructurePiece structurepiece = structurestart.a.getFirst();
 
             return structurepiece instanceof WorldGenRegistration.WorldGenWitchHut;
         } else {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenRegistration.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenRegistration.java
index 12e4b10..0f489f7 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenRegistration.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenRegistration.java
@@ -20,14 +20,12 @@ public class WorldGenRegistration {
         static {
             try {
                 WorldGenRegistration.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 WorldGenRegistration.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
@@ -102,12 +100,12 @@ public class WorldGenRegistration {
                     j1 = this.d(2);
                     int k1 = this.b(2, 5);
 
-                    if (structureboundingbox.b((BaseBlockPosition) (new BlockPosition(i1, j1, k1)))) {
+                    if (structureboundingbox.b(new BlockPosition(i1, j1, k1))) {
                         this.e = true;
                         EntityWitch entitywitch = new EntityWitch(world);
 
-                        entitywitch.setPositionRotation((double) i1 + 0.5D, (double) j1, (double) k1 + 0.5D, 0.0F, 0.0F);
-                        entitywitch.prepare(world.E(new BlockPosition(i1, j1, k1)), (GroupDataEntity) null);
+                        entitywitch.setPositionRotation((double) i1 + 0.5D, j1, (double) k1 + 0.5D, 0.0F, 0.0F);
+                        entitywitch.prepare(world.E(new BlockPosition(i1, j1, k1)), null);
                         world.addEntity(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
                     }
                 }
@@ -125,7 +123,7 @@ public class WorldGenRegistration {
         private boolean h;
         private static final List i = Lists.newArrayList(new StructurePieceTreasure[] { new StructurePieceTreasure(Items.DIAMOND, 0, 1, 3, 3), new StructurePieceTreasure(Items.IRON_INGOT, 0, 1, 5, 10), new StructurePieceTreasure(Items.GOLD_INGOT, 0, 2, 7, 15), new StructurePieceTreasure(Items.EMERALD, 0, 1, 3, 2), new StructurePieceTreasure(Items.BONE, 0, 4, 6, 20), new StructurePieceTreasure(Items.ROTTEN_FLESH, 0, 3, 7, 16), new StructurePieceTreasure(Items.SADDLE, 0, 1, 1, 3), new StructurePieceTreasure(Items.IRON_HORSE_ARMOR, 0, 1, 1, 1), new StructurePieceTreasure(Items.GOLDEN_HORSE_ARMOR, 0, 1, 1, 1), new StructurePieceTreasure(Items.DIAMOND_HORSE_ARMOR, 0, 1, 1, 1)});
         private static final List j = Lists.newArrayList(new StructurePieceTreasure[] { new StructurePieceTreasure(Items.ARROW, 0, 2, 7, 30)});
-        private static WorldGenRegistration.WorldGenJungleTemple.WorldGenJungleTemple$WorldGenJungleTemplePiece k = new WorldGenRegistration.WorldGenJungleTemple.WorldGenJungleTemple$WorldGenJungleTemplePiece((WorldGenRegistration.SyntheticClass_1) null);
+        private static WorldGenRegistration.WorldGenJungleTemple.WorldGenJungleTemple$WorldGenJungleTemplePiece k = new WorldGenRegistration.WorldGenJungleTemple.WorldGenJungleTemple$WorldGenJungleTemplePiece(null);
 
         public WorldGenJungleTemple() {}
 
@@ -257,10 +255,10 @@ public class WorldGenRegistration {
                 this.a(world, structureboundingbox, 7, -2, 1, 9, -2, 1, false, random, WorldGenRegistration.WorldGenJungleTemple.k);
                 this.a(world, structureboundingbox, 6, -3, 1, 6, -3, 1, false, random, WorldGenRegistration.WorldGenJungleTemple.k);
                 this.a(world, structureboundingbox, 6, -1, 1, 6, -1, 1, false, random, WorldGenRegistration.WorldGenJungleTemple.k);
-                this.a(world, Blocks.TRIPWIRE_HOOK.fromLegacyData(this.a(Blocks.TRIPWIRE_HOOK, EnumDirection.EAST.b())).set(BlockTripwireHook.ATTACHED, Boolean.valueOf(true)), 1, -3, 8, structureboundingbox);
-                this.a(world, Blocks.TRIPWIRE_HOOK.fromLegacyData(this.a(Blocks.TRIPWIRE_HOOK, EnumDirection.WEST.b())).set(BlockTripwireHook.ATTACHED, Boolean.valueOf(true)), 4, -3, 8, structureboundingbox);
-                this.a(world, Blocks.TRIPWIRE.getBlockData().set(BlockTripwire.ATTACHED, Boolean.valueOf(true)), 2, -3, 8, structureboundingbox);
-                this.a(world, Blocks.TRIPWIRE.getBlockData().set(BlockTripwire.ATTACHED, Boolean.valueOf(true)), 3, -3, 8, structureboundingbox);
+                this.a(world, Blocks.TRIPWIRE_HOOK.fromLegacyData(this.a(Blocks.TRIPWIRE_HOOK, EnumDirection.EAST.b())).set(BlockTripwireHook.ATTACHED, Boolean.TRUE), 1, -3, 8, structureboundingbox);
+                this.a(world, Blocks.TRIPWIRE_HOOK.fromLegacyData(this.a(Blocks.TRIPWIRE_HOOK, EnumDirection.WEST.b())).set(BlockTripwireHook.ATTACHED, Boolean.TRUE), 4, -3, 8, structureboundingbox);
+                this.a(world, Blocks.TRIPWIRE.getBlockData().set(BlockTripwire.ATTACHED, Boolean.TRUE), 2, -3, 8, structureboundingbox);
+                this.a(world, Blocks.TRIPWIRE.getBlockData().set(BlockTripwire.ATTACHED, Boolean.TRUE), 3, -3, 8, structureboundingbox);
                 this.a(world, Blocks.REDSTONE_WIRE.getBlockData(), 5, -3, 7, structureboundingbox);
                 this.a(world, Blocks.REDSTONE_WIRE.getBlockData(), 5, -3, 6, structureboundingbox);
                 this.a(world, Blocks.REDSTONE_WIRE.getBlockData(), 5, -3, 5, structureboundingbox);
@@ -275,11 +273,11 @@ public class WorldGenRegistration {
                 }
 
                 this.a(world, Blocks.VINE.fromLegacyData(15), 3, -2, 2, structureboundingbox);
-                this.a(world, Blocks.TRIPWIRE_HOOK.fromLegacyData(this.a(Blocks.TRIPWIRE_HOOK, EnumDirection.NORTH.b())).set(BlockTripwireHook.ATTACHED, Boolean.valueOf(true)), 7, -3, 1, structureboundingbox);
-                this.a(world, Blocks.TRIPWIRE_HOOK.fromLegacyData(this.a(Blocks.TRIPWIRE_HOOK, EnumDirection.SOUTH.b())).set(BlockTripwireHook.ATTACHED, Boolean.valueOf(true)), 7, -3, 5, structureboundingbox);
-                this.a(world, Blocks.TRIPWIRE.getBlockData().set(BlockTripwire.ATTACHED, Boolean.valueOf(true)), 7, -3, 2, structureboundingbox);
-                this.a(world, Blocks.TRIPWIRE.getBlockData().set(BlockTripwire.ATTACHED, Boolean.valueOf(true)), 7, -3, 3, structureboundingbox);
-                this.a(world, Blocks.TRIPWIRE.getBlockData().set(BlockTripwire.ATTACHED, Boolean.valueOf(true)), 7, -3, 4, structureboundingbox);
+                this.a(world, Blocks.TRIPWIRE_HOOK.fromLegacyData(this.a(Blocks.TRIPWIRE_HOOK, EnumDirection.NORTH.b())).set(BlockTripwireHook.ATTACHED, Boolean.TRUE), 7, -3, 1, structureboundingbox);
+                this.a(world, Blocks.TRIPWIRE_HOOK.fromLegacyData(this.a(Blocks.TRIPWIRE_HOOK, EnumDirection.SOUTH.b())).set(BlockTripwireHook.ATTACHED, Boolean.TRUE), 7, -3, 5, structureboundingbox);
+                this.a(world, Blocks.TRIPWIRE.getBlockData().set(BlockTripwire.ATTACHED, Boolean.TRUE), 7, -3, 2, structureboundingbox);
+                this.a(world, Blocks.TRIPWIRE.getBlockData().set(BlockTripwire.ATTACHED, Boolean.TRUE), 7, -3, 3, structureboundingbox);
+                this.a(world, Blocks.TRIPWIRE.getBlockData().set(BlockTripwire.ATTACHED, Boolean.TRUE), 7, -3, 4, structureboundingbox);
                 this.a(world, Blocks.REDSTONE_WIRE.getBlockData(), 8, -3, 6, structureboundingbox);
                 this.a(world, Blocks.REDSTONE_WIRE.getBlockData(), 9, -3, 6, structureboundingbox);
                 this.a(world, Blocks.REDSTONE_WIRE.getBlockData(), 9, -3, 5, structureboundingbox);
@@ -565,16 +563,13 @@ public class WorldGenRegistration {
             this.a(world, Blocks.AIR.getBlockData(), 10, -10, 12, structureboundingbox);
             this.a(world, Blocks.SANDSTONE.fromLegacyData(BlockSandStone.EnumSandstoneVariant.CHISELED.a()), 10, -10, 13, structureboundingbox);
             this.a(world, Blocks.SANDSTONE.fromLegacyData(BlockSandStone.EnumSandstoneVariant.SMOOTH.a()), 10, -11, 13, structureboundingbox);
-            Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
-
-            while (iterator.hasNext()) {
-                EnumDirection enumdirection = (EnumDirection) iterator.next();
 
+            for (EnumDirection enumdirection : EnumDirection.EnumDirectionLimit.HORIZONTAL) {
                 if (!this.e[enumdirection.b()]) {
                     int l1 = enumdirection.getAdjacentX() * 2;
                     int i2 = enumdirection.getAdjacentZ() * 2;
 
-                    this.e[enumdirection.b()] = this.a(world, structureboundingbox, random, 10 + l1, -11, 10 + i2, StructurePieceTreasure.a(WorldGenRegistration.WorldGenPyramidPiece.f, new StructurePieceTreasure[] { Items.ENCHANTED_BOOK.b(random)}), 2 + random.nextInt(5));
+                    this.e[enumdirection.b()] = this.a(world, structureboundingbox, random, 10 + l1, -11, 10 + i2, StructurePieceTreasure.a(WorldGenPyramidPiece.f, new StructurePieceTreasure[]{Items.ENCHANTED_BOOK.b(random)}), 2 + random.nextInt(5));
                 }
             }
 
@@ -634,7 +629,7 @@ public class WorldGenRegistration {
                 for (int l = this.l.c; l <= this.l.f; ++l) {
                     for (int i1 = this.l.a; i1 <= this.l.d; ++i1) {
                         blockposition_mutableblockposition.c(i1, 64, l);
-                        if (structureboundingbox.b((BaseBlockPosition) blockposition_mutableblockposition)) {
+                        if (structureboundingbox.b(blockposition_mutableblockposition)) {
                             j += Math.max(world.r(blockposition_mutableblockposition).getY(), world.worldProvider.getSeaLevel());
                             ++k;
                         }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillage.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillage.java
index 6648a70..9ba73ec 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillage.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillage.java
@@ -21,14 +21,13 @@ public class WorldGenVillage extends StructureGenerator {
 
     public WorldGenVillage(Map map) {
         this();
-        Iterator iterator = map.entrySet().iterator();
 
-        while (iterator.hasNext()) {
-            Entry entry = (Entry) iterator.next();
+        for (Entry stringStringEntry : map.entrySet()) {
+            Entry entry = stringStringEntry;
 
-            if (((String) entry.getKey()).equals("size")) {
+            if (entry.getKey().equals("size")) {
                 this.f = MathHelper.a((String) entry.getValue(), this.f, 0);
-            } else if (((String) entry.getKey()).equals("distance")) {
+            } else if (entry.getKey().equals("distance")) {
                 this.g = MathHelper.a((String) entry.getValue(), this.g, this.h + 1);
             }
         }
@@ -86,7 +85,7 @@ public class WorldGenVillage extends StructureGenerator {
             WorldGenVillagePieces.WorldGenVillageStartPiece worldgenvillagepieces_worldgenvillagestartpiece = new WorldGenVillagePieces.WorldGenVillageStartPiece(world.getWorldChunkManager(), 0, random, (i << 4) + 2, (j << 4) + 2, list, k);
 
             this.a.add(worldgenvillagepieces_worldgenvillagestartpiece);
-            worldgenvillagepieces_worldgenvillagestartpiece.a((StructurePiece) worldgenvillagepieces_worldgenvillagestartpiece, (List) this.a, random);
+            worldgenvillagepieces_worldgenvillagestartpiece.a(worldgenvillagepieces_worldgenvillagestartpiece, this.a, random);
             List list1 = worldgenvillagepieces_worldgenvillagestartpiece.g;
             List list2 = worldgenvillagepieces_worldgenvillagestartpiece.f;
 
@@ -98,21 +97,18 @@ public class WorldGenVillage extends StructureGenerator {
                 if (list1.isEmpty()) {
                     l = random.nextInt(list2.size());
                     structurepiece = (StructurePiece) list2.remove(l);
-                    structurepiece.a((StructurePiece) worldgenvillagepieces_worldgenvillagestartpiece, (List) this.a, random);
+                    structurepiece.a(worldgenvillagepieces_worldgenvillagestartpiece, this.a, random);
                 } else {
                     l = random.nextInt(list1.size());
                     structurepiece = (StructurePiece) list1.remove(l);
-                    structurepiece.a((StructurePiece) worldgenvillagepieces_worldgenvillagestartpiece, (List) this.a, random);
+                    structurepiece.a(worldgenvillagepieces_worldgenvillagestartpiece, this.a, random);
                 }
             }
 
             this.c();
             l = 0;
-            Iterator iterator = this.a.iterator();
-
-            while (iterator.hasNext()) {
-                StructurePiece structurepiece1 = (StructurePiece) iterator.next();
 
+            for (StructurePiece structurepiece1 : this.a) {
                 if (!(structurepiece1 instanceof WorldGenVillagePieces.WorldGenVillageRoadPiece)) {
                     ++l;
                 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillagePieces.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillagePieces.java
index 3ed55f4..8792783 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillagePieces.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillagePieces.java
@@ -101,18 +101,15 @@ public class WorldGenVillagePieces {
             while (j1 < 5) {
                 ++j1;
                 int k1 = random.nextInt(i1);
-                Iterator iterator = worldgenvillagepieces_worldgenvillagestartpiece.e.iterator();
-
-                while (iterator.hasNext()) {
-                    WorldGenVillagePieces.WorldGenVillagePieceWeight worldgenvillagepieces_worldgenvillagepieceweight = (WorldGenVillagePieces.WorldGenVillagePieceWeight) iterator.next();
 
+                for (WorldGenVillagePieceWeight worldgenvillagepieces_worldgenvillagepieceweight : worldgenvillagepieces_worldgenvillagestartpiece.e) {
                     k1 -= worldgenvillagepieces_worldgenvillagepieceweight.b;
                     if (k1 < 0) {
                         if (!worldgenvillagepieces_worldgenvillagepieceweight.a(l) || worldgenvillagepieces_worldgenvillagepieceweight == worldgenvillagepieces_worldgenvillagestartpiece.d && worldgenvillagepieces_worldgenvillagestartpiece.e.size() > 1) {
                             break;
                         }
 
-                        WorldGenVillagePieces.WorldGenVillagePiece worldgenvillagepieces_worldgenvillagepiece = a(worldgenvillagepieces_worldgenvillagestartpiece, worldgenvillagepieces_worldgenvillagepieceweight, list, random, i, j, k, enumdirection, l);
+                        WorldGenVillagePiece worldgenvillagepieces_worldgenvillagepiece = a(worldgenvillagepieces_worldgenvillagestartpiece, worldgenvillagepieces_worldgenvillagepieceweight, list, random, i, j, k, enumdirection, l);
 
                         if (worldgenvillagepieces_worldgenvillagepiece != null) {
                             ++worldgenvillagepieces_worldgenvillagepieceweight.c;
@@ -197,26 +194,22 @@ public class WorldGenVillagePieces {
         static {
             try {
                 WorldGenVillagePieces.SyntheticClass_1.a[EnumDirection.NORTH.ordinal()] = 1;
-            } catch (NoSuchFieldError nosuchfielderror) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 WorldGenVillagePieces.SyntheticClass_1.a[EnumDirection.SOUTH.ordinal()] = 2;
-            } catch (NoSuchFieldError nosuchfielderror1) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 WorldGenVillagePieces.SyntheticClass_1.a[EnumDirection.WEST.ordinal()] = 3;
-            } catch (NoSuchFieldError nosuchfielderror2) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
             try {
                 WorldGenVillagePieces.SyntheticClass_1.a[EnumDirection.EAST.ordinal()] = 4;
-            } catch (NoSuchFieldError nosuchfielderror3) {
-                ;
+            } catch (NoSuchFieldError ignored) {
             }
 
         }
@@ -523,7 +516,7 @@ public class WorldGenVillagePieces {
             this.a(world, Blocks.PLANKS.getBlockData(), 1, 1, 5, structureboundingbox);
             this.a(world, Blocks.OAK_STAIRS.fromLegacyData(this.a(Blocks.OAK_STAIRS, 3)), 2, 1, 5, structureboundingbox);
             this.a(world, Blocks.OAK_STAIRS.fromLegacyData(this.a(Blocks.OAK_STAIRS, 1)), 1, 1, 4, structureboundingbox);
-            if (!this.b && structureboundingbox.b((BaseBlockPosition) (new BlockPosition(this.a(5, 5), this.d(1), this.b(5, 5))))) {
+            if (!this.b && structureboundingbox.b(new BlockPosition(this.a(5, 5), this.d(1), this.b(5, 5)))) {
                 this.b = true;
                 this.a(world, structureboundingbox, random, 5, 1, 5, WorldGenVillagePieces.WorldGenVillageBlacksmith.a, 3 + random.nextInt(6));
             }
@@ -1335,7 +1328,7 @@ public class WorldGenVillagePieces {
                 for (int j = this.l.c; j <= this.l.f; ++j) {
                     BlockPosition blockposition = new BlockPosition(i, 64, j);
 
-                    if (structureboundingbox.b((BaseBlockPosition) blockposition)) {
+                    if (structureboundingbox.b(blockposition)) {
                         blockposition = world.r(blockposition).down();
                         world.setTypeAndData(blockposition, iblockdata, 2);
                         world.setTypeAndData(blockposition.down(), iblockdata1, 2);
@@ -1369,7 +1362,7 @@ public class WorldGenVillagePieces {
         public WorldGenVillageStartPiece() {}
 
         public WorldGenVillageStartPiece(WorldChunkManager worldchunkmanager, int i, Random random, int j, int k, List list, int l) {
-            super((WorldGenVillagePieces.WorldGenVillageStartPiece) null, 0, random, j, k);
+            super(null, 0, random, j, k);
             this.a = worldchunkmanager;
             this.e = list;
             this.c = l;
@@ -1524,7 +1517,7 @@ public class WorldGenVillagePieces {
             for (int k = this.l.c; k <= this.l.f; ++k) {
                 for (int l = this.l.a; l <= this.l.d; ++l) {
                     blockposition_mutableblockposition.c(l, 64, k);
-                    if (structureboundingbox.b((BaseBlockPosition) blockposition_mutableblockposition)) {
+                    if (structureboundingbox.b(blockposition_mutableblockposition)) {
                         i += Math.max(world.r(blockposition_mutableblockposition).getY(), world.worldProvider.getSeaLevel());
                         ++j;
                     }
@@ -1549,15 +1542,15 @@ public class WorldGenVillagePieces {
                     int k1 = this.d(j);
                     int l1 = this.b(i + i1, k);
 
-                    if (!structureboundingbox.b((BaseBlockPosition) (new BlockPosition(j1, k1, l1)))) {
+                    if (!structureboundingbox.b(new BlockPosition(j1, k1, l1))) {
                         break;
                     }
 
                     ++this.a;
                     EntityVillager entityvillager = new EntityVillager(world);
 
-                    entityvillager.setPositionRotation((double) j1 + 0.5D, (double) k1, (double) l1 + 0.5D, 0.0F, 0.0F);
-                    entityvillager.prepare(world.E(new BlockPosition(entityvillager)), (GroupDataEntity) null);
+                    entityvillager.setPositionRotation((double) j1 + 0.5D, k1, (double) l1 + 0.5D, 0.0F, 0.0F);
+                    entityvillager.prepare(world.E(new BlockPosition(entityvillager)), null);
                     entityvillager.setProfession(this.c(i1, entityvillager.getProfession()));
                     world.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
                 }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldManager.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldManager.java
index 2ade8fb..2db25a9 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldManager.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldManager.java
@@ -52,7 +52,7 @@ public class WorldManager implements IWorldAccess {
 
     public void a(EntityHuman entityhuman, int i, BlockPosition blockposition, int j) {
         // CraftBukkit - this.world.dimension
-        this.a.getPlayerList().sendPacketNearby(entityhuman, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 64.0D, this.world.dimension, new PacketPlayOutWorldEvent(i, blockposition, j, false));
+        this.a.getPlayerList().sendPacketNearby(entityhuman, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 64.0D, this.world.dimension, new PacketPlayOutWorldEvent(i, blockposition, j, false));
     }
 
     public void a(int i, BlockPosition blockposition, int j) {
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldMap.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldMap.java
index 40c4246..16e47e9 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldMap.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldMap.java
@@ -263,12 +263,8 @@ public class WorldMap extends PersistentBase {
 
     public void flagDirty(int i, int j) {
         super.c();
-        Iterator iterator = this.g.iterator();
-
-        while (iterator.hasNext()) {
-            WorldMap.WorldMapHumanTracker worldmap_worldmaphumantracker = (WorldMap.WorldMapHumanTracker) iterator
-                    .next();
 
+        for (WorldMapHumanTracker worldmap_worldmaphumantracker : this.g) {
             worldmap_worldmaphumantracker.a(i, j);
         }
 
@@ -316,7 +312,7 @@ public class WorldMap extends PersistentBase {
                     .render((org.bukkit.craftbukkit.entity.CraftPlayer) this.trackee.getBukkitEntity())
                     : WorldMap.this.vanillaRender; // CraftBukkit // Paper
 
-            java.util.Collection icons = new java.util.ArrayList();
+            java.util.Collection icons = new java.util.ArrayList<>();
             if (vanillaMaps) {
                 addSeenPlayers(icons); // Paper
             }
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldNBTStorage.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldNBTStorage.java
index 8293ba0..1ae0f72 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldNBTStorage.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldNBTStorage.java
@@ -12,6 +12,7 @@ import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
 // CraftBukkit start
+import java.nio.charset.StandardCharsets;
 import java.util.UUID;
 
 import org.bukkit.craftbukkit.entity.CraftPlayer;
@@ -45,12 +46,9 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
     private void h() {
         try {
             File file = new File(this.baseDir, "session.lock");
-            DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(file));
 
-            try {
+            try (DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(file))) {
                 dataoutputstream.writeLong(this.sessionId);
-            } finally {
-                dataoutputstream.close();
             }
 
         } catch (IOException ioexception) {
@@ -66,14 +64,11 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
     public void checkSession() throws ExceptionWorldConflict {
         try {
             File file = new File(this.baseDir, "session.lock");
-            DataInputStream datainputstream = new DataInputStream(new FileInputStream(file));
 
-            try {
+            try (DataInputStream datainputstream = new DataInputStream(new FileInputStream(file))) {
                 if (datainputstream.readLong() != this.sessionId) {
                     throw new ExceptionWorldConflict("The save for world located at " + this.baseDir + " is being accessed from another location, aborting");  // Spigot
                 }
-            } finally {
-                datainputstream.close();
             }
 
         } catch (IOException ioexception) {
@@ -92,7 +87,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
 
         if (file.exists()) {
             try {
-                nbttagcompound = NBTCompressedStreamTools.a((InputStream) (new FileInputStream(file)));
+                nbttagcompound = NBTCompressedStreamTools.a(new FileInputStream(file));
                 nbttagcompound1 = nbttagcompound.getCompound("Data");
                 return new WorldData(nbttagcompound1);
             } catch (Exception exception) {
@@ -103,7 +98,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
         file = new File(this.baseDir, "level.dat_old");
         if (file.exists()) {
             try {
-                nbttagcompound = NBTCompressedStreamTools.a((InputStream) (new FileInputStream(file)));
+                nbttagcompound = NBTCompressedStreamTools.a(new FileInputStream(file));
                 nbttagcompound1 = nbttagcompound.getCompound("Data");
                 return new WorldData(nbttagcompound1);
             } catch (Exception exception1) {
@@ -125,7 +120,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
             File file1 = new File(this.baseDir, "level.dat_old");
             File file2 = new File(this.baseDir, "level.dat");
 
-            NBTCompressedStreamTools.a(nbttagcompound2, (OutputStream) (new FileOutputStream(file)));
+            NBTCompressedStreamTools.a(nbttagcompound2, new FileOutputStream(file));
             if (file1.exists()) {
                 file1.delete();
             }
@@ -156,7 +151,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
             File file1 = new File(this.baseDir, "level.dat_old");
             File file2 = new File(this.baseDir, "level.dat");
 
-            NBTCompressedStreamTools.a(nbttagcompound1, (OutputStream) (new FileOutputStream(file)));
+            NBTCompressedStreamTools.a(nbttagcompound1, new FileOutputStream(file));
             if (file1.exists()) {
                 file1.delete();
             }
@@ -184,7 +179,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
             File file = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat.tmp");
             File file1 = new File(this.playerDir, entityhuman.getUniqueID().toString() + ".dat");
 
-            NBTCompressedStreamTools.a(nbttagcompound, (OutputStream) (new FileOutputStream(file)));
+            NBTCompressedStreamTools.a(nbttagcompound, new FileOutputStream(file));
             if (file1.exists()) {
                 file1.delete();
             }
@@ -207,7 +202,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
             boolean normalFile = file.exists() && file.isFile(); // KigPaper
             if ( org.bukkit.Bukkit.getOnlineMode() && !normalFile ) // PaperSpigot - Check online mode first
             {
-                file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes( "UTF-8" ) ).toString() + ".dat");
+                file = new File( this.playerDir, UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + entityhuman.getName() ).getBytes(StandardCharsets.UTF_8) ) + ".dat");
                 if ( file.exists() )
                 {
                     usingWrongFile = true;
@@ -217,7 +212,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
             // Spigot End
 
             if (normalFile) { // KigPaper
-                nbttagcompound = NBTCompressedStreamTools.a((InputStream) (new FileInputStream(file)));
+                nbttagcompound = NBTCompressedStreamTools.a(new FileInputStream(file));
             }
             // Spigot Start
             if ( usingWrongFile )
@@ -253,7 +248,7 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
             File file1 = new File(this.playerDir, s + ".dat");
 
             if (file1.exists()) {
-                return NBTCompressedStreamTools.a((InputStream) (new FileInputStream(file1)));
+                return NBTCompressedStreamTools.a(new FileInputStream(file1));
             }
         } catch (Exception exception) {
             a.warn("Failed to load player data for " + s);
@@ -298,39 +293,21 @@ public class WorldNBTStorage implements IDataManager, IPlayerFileData {
         if (uuid != null) return uuid;
         File file1 = new File(this.baseDir, "uid.dat");
         if (file1.exists()) {
-            DataInputStream dis = null;
-            try {
-                dis = new DataInputStream(new FileInputStream(file1));
+            try (DataInputStream dis = new DataInputStream(new FileInputStream(file1))) {
                 return uuid = new UUID(dis.readLong(), dis.readLong());
             } catch (IOException ex) {
                 a.warn("Failed to read " + file1 + ", generating new random UUID", ex);
-            } finally {
-                if (dis != null) {
-                    try {
-                        dis.close();
-                    } catch (IOException ex) {
-                        // NOOP
-                    }
-                }
             }
+            // NOOP
         }
         uuid = UUID.randomUUID();
-        DataOutputStream dos = null;
-        try {
-            dos = new DataOutputStream(new FileOutputStream(file1));
+        try (DataOutputStream dos = new DataOutputStream(new FileOutputStream(file1))) {
             dos.writeLong(uuid.getMostSignificantBits());
             dos.writeLong(uuid.getLeastSignificantBits());
         } catch (IOException ex) {
             a.warn("Failed to write " + file1, ex);
-        } finally {
-            if (dos != null) {
-                try {
-                    dos.close();
-                } catch (IOException ex) {
-                    // NOOP
-                }
-            }
         }
+        // NOOP
         return uuid;
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldServer.java b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldServer.java
index 85da369..0912ca7 100644
--- a/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldServer.java
+++ b/TacoSpigot-Server/src/main/java/net/minecraft/server/WorldServer.java
@@ -4,12 +4,6 @@ import com.google.common.base.Predicate;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.util.concurrent.ListenableFuture;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.UUID;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 
@@ -85,7 +79,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
             this.worldMaps.a(s, this.villages);
         } else {
             this.villages = persistentvillage;
-            this.villages.a((World) this);
+            this.villages.a(this);
         }
 
         if (getServer().getScoreboardManager() == null) { // CraftBukkit
@@ -295,7 +289,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
     public boolean a(EnumCreatureType enumcreaturetype, BiomeBase.BiomeMeta biomebase_biomemeta, BlockPosition blockposition) {
         List list = this.N().getMobsFor(enumcreaturetype, blockposition);
 
-        return list != null && !list.isEmpty() ? list.contains(biomebase_biomemeta) : false;
+        return list != null && !list.isEmpty() && list.contains(biomebase_biomemeta);
     }
 
     public void everyoneSleeping() {
@@ -303,11 +297,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
         if (!this.players.isEmpty()) {
             int i = 0;
             int j = 0;
-            Iterator iterator = this.players.iterator();
-
-            while (iterator.hasNext()) {
-                EntityHuman entityhuman = (EntityHuman) iterator.next();
 
+            for (EntityHuman entityhuman : this.players) {
                 if (entityhuman.isSpectator()) {
                     ++i;
                 } else if (entityhuman.isSleeping() || entityhuman.fauxSleeping) {
@@ -322,11 +313,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
 
     protected void e() {
         this.O = false;
-        Iterator iterator = this.players.iterator();
-
-        while (iterator.hasNext()) {
-            EntityHuman entityhuman = (EntityHuman) iterator.next();
 
+        for (EntityHuman entityhuman : this.players) {
             if (entityhuman.isSleeping()) {
                 entityhuman.a(false, false, true);
             }
@@ -440,7 +428,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
                     i1 = this.m >> 2;
                     blockposition = this.a(new BlockPosition(k + (i1 & 15), 0, l + (i1 >> 8 & 15)));
                     if (this.isRainingAt(blockposition)) {
-                        this.strikeLightning(new EntityLightning(this, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ()));
+                        this.strikeLightning(new EntityLightning(this, blockposition.getX(), blockposition.getY(), blockposition.getZ()));
                     }
                 }
 
@@ -489,9 +477,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
                     ChunkSection[] achunksection = chunk.getSections();
                     int j1 = achunksection.length;
 
-                    for (int k1 = 0; k1 < j1; ++k1) {
-                        ChunkSection chunksection = achunksection[k1];
-
+                    for (ChunkSection chunksection : achunksection) {
                         if (chunksection != null && chunksection.shouldTick()) {
                             for (int l1 = 0; l1 < i1; ++l1) {
                                 this.m = this.m * 3 + 1013904223;
@@ -506,7 +492,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
 
                                 if (block.isTicking()) {
                                     ++i;
-                                    block.a((World) this, new BlockPosition(j2 + k, l2 + chunksection.getYPosition(), k2 + l), iblockdata, this.random);
+                                    block.a(this, new BlockPosition(j2 + k, l2 + chunksection.getYPosition(), k2 + l), iblockdata, this.random);
                                 }
                             }
                         }
@@ -561,7 +547,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
                     IBlockData iblockdata = this.getType(nextticklistentry.a);
 
                     if (iblockdata.getBlock().getMaterial() != Material.AIR && iblockdata.getBlock() == nextticklistentry.a()) {
-                        iblockdata.getBlock().b((World) this, nextticklistentry.a, iblockdata, this.random);
+                        iblockdata.getBlock().b(this, nextticklistentry.a, iblockdata, this.random);
                     }
                 }
 
@@ -648,7 +634,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
                 NextTickListEntry nextticklistentry;
 
                 for (int j = 0; j < i; ++j) {
-                    nextticklistentry = (NextTickListEntry) this.M.first();
+                    nextticklistentry = this.M.first();
                     if (!flag && nextticklistentry.b > this.worldData.getTime()) {
                         break;
                     }
@@ -693,7 +679,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
 
                         if (iblockdata.getBlock().getMaterial() != Material.AIR && Block.a(iblockdata.getBlock(), nextticklistentry.a())) {
                             try {
-                                iblockdata.getBlock().b((World) this, nextticklistentry.a, iblockdata, this.random);
+                                iblockdata.getBlock().b(this, nextticklistentry.a, iblockdata, this.random);
                             } catch (Throwable throwable) {
                                 CrashReport crashreport = CrashReport.a(throwable, "Exception while ticking a block");
                                 CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Block being ticked");
@@ -854,8 +840,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
 
                 try {
                     this.a(crashreport);
-                } catch (Throwable throwable1) {
-                    ;
+                } catch (Throwable ignored) {
                 }
 
                 throw new ReportedException(crashreport);
@@ -900,10 +885,10 @@ public class WorldServer extends World implements IAsyncTaskHandler {
             // CraftBukkit start
             if (this.generator != null) {
                 Random rand = new Random(this.getSeed());
-                org.bukkit.Location spawn = this.generator.getFixedSpawnLocation(((WorldServer) this).getWorld(), rand);
+                org.bukkit.Location spawn = this.generator.getFixedSpawnLocation(this.getWorld(), rand);
 
                 if (spawn != null) {
-                    if (spawn.getWorld() != ((WorldServer) this).getWorld()) {
+                    if (spawn.getWorld() != this.getWorld()) {
                         throw new IllegalStateException("Cannot set spawn point for " + this.worldData.getName() + " to be in another world (" + spawn.getWorld().getName() + ")");
                     } else {
                         this.worldData.setSpawn(spawn);
@@ -975,10 +960,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
             this.chunkProvider.saveChunks(flag, iprogressupdate);
             // CraftBukkit - ArrayList -> Collection
             Collection arraylist = this.chunkProviderServer.a();
-            Iterator iterator = arraylist.iterator();
 
-            while (iterator.hasNext()) {
-                Chunk chunk = (Chunk) iterator.next();
+            for (Object value : arraylist) {
+                Chunk chunk = (Chunk) value;
 
                 if (chunk != null && !this.manager.a(chunk.locX, chunk.locZ)) {
                     this.chunkProviderServer.queueUnload(chunk.locX, chunk.locZ);
@@ -1020,8 +1004,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
         Entity[] aentity = entity.aB();
 
         if (aentity != null) {
-            for (int i = 0; i < aentity.length; ++i) {
-                this.entitiesById.a(aentity[i].getId(), aentity[i]);
+            for (Entity value : aentity) {
+                this.entitiesById.a(value.getId(), value);
             }
         }
 
@@ -1034,8 +1018,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
         Entity[] aentity = entity.aB();
 
         if (aentity != null) {
-            for (int i = 0; i < aentity.length; ++i) {
-                this.entitiesById.d(aentity[i].getId());
+            for (Entity value : aentity) {
+                this.entitiesById.d(value.getId());
             }
         }
 
@@ -1081,13 +1065,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
             explosion.clearBlocks();
         }
 
-        Iterator iterator = this.players.iterator();
-
-        while (iterator.hasNext()) {
-            EntityHuman entityhuman = (EntityHuman) iterator.next();
-
+        for (EntityHuman entityhuman : this.players) {
             if (entityhuman.e(d0, d1, d2) < 4096.0D) {
-                ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutExplosion(d0, d1, d2, f, explosion.getBlocks(), (Vec3D) explosion.b().get(entityhuman)));
+                ((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutExplosion(d0, d1, d2, f, explosion.getBlocks(), explosion.b().get(entityhuman)));
             }
         }
 
@@ -1116,14 +1096,11 @@ public class WorldServer extends World implements IAsyncTaskHandler {
             int i = this.T;
 
             this.T ^= 1;
-            Iterator iterator = this.S[i].iterator();
-
-            while (iterator.hasNext()) {
-                BlockActionData blockactiondata = (BlockActionData) iterator.next();
 
+            for (BlockActionData blockactiondata : this.S[i]) {
                 if (this.a(blockactiondata)) {
                     // CraftBukkit - this.worldProvider.dimension -> this.dimension
-                    this.server.getPlayerList().sendPacketNearby((double) blockactiondata.a().getX(), (double) blockactiondata.a().getY(), (double) blockactiondata.a().getZ(), 64.0D, dimension, new PacketPlayOutBlockAction(blockactiondata.a(), blockactiondata.d(), blockactiondata.b(), blockactiondata.c()));
+                    this.server.getPlayerList().sendPacketNearby(blockactiondata.a().getX(), blockactiondata.a().getY(), blockactiondata.a().getZ(), 64.0D, dimension, new PacketPlayOutBlockAction(blockactiondata.a(), blockactiondata.d(), blockactiondata.b(), blockactiondata.c()));
                 }
             }
 
@@ -1135,7 +1112,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
     private boolean a(BlockActionData blockactiondata) {
         IBlockData iblockdata = this.getType(blockactiondata.a());
 
-        return iblockdata.getBlock() == blockactiondata.d() ? iblockdata.getBlock().a(this, blockactiondata.a(), iblockdata, blockactiondata.b(), blockactiondata.c()) : false;
+        return iblockdata.getBlock() == blockactiondata.d() && iblockdata.getBlock().a(this, blockactiondata.a(), iblockdata, blockactiondata.b(), blockactiondata.c());
     }
 
     public void saveLevel() {
@@ -1168,15 +1145,15 @@ public class WorldServer extends World implements IAsyncTaskHandler {
         // */
         if (flag != this.S()) {
             // Only send weather packets to those affected
-            for (int i = 0; i < this.players.size(); ++i) {
-                if (((EntityPlayer) this.players.get(i)).world == this) {
-                    ((EntityPlayer) this.players.get(i)).setPlayerWeather((!flag ? WeatherType.DOWNFALL : WeatherType.CLEAR), false);
+            for (EntityHuman player : this.players) {
+                if (player.world == this) {
+                    ((EntityPlayer) player).setPlayerWeather((!flag ? WeatherType.DOWNFALL : WeatherType.CLEAR), false);
                 }
             }
         }
-        for (int i = 0; i < this.players.size(); ++i) {
-            if (((EntityPlayer) this.players.get(i)).world == this) {
-                ((EntityPlayer) this.players.get(i)).updateWeather(this.o, this.p, this.q, this.r);
+        for (EntityHuman player : this.players) {
+            if (player.world == this) {
+                ((EntityPlayer) player).updateWeather(this.o, this.p, this.q, this.r);
             }
         }
         // CraftBukkit end
@@ -1216,9 +1193,10 @@ public class WorldServer extends World implements IAsyncTaskHandler {
         // CraftBukkit end
         PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(enumparticle, flag, (float) d0, (float) d1, (float) d2, (float) d3, (float) d4, (float) d5, (float) d6, i, aint);
 
-        for (int j = 0; j < this.players.size(); ++j) {
-            EntityPlayer entityplayer = (EntityPlayer) this.players.get(j);
-            if (sender != null && !entityplayer.getBukkitEntity().canSee(sender.getBukkitEntity())) continue; // CraftBukkit
+        for (EntityHuman player : this.players) {
+            EntityPlayer entityplayer = (EntityPlayer) player;
+            if (sender != null && !entityplayer.getBukkitEntity().canSee(sender.getBukkitEntity()))
+                continue; // CraftBukkit
             BlockPosition blockposition = entityplayer.getChunkCoordinates();
             double d7 = blockposition.c(d0, d1, d2);
 
@@ -1230,7 +1208,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
     }
 
     public Entity getEntity(UUID uuid) {
-        return (Entity) this.entitiesByUUID.get(uuid);
+        return this.entitiesByUUID.get(uuid);
     }
 
     public ListenableFuture postToMainThread(Runnable runnable) {
diff --git a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/BlockStateRegistry.java b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/BlockStateRegistry.java
index 5678ed3..ee29dd0 100644
--- a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/BlockStateRegistry.java
+++ b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/BlockStateRegistry.java
@@ -1,8 +1,5 @@
 package net.techcable.tacospigot;
 
-import gnu.trove.map.TObjectIntMap;
-import gnu.trove.map.hash.TObjectIntHashMap;
-
 import java.util.Arrays;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
diff --git a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/HopperPusher.java b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/HopperPusher.java
index 21d5a11..214ec08 100644
--- a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/HopperPusher.java
+++ b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/HopperPusher.java
@@ -9,7 +9,7 @@ import net.minecraft.server.World;
 
 public interface HopperPusher {
 
-    public default TileEntityHopper findHopper() {
+    default TileEntityHopper findHopper() {
         BlockPosition pos = new BlockPosition(getX(), getY(), getZ());
         int startX = pos.getX() - 1;
         int endX = pos.getX() + 1;
@@ -36,29 +36,29 @@ public interface HopperPusher {
         return null;
     }
 
-    public boolean acceptItem(TileEntityHopper hopper);
+    boolean acceptItem(TileEntityHopper hopper);
 
-    public default boolean tryPutInHopper() {
+    default boolean tryPutInHopper() {
         if (!getWorld().tacoSpigotConfig.isHopperPushBased) return false;
         TileEntityHopper hopper = findHopper();
         return hopper != null && hopper.canAcceptItems() && acceptItem(hopper);
     }
 
-    public AxisAlignedBB getBoundingBox();
+    AxisAlignedBB getBoundingBox();
 
-    public World getWorld();
+    World getWorld();
 
     // Default implementations for entities
 
-    public default double getX() {
+    default double getX() {
         return ((Entity) this).locX;
     }
 
-    public default double getY() {
+    default double getY() {
         return ((Entity) this).locY;
     }
 
-    public default double getZ() {
+    default double getZ() {
         return ((Entity) this).locZ;
     }
 
diff --git a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/ImmutableArrayMap.java b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/ImmutableArrayMap.java
index ab6725c..d1f6ad0 100644
--- a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/ImmutableArrayMap.java
+++ b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/ImmutableArrayMap.java
@@ -149,8 +149,7 @@ public class ImmutableArrayMap extends AbstractMap implements Map {
-    public int getId(T t);
+    int getId(T t);
 }
diff --git a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/TacoSpigotConfig.java b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/TacoSpigotConfig.java
index c0a7160..45ed786 100644
--- a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/TacoSpigotConfig.java
+++ b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/TacoSpigotConfig.java
@@ -5,15 +5,10 @@ import java.io.IOException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
 import java.util.logging.Level;
 
-import net.minecraft.server.MinecraftServer;
-
 import org.bukkit.Bukkit;
-import org.bukkit.command.Command;
 import org.bukkit.configuration.InvalidConfigurationException;
 import org.bukkit.configuration.file.YamlConfiguration;
 
@@ -34,7 +29,7 @@ public class TacoSpigotConfig {
         try {
             System.out.println("Loading TacoSpigot config from " + configFile.getName());
             config.load(CONFIG_FILE);
-        } catch (IOException ex) {
+        } catch (IOException ignored) {
         } catch (InvalidConfigurationException ex) {
             Bukkit.getLogger().log(Level.SEVERE, "Could not load taco.yml, please correct your syntax errors", ex);
             throw Throwables.propagate(ex);
@@ -96,7 +91,7 @@ public class TacoSpigotConfig {
 
     private static  List getList(String path, T def) {
         config.addDefault(path, def);
-        return (List) config.getList(path, config.getList(path));
+        return config.getList(path, config.getList(path));
     }
 
     private static String getString(String path, String def) {
diff --git a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/TacoSpigotWorldConfig.java b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/TacoSpigotWorldConfig.java
index 8c1f1a7..f6975ff 100644
--- a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/TacoSpigotWorldConfig.java
+++ b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/TacoSpigotWorldConfig.java
@@ -56,7 +56,7 @@ public class TacoSpigotWorldConfig {
 
     private  List getList(String path, T def) {
         config.addDefault("world-settings.default." + path, def);
-        return (List) config.getList("world-settings." + worldName + "." + path, config.getList("world-settings.default." + path));
+        return config.getList("world-settings." + worldName + "." + path, config.getList("world-settings.default." + path));
     }
 
     private String getString(String path, String def) {
diff --git a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/function/ObjIntFunction.java b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/function/ObjIntFunction.java
index b5adb4e..8f1ba38 100644
--- a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/function/ObjIntFunction.java
+++ b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/function/ObjIntFunction.java
@@ -2,5 +2,5 @@ package net.techcable.tacospigot.function;
 
 @FunctionalInterface
 public interface ObjIntFunction {
-    public R apply(T t, int i);
+    R apply(T t, int i);
 }
diff --git a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/utils/BlockHelper.java b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/utils/BlockHelper.java
index e98fa4d..b263319 100644
--- a/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/utils/BlockHelper.java
+++ b/TacoSpigot-Server/src/main/java/net/techcable/tacospigot/utils/BlockHelper.java
@@ -1,16 +1,7 @@
 package net.techcable.tacospigot.utils;
 
-import java.util.AbstractSet;
-import java.util.Iterator;
-import java.util.Spliterator;
-import java.util.Spliterators;
 import java.util.function.BiConsumer;
 import java.util.function.BiPredicate;
-import java.util.stream.Stream;
-import java.util.stream.StreamSupport;
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.AbstractIterator;
 
 import net.minecraft.server.Block;
 import net.minecraft.server.BlockPosition;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index 888a520..36e45b8 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -51,7 +51,7 @@ public class CraftChunk implements Chunk {
             c = worldServer.getChunkAt(x, z);
 
             if (!(c instanceof EmptyChunk)) {
-                weakChunk = new WeakReference(c);
+                weakChunk = new WeakReference<>(c);
             }
         }
 
@@ -176,7 +176,7 @@ public class CraftChunk implements Chunk {
                 // Copy base IDs
                 for (int j = 0; j < 4096; j++) {
                     if (baseids[j] == 0) continue;
-                    IBlockData blockData = (IBlockData) net.minecraft.server.Block.d.a(baseids[j]);
+                    IBlockData blockData = net.minecraft.server.Block.d.a(baseids[j]);
                     if (blockData == null) continue;
                     blockids[j] = (short) net.minecraft.server.Block.getId(blockData.getBlock());
                     int data = blockData.getBlock().toLegacyData(blockData);
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java
index 7a8ea3b..555830f 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit;
 
 import net.minecraft.server.IpBanEntry;
 import net.minecraft.server.IpBanList;
-import net.minecraft.server.MinecraftServer;
 
 import java.io.IOException;
 import java.util.Date;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java
index 80832f7..bd2171f 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java
@@ -7,7 +7,6 @@ import java.util.Set;
 
 import net.minecraft.server.IpBanEntry;
 import net.minecraft.server.IpBanList;
-import net.minecraft.server.MinecraftServer;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.Validate;
 
@@ -26,7 +25,7 @@ public class CraftIpBanList implements org.bukkit.BanList {
     public org.bukkit.BanEntry getBanEntry(String target) {
         Validate.notNull(target, "Target cannot be null");
 
-        IpBanEntry entry = (IpBanEntry) list.get(target);
+        IpBanEntry entry = list.get(target);
         if (entry == null) {
             return null;
         }
@@ -57,7 +56,7 @@ public class CraftIpBanList implements org.bukkit.BanList {
     public Set getBanEntries() {
         ImmutableSet.Builder builder = ImmutableSet.builder();
         for (String target : list.getEntries()) {
-            builder.add(new CraftIpBanEntry(target, (IpBanEntry) list.get(target), list));
+            builder.add(new CraftIpBanEntry(target, list.get(target), list));
         }
 
         return builder.build();
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
index 4521786..a7ab893 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
@@ -7,7 +7,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 
-import net.minecraft.server.EntityPlayer;
 import net.minecraft.server.NBTTagCompound;
 import net.minecraft.server.WorldNBTStorage;
 
@@ -122,7 +121,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
     }
 
     public Map serialize() {
-        Map result = new LinkedHashMap();
+        Map result = new LinkedHashMap<>();
 
         result.put("UUID", profile.getId().toString());
 
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java
index 3c6f922..ba20023 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java
@@ -3,7 +3,6 @@ package org.bukkit.craftbukkit;
 import com.mojang.authlib.GameProfile;
 import net.minecraft.server.GameProfileBanEntry;
 import net.minecraft.server.GameProfileBanList;
-import net.minecraft.server.MinecraftServer;
 
 import java.io.IOException;
 import java.util.Date;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java
index 84a1f9c..a227e49 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java
@@ -33,7 +33,7 @@ public class CraftProfileBanList implements org.bukkit.BanList {
             return null;
         }
 
-        GameProfileBanEntry entry = (GameProfileBanEntry) list.get(profile);
+        GameProfileBanEntry entry = list.get(profile);
         if (entry == null) {
             return null;
         }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index dca53b7..ff2626c 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -70,7 +70,6 @@ import org.bukkit.event.inventory.InventoryType;
 import org.bukkit.event.player.PlayerChatTabCompleteEvent;
 import org.bukkit.event.world.WorldInitEvent;
 import org.bukkit.event.world.WorldLoadEvent;
-import org.bukkit.event.world.WorldSaveEvent;
 import org.bukkit.event.world.WorldUnloadEvent;
 import org.bukkit.generator.ChunkGenerator;
 import org.bukkit.help.HelpMap;
@@ -137,7 +136,7 @@ public final class CraftServer implements Server {
     private final PluginManager pluginManager = new SimplePluginManager(this, commandMap);
     protected final MinecraftServer console;
     protected final DedicatedPlayerList playerList;
-    private final Map worlds = new LinkedHashMap();
+    private final Map worlds = new LinkedHashMap<>();
     private YamlConfiguration configuration;
     private YamlConfiguration commandsConfiguration;
     // KigPaper start - CVE-2017-18640
@@ -181,12 +180,7 @@ public final class CraftServer implements Server {
         loaderOptions.setMaxAliasesForCollections(32); // KigPaper - CVE-2017-18640
         this.console = console;
         this.playerList = (DedicatedPlayerList) playerList;
-        this.playerView = Collections.unmodifiableList(Lists.transform(playerList.players, new Function() {
-            @Override
-            public CraftPlayer apply(EntityPlayer player) {
-                return player.getBukkitEntity();
-            }
-        }));
+        this.playerView = Collections.unmodifiableList(Lists.transform(playerList.players, EntityPlayer::getBukkitEntity));
         this.serverVersion = CraftServer.class.getPackage().getImplementationVersion();
         online.value = console.getPropertyManager().getBoolean("online-mode", true);
 
@@ -226,7 +220,7 @@ public final class CraftServer implements Server {
         if (legacyAlias != null) {
             ConfigurationSection aliases = commandsConfiguration.createSection("aliases");
             for (String key : legacyAlias.getKeys(false)) {
-                ArrayList commands = new ArrayList();
+                ArrayList commands = new ArrayList<>();
 
                 if (legacyAlias.isList(key)) {
                     for (String command : legacyAlias.getStringList(key)) {
@@ -462,7 +456,7 @@ public final class CraftServer implements Server {
     public List matchPlayer(String partialName) {
         Validate.notNull(partialName, "PartialName cannot be null");
 
-        List matchedPlayers = new ArrayList();
+        List matchedPlayers = new ArrayList<>();
 
         for (Player iterPlayer : this.getOnlinePlayers()) {
             String iterPlayerName = iterPlayer.getName();
@@ -610,7 +604,7 @@ public final class CraftServer implements Server {
 
     @Override
     public List getWorlds() {
-        return new ArrayList(worlds.values());
+        return new ArrayList<>(worlds.values());
     }
 
     public DedicatedPlayerList getHandle() {
@@ -751,7 +745,7 @@ public final class CraftServer implements Server {
         while (pollCount < 50 && getScheduler().getActiveWorkers().size() > 0) {
             try {
                 Thread.sleep(50);
-            } catch (InterruptedException e) {}
+            } catch (InterruptedException ignored) {}
             pollCount++;
         }
 
@@ -804,9 +798,9 @@ public final class CraftServer implements Server {
         Map> perms;
 
         try {
-            perms = (Map>) yaml.load(stream);
+            perms = yaml.load(stream);
         } catch (MarkedYAMLException ex) {
-            getLogger().log(Level.WARNING, "Server permissions file " + file + " is not valid YAML: " + ex.toString());
+            getLogger().log(Level.WARNING, "Server permissions file " + file + " is not valid YAML: " + ex);
             return;
         } catch (Throwable ex) {
             getLogger().log(Level.WARNING, "Server permissions file " + file + " is not valid YAML.", ex);
@@ -814,7 +808,7 @@ public final class CraftServer implements Server {
         } finally {
             try {
                 stream.close();
-            } catch (IOException ex) {}
+            } catch (IOException ignored) {}
         }
 
         if (perms == null) {
@@ -1159,7 +1153,7 @@ public final class CraftServer implements Server {
     public List getRecipesFor(ItemStack result) {
         Validate.notNull(result, "Result cannot be null");
 
-        List results = new ArrayList();
+        List results = new ArrayList<>();
         Iterator iter = recipeIterator();
         while (iter.hasNext()) {
             Recipe recipe = iter.next();
@@ -1196,7 +1190,7 @@ public final class CraftServer implements Server {
     @Override
     public Map getCommandAliases() {
         ConfigurationSection section = commandsConfiguration.getConfigurationSection("aliases");
-        Map result = new LinkedHashMap();
+        Map result = new LinkedHashMap<>();
 
         if (section != null) {
             for (String key : section.getKeys(false)) {
@@ -1208,7 +1202,7 @@ public final class CraftServer implements Server {
                     commands = ImmutableList.of(section.getString(key));
                 }
 
-                result.put(key, commands.toArray(new String[commands.size()]));
+                result.put(key, commands.toArray(new String[0]));
             }
         }
 
@@ -1410,7 +1404,7 @@ public final class CraftServer implements Server {
     @Override
     @SuppressWarnings("unchecked")
     public Set getIPBans() {
-        return new HashSet(Arrays.asList(playerList.getIPBans().getEntries()));
+        return new HashSet<>(Arrays.asList(playerList.getIPBans().getEntries()));
     }
 
     @Override
@@ -1429,7 +1423,7 @@ public final class CraftServer implements Server {
 
     @Override
     public Set getBannedPlayers() {
-        Set result = new HashSet();
+        Set result = new HashSet<>();
 
         for (JsonListEntry entry : playerList.getProfileBans().getValues()) {
             result.add(getOfflinePlayer((GameProfile) entry.getKey()));
@@ -1459,7 +1453,7 @@ public final class CraftServer implements Server {
 
     @Override
     public Set getWhitelistedPlayers() {
-        Set result = new LinkedHashSet();
+        Set result = new LinkedHashSet<>();
 
         for (JsonListEntry entry : playerList.getWhitelist().getValues()) {
             result.add(getOfflinePlayer((GameProfile) entry.getKey()));
@@ -1470,7 +1464,7 @@ public final class CraftServer implements Server {
 
     @Override
     public Set getOperators() {
-        Set result = new HashSet();
+        Set result = new HashSet<>();
 
         for (JsonListEntry entry : playerList.getOPs().getValues()) {
             result.add(getOfflinePlayer((GameProfile) entry.getKey()));
@@ -1532,7 +1526,7 @@ public final class CraftServer implements Server {
     public OfflinePlayer[] getOfflinePlayers() {
         WorldNBTStorage storage = (WorldNBTStorage) console.worlds.get(0).getDataManager();
         String[] files = storage.getPlayerDir().list(new DatFileFilter());
-        Set players = new HashSet();
+        Set players = new HashSet<>();
 
         for (String file : files) {
             try {
@@ -1544,7 +1538,7 @@ public final class CraftServer implements Server {
 
         players.addAll(getOnlinePlayers());
 
-        return players.toArray(new OfflinePlayer[players.size()]);
+        return players.toArray(new OfflinePlayer[0]);
     }
 
     @Override
@@ -1563,7 +1557,7 @@ public final class CraftServer implements Server {
 
     @Override
     public Set getListeningPluginChannels() {
-        Set result = new HashSet();
+        Set result = new HashSet<>();
 
         for (Player player : getOnlinePlayers()) {
             result.addAll(player.getListeningPluginChannels());
@@ -1697,7 +1691,7 @@ public final class CraftServer implements Server {
     // PaperSpigot end
 
     public List tabCompleteChat(Player player, String message) {
-        List completions = new ArrayList();
+        List completions = new ArrayList<>();
         PlayerChatTabCompleteEvent event = new PlayerChatTabCompleteEvent(player, message, completions);
         String token = event.getLastToken();
         for (Player p : getOnlinePlayers()) {
@@ -1715,7 +1709,7 @@ public final class CraftServer implements Server {
                 it.remove();
             }
         }
-        Collections.sort(completions, String.CASE_INSENSITIVE_ORDER);
+        completions.sort(String.CASE_INSENSITIVE_ORDER);
         return completions;
     }
 
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
index 3341c99..84b42f1 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
@@ -119,7 +119,7 @@ public class CraftStatistic {
     }
 
     public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) {
-        MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.eggInfo.get(Integer.valueOf(entity.getTypeId()));
+        MonsterEggInfo monsteregginfo = EntityTypes.eggInfo.get((int) entity.getTypeId());
 
         if (monsteregginfo != null) {
             return monsteregginfo.killEntityStatistic;
@@ -135,11 +135,11 @@ public class CraftStatistic {
     public static Material getMaterialFromStatistic(net.minecraft.server.Statistic statistic) {
         String statisticString = statistic.name;
         String val = statisticString.substring(statisticString.lastIndexOf(".") + 1);
-        Item item = (Item) Item.REGISTRY.get(new MinecraftKey(val));
+        Item item = Item.REGISTRY.get(new MinecraftKey(val));
         if (item != null) {
             return Material.getMaterial(Item.getId(item));
         }
-        Block block = (Block) Block.REGISTRY.get(new MinecraftKey(val));
+        Block block = Block.REGISTRY.get(new MinecraftKey(val));
         if (block != null) {
             return Material.getMaterial(Block.getId(block));
         }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ff0ec00..ad46b58 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -35,7 +35,6 @@ import org.bukkit.craftbukkit.block.CraftBlock;
 import org.bukkit.craftbukkit.block.CraftBlockState;
 import org.bukkit.craftbukkit.entity.*;
 import org.bukkit.craftbukkit.inventory.CraftItemStack;
-import org.bukkit.craftbukkit.metadata.BlockMetadataStore;
 import org.bukkit.craftbukkit.metadata.SpecializedBlockMetadataStore;
 import org.bukkit.craftbukkit.util.CraftMagicNumbers;
 import org.bukkit.craftbukkit.util.LongHash;
@@ -47,8 +46,6 @@ import org.bukkit.entity.minecart.PoweredMinecart;
 import org.bukkit.entity.minecart.SpawnerMinecart;
 import org.bukkit.entity.minecart.StorageMinecart;
 import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
-import org.bukkit.event.weather.ThunderChangeEvent;
-import org.bukkit.event.weather.WeatherChangeEvent;
 import org.bukkit.event.world.SpawnChangeEvent;
 import org.bukkit.generator.BlockPopulator;
 import org.bukkit.generator.ChunkGenerator;
@@ -67,7 +64,7 @@ public class CraftWorld implements World {
     private Environment environment;
     private final CraftServer server = (CraftServer) Bukkit.getServer();
     private final ChunkGenerator generator;
-    private final List populators = new ArrayList();
+    private final List populators = new ArrayList<>();
     // KigPaper start
     //private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this);
     private final MetadataStore blockMetadata = new SpecializedBlockMetadataStore(this);
@@ -155,12 +152,7 @@ public class CraftWorld implements World {
     // PaperSpigot start - Async chunk load API
     public void getChunkAtAsync(final int x, final int z, final ChunkLoadCallback callback) {
         final ChunkProviderServer cps = this.world.chunkProviderServer;
-        cps.getChunkAt(x, z, new Runnable() {
-            @Override
-            public void run() {
-                callback.onLoad(cps.getChunkAt(x, z).bukkitChunk);
-            }
-        });
+        cps.getChunkAt(x, z, () -> callback.onLoad(cps.getChunkAt(x, z).bukkitChunk));
     }
     public void getChunkAtAsync(Block block, ChunkLoadCallback callback) {
         getChunkAtAsync(block.getX() >> 4, block.getZ() >> 4, callback);
@@ -461,22 +453,22 @@ public class CraftWorld implements World {
             break;
         case JUNGLE:
             IBlockData iblockdata1 = Blocks.LOG.getBlockData().set(BlockLog1.VARIANT, BlockWood.EnumLogVariant.JUNGLE);
-            IBlockData iblockdata2 = Blocks.LEAVES.getBlockData().set(BlockLeaves1.VARIANT, BlockWood.EnumLogVariant.JUNGLE).set(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
+            IBlockData iblockdata2 = Blocks.LEAVES.getBlockData().set(BlockLeaves1.VARIANT, BlockWood.EnumLogVariant.JUNGLE).set(BlockLeaves.CHECK_DECAY, Boolean.FALSE);
             gen = new WorldGenJungleTree(true, 10, 20, iblockdata1, iblockdata2); // Magic values as in BlockSapling
             break;
         case SMALL_JUNGLE:
             iblockdata1 = Blocks.LOG.getBlockData().set(BlockLog1.VARIANT, BlockWood.EnumLogVariant.JUNGLE);
-            iblockdata2 = Blocks.LEAVES.getBlockData().set(BlockLeaves1.VARIANT, BlockWood.EnumLogVariant.JUNGLE).set(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
+            iblockdata2 = Blocks.LEAVES.getBlockData().set(BlockLeaves1.VARIANT, BlockWood.EnumLogVariant.JUNGLE).set(BlockLeaves.CHECK_DECAY, Boolean.FALSE);
             gen = new WorldGenTrees(true, 4 + rand.nextInt(7), iblockdata1, iblockdata2, false);
             break;
         case COCOA_TREE:
             iblockdata1 = Blocks.LOG.getBlockData().set(BlockLog1.VARIANT, BlockWood.EnumLogVariant.JUNGLE);
-            iblockdata2 = Blocks.LEAVES.getBlockData().set(BlockLeaves1.VARIANT, BlockWood.EnumLogVariant.JUNGLE).set(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
+            iblockdata2 = Blocks.LEAVES.getBlockData().set(BlockLeaves1.VARIANT, BlockWood.EnumLogVariant.JUNGLE).set(BlockLeaves.CHECK_DECAY, Boolean.FALSE);
             gen = new WorldGenTrees(true, 4 + rand.nextInt(7), iblockdata1, iblockdata2, true);
             break;
         case JUNGLE_BUSH:
             iblockdata1 = Blocks.LOG.getBlockData().set(BlockLog1.VARIANT, BlockWood.EnumLogVariant.JUNGLE);
-            iblockdata2 = Blocks.LEAVES.getBlockData().set(BlockLeaves1.VARIANT, BlockWood.EnumLogVariant.OAK).set(BlockLeaves.CHECK_DECAY, Boolean.valueOf(false));
+            iblockdata2 = Blocks.LEAVES.getBlockData().set(BlockLeaves1.VARIANT, BlockWood.EnumLogVariant.OAK).set(BlockLeaves.CHECK_DECAY, Boolean.FALSE);
             gen = new WorldGenGroundBush(iblockdata1, iblockdata2);
             break;
         case RED_MUSHROOM:
@@ -675,7 +667,7 @@ public class CraftWorld implements World {
     }
 
     public List getEntities() {
-        List list = new ArrayList();
+        List list = new ArrayList<>();
 
         for (Object o : world.entityList) {
             if (o instanceof net.minecraft.server.Entity) {
@@ -693,7 +685,7 @@ public class CraftWorld implements World {
     }
 
     public List getLivingEntities() {
-        List list = new ArrayList();
+        List list = new ArrayList<>();
 
         for (Object o : world.entityList) {
             if (o instanceof net.minecraft.server.Entity) {
@@ -718,7 +710,7 @@ public class CraftWorld implements World {
 
     @SuppressWarnings("unchecked")
     public  Collection getEntitiesByClass(Class clazz) {
-        Collection list = new ArrayList();
+        Collection list = new ArrayList<>();
 
         for (Object entity: world.entityList) {
             if (entity instanceof net.minecraft.server.Entity) {
@@ -740,7 +732,7 @@ public class CraftWorld implements World {
     }
 
     public Collection getEntitiesByClasses(Class... classes) {
-        Collection list = new ArrayList();
+        Collection list = new ArrayList<>();
 
         for (Object entity: world.entityList) {
             if (entity instanceof net.minecraft.server.Entity) {
@@ -772,7 +764,7 @@ public class CraftWorld implements World {
 
         AxisAlignedBB bb = new AxisAlignedBB(location.getX() - x, location.getY() - y, location.getZ() - z, location.getX() + x, location.getY() + y, location.getZ() + z);
         List entityList = getHandle().a((net.minecraft.server.Entity) null, bb, null); // PAIL : rename
-        List bukkitEntityList = new ArrayList(entityList.size());
+        List bukkitEntityList = new ArrayList<>(entityList.size());
         for (Object entity : entityList) {
             bukkitEntityList.add(((net.minecraft.server.Entity) entity).getBukkitEntity());
         }
@@ -780,7 +772,7 @@ public class CraftWorld implements World {
     }
 
     public List getPlayers() {
-        List list = new ArrayList(world.players.size());
+        List list = new ArrayList<>(world.players.size());
 
         for (EntityHuman human : world.players) {
             HumanEntity bukkitEntity = human.getBukkitEntity();
@@ -1116,7 +1108,7 @@ public class CraftWorld implements World {
                 if (nmsBlock.getMaterial().isBuildable() || BlockDiodeAbstract.d(nmsBlock)) {
                     boolean taken = false;
                     AxisAlignedBB bb = EntityHanging.calculateBoundingBox(pos,CraftBlock.blockFaceToNotch(dir).opposite(),width,height);
-                    List list = (List) world.getEntities(null, bb);
+                    List list = world.getEntities(null, bb);
                     for (Iterator it = list.iterator(); !taken && it.hasNext();) {
                         net.minecraft.server.Entity e = it.next();
                         if (e instanceof EntityHanging) {
@@ -1178,7 +1170,7 @@ public class CraftWorld implements World {
         Preconditions.checkArgument(entity != null, "Cannot spawn null entity");
 
         if (entity instanceof EntityInsentient) {
-            ((EntityInsentient) entity).prepare(getHandle().E(new BlockPosition(entity)), (GroupDataEntity) null);
+            ((EntityInsentient) entity).prepare(getHandle().E(new BlockPosition(entity)), null);
         }
 
         world.addEntity(entity, reason);
@@ -1263,7 +1255,7 @@ public class CraftWorld implements World {
     }
 
     public File getWorldFolder() {
-        return ((WorldNBTStorage) world.getDataManager()).getDirectory();
+        return world.getDataManager().getDirectory();
     }
 
     public void sendPluginMessage(Plugin source, String channel, byte[] message) {
@@ -1275,7 +1267,7 @@ public class CraftWorld implements World {
     }
 
     public Set getListeningPluginChannels() {
-        Set result = new HashSet();
+        Set result = new HashSet<>();
 
         for (Player player : getPlayers()) {
             result.addAll(player.getListeningPluginChannels());
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
index f233b7a..623316d 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
@@ -17,7 +17,7 @@ public class CraftBanner extends CraftBlockState implements Banner {
 
     private final TileEntityBanner banner;
     private DyeColor base;
-    private List patterns = new ArrayList();
+    private List patterns = new ArrayList<>();
 
     public CraftBanner(final Block block) {
         super(block);
@@ -29,7 +29,7 @@ public class CraftBanner extends CraftBlockState implements Banner {
 
         if (banner.patterns != null) {
             for (int i = 0; i < banner.patterns.size(); i++) {
-                NBTTagCompound p = (NBTTagCompound) banner.patterns.get(i);
+                NBTTagCompound p = banner.patterns.get(i);
                 patterns.add(new Pattern(DyeColor.getByDyeData((byte) p.getInt("Color")), PatternType.getByIdentifier(p.getString("Pattern"))));
             }
         }
@@ -43,7 +43,7 @@ public class CraftBanner extends CraftBlockState implements Banner {
 
         if (banner.patterns != null) {
             for (int i = 0; i < banner.patterns.size(); i++) {
-                NBTTagCompound p = (NBTTagCompound) banner.patterns.get(i);
+                NBTTagCompound p = banner.patterns.get(i);
                 patterns.add(new Pattern(DyeColor.getByDyeData((byte) p.getInt("Color")), PatternType.getByIdentifier(p.getString("Pattern"))));
             }
         }
@@ -61,12 +61,12 @@ public class CraftBanner extends CraftBlockState implements Banner {
 
     @Override
     public List getPatterns() {
-        return new ArrayList(patterns);
+        return new ArrayList<>(patterns);
     }
 
     @Override
     public void setPatterns(List patterns) {
-        this.patterns = new ArrayList(patterns);
+        this.patterns = new ArrayList<>(patterns);
     }
 
     @Override
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 22a8055..3cac9be 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -29,8 +29,8 @@ public class CraftBlock implements Block {
     private final int x;
     private final int y;
     private final int z;
-    private static final Biome BIOME_MAPPING[];
-    private static final BiomeBase BIOMEBASE_MAPPING[];
+    private static final Biome[] BIOME_MAPPING;
+    private static final BiomeBase[] BIOMEBASE_MAPPING;
 
     public CraftBlock(CraftChunk chunk, int x, int y, int z) {
         this.x = x;
@@ -416,7 +416,7 @@ public class CraftBlock implements Block {
     }
 
     public Collection getDrops() {
-        List drops = new ArrayList();
+        List drops = new ArrayList<>();
 
         net.minecraft.server.Block block = this.getNMSBlock();
         if (block != Blocks.AIR) {
@@ -442,7 +442,7 @@ public class CraftBlock implements Block {
                         drops.add(CraftItemStack.asBukkitCopy(nmsStack));
                         // We don't want to drop cocoa blocks, we want to drop cocoa beans.
                     } else if (Blocks.COCOA == block) {
-                        int age = (Integer) block.fromLegacyData(data).get(BlockCocoa.AGE);
+                        int age = block.fromLegacyData(data).get(BlockCocoa.AGE);
                         int dropAmount = (age >= 2 ? 3 : 1);
                         for (int j = 0; j < dropAmount; ++j) {
                             drops.add(new ItemStack(Material.INK_SACK, 1, (short) 3));
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index 4a8c814..137f0be 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -14,6 +14,8 @@ import org.bukkit.metadata.MetadataValue;
 import org.bukkit.plugin.Plugin;
 
 import java.util.List;
+import java.util.Objects;
+
 import net.minecraft.server.TileEntity;
 
 public class CraftBlockState implements BlockState {
@@ -207,7 +209,7 @@ public class CraftBlockState implements BlockState {
             return false;
         }
         final CraftBlockState other = (CraftBlockState) obj;
-        if (this.world != other.world && (this.world == null || !this.world.equals(other.world))) {
+        if (!Objects.equals(this.world, other.world)) {
             return false;
         }
         if (this.x != other.x) {
@@ -222,7 +224,7 @@ public class CraftBlockState implements BlockState {
         if (this.type != other.type) {
             return false;
         }
-        if (this.data != other.data && (this.data == null || !this.data.equals(other.data))) {
+        if (!Objects.equals(this.data, other.data)) {
             return false;
         }
         return true;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java
index 69e5da4..8a6adea 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java
@@ -10,7 +10,7 @@ public class ChunkIOExecutor {
     static final int BASE_THREADS = 2; // PaperSpigot - Bumped value
     static final int PLAYERS_PER_THREAD = 50;
 
-    private static final AsynchronousExecutor instance = new AsynchronousExecutor(new ChunkIOProvider(), BASE_THREADS);
+    private static final AsynchronousExecutor instance = new AsynchronousExecutor<>(new ChunkIOProvider(), BASE_THREADS);
 
     public static Chunk syncChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z) {
         return instance.getSkipQueue(new QueuedChunk(x, z, loader, world, provider));
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 1178ad7..7a86b43 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -10,10 +10,6 @@ import org.bukkit.craftbukkit.util.AsynchronousExecutor;
 import org.bukkit.craftbukkit.util.LongHash;
 
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import net.minecraft.server.Entity;
-import net.minecraft.server.EntitySlice;
 
 class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider {
     private final AtomicInteger threadNumber = new AtomicInteger(1);
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
index 26a2fb8..b4e2fe5 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
@@ -14,7 +14,7 @@ import org.bukkit.craftbukkit.CraftServer;
 
 public class ColouredConsoleSender extends CraftConsoleCommandSender {
     private final Terminal terminal;
-    private final Map replacements = new EnumMap(ChatColor.class);
+    private final Map replacements = new EnumMap<>(ChatColor.class);
     private final ChatColor[] colors = ChatColor.values();
 
     protected ColouredConsoleSender() {
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
index db46eb0..19bfc98 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
@@ -60,16 +60,16 @@ public final class VanillaCommandWrapper extends VanillaCommand {
         Validate.notNull(args, "Arguments cannot be null");
         Validate.notNull(alias, "Alias cannot be null");
         if (location == null) { // PaperSpigot use location information if available
-            return (List) vanillaCommand.tabComplete(getListener(sender), args, new BlockPosition(0, 0, 0));
+            return vanillaCommand.tabComplete(getListener(sender), args, new BlockPosition(0, 0, 0));
         } else {
-            return (List) vanillaCommand.tabComplete(getListener(sender), args, new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
+            return vanillaCommand.tabComplete(getListener(sender), args, new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()));
         }
     }
     // PaperSpigot end
 
     public static CommandSender lastSender = null; // Nasty :(
 
-    public final int dispatchVanillaCommand(CommandSender bSender, ICommandListener icommandlistener, String[] as) {
+    public int dispatchVanillaCommand(CommandSender bSender, ICommandListener icommandlistener, String[] as) {
         // Copied from net.minecraft.server.CommandHandler
         int i = getPlayerListSize(as);
         int j = 0;
@@ -92,15 +92,12 @@ public final class VanillaCommandWrapper extends VanillaCommand {
         try {
             if (vanillaCommand.canUse(icommandlistener)) {
                 if (i > -1) {
-                    List list = ((List)PlayerSelector.getPlayers(icommandlistener, as[i], Entity.class));
+                    List list = PlayerSelector.getPlayers(icommandlistener, as[i], Entity.class);
                     String s2 = as[i];
                     
                     icommandlistener.a(CommandObjectiveExecutor.EnumCommandResult.AFFECTED_ENTITIES, list.size());
-                    Iterator iterator = list.iterator();
-
-                    while (iterator.hasNext()) {
-                        Entity entity = iterator.next();
 
+                    for (Entity entity : list) {
                         CommandSender oldSender = lastSender;
                         lastSender = bSender;
                         try {
@@ -108,7 +105,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
                             vanillaCommand.execute(icommandlistener, as);
                             j++;
                         } catch (ExceptionUsage exceptionusage) {
-                            ChatMessage chatmessage = new ChatMessage("commands.generic.usage", new Object[] { new ChatMessage(exceptionusage.getMessage(), exceptionusage.getArgs())});
+                            ChatMessage chatmessage = new ChatMessage("commands.generic.usage", new Object[]{new ChatMessage(exceptionusage.getMessage(), exceptionusage.getArgs())});
                             chatmessage.getChatModifier().setColor(EnumChatFormat.RED);
                             icommandlistener.sendMessage(chatmessage);
                         } catch (CommandException commandexception) {
@@ -144,7 +141,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
                 CommandBlockListenerAbstract listener = (CommandBlockListenerAbstract) icommandlistener;
                 MinecraftServer.LOGGER.log(Level.WARN, String.format("CommandBlock at (%d,%d,%d) failed to handle command", listener.getChunkCoordinates().getX(), listener.getChunkCoordinates().getY(), listener.getChunkCoordinates().getZ()), throwable);
             } else {
-                MinecraftServer.LOGGER.log(Level.WARN, String.format("Unknown CommandBlock failed to handle command"), throwable);
+                MinecraftServer.LOGGER.log(Level.WARN, "Unknown CommandBlock failed to handle command", throwable);
             }
         } finally {
             MinecraftServer.getServer().worldServer = prev;
@@ -175,7 +172,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
         throw new IllegalArgumentException("Cannot make " + sender + " a vanilla command listener");
     }
 
-    private int getPlayerListSize(String as[]) {
+    private int getPlayerListSize(String[] as) {
         for (int i = 0; i < as.length; i++) {
             if (vanillaCommand.isListStart(as, i) && PlayerSelector.isList(as[i])) {
                 return i;
@@ -184,11 +181,9 @@ public final class VanillaCommandWrapper extends VanillaCommand {
         return -1;
     }
 
-    public static String[] dropFirstArgument(String as[]) {
-        String as1[] = new String[as.length - 1];
-        for (int i = 1; i < as.length; i++) {
-            as1[i - 1] = as[i];
-        }
+    public static String[] dropFirstArgument(String[] as) {
+        String[] as1 = new String[as.length - 1];
+        System.arraycopy(as, 1, as1, 0, as.length - 1);
 
         return as1;
     }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java
index 30ef7d9..d834e7e 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java
@@ -12,7 +12,7 @@ import org.bukkit.conversations.ManuallyAbandonedConversationCanceller;
  */
 public class ConversationTracker {
 
-    private LinkedList conversationQueue = new LinkedList();
+    private LinkedList conversationQueue = new LinkedList<>();
 
     public synchronized boolean beginConversation(Conversation conversation) {
         if (!conversationQueue.contains(conversation)) {
@@ -43,7 +43,7 @@ public class ConversationTracker {
     public synchronized void abandonAllConversations() {
 
         LinkedList oldQueue = conversationQueue;
-        conversationQueue = new LinkedList();
+        conversationQueue = new LinkedList<>();
         for (Conversation conversation : oldQueue) {
             try {
                 conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 998cdef..f3dd35e 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1,8 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import java.util.ArrayList;
-import java.util.Collection;
+
 import java.util.List;
 import java.util.Set;
 import java.util.UUID;
@@ -14,7 +13,6 @@ import org.bukkit.Location;
 import org.bukkit.Server;
 import org.bukkit.World;
 import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.craftbukkit.CraftWorld;
 import org.bukkit.event.entity.EntityDamageEvent;
 import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
 import org.bukkit.metadata.MetadataValue;
@@ -275,7 +273,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     public List getNearbyEntities(double x, double y, double z) {
         List notchEntityList = entity.world.a(entity, entity.getBoundingBox().grow(x, y, z), null);
-        List bukkitEntityList = new java.util.ArrayList(notchEntityList.size());
+        List bukkitEntityList = new java.util.ArrayList<>(notchEntityList.size());
 
         for (Entity e : notchEntityList) {
             bukkitEntityList.add(e.getBukkitEntity());
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
index 6f0b942..c803686 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
@@ -54,7 +54,7 @@ public class CraftFireball extends AbstractProjectile implements Fireball {
         double x = direction.getX();
         double y = direction.getY();
         double z = direction.getZ();
-        double magnitude = (double) MathHelper.sqrt(x * x + y * y + z * z);
+        double magnitude = MathHelper.sqrt(x * x + y * y + z * z);
         getHandle().dirX = x / magnitude;
         getHandle().dirY = y / magnitude;
         getHandle().dirZ = z / magnitude;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java
index 411c023..f36e7ee 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java
@@ -1,9 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.server.BlockPosition;
 import net.minecraft.server.EntityHanging;
 import net.minecraft.server.EnumDirection;
-import org.bukkit.block.Block;
 import org.bukkit.block.BlockFace;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.EntityType;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 8a08bab..a07ea13 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -186,21 +186,21 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
                 break;
             case DISPENSER:
                 if (iinventory instanceof TileEntityDispenser) {
-                    getHandle().openContainer((TileEntityDispenser) iinventory);
+                    getHandle().openContainer(iinventory);
                 } else {
                     openCustomInventory(inventory, player, "minecraft:dispenser");
                 }
                 break;
             case DROPPER:
                 if (iinventory instanceof TileEntityDropper) {
-                    getHandle().openContainer((TileEntityDropper) iinventory);
+                    getHandle().openContainer(iinventory);
                 } else {
                     openCustomInventory(inventory, player, "minecraft:dropper");
                 }
                 break;
             case FURNACE:
                 if (iinventory instanceof TileEntityFurnace) {
-                    getHandle().openContainer((TileEntityFurnace) iinventory);
+                    getHandle().openContainer(iinventory);
                 } else {
                     openCustomInventory(inventory, player, "minecraft:furnace");
                 }
@@ -210,7 +210,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
                 break;
             case BREWING:
                 if (iinventory instanceof TileEntityBrewingStand) {
-                    getHandle().openContainer((TileEntityBrewingStand) iinventory);
+                    getHandle().openContainer(iinventory);
                 } else {
                     openCustomInventory(inventory, player, "minecraft:brewing_stand");
                 }
@@ -220,16 +220,16 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
                 break;
             case HOPPER:
                 if (iinventory instanceof TileEntityHopper) {
-                    getHandle().openContainer((TileEntityHopper) iinventory);
+                    getHandle().openContainer(iinventory);
                 } else if (iinventory instanceof EntityMinecartHopper) {
-                    getHandle().openContainer((EntityMinecartHopper) iinventory);
+                    getHandle().openContainer(iinventory);
                 } else {
                     openCustomInventory(inventory, player, "minecraft:hopper");
                 }
                 break;
             case BEACON:
                 if (iinventory instanceof TileEntityBeacon) {
-                    getHandle().openContainer((TileEntityBeacon) iinventory);
+                    getHandle().openContainer(iinventory);
                 } else {
                     openCustomInventory(inventory, player, "minecraft:beacon");
                 }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index c2d3866..49d6ebd 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -131,7 +131,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
         if (maxDistance > 120) {
             maxDistance = 120;
         }
-        ArrayList blocks = new ArrayList();
+        ArrayList blocks = new ArrayList<>();
         Iterator itr = new BlockIterator(this, maxDistance);
         while (itr.hasNext()) {
             Block block = itr.next();
@@ -157,7 +157,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
         if (maxDistance > 120) {
             maxDistance = 120;
         }
-        ArrayList blocks = new ArrayList();
+        ArrayList blocks = new ArrayList<>();
         Iterator itr = new BlockIterator(this, maxDistance);
         while (itr.hasNext()) {
             Block block = itr.next();
@@ -322,7 +322,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
     }
 
     public Collection getActivePotionEffects() {
-        List effects = new ArrayList();
+        List effects = new ArrayList<>();
         for (Object raw : getHandle().effects.values()) {
             if (!(raw instanceof MobEffect))
                 continue;
@@ -367,7 +367,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
                 launch = new EntityLargeFireball(world, getHandle(), direction.getX(), direction.getY(), direction.getZ());
             }
 
-            ((EntityFireball) launch).projectileSource = this;
+            launch.projectileSource = this;
             launch.setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
         }
 
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
index 03e0730..6a21ae6 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
@@ -4,7 +4,6 @@ import net.minecraft.server.Blocks;
 import net.minecraft.server.EntityMinecartAbstract;
 
 import net.minecraft.server.IBlockData;
-import org.bukkit.Material;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.util.CraftMagicNumbers;
 import org.bukkit.entity.Minecart;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 07ad9a8..0dff03b 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -12,6 +12,7 @@ import java.io.IOException;
 import java.lang.Override;
 import java.net.InetSocketAddress;
 import java.net.SocketAddress;
+import java.nio.charset.StandardCharsets;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashSet;
@@ -33,7 +34,6 @@ import org.apache.commons.lang.Validate;
 import org.apache.commons.lang.NotImplementedException;
 import org.bukkit.*;
 import org.bukkit.Achievement;
-import org.bukkit.BanList;
 import org.bukkit.Statistic;
 import org.bukkit.Material;
 import org.bukkit.Statistic.Type;
@@ -78,8 +78,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     private long lastPlayed = 0;
     private boolean hasPlayedBefore = false;
     private final ConversationTracker conversationTracker = new ConversationTracker();
-    private final Set channels = new HashSet();
-    private final Set hiddenPlayers = new HashSet();
+    private final Set channels = new HashSet<>();
+    private final Set hiddenPlayers = new HashSet<>();
     private int hash = 0;
     private double health = 20;
     private boolean scaledHealth = false;
@@ -283,7 +283,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
             name = getName();
         }
         getHandle().listName = name.equals(getName()) ? null : CraftChatMessage.fromString(name)[0];
-        for (EntityPlayer player : (List)server.getHandle().players) {
+        for (EntityPlayer player : server.getHandle().players) {
             if (player.getBukkitEntity().canSee(this)) {
                 player.playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.UPDATE_DISPLAY_NAME, getHandle()));
             }
@@ -518,7 +518,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         if (getHandle().playerConnection == null) return;
 
         RenderData data = ((CraftMapView) map).render(this);
-        Collection icons = new ArrayList();
+        Collection icons = new ArrayList<>();
         for (MapCursor cursor : data.cursors) {
             if (cursor.isVisible()) {
                 icons.add(new MapIcon(cursor.getRawType(), cursor.getX(), cursor.getY(), cursor.getDirection()));
@@ -993,7 +993,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         //remove this player from the hidden player's EntityTrackerEntry
         EntityTracker tracker = ((WorldServer) entity.world).tracker;
         EntityPlayer other = ((CraftPlayer) player).getHandle();
-        EntityTrackerEntry entry = (EntityTrackerEntry) tracker.trackedEntities.get(other.getId());
+        EntityTrackerEntry entry = tracker.trackedEntities.get(other.getId());
         if (entry != null) {
             entry.clear(getHandle());
         }
@@ -1017,7 +1017,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         if (!eSpigotFeature.SHOW_HIDDEN_PLAYERS_IN_TAB.isEnabled())
             getHandle().playerConnection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, other));
 
-        EntityTrackerEntry entry = (EntityTrackerEntry) tracker.trackedEntities.get(other.getId());
+        EntityTrackerEntry entry = tracker.trackedEntities.get(other.getId());
         if (entry != null && !entry.trackedPlayers.contains(getHandle())) {
             entry.updatePlayer(getHandle());
         }
@@ -1034,7 +1034,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public Map serialize() {
-        Map result = new LinkedHashMap();
+        Map result = new LinkedHashMap<>();
 
         result.put("name", getName());
 
@@ -1200,7 +1200,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
             for (String channel : listening) {
                 try {
-                    stream.write(channel.getBytes("UTF8"));
+                    stream.write(channel.getBytes(StandardCharsets.UTF_8));
                     stream.write((byte) 0);
                 } catch (IOException ex) {
                     Logger.getLogger(CraftPlayer.class.getName()).log(Level.SEVERE, "Could not send Plugin Channel REGISTER to " + getName(), ex);
@@ -1414,7 +1414,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
         injectScaledMaxHealth(set, true);
 
-        getHandle().getDataWatcher().watch(6, (float) getScaledHealth());
+        getHandle().getDataWatcher().watch(6, getScaledHealth());
         getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateHealth(getScaledHealth(), getHandle().getFoodData().getFoodLevel(), getHandle().getFoodData().getSaturationLevel()));
         getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateAttributes(getHandle().getId(), set));
 
@@ -1567,7 +1567,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         @Override
         public Set getHiddenPlayers()
         {
-            Set ret = new HashSet();
+            Set ret = new HashSet<>();
             for ( UUID u : hiddenPlayers )
             {
                 ret.add( getServer().getPlayer( u ) );
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
index 2f29f2f..1c5bbed 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
@@ -56,7 +56,7 @@ public abstract class CraftProjectile extends AbstractProjectile implements Proj
         }
         getHandle().shooter = ((CraftLivingEntity) shooter).getHandle();
         if (shooter instanceof CraftHumanEntity) {
-            getHandle().shooterName = ((CraftHumanEntity) shooter).getName();
+            getHandle().shooterName = shooter.getName();
         }
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java
index ee21d7b..6da373b 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java
@@ -3,7 +3,6 @@ package org.bukkit.craftbukkit.entity;
 import net.minecraft.server.EntityWaterAnimal;
 
 import org.bukkit.craftbukkit.CraftServer;
-import org.bukkit.entity.LivingEntity;
 import org.bukkit.entity.WaterMob;
 
 public class CraftWaterMob extends CraftLivingEntity implements WaterMob {
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 6adc8f6..69fe35b 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -99,8 +99,8 @@ public class CraftEventFactory {
         Block blockClicked = craftWorld.getBlockAt(clickedX, clickedY, clickedZ);
 
         boolean canBuild = true;
-        for (int i = 0; i < blockStates.size(); i++) {
-            if (!canBuild(craftWorld, player, blockStates.get(i).getX(), blockStates.get(i).getZ())) {
+        for (BlockState blockState : blockStates) {
+            if (!canBuild(craftWorld, player, blockState.getX(), blockState.getZ())) {
                 canBuild = false;
                 break;
             }
@@ -370,7 +370,7 @@ public class CraftEventFactory {
     }
 
     public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim) {
-        return callEntityDeathEvent(victim, new ArrayList(0));
+        return callEntityDeathEvent(victim, new ArrayList<>(0));
     }
 
     public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List drops) {
@@ -565,8 +565,8 @@ public class CraftEventFactory {
     private static final Function ZERO = Functions.constant(-0.0);
 
     public static EntityDamageEvent handleLivingEntityDamageEvent(Entity damagee, DamageSource source, double rawDamage, double hardHatModifier, double blockingModifier, double armorModifier, double resistanceModifier, double magicModifier, double absorptionModifier, Function hardHat, Function blocking, Function armor, Function resistance, Function magic, Function absorption) {
-        Map modifiers = new EnumMap(DamageModifier.class);
-        Map> modifierFunctions = new EnumMap>(DamageModifier.class);
+        Map modifiers = new EnumMap<>(DamageModifier.class);
+        Map> modifierFunctions = new EnumMap<>(DamageModifier.class);
         modifiers.put(DamageModifier.BASE, rawDamage);
         modifierFunctions.put(DamageModifier.BASE, ZERO);
         if (source == DamageSource.FALLING_BLOCK || source == DamageSource.ANVIL) {
@@ -598,7 +598,7 @@ public class CraftEventFactory {
             return false;
         }
 
-        final EnumMap modifiers = new EnumMap(DamageModifier.class);
+        final EnumMap modifiers = new EnumMap<>(DamageModifier.class);
         final EnumMap> functions = new EnumMap(DamageModifier.class);
 
         modifiers.put(DamageModifier.BASE, damage);
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java
index fc4bc81..600377f 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java
@@ -28,7 +28,7 @@ public class NormalChunkGenerator extends InternalChunkGenerator {
 
     @Override
     public List getDefaultPopulators(org.bukkit.World world) {
-        return new ArrayList();
+        return new ArrayList<>();
     }
 
     @Override
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java
index 2089a5f..c1533d6 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java
@@ -16,7 +16,7 @@ public class CustomIndexHelpTopic extends IndexHelpTopic {
     private final HelpMap helpMap;
 
     public CustomIndexHelpTopic(HelpMap helpMap, String name, String shortText, String permission, List futureTopics, String preamble) {
-        super(name, shortText, permission, new HashSet(), preamble);
+        super(name, shortText, permission, new HashSet<>(), preamble);
         this.helpMap = helpMap;
         this.futureTopics = futureTopics;
     }
@@ -24,7 +24,7 @@ public class CustomIndexHelpTopic extends IndexHelpTopic {
     @Override
     public String getFullText(CommandSender sender) {
         if (futureTopics != null) {
-            List topics = new LinkedList();
+            List topics = new LinkedList<>();
             for (String futureTopic : futureTopics) {
                 HelpTopic topic = helpMap.getHelpTopic(futureTopic);
                 if (topic != null) {
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java
index 60a6221..8552f50 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java
@@ -54,7 +54,7 @@ public class HelpYamlReader {
      * @return A list of general topics.
      */
     public List getGeneralTopics() {
-        List topics = new LinkedList();
+        List topics = new LinkedList<>();
         ConfigurationSection generalTopics = helpYaml.getConfigurationSection("general-topics");
         if (generalTopics != null) {
             for (String topicName : generalTopics.getKeys(false)) {
@@ -74,7 +74,7 @@ public class HelpYamlReader {
      * @return A list of index topics.
      */
     public List getIndexTopics() {
-        List topics = new LinkedList();
+        List topics = new LinkedList<>();
         ConfigurationSection indexTopics = helpYaml.getConfigurationSection("index-topics");
         if (indexTopics != null) {
             for (String topicName : indexTopics.getKeys(false)) {
@@ -95,7 +95,7 @@ public class HelpYamlReader {
      * @return A list of amendments.
      */
     public List getTopicAmendments() {
-        List amendments = new LinkedList();
+        List amendments = new LinkedList<>();
         ConfigurationSection commandTopics = helpYaml.getConfigurationSection("amended-topics");
         if (commandTopics != null) {
             for (String topicName : commandTopics.getKeys(false)) {
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java
index 7dd5afe..af954ea 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java
@@ -26,8 +26,8 @@ public class SimpleHelpMap implements HelpMap {
 
     @SuppressWarnings("unchecked")
     public SimpleHelpMap(CraftServer server) {
-        this.helpTopics = new TreeMap(HelpTopicComparator.topicNameComparatorInstance()); // Using a TreeMap for its explicit sorting on key
-        this.topicFactoryMap = new HashMap>();
+        this.helpTopics = new TreeMap<>(HelpTopicComparator.topicNameComparatorInstance()); // Using a TreeMap for its explicit sorting on key
+        this.topicFactoryMap = new HashMap<>();
         this.server = server;
         this.yaml = new HelpYamlReader(server);
 
@@ -98,7 +98,7 @@ public class SimpleHelpMap implements HelpMap {
      */
     public synchronized void initializeCommands() {
         // ** Load topics from highest to lowest priority order **
-        Set ignoredPlugins = new HashSet(yaml.getIgnoredPlugins());
+        Set ignoredPlugins = new HashSet<>(yaml.getIgnoredPlugins());
 
         // Don't load any automatic help topics if All is ignored
         if (ignoredPlugins.contains("All")) {
@@ -147,7 +147,7 @@ public class SimpleHelpMap implements HelpMap {
         }
 
         // Initialize plugin-level sub-topics
-        Map> pluginIndexes = new HashMap>();
+        Map> pluginIndexes = new HashMap<>();
         fillPluginIndexes(pluginIndexes, server.getCommandMap().getCommands());
 
         for (Map.Entry> entry : pluginIndexes.entrySet()) {
@@ -172,7 +172,7 @@ public class SimpleHelpMap implements HelpMap {
                 HelpTopic topic = getHelpTopic("/" + command.getLabel());
                 if (topic != null) {
                     if (!pluginIndexes.containsKey(pluginName)) {
-                        pluginIndexes.put(pluginName, new TreeSet(HelpTopicComparator.helpTopicComparatorInstance())); //keep things in topic order
+                        pluginIndexes.put(pluginName, new TreeSet<>(HelpTopicComparator.helpTopicComparatorInstance())); //keep things in topic order
                     }
                     pluginIndexes.get(pluginName).add(topic);
                 }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java
index 69f17db..c2855a9 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.inventory;
 
 import net.minecraft.server.RecipesFurnace;
 
-import org.bukkit.craftbukkit.util.CraftMagicNumbers;
 import org.bukkit.inventory.FurnaceRecipe;
 import org.bukkit.inventory.ItemStack;
 
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index e9a3c50..3b7a73b 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -155,7 +155,7 @@ public class CraftInventory implements Inventory {
     }
 
     public HashMap all(int materialId) {
-        HashMap slots = new HashMap();
+        HashMap slots = new HashMap<>();
 
         ItemStack[] inventory = getContents();
         for (int i = 0; i < inventory.length; i++) {
@@ -173,7 +173,7 @@ public class CraftInventory implements Inventory {
     }
 
     public HashMap all(ItemStack item) {
-        HashMap slots = new HashMap();
+        HashMap slots = new HashMap<>();
         if (item != null) {
             ItemStack[] inventory = getContents();
             for (int i = 0; i < inventory.length; i++) {
@@ -263,7 +263,7 @@ public class CraftInventory implements Inventory {
 
     public HashMap addItem(ItemStack... items) {
         Validate.noNullElements(items, "Item cannot be null");
-        HashMap leftover = new HashMap();
+        HashMap leftover = new HashMap<>();
 
         /* TODO: some optimization
          *  - Create a 'firstPartial' with a 'fromIndex'
@@ -328,7 +328,7 @@ public class CraftInventory implements Inventory {
 
     public HashMap removeItem(ItemStack... items) {
         Validate.notNull(items, "Items cannot be null");
-        HashMap leftover = new HashMap();
+        HashMap leftover = new HashMap<>();
 
         // TODO: optimization
 
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
index e99b8cc..602fffd 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
@@ -58,7 +58,7 @@ public class CraftInventoryCustom extends CraftInventory {
             Validate.notNull(title, "Title cannot be null");
             this.items = new ItemStack[size];
             this.title = title;
-            this.viewers = new ArrayList();
+            this.viewers = new ArrayList<>();
             this.owner = owner;
             this.type = InventoryType.CHEST;
         }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
index 87252ca..32aff01 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
@@ -1,6 +1,5 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.server.ITileEntityContainer;
 import net.minecraft.server.ITileInventory;
 import org.bukkit.block.DoubleChest;
 import org.bukkit.inventory.DoubleChestInventory;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 23f05f4..3e8182a 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -20,10 +20,6 @@ import org.bukkit.inventory.ItemStack;
 import org.bukkit.inventory.meta.ItemMeta;
 
 import com.google.common.collect.ImmutableMap;
-import net.minecraft.server.IChatBaseComponent.ChatSerializer;
-import net.minecraft.server.Items;
-import net.minecraft.server.NBTTagString;
-import org.bukkit.craftbukkit.util.CraftChatMessage;
 
 @DelegateDeserialization(ItemStack.class)
 public final class CraftItemStack extends ItemStack {
@@ -194,7 +190,7 @@ public final class CraftItemStack extends ItemStack {
         int size = list.size();
 
         for (int i = 0; i < size; i++) {
-            NBTTagCompound tag = (NBTTagCompound) list.get(i);
+            NBTTagCompound tag = list.get(i);
             short id = tag.getShort(ENCHANTMENTS_ID.NBT);
             if (id == ench.getId()) {
                 tag.setShort(ENCHANTMENTS_LVL.NBT, (short) level);
@@ -246,7 +242,7 @@ public final class CraftItemStack extends ItemStack {
         int size = list.size();
 
         for (int i = 0; i < size; i++) {
-            NBTTagCompound enchantment = (NBTTagCompound) list.get(i);
+            NBTTagCompound enchantment = list.get(i);
             int id = 0xffff & enchantment.getShort(ENCHANTMENTS_ID.NBT);
             if (id == ench.getId()) {
                 index = i;
@@ -293,8 +289,8 @@ public final class CraftItemStack extends ItemStack {
         ImmutableMap.Builder result = ImmutableMap.builder();
 
         for (int i = 0; i < list.size(); i++) {
-            int id = 0xffff & ((NBTTagCompound) list.get(i)).getShort(ENCHANTMENTS_ID.NBT);
-            int level = 0xffff & ((NBTTagCompound) list.get(i)).getShort(ENCHANTMENTS_LVL.NBT);
+            int id = 0xffff & list.get(i).getShort(ENCHANTMENTS_ID.NBT);
+            int level = 0xffff & list.get(i).getShort(ENCHANTMENTS_LVL.NBT);
 
             result.put(Enchantment.getById(id), level);
         }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
index 80f9ffa..d0031b6 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
@@ -23,7 +23,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
     static final ItemMetaKey PATTERN = new ItemMetaKey("Pattern", "pattern");
 
     private DyeColor base;
-    private List patterns = new ArrayList();
+    private List patterns = new ArrayList<>();
 
     CraftMetaBanner(CraftMetaItem meta) {
         super(meta);
@@ -34,7 +34,7 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
 
         CraftMetaBanner banner = (CraftMetaBanner) meta;
         base = banner.base;
-        patterns = new ArrayList(banner.patterns);
+        patterns = new ArrayList<>(banner.patterns);
     }
 
     CraftMetaBanner(NBTTagCompound tag) {
@@ -111,12 +111,12 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
 
     @Override
     public List getPatterns() {
-        return new ArrayList(patterns);
+        return new ArrayList<>(patterns);
     }
 
     @Override
     public void setPatterns(List patterns) {
-        this.patterns = new ArrayList(patterns);
+        this.patterns = new ArrayList<>(patterns);
     }
 
     @Override
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index 2463640..d458b5d 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -40,7 +40,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
 
     protected String title;
     protected String author;
-    public List pages = new ArrayList();
+    public List pages = new ArrayList<>();
     protected Integer generation;
 
     CraftMetaBook(CraftMetaItem meta) {
@@ -280,7 +280,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
     @Override
     public CraftMetaBook clone() {
         CraftMetaBook meta = (CraftMetaBook) super.clone();
-        meta.pages = new ArrayList(pages);
+        meta.pages = new ArrayList<>(pages);
         return meta;
     }
 
@@ -333,7 +333,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
         }
 
         if (hasPages()) {
-            List pagesString = new ArrayList();
+            List pagesString = new ArrayList<>();
             for (IChatBaseComponent comp : pages) {
                 pagesString.add(CraftChatMessage.fromComponent(comp));
             }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
index ae3341c..032dfe8 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
@@ -1,7 +1,5 @@
 package org.bukkit.craftbukkit.inventory;
 
-import java.util.ArrayList;
-import java.util.List;
 import java.util.Map;
 
 import net.minecraft.server.NBTTagCompound;
@@ -16,7 +14,6 @@ import com.google.common.collect.ImmutableMap.Builder;
 import net.minecraft.server.IChatBaseComponent.ChatSerializer;
 import net.minecraft.server.IChatBaseComponent;
 import net.minecraft.server.NBTTagString;
-import org.bukkit.craftbukkit.util.CraftChatMessage;
 
 @DelegateDeserialization(SerializableMeta.class)
 class CraftMetaBookSigned extends CraftMetaBook implements BookMeta {
@@ -107,8 +104,7 @@ class CraftMetaBookSigned extends CraftMetaBook implements BookMeta {
 
     @Override
     public CraftMetaBookSigned clone() {
-        CraftMetaBookSigned meta = (CraftMetaBookSigned) super.clone();
-        return meta;
+        return (CraftMetaBookSigned) super.clone();
     }
 
     @Override
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java
index 8d44e55..d631065 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java
@@ -30,7 +30,7 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage
         CraftMetaEnchantedBook that = (CraftMetaEnchantedBook) meta;
 
         if (that.hasEnchants()) {
-            this.enchantments = new HashMap(that.enchantments);
+            this.enchantments = new HashMap<>(that.enchantments);
         }
     }
 
@@ -107,7 +107,7 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage
         CraftMetaEnchantedBook meta = (CraftMetaEnchantedBook) super.clone();
 
         if (this.enchantments != null) {
-            meta.enchantments = new HashMap(this.enchantments);
+            meta.enchantments = new HashMap<>(this.enchantments);
         }
 
         return meta;
@@ -144,7 +144,7 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage
 
     public boolean addStoredEnchant(Enchantment ench, int level, boolean ignoreRestrictions) {
         if (enchantments == null) {
-            enchantments = new HashMap(4);
+            enchantments = new HashMap<>(4);
         }
 
         if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
index 5a409ae..7b7a7c2 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
@@ -69,7 +69,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
         this.power = that.power;
 
         if (that.hasEffects()) {
-            this.effects = new ArrayList(that.effects);
+            this.effects = new ArrayList<>(that.effects);
         }
     }
 
@@ -89,10 +89,10 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
         }
 
         NBTTagList fireworkEffects = fireworks.getList(EXPLOSIONS.NBT, 10);
-        List effects = this.effects = new ArrayList(fireworkEffects.size());
+        List effects = this.effects = new ArrayList<>(fireworkEffects.size());
 
         for (int i = 0; i < fireworkEffects.size(); i++) {
-            effects.add(getEffect((NBTTagCompound) fireworkEffects.get(i)));
+            effects.add(getEffect(fireworkEffects.get(i)));
         }
     }
 
@@ -189,7 +189,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
 
         List effects = this.effects;
         if (effects == null) {
-            effects = this.effects = new ArrayList();
+            effects = this.effects = new ArrayList<>();
         }
 
         for (Object obj : collection) {
@@ -318,7 +318,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
         CraftMetaFirework meta = (CraftMetaFirework) super.clone();
 
         if (this.effects != null) {
-            meta.effects = new ArrayList(this.effects);
+            meta.effects = new ArrayList<>(this.effects);
         }
 
         return meta;
@@ -327,7 +327,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
     public void addEffect(FireworkEffect effect) {
         Validate.notNull(effect, "Effect cannot be null");
         if (this.effects == null) {
-            this.effects = new ArrayList();
+            this.effects = new ArrayList<>();
         }
         this.effects.add(effect);
     }
@@ -340,7 +340,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
 
         List list = this.effects;
         if (list == null) {
-            list = this.effects = new ArrayList();
+            list = this.effects = new ArrayList<>();
         }
 
         for (FireworkEffect effect : effects) {
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index eaaa6a1..31cb63d 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -40,7 +40,6 @@ import java.io.IOException;
 import java.util.Arrays;
 import java.util.EnumSet;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Set;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -86,7 +85,6 @@ class CraftMetaItem implements ItemMeta, Repairable {
             enum To {
                 BUKKIT,
                 NBT,
-                ;
             }
             To value();
         }
@@ -153,9 +151,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
 
             try {
                 return constructor.newInstance(map);
-            } catch (final InstantiationException e) {
-                throw new AssertionError(e);
-            } catch (final IllegalAccessException e) {
+            } catch (final InstantiationException | IllegalAccessException e) {
                 throw new AssertionError(e);
             } catch (final InvocationTargetException e) {
                 throw e.getCause();
@@ -228,7 +224,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
 
     private static final Set HANDLED_TAGS = Sets.newHashSet();
 
-    private final Map unhandledTags = new HashMap();
+    private final Map unhandledTags = new HashMap<>();
 
     CraftMetaItem(CraftMetaItem meta) {
         if (meta == null) {
@@ -238,11 +234,11 @@ class CraftMetaItem implements ItemMeta, Repairable {
         this.displayName = meta.displayName;
 
         if (meta.hasLore()) {
-            this.lore = new ArrayList(meta.lore);
+            this.lore = new ArrayList<>(meta.lore);
         }
 
         if (meta.enchantments != null) { // Spigot
-            this.enchantments = new HashMap(meta.enchantments);
+            this.enchantments = new HashMap<>(meta.enchantments);
         }
 
         this.repairCost = meta.repairCost;
@@ -261,7 +257,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
 
             if (display.hasKey(LORE.NBT)) {
                 NBTTagList list = display.getList(LORE.NBT, 8);
-                lore = new ArrayList(list.size());
+                lore = new ArrayList<>(list.size());
 
                 for (int index = 0; index < list.size(); index++) {
                     String line = limit( list.getString(index), 1024 ); // Spigot
@@ -285,9 +281,9 @@ class CraftMetaItem implements ItemMeta, Repairable {
             NBTTagList nbttaglist = tag.getList(ATTRIBUTES.NBT, 10);
 
             // Spigot start
-            gnu.trove.map.hash.TObjectDoubleHashMap attributeTracker = new gnu.trove.map.hash.TObjectDoubleHashMap();
-            gnu.trove.map.hash.TObjectDoubleHashMap attributeTrackerX = new gnu.trove.map.hash.TObjectDoubleHashMap();
-            Map attributesByName = new HashMap();
+            gnu.trove.map.hash.TObjectDoubleHashMap attributeTracker = new gnu.trove.map.hash.TObjectDoubleHashMap<>();
+            gnu.trove.map.hash.TObjectDoubleHashMap attributeTrackerX = new gnu.trove.map.hash.TObjectDoubleHashMap<>();
+            Map attributesByName = new HashMap<>();
             attributeTracker.put( "generic.maxHealth", 20.0 );
             attributesByName.put( "generic.maxHealth", GenericAttributes.maxHealth );
             attributeTracker.put( "generic.followRange", 32.0 );
@@ -301,9 +297,9 @@ class CraftMetaItem implements ItemMeta, Repairable {
             NBTTagList oldList = nbttaglist;
             nbttaglist = new NBTTagList();
 
-            List op0 = new ArrayList();
-            List op1 = new ArrayList();
-            List op2 = new ArrayList();
+            List op0 = new ArrayList<>();
+            List op1 = new ArrayList<>();
+            List op2 = new ArrayList<>();
 
             for ( int i = 0; i < oldList.size(); ++i )
             {
@@ -405,7 +401,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
                 if (!(nbttaglist.get(i) instanceof NBTTagCompound)) {
                     continue;
                 }
-                NBTTagCompound nbttagcompound = (NBTTagCompound) nbttaglist.get(i);
+                NBTTagCompound nbttagcompound = nbttaglist.get(i);
 
                 if (!nbttagcompound.hasKeyOfType(ATTRIBUTES_UUID_HIGH.NBT, 99)) {
                     continue;
@@ -463,11 +459,11 @@ class CraftMetaItem implements ItemMeta, Repairable {
         }
 
         NBTTagList ench = tag.getList(key.NBT, 10);
-        Map enchantments = new HashMap(ench.size());
+        Map enchantments = new HashMap<>(ench.size());
 
         for (int i = 0; i < ench.size(); i++) {
-            int id = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_ID.NBT);
-            int level = 0xffff & ((NBTTagCompound) ench.get(i)).getShort(ENCHANTMENTS_LVL.NBT);
+            int id = 0xffff & ench.get(i).getShort(ENCHANTMENTS_ID.NBT);
+            int level = 0xffff & ench.get(i).getShort(ENCHANTMENTS_LVL.NBT);
 
             // Spigot start - skip invalid enchantments
             Enchantment e = Enchantment.getById(id);
@@ -484,7 +480,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
 
         Iterable lore = SerializableMeta.getObject(Iterable.class, map, LORE.BUKKIT, true);
         if (lore != null) {
-            safelyAdd(lore, this.lore = new ArrayList(), Integer.MAX_VALUE);
+            safelyAdd(lore, this.lore = new ArrayList<>(), Integer.MAX_VALUE);
         }
 
         enchantments = buildEnchantments(map, ENCHANTMENTS);
@@ -542,7 +538,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
             return null;
         }
 
-        Map enchantments = new HashMap(ench.size());
+        Map enchantments = new HashMap<>(ench.size());
         for (Map.Entry entry : ench.entrySet()) {
             Enchantment enchantment = Enchantment.getByName(entry.getKey().toString());
 
@@ -677,7 +673,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
 
     public boolean addEnchant(Enchantment ench, int level, boolean ignoreRestrictions) {
         if (enchantments == null) {
-            enchantments = new HashMap(4);
+            enchantments = new HashMap<>(4);
         }
 
         if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -744,7 +740,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
     }
 
     public List getLore() {
-        return this.lore == null ? null : new ArrayList(this.lore);
+        return this.lore == null ? null : new ArrayList<>(this.lore);
     }
 
     public void setLore(List lore) { // too tired to think if .clone is better
@@ -752,7 +748,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
             this.lore = null;
         } else {
             if (this.lore == null) {
-                safelyAdd(lore, this.lore = new ArrayList(lore.size()), Integer.MAX_VALUE);
+                safelyAdd(lore, this.lore = new ArrayList<>(lore.size()), Integer.MAX_VALUE);
             } else {
                 this.lore.clear();
                 safelyAdd(lore, this.lore, Integer.MAX_VALUE);
@@ -832,10 +828,10 @@ class CraftMetaItem implements ItemMeta, Repairable {
         try {
             CraftMetaItem clone = (CraftMetaItem) super.clone();
             if (this.lore != null) {
-                clone.lore = new ArrayList(this.lore);
+                clone.lore = new ArrayList<>(this.lore);
             }
             if (this.enchantments != null) {
-                clone.enchantments = new HashMap(this.enchantments);
+                clone.enchantments = new HashMap<>(this.enchantments);
             }
             clone.hideFlag = this.hideFlag;
             return clone;
@@ -875,7 +871,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
         // Spigot end
 
 
-        Set hideFlags = new HashSet();
+        Set hideFlags = new HashSet<>();
         for (ItemFlag hideFlagEnum : getItemFlags()) {
             hideFlags.add(hideFlagEnum.name());
         }
@@ -883,7 +879,7 @@ class CraftMetaItem implements ItemMeta, Repairable {
             builder.put(HIDEFLAGS.BUKKIT, hideFlags);
         }
 
-        final Map internalTags = new HashMap(unhandledTags);
+        final Map internalTags = new HashMap<>(unhandledTags);
         serializeInternal(internalTags);
         if (!internalTags.isEmpty()) {
             NBTTagCompound internal = new NBTTagCompound();
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
index 5b2d12b..26c5faf 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
@@ -37,7 +37,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
         }
         CraftMetaPotion potionMeta = (CraftMetaPotion) meta;
         if (potionMeta.hasCustomEffects()) {
-            this.customEffects = new ArrayList(potionMeta.customEffects);
+            this.customEffects = new ArrayList<>(potionMeta.customEffects);
         }
     }
 
@@ -47,7 +47,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
         if (tag.hasKey(POTION_EFFECTS.NBT)) {
             NBTTagList list = tag.getList(POTION_EFFECTS.NBT, 10);
             int length = list.size();
-            customEffects = new ArrayList(length);
+            customEffects = new ArrayList<>(length);
 
             for (int i = 0; i < length; i++) {
                 NBTTagCompound effect = list.get(i);
@@ -119,7 +119,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
     public CraftMetaPotion clone() {
         CraftMetaPotion clone = (CraftMetaPotion) super.clone();
         if (this.customEffects != null) {
-            clone.customEffects = new ArrayList(this.customEffects);
+            clone.customEffects = new ArrayList<>(this.customEffects);
         }
         return clone;
     }
@@ -152,7 +152,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
             }
         } else {
             if (customEffects == null) {
-                customEffects = new ArrayList();
+                customEffects = new ArrayList<>();
             }
             customEffects.add(effect);
             return true;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java
index 5e44966..873968c 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryWrapper.java
@@ -15,7 +15,7 @@ import org.bukkit.inventory.InventoryHolder;
 public class InventoryWrapper implements IInventory {
 
     private final Inventory inventory;
-    private final List viewers = new ArrayList();
+    private final List viewers = new ArrayList<>();
 
     public InventoryWrapper(Inventory inventory) {
         this.inventory = inventory;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCanvas.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCanvas.java
index 1c3e198..cf4ecb8 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCanvas.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCanvas.java
@@ -91,7 +91,7 @@ public class CraftMapCanvas implements MapCanvas {
                         i = j;
                         continue;
                     }
-                    catch (NumberFormatException ex) {}
+                    catch (NumberFormatException ignored) {}
                 }
             }
 
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
index 7e43bdb..49f2d1a 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
@@ -43,7 +43,7 @@ public class CraftMapRenderer extends MapRenderer {
                     continue;
                 }
 
-                MapIcon decoration = (MapIcon) worldMap.decorations.get(key);
+                MapIcon decoration = worldMap.decorations.get(key);
                 cursors.addCursor(decoration.getX(), decoration.getY(), (byte) (decoration.getRotation() & 15), decoration.getType());
             }
         }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java
index 1a150d9..23fc942 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java
@@ -17,9 +17,9 @@ import org.bukkit.map.MapView;
 
 public final class CraftMapView implements MapView {
 
-    private final Map renderCache = new HashMap();
-    private final List renderers = new ArrayList();
-    private final Map> canvases = new HashMap>();
+    private final Map renderCache = new HashMap<>();
+    private final List renderers = new ArrayList<>();
+    private final Map> canvases = new HashMap<>();
     protected final WorldMap worldMap;
 
     public CraftMapView(WorldMap worldMap) {
@@ -84,13 +84,13 @@ public final class CraftMapView implements MapView {
     }
 
     public List getRenderers() {
-        return new ArrayList(renderers);
+        return new ArrayList<>(renderers);
     }
 
     public void addRenderer(MapRenderer renderer) {
         if (!renderers.contains(renderer)) {
             renderers.add(renderer);
-            canvases.put(renderer, new HashMap());
+            canvases.put(renderer, new HashMap<>());
             renderer.initialize(this);
         }
     }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/RenderData.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/RenderData.java
index 503a31b..bb78abb 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/RenderData.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/RenderData.java
@@ -10,7 +10,7 @@ public class RenderData {
 
     public RenderData() {
         this.buffer = new byte[128 * 128];
-        this.cursors = new ArrayList();
+        this.cursors = new ArrayList<>();
     }
 
 }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java
index 6f7102f..af845a3 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java
@@ -33,7 +33,7 @@ public class BlockMetadataStore extends MetadataStoreBase implements Meta
      */
     @Override
     protected String disambiguate(Block block, String metadataKey) {
-        return Integer.toString(block.getX()) + ":" + Integer.toString(block.getY()) + ":"  + Integer.toString(block.getZ()) + ":"  + metadataKey;
+        return block.getX() + ":" + block.getY() + ":"  + block.getZ() + ":"  + metadataKey;
     }
 
     /**
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java
index bb16958..9171bc0 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java
@@ -21,7 +21,7 @@ public class CraftPotionBrewer implements PotionBrewer {
             return cache.get(damage);
 
         List mcEffects = net.minecraft.server.PotionBrewer.getEffects(damage, false);
-        List effects = new ArrayList();
+        List effects = new ArrayList<>();
         if (mcEffects == null)
             return effects;
 
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
index b8bf754..58ad20f 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
@@ -81,7 +81,7 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
         } else if (Arrow.class.isAssignableFrom(projectile)) {
             launch = new EntityArrow(world, iposition.getX(), iposition.getY(), iposition.getZ());
             ((EntityArrow) launch).fromPlayer = 1;
-            ((EntityArrow) launch).projectileSource = this;
+            launch.projectileSource = this;
         } else if (Fireball.class.isAssignableFrom(projectile)) {
             double d0 = iposition.getX() + (double) ((float) enumdirection.getAdjacentX() * 0.3F);
             double d1 = iposition.getY() + (double) ((float) enumdirection.getAdjacentY() * 0.3F);
@@ -96,7 +96,7 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
             } else if (WitherSkull.class.isAssignableFrom(projectile)) {
                 launch = new EntityWitherSkull(world);
                 launch.setPosition(d0, d1, d2);
-                double d6 = (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
+                double d6 = MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
 
                 ((EntityFireball) launch).dirX = d3 / d6 * 0.1D;
                 ((EntityFireball) launch).dirY = d4 / d6 * 0.1D;
@@ -104,21 +104,21 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
             } else {
                 launch = new EntityLargeFireball(world);
                 launch.setPosition(d0, d1, d2);
-                double d6 = (double) MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
+                double d6 = MathHelper.sqrt(d3 * d3 + d4 * d4 + d5 * d5);
 
                 ((EntityFireball) launch).dirX = d3 / d6 * 0.1D;
                 ((EntityFireball) launch).dirY = d4 / d6 * 0.1D;
                 ((EntityFireball) launch).dirZ = d5 / d6 * 0.1D;
             }
             
-            ((EntityFireball) launch).projectileSource = this;
+            launch.projectileSource = this;
         }
 
         Validate.notNull(launch, "Projectile not supported");
 
         if (launch instanceof IProjectile) {
             if (launch instanceof EntityProjectile) {
-                ((EntityProjectile) launch).projectileSource = this;
+                launch.projectileSource = this;
             }
             // Values from DispenseBehaviorProjectile
             float a = 6.0F;
@@ -129,7 +129,7 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
                 b *= 1.25F;
             }
             // Copied from DispenseBehaviorProjectile
-            ((IProjectile) launch).shoot((double) enumdirection.getAdjacentX(), (double) ((float) enumdirection.getAdjacentY() + 0.1F), (double) enumdirection.getAdjacentZ(), b, a);
+            ((IProjectile) launch).shoot(enumdirection.getAdjacentX(), (float) enumdirection.getAdjacentY() + 0.1F, enumdirection.getAdjacentZ(), b, a);
         }
 
         if (velocity != null) {
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java
index f3da84a..89d8ffd 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java
@@ -11,7 +11,7 @@ import org.bukkit.scheduler.BukkitWorker;
 
 class CraftAsyncTask extends CraftTask {
 
-    private final LinkedList workers = new LinkedList();
+    private final LinkedList workers = new LinkedList<>();
     private final Map runners;
 
     CraftAsyncTask(final Map runners, final Plugin plugin, final Runnable task, final int id, final long delay) {
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 1b0899b..18f948d 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -53,24 +53,20 @@ public class CraftScheduler implements BukkitScheduler {
     /**
      * Tail of a linked-list. AtomicReference only matters when adding to queue
      */
-    private final AtomicReference tail = new AtomicReference(head);
+    private final AtomicReference tail = new AtomicReference<>(head);
     /**
      * Main thread logic only
      */
-    private final PriorityQueue pending = new PriorityQueue(10,
-            new Comparator() {
-                public int compare(final CraftTask o1, final CraftTask o2) {
-                    return (int) (o1.getNextRun() - o2.getNextRun());
-                }
-            });
+    private final PriorityQueue pending = new PriorityQueue<>(10,
+            (o1, o2) -> (int) (o1.getNextRun() - o2.getNextRun()));
     /**
      * Main thread logic only
      */
-    private final List temp = new ArrayList();
+    private final List temp = new ArrayList<>();
     /**
      * These are tasks that are currently active. It's provided for 'viewing' the current state.
      */
-    private final ConcurrentHashMap runners = new ConcurrentHashMap();
+    private final ConcurrentHashMap runners = new ConcurrentHashMap<>();
     private volatile int currentTick = -1;
     private final Executor executor = Executors.newCachedThreadPool(new com.google.common.util.concurrent.ThreadFactoryBuilder().setNameFormat("Craft Scheduler Thread - %1$d").build()); // Spigot
     private CraftAsyncDebugger debugHead = new CraftAsyncDebugger(-1, null, null) {@Override StringBuilder debugTo(StringBuilder string) {return string;}};
@@ -152,7 +148,7 @@ public class CraftScheduler implements BukkitScheduler {
 
     public  Future callSyncMethod(final Plugin plugin, final Callable task) {
         validate(plugin, task);
-        final CraftFuture future = new CraftFuture(task, plugin, nextId());
+        final CraftFuture future = new CraftFuture<>(task, plugin, nextId());
         handle(future, 0l);
         return future;
     }
@@ -238,19 +234,17 @@ public class CraftScheduler implements BukkitScheduler {
 
     public void cancelAllTasks() {
         final CraftTask task = new CraftTask(
-                new Runnable() {
-                    public void run() {
-                        Iterator it = CraftScheduler.this.runners.values().iterator();
-                        while (it.hasNext()) {
-                            CraftTask task = it.next();
-                            task.cancel0();
-                            if (task.isSync()) {
-                                it.remove();
-                            }
+                () -> {
+                    Iterator it = CraftScheduler.this.runners.values().iterator();
+                    while (it.hasNext()) {
+                        CraftTask task1 = it.next();
+                        task1.cancel0();
+                        if (task1.isSync()) {
+                            it.remove();
                         }
-                        CraftScheduler.this.pending.clear();
-                        CraftScheduler.this.temp.clear();
                     }
+                    CraftScheduler.this.pending.clear();
+                    CraftScheduler.this.temp.clear();
                 }){{this.timings=co.aikar.timings.SpigotTimings.getCancelTasksTimer();}}; // Spigot
         handle(task, 0l);
         for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
@@ -289,7 +283,7 @@ public class CraftScheduler implements BukkitScheduler {
     }
 
     public List getActiveWorkers() {
-        final ArrayList workers = new ArrayList();
+        final ArrayList workers = new ArrayList<>();
         for (final CraftTask taskObj : runners.values()) {
             // Iterator will be a best-effort (may fail to grab very new values) if called from an async thread
             if (taskObj.isSync()) {
@@ -305,7 +299,7 @@ public class CraftScheduler implements BukkitScheduler {
     }
 
     public List getPendingTasks() {
-        final ArrayList truePending = new ArrayList();
+        final ArrayList truePending = new ArrayList<>();
         for (CraftTask task = head.getNext(); task != null; task = task.getNext()) {
             if (task.getTaskId() != -1) {
                 // -1 is special code
@@ -313,7 +307,7 @@ public class CraftScheduler implements BukkitScheduler {
             }
         }
 
-        final ArrayList pending = new ArrayList();
+        final ArrayList pending = new ArrayList<>();
         for (CraftTask task : runners.values()) {
             if (task.getPeriod() >= -1l) {
                 pending.add(task);
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
index 5bd8cf9..fb9c372 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
@@ -9,6 +9,8 @@ import org.bukkit.scoreboard.DisplaySlot;
 import org.bukkit.scoreboard.Objective;
 import org.bukkit.scoreboard.Score;
 
+import java.util.Objects;
+
 final class CraftObjective extends CraftScoreboardComponent implements Objective {
     private final ScoreboardObjective objective;
     private final CraftCriteria criteria;
@@ -131,7 +133,7 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
             return false;
         }
         final CraftObjective other = (CraftObjective) obj;
-        return !(this.objective != other.objective && (this.objective == null || !this.objective.equals(other.objective)));
+        return !(!Objects.equals(this.objective, other.objective));
     }
 
 
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
index 00b30f8..b35423b 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
@@ -45,7 +45,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
         Validate.notNull(criteria, "Criteria cannot be null");
 
         ImmutableSet.Builder objectives = ImmutableSet.builder();
-        for (ScoreboardObjective netObjective : (Collection) this.board.getObjectives()) {
+        for (ScoreboardObjective netObjective : this.board.getObjectives()) {
             CraftObjective objective = new CraftObjective(this, netObjective);
             if (objective.getCriteria().equals(criteria)) {
                 objectives.add(objective);
@@ -55,13 +55,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
     }
 
     public ImmutableSet getObjectives() {
-        return ImmutableSet.copyOf(Iterables.transform((Collection) this.board.getObjectives(), new Function() {
-
-            @Override
-            public Objective apply(ScoreboardObjective input) {
-                return new CraftObjective(CraftScoreboard.this, input);
-            }
-        }));
+        return ImmutableSet.copyOf(Iterables.transform(this.board.getObjectives(), (Function) input -> new CraftObjective(CraftScoreboard.this, input)));
     }
 
     public Objective getObjective(DisplaySlot slot) throws IllegalArgumentException {
@@ -83,7 +77,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
         Validate.notNull(entry, "Entry cannot be null");
 
         ImmutableSet.Builder scores = ImmutableSet.builder();
-        for (ScoreboardObjective objective : (Collection) this.board.getObjectives()) {
+        for (ScoreboardObjective objective : this.board.getObjectives()) {
             scores.add(new CraftScore(new CraftObjective(this, objective), entry));
         }
         return scores.build();
@@ -98,7 +92,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
     public void resetScores(String entry) throws IllegalArgumentException {
         Validate.notNull(entry, "Entry cannot be null");
 
-        for (ScoreboardObjective objective : (Collection) this.board.getObjectives()) {
+        for (ScoreboardObjective objective : this.board.getObjectives()) {
             board.resetPlayerScores(entry, objective);
         }
     }
@@ -125,13 +119,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
     }
 
     public ImmutableSet getTeams() {
-        return ImmutableSet.copyOf(Iterables.transform((Collection) this.board.getTeams(), new Function() {
-
-            @Override
-            public Team apply(ScoreboardTeam input) {
-                return new CraftTeam(CraftScoreboard.this, input);
-            }
-        }));
+        return ImmutableSet.copyOf(Iterables.transform(this.board.getTeams(), (Function) input -> new CraftTeam(CraftScoreboard.this, input)));
     }
 
     public Team registerNewTeam(String name) throws IllegalArgumentException {
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
index fbea5db..096fb1c 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
@@ -28,8 +28,8 @@ import org.bukkit.scoreboard.ScoreboardManager;
 public final class CraftScoreboardManager implements ScoreboardManager {
     private final CraftScoreboard mainScoreboard;
     private final MinecraftServer server;
-    private final Collection scoreboards = new WeakCollection();
-    private final Map playerBoards = new HashMap();
+    private final Collection scoreboards = new WeakCollection<>();
+    private final Map playerBoards = new HashMap<>();
 
     public CraftScoreboardManager(MinecraftServer minecraftserver, net.minecraft.server.Scoreboard scoreboardServer) {
         mainScoreboard = new CraftScoreboard(scoreboardServer);
@@ -51,7 +51,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
     // CraftBukkit method
     public CraftScoreboard getPlayerBoard(CraftPlayer player) {
         CraftScoreboard board = playerBoards.get(player);
-        return (CraftScoreboard) (board == null ? getMainScoreboard() : board);
+        return board == null ? getMainScoreboard() : board;
     }
 
     // CraftBukkit method
@@ -70,11 +70,11 @@ public final class CraftScoreboardManager implements ScoreboardManager {
         if (scoreboard == mainScoreboard) {
             playerBoards.remove(player);
         } else {
-            playerBoards.put(player, (CraftScoreboard) scoreboard);
+            playerBoards.put(player, scoreboard);
         }
 
         // Old objective tracking
-        HashSet removed = new HashSet();
+        HashSet removed = new HashSet<>();
         for (int i = 0; i < 3; ++i) {
             ScoreboardObjective scoreboardobjective = oldboard.getObjectiveForSlot(i);
             if (scoreboardobjective != null && !removed.contains(scoreboardobjective)) {
@@ -84,9 +84,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
         }
 
         // Old team tracking
-        Iterator iterator = oldboard.getTeams().iterator();
-        while (iterator.hasNext()) {
-            ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next();
+        for (ScoreboardTeam scoreboardteam : oldboard.getTeams()) {
             entityplayer.playerConnection.sendPacket(new PacketPlayOutScoreboardTeam(scoreboardteam, 1));
         }
 
@@ -103,7 +101,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
     public Collection getScoreboardScores(IScoreboardCriteria criteria, String name, Collection collection) {
         for (CraftScoreboard scoreboard : scoreboards) {
             Scoreboard board = scoreboard.board;
-            for (ScoreboardObjective objective : (Iterable) board.getObjectivesForCriteria(criteria)) {
+            for (ScoreboardObjective objective : board.getObjectivesForCriteria(criteria)) {
                 collection.add(board.getPlayerScoreForObjective(name, objective));
             }
         }
@@ -112,7 +110,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
 
     // CraftBukkit method
     public void updateAllScoresForList(IScoreboardCriteria criteria, String name, List of) {
-        for (ScoreboardScore score : getScoreboardScores(criteria, name, new ArrayList())) {
+        for (ScoreboardScore score : getScoreboardScores(criteria, name, new ArrayList<>())) {
             score.updateForList((List) of);
         }
     }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
index f5ff0f7..fddedd1 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
@@ -1,5 +1,6 @@
 package org.bukkit.craftbukkit.scoreboard;
 
+import java.util.Objects;
 import java.util.Set;
 
 import net.minecraft.server.ScoreboardTeamBase.EnumNameTagVisibility;
@@ -236,7 +237,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
             return false;
         }
         final CraftTeam other = (CraftTeam) obj;
-        return !(this.team != other.team && (this.team == null || !this.team.equals(other.team)));
+        return !(!Objects.equals(this.team, other.team));
     }
 
 }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java
index 193c362..f99c404 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java
@@ -28,7 +28,7 @@ import org.apache.commons.lang.Validate;
  */
 public final class AsynchronousExecutor {
 
-    public static interface CallBackProvider extends ThreadFactory {
+    public interface CallBackProvider extends ThreadFactory {
 
         /**
          * Normally an asynchronous call, but can be synchronous
@@ -74,7 +74,7 @@ public final class AsynchronousExecutor {
         volatile int state = PENDING;
         final P parameter;
         T object;
-        final List callbacks = new LinkedList();
+        final List callbacks = new LinkedList<>();
         E t = null;
 
         Task(final P parameter) {
@@ -215,8 +215,8 @@ public final class AsynchronousExecutor {
     }
 
     final CallBackProvider provider;
-    final Queue finished = new ConcurrentLinkedQueue();
-    final Map tasks = new HashMap();
+    final Queue finished = new ConcurrentLinkedQueue<>();
+    final Map tasks = new HashMap<>();
     final ThreadPoolExecutor pool;
 
     /**
@@ -228,7 +228,7 @@ public final class AsynchronousExecutor {
         this.provider = provider;
 
         // We have an unbound queue size so do not need a max thread size
-        pool = new ThreadPoolExecutor(coreSize, Integer.MAX_VALUE, 60l, TimeUnit.SECONDS, new LinkedBlockingQueue(), provider);
+        pool = new ThreadPoolExecutor(coreSize, Integer.MAX_VALUE, 60l, TimeUnit.SECONDS, new LinkedBlockingQueue<>(), provider);
     }
 
     /**
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
index 2dbedd2..04ecd59 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
@@ -15,7 +15,7 @@ public class BlockStateListPopulator {
     private final List list;
 
     public BlockStateListPopulator(World world) {
-        this(world, new ArrayList());
+        this(world, new ArrayList<>());
     }
 
     public BlockStateListPopulator(World world, List list) {
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
index 74f9799..2078e9b 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
@@ -19,7 +19,7 @@ import net.minecraft.server.ChatMessage;
 
 public final class CraftChatMessage {
     
-    private static final Pattern LINK_PATTERN = Pattern.compile("((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " \\n]|$))))");
+    private static final Pattern LINK_PATTERN = Pattern.compile("((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + org.bukkit.ChatColor.COLOR_CHAR + " \\n]|$))))");
     private static class StringMessage {
         private static final Map formatMap;
         //private static final Pattern INCREMENTAL_PATTERN = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-or])|(\\n)|((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " \\n]|$))))", Pattern.CASE_INSENSITIVE);
@@ -33,7 +33,7 @@ public final class CraftChatMessage {
             formatMap = builder.build();
         }
 
-        private final List list = new ArrayList();
+        private final List list = new ArrayList<>();
         private IChatBaseComponent currentChatComponent = new ChatComponentText("");
         private ChatModifier modifier = new ChatModifier();
         private final IChatBaseComponent[] output;
@@ -98,7 +98,7 @@ public final class CraftChatMessage {
                     }
                     modifier.setChatClickable(new ChatClickable(EnumClickAction.OPEN_URL, match));
                     appendNewComponent(matcher.end(groupId));
-                    modifier.setChatClickable((ChatClickable) null);
+                    modifier.setChatClickable(null);
                 }
                 currentIndex = matcher.end(groupId);
             }
@@ -107,7 +107,7 @@ public final class CraftChatMessage {
                 appendNewComponent(message.length());
             }
 
-            output = list.toArray(new IChatBaseComponent[list.size()]);
+            output = list.toArray(new IChatBaseComponent[0]);
         }
 
         private void appendNewComponent(int index) {
@@ -145,7 +145,7 @@ public final class CraftChatMessage {
         if (component == null) return "";
         StringBuilder out = new StringBuilder();
         
-        for (IChatBaseComponent c : (Iterable) component) {
+        for (IChatBaseComponent c : component) {
             ChatModifier modi = c.getChatModifier();
             out.append(modi.getColor() == null ? defaultColor : modi.getColor());
             if (modi.isBold()) {
@@ -182,8 +182,8 @@ public final class CraftChatMessage {
 
                 ChatModifier modifier = text.getChatModifier() != null ?
                         text.getChatModifier() : new ChatModifier();
-                List extras = new ArrayList();
-                List extrasOld = new ArrayList(text.a());
+                List extras = new ArrayList<>();
+                List extrasOld = new ArrayList<>(text.a());
                 component = text = new ChatComponentText("");
 
                 int pos = 0;
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 589dba7..1eb685d 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -54,8 +54,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
 
     public static Item getItem(Material material) {
         // TODO: Don't use ID
-        Item item = Item.getById(material.getId());
-        return item;
+        return Item.getById(material.getId());
     }
 
     @Deprecated
@@ -94,13 +93,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
 
     @Override
     public Material getMaterialFromInternalName(String name) {
-        return getMaterial((Item) Item.REGISTRY.get(new MinecraftKey(name)));
+        return getMaterial(Item.REGISTRY.get(new MinecraftKey(name)));
     }
 
     @Override
     public List tabCompleteInternalMaterialName(String token, List completions) {
         ArrayList results = Lists.newArrayList();
-        for (MinecraftKey key : (Set)Item.REGISTRY.keySet()) {
+        for (MinecraftKey key : Item.REGISTRY.keySet()) {
             results.add(key.toString());
         }
         return StringUtil.copyPartialMatches(token, results, completions);
@@ -111,7 +110,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
         net.minecraft.server.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack);
 
         try {
-            nmsStack.setTag((NBTTagCompound) MojangsonParser.parse(arguments));
+            nmsStack.setTag(MojangsonParser.parse(arguments));
         } catch (MojangsonParseException ex) {
             Logger.getLogger(CraftMagicNumbers.class.getName()).log(Level.SEVERE, null, ex);
         }
@@ -133,10 +132,9 @@ public final class CraftMagicNumbers implements UnsafeValues {
 
     @Override
     public List tabCompleteInternalStatisticOrAchievementName(String token, List completions) {
-        List matches = new ArrayList();
-        Iterator iterator = StatisticList.stats.iterator();
-        while (iterator.hasNext()) {
-            String statistic = ((net.minecraft.server.Statistic) iterator.next()).name;
+        List matches = new ArrayList<>();
+        for (net.minecraft.server.Statistic value : StatisticList.stats) {
+            String statistic = value.name;
             if (statistic.startsWith(token)) {
                 matches.add(statistic);
             }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java
index 74ce4b2..66a66c6 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java
@@ -10,7 +10,7 @@ import java.util.logging.Level;
 import java.util.logging.LogRecord;
 
 public class ForwardLogHandler extends ConsoleHandler {
-    private Map cachedLoggers = new ConcurrentHashMap();
+    private Map cachedLoggers = new ConcurrentHashMap<>();
 
     private Logger getLogger(String name) {
         Logger logger = cachedLoggers.get(name);
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java
index 80a5c29..03b8717 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java
@@ -8,8 +8,8 @@ import java.util.TreeSet;
 
 public class HashTreeSet implements Set {
 
-    private HashSet hash = new HashSet();
-    private TreeSet tree = new TreeSet();
+    private HashSet hash = new HashSet<>();
+    private TreeSet tree = new TreeSet<>();
 
     public HashTreeSet() {
 
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java
index ae19da4..f4a7e5a 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java
@@ -15,7 +15,7 @@ public class LazyPlayerSet extends LazyHashSet {
             throw new IllegalStateException("Reference already created!");
         }
         List players = MinecraftServer.getServer().getPlayerList().players;
-        HashSet reference = new HashSet(players.size());
+        HashSet reference = new HashSet<>(players.size());
         for (EntityPlayer player : players) {
             reference.add(player.getBukkitEntity());
         }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongHash.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongHash.java
index 691cafd..9c01526 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongHash.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongHash.java
@@ -10,6 +10,6 @@ public class LongHash {
     }
 
     public static int lsw(long l) {
-        return (int) (l & 0xFFFFFFFF) + Integer.MIN_VALUE;
+        return (int) (l) + Integer.MIN_VALUE;
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongObjectHashMap.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongObjectHashMap.java
index 0cd430a..f628cf4 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongObjectHashMap.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongObjectHashMap.java
@@ -192,7 +192,7 @@ public class LongObjectHashMap implements Cloneable, Serializable {
      */
     @Deprecated
     public Set> entrySet() {
-        HashSet> set = new HashSet>();
+        HashSet> set = new HashSet<>();
         for (long key : keySet()) {
             set.add(new Entry(key, get(key)));
         }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index ae3481b..35778e2 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -19,7 +19,7 @@ public class ServerShutdownThread extends Thread {
         } finally {
             try {
                 server.reader.getTerminal().restore();
-            } catch (Exception e) {
+            } catch (Exception ignored) {
             }
         }
     }
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/StructureGrowDelegate.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/StructureGrowDelegate.java
index f9cc7d6..eb7f4cf 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/StructureGrowDelegate.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/StructureGrowDelegate.java
@@ -14,7 +14,7 @@ import org.bukkit.material.MaterialData;
 
 public class StructureGrowDelegate implements BlockChangeDelegate {
     private final CraftWorld world;
-    private final List blocks = new ArrayList();
+    private final List blocks = new ArrayList<>();
 
     public StructureGrowDelegate(World world) {
         this.world = world.getWorld();
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 90f2f1d..f8dc895 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -1,12 +1,5 @@
 package org.bukkit.craftbukkit.util;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Properties;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.bukkit.Bukkit;
-
 public final class Versioning {
     public static String getBukkitVersion() {
         return "1.8.8-R0.1-SNAPSHOT";
diff --git a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java
index 7e7363f..1af20af 100644
--- a/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java
+++ b/TacoSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java
@@ -13,12 +13,12 @@ public final class WeakCollection implements Collection {
     private final Collection> collection;
 
     public WeakCollection() {
-        collection = new ArrayList>();
+        collection = new ArrayList<>();
     }
 
     public boolean add(T value) {
         Validate.notNull(value, "Cannot add null value");
-        return collection.add(new WeakReference(value));
+        return collection.add(new WeakReference<>(value));
     }
 
     public boolean addAll(Collection collection) {
@@ -26,7 +26,7 @@ public final class WeakCollection implements Collection {
         boolean ret = false;
         for (T value : collection) {
             Validate.notNull(value, "Cannot add null value");
-            ret |= values.add(new WeakReference(value));
+            ret |= values.add(new WeakReference<>(value));
         }
         return ret;
     }
@@ -160,10 +160,8 @@ public final class WeakCollection implements Collection {
     }
 
     private Collection toCollection() {
-        ArrayList collection = new ArrayList();
-        for (T value : this) {
-            collection.add(value);
-        }
+        ArrayList collection = new ArrayList<>();
+        collection.addAll(this);
         return collection;
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/org/github/paperspigot/PaperSpigotConfig.java b/TacoSpigot-Server/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
index d4fe328..9c700b7 100644
--- a/TacoSpigot-Server/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
+++ b/TacoSpigot-Server/src/main/java/org/github/paperspigot/PaperSpigotConfig.java
@@ -10,7 +10,6 @@ import java.lang.reflect.Modifier;
 import java.util.*;
 import java.util.logging.Level;
 
-import net.minecraft.server.Item;
 import net.minecraft.server.Items;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.server.RegionFile;
@@ -46,7 +45,7 @@ public class PaperSpigotConfig
         try
         {
             config.load ( CONFIG_FILE );
-        } catch ( IOException ex )
+        } catch ( IOException ignored)
         {
         } catch ( InvalidConfigurationException ex )
         {
@@ -56,7 +55,7 @@ public class PaperSpigotConfig
         config.options().header( HEADER );
         config.options().copyDefaults( true );
 
-        commands = new HashMap();
+        commands = new HashMap<>();
 
         version = getInt( "config-version", 9 );
         set( "config-version", 9 );
@@ -123,7 +122,7 @@ public class PaperSpigotConfig
     private static float getFloat(String path, float def)
     {
         // TODO: Figure out why getFloat() always returns the default value.
-        return (float) getDouble( path, (double) def );
+        return (float) getDouble( path, def);
     }
 
     private static int getInt(String path, int def)
@@ -135,7 +134,7 @@ public class PaperSpigotConfig
     private static  List getList(String path, T def)
     {
         config.addDefault( path, def );
-        return (List) config.getList( path, config.getList( path ) );
+        return config.getList( path, config.getList( path ) );
     }
 
     private static String getString(String path, String def)
diff --git a/TacoSpigot-Server/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/TacoSpigot-Server/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
index 6ad8e81..4309634 100644
--- a/TacoSpigot-Server/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
+++ b/TacoSpigot-Server/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
@@ -60,13 +60,13 @@ public class PaperSpigotWorldConfig
     private float getFloat(String path, float def)
     {
         // TODO: Figure out why getFloat() always returns the default value.
-        return (float) getDouble( path, (double) def );
+        return (float) getDouble( path, def);
     }
 
     private  List getList(String path, T def)
     {
         config.addDefault( "world-settings.default." + path, def );
-        return (List) config.getList( "world-settings." + worldName + "." + path, config.getList( "world-settings.default." + path ) );
+        return config.getList( "world-settings." + worldName + "." + path, config.getList( "world-settings.default." + path ) );
     }
 
     private String getString(String path, String def)
diff --git a/TacoSpigot-Server/src/main/java/org/spigotmc/ActivationRange.java b/TacoSpigot-Server/src/main/java/org/spigotmc/ActivationRange.java
index 4b5f87d..adff0c9 100644
--- a/TacoSpigot-Server/src/main/java/org/spigotmc/ActivationRange.java
+++ b/TacoSpigot-Server/src/main/java/org/spigotmc/ActivationRange.java
@@ -1,8 +1,7 @@
 package org.spigotmc;
 
-import java.util.ArrayList;
 import java.util.List;
-import java.util.Set;
+
 import net.minecraft.server.AxisAlignedBB;
 import net.minecraft.server.Chunk;
 import net.minecraft.server.Entity;
@@ -22,7 +21,6 @@ import net.minecraft.server.EntityLiving;
 import net.minecraft.server.EntityMonster;
 import net.minecraft.server.EntityProjectile;
 import net.minecraft.server.EntitySheep;
-import net.minecraft.server.EntitySlice;
 import net.minecraft.server.EntitySlime;
 import net.minecraft.server.EntityTNTPrimed;
 import net.minecraft.server.EntityVillager;
diff --git a/TacoSpigot-Server/src/main/java/org/spigotmc/AntiXray.java b/TacoSpigot-Server/src/main/java/org/spigotmc/AntiXray.java
index ec884c6..f3a2c84 100644
--- a/TacoSpigot-Server/src/main/java/org/spigotmc/AntiXray.java
+++ b/TacoSpigot-Server/src/main/java/org/spigotmc/AntiXray.java
@@ -28,7 +28,7 @@ public class AntiXray
     private final byte[] replacementOres;
     // PaperSpigot start
     public boolean queueUpdates = true;
-    public final Set pendingUpdates = new HashSet();
+    public final Set pendingUpdates = new HashSet<>();
     // PaperSpigot end
 
     public AntiXray(SpigotWorldConfig config)
diff --git a/TacoSpigot-Server/src/main/java/org/spigotmc/LimitStream.java b/TacoSpigot-Server/src/main/java/org/spigotmc/LimitStream.java
index 8c32e8b..c629f8f 100644
--- a/TacoSpigot-Server/src/main/java/org/spigotmc/LimitStream.java
+++ b/TacoSpigot-Server/src/main/java/org/spigotmc/LimitStream.java
@@ -26,14 +26,14 @@ public class LimitStream extends FilterInputStream
     @Override
     public int read(byte[] b) throws IOException
     {
-        limit.a( b.length * 8 );
+        limit.a( b.length * 8L);
         return super.read( b );
     }
 
     @Override
     public int read(byte[] b, int off, int len) throws IOException
     {
-        limit.a( len * 8 );
+        limit.a( len * 8L);
         return super.read( b, off, len );
     }
 }
diff --git a/TacoSpigot-Server/src/main/java/org/spigotmc/Metrics.java b/TacoSpigot-Server/src/main/java/org/spigotmc/Metrics.java
index bdecae2..6f2c7cf 100644
--- a/TacoSpigot-Server/src/main/java/org/spigotmc/Metrics.java
+++ b/TacoSpigot-Server/src/main/java/org/spigotmc/Metrics.java
@@ -30,9 +30,6 @@ package org.spigotmc;
 import org.bukkit.Bukkit;
 import org.bukkit.configuration.file.YamlConfiguration;
 import org.bukkit.configuration.InvalidConfigurationException;
-import org.bukkit.plugin.Plugin;
-import org.bukkit.plugin.PluginDescriptionFile;
-import org.bukkit.scheduler.BukkitTask;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -91,7 +88,7 @@ public class Metrics {
     /**
      * All of the custom graphs to submit to metrics
      */
-    private final Set graphs = Collections.synchronizedSet(new HashSet());
+    private final Set graphs = Collections.synchronizedSet(new HashSet<>());
     /**
      * The default graph, used for addCustomData when you don't want a specific graph
      */
@@ -264,12 +261,7 @@ public class Metrics {
             try {
                 // Reload the metrics file
                 configuration.load(getConfigFile());
-            } catch (IOException ex) {
-                if (debug) {
-                    Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage());
-                }
-                return true;
-            } catch (InvalidConfigurationException ex) {
+            } catch (IOException | InvalidConfigurationException ex) {
                 if (debug) {
                     Bukkit.getLogger().log(Level.INFO, "[Metrics] " + ex.getMessage());
                 }
@@ -389,11 +381,8 @@ public class Metrics {
         // Acquire a lock on the graphs, which lets us make the assumption we also lock everything
         // inside of the graph (e.g plotters)
         synchronized (graphs) {
-            final Iterator iter = graphs.iterator();
-
-            while (iter.hasNext()) {
-                final Graph graph = iter.next();
 
+            for (Graph graph : graphs) {
                 for (Plotter plotter : graph.getPlotters()) {
                     // The key name to send to the metrics server
                     // The format is C-GRAPHNAME-PLOTTERNAME where separator - is defined at the top
@@ -445,11 +434,8 @@ public class Metrics {
             // Is this the first update this hour?
             if (response.contains("OK This is your first update this hour")) {
                 synchronized (graphs) {
-                    final Iterator iter = graphs.iterator();
-
-                    while (iter.hasNext()) {
-                        final Graph graph = iter.next();
 
+                    for (Graph graph : graphs) {
                         for (Plotter plotter : graph.getPlotters()) {
                             plotter.reset();
                         }
@@ -513,7 +499,7 @@ public class Metrics {
         /**
          * The set of plotters that are contained within this graph
          */
-        private final Set plotters = new LinkedHashSet();
+        private final Set plotters = new LinkedHashSet<>();
 
         private Graph(final String name) {
             this.name = name;
diff --git a/TacoSpigot-Server/src/main/java/org/spigotmc/RestartCommand.java b/TacoSpigot-Server/src/main/java/org/spigotmc/RestartCommand.java
index 429c258..e7d47be 100644
--- a/TacoSpigot-Server/src/main/java/org/spigotmc/RestartCommand.java
+++ b/TacoSpigot-Server/src/main/java/org/spigotmc/RestartCommand.java
@@ -23,14 +23,7 @@ public class RestartCommand extends Command
     {
         if ( testPermission( sender ) )
         {
-            MinecraftServer.getServer().processQueue.add( new Runnable()
-            {
-                @Override
-                public void run()
-                {
-                    restart();
-                }
-            } );
+            MinecraftServer.getServer().processQueue.add(RestartCommand::restart);
         }
         return true;
     }
@@ -53,7 +46,7 @@ public class RestartCommand extends Command
                 WatchdogThread.doStop();
 
                 // Kick all players
-                for ( EntityPlayer p : (List< EntityPlayer>) MinecraftServer.getServer().getPlayerList().players )
+                for ( EntityPlayer p : MinecraftServer.getServer().getPlayerList().players)
                 {
                     p.playerConnection.disconnect(SpigotConfig.restartMessage);
                 }
@@ -61,7 +54,7 @@ public class RestartCommand extends Command
                 try
                 {
                     Thread.sleep( 100 );
-                } catch ( InterruptedException ex )
+                } catch ( InterruptedException ignored)
                 {
                 }
                 // Close the socket so we can rebind with the new process
@@ -71,7 +64,7 @@ public class RestartCommand extends Command
                 try
                 {
                     Thread.sleep( 100 );
-                } catch ( InterruptedException ex )
+                } catch ( InterruptedException ignored)
                 {
                 }
 
@@ -79,35 +72,30 @@ public class RestartCommand extends Command
                 try
                 {
                     MinecraftServer.getServer().stop();
-                } catch ( Throwable t )
+                } catch ( Throwable ignored)
                 {
                 }
 
                 // This will be done AFTER the server has completely halted
-                Thread shutdownHook = new Thread()
-                {
-                    @Override
-                    public void run()
+                Thread shutdownHook = new Thread(() -> {
+                    try
                     {
-                        try
+                        String os = System.getProperty( "os.name" ).toLowerCase();
+                        if ( os.contains( "win" ) )
                         {
-                            String os = System.getProperty( "os.name" ).toLowerCase();
-                            if ( os.contains( "win" ) )
-                            {
-                                Runtime.getRuntime().exec( "cmd /c start " + script.getPath() );
-                            } else
-                            {
-                                Runtime.getRuntime().exec( new String[]
-                                {
-                                    "sh", script.getPath()
-                                } );
-                            }
-                        } catch ( Exception e )
+                            Runtime.getRuntime().exec( "cmd /c start " + script.getPath() );
+                        } else
                         {
-                            e.printStackTrace();
+                            Runtime.getRuntime().exec( new String[]
+                            {
+                                "sh", script.getPath()
+                            } );
                         }
+                    } catch ( Exception e )
+                    {
+                        e.printStackTrace();
                     }
-                };
+                });
 
                 shutdownHook.setDaemon( true );
                 Runtime.getRuntime().addShutdownHook( shutdownHook );
diff --git a/TacoSpigot-Server/src/main/java/org/spigotmc/SpigotConfig.java b/TacoSpigot-Server/src/main/java/org/spigotmc/SpigotConfig.java
index 9aeeb6e..bcae756 100644
--- a/TacoSpigot-Server/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/TacoSpigot-Server/src/main/java/org/spigotmc/SpigotConfig.java
@@ -1,7 +1,5 @@
 package org.spigotmc;
 
-import com.elevatemc.spigot.command.KnockbackCommand;
-import com.elevatemc.spigot.command.TicksPerSecondCommand;
 import com.google.common.base.Throwables;
 import java.io.File;
 import java.io.IOException;
@@ -62,7 +60,7 @@ public class SpigotConfig
         try
         {
             config.load( CONFIG_FILE );
-        } catch ( IOException ex )
+        } catch ( IOException ignored)
         {
         } catch ( InvalidConfigurationException ex )
         {
@@ -73,7 +71,7 @@ public class SpigotConfig
         config.options().header( HEADER );
         config.options().copyDefaults( true );
 
-        commands = new HashMap();
+        commands = new HashMap<>();
 
         version = getInt( "config-version", 8 );
         set( "config-version", 8 );
@@ -152,7 +150,7 @@ public class SpigotConfig
     private static  List getList(String path, T def)
     {
         config.addDefault( path, def );
-        return (List) config.getList( path, config.getList( path ) );
+        return config.getList( path, config.getList( path ) );
     }
 
     private static String getString(String path, String def)
@@ -284,7 +282,7 @@ public class SpigotConfig
     }
 
     public static boolean disableStatSaving;
-    public static TObjectIntHashMap forcedStats = new TObjectIntHashMap();
+    public static TObjectIntHashMap forcedStats = new TObjectIntHashMap<>();
     private static void stats()
     {
         disableStatSaving = getBoolean( "stats.disable-saving", false );
@@ -352,8 +350,8 @@ public class SpigotConfig
             set( "commands.replace-commands", config.getStringList( "replace-commands" ) );
             config.set( "replace-commands", null );
         }
-        replaceCommands = new HashSet( (List) getList( "commands.replace-commands",
-                Arrays.asList( "setblock", "summon", "testforblock", "tellraw" ) ) );
+        replaceCommands = new HashSet<>((List) getList("commands.replace-commands",
+                Arrays.asList("setblock", "summon", "testforblock", "tellraw")));
     }
     
     public static int userCacheCap;
diff --git a/TacoSpigot-Server/src/main/java/org/spigotmc/SpigotWorldConfig.java b/TacoSpigot-Server/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 471d1aa..76db455 100644
--- a/TacoSpigot-Server/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/TacoSpigot-Server/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -61,7 +61,7 @@ public class SpigotWorldConfig
     private  List getList(String path, T def)
     {
         config.addDefault( "world-settings.default." + path, def );
-        return (List) config.getList( "world-settings." + worldName + "." + path, config.getList( "world-settings.default." + path ) );
+        return config.getList( "world-settings." + worldName + "." + path, config.getList( "world-settings.default." + path ) );
     }
 
     private String getString(String path, String def)
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/DyeColorsTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/DyeColorsTest.java
index f0b889b..1b235e8 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/DyeColorsTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/DyeColorsTest.java
@@ -22,7 +22,7 @@ public class DyeColorsTest extends AbstractTestingBase {
 
     @Parameters(name= "{index}: {0}")
     public static List data() {
-        List list = new ArrayList();
+        List list = new ArrayList<>();
         for (DyeColor dye : DyeColor.values()) {
             list.add(new Object[] {dye});
         }
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/MaterialTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/MaterialTest.java
index a63c0f4..9bd88b8 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/MaterialTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/MaterialTest.java
@@ -29,10 +29,7 @@ public class MaterialTest extends AbstractTestingBase {
         }
         materials.remove(0); // Purge air.
 
-        Iterator items = Item.REGISTRY.iterator();
-
-        while (items.hasNext()) {
-            Item item = items.next();
+        for (Item item : Item.REGISTRY) {
             if (item == null) continue;
 
             int id = CraftMagicNumbers.getId(item);
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java
index 0a6c277..72adf9d 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java
@@ -3,7 +3,6 @@ package org.bukkit;
 import static org.junit.Assert.*;
 import static org.hamcrest.Matchers.*;
 
-import java.util.Collections;
 import java.util.List;
 
 import net.minecraft.server.AchievementList;
@@ -21,7 +20,7 @@ public class StatisticsAndAchievementsTest extends AbstractTestingBase {
     @SuppressWarnings("unchecked")
     public void verifyAchievementMapping() throws Throwable {
         List achievements = Lists.newArrayList(Achievement.values());
-        for (net.minecraft.server.Achievement achievement : (List) AchievementList.e) {
+        for (net.minecraft.server.Achievement achievement : AchievementList.e) {
             String name = achievement.name;
 
             String message = String.format("org.bukkit.Achievement is missing: '%s'", name);
@@ -39,7 +38,7 @@ public class StatisticsAndAchievementsTest extends AbstractTestingBase {
     @SuppressWarnings("unchecked")
     public void verifyStatisticMapping() throws Throwable {
         HashMultiset statistics = HashMultiset.create();
-        for (net.minecraft.server.Statistic statistic : (List) StatisticList.stats) {
+        for (net.minecraft.server.Statistic statistic : StatisticList.stats) {
             if (statistic instanceof net.minecraft.server.Achievement) {
                 continue;
             }
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java
index 1349a7f..2000f23 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java
@@ -24,7 +24,7 @@ public class CompositeSerialization extends AbstractTestingBase {
     public void testSaveRestoreCompositeList() throws InvalidConfigurationException {
         YamlConfiguration out = getConfig();
 
-        List stacks = new ArrayList();
+        List stacks = new ArrayList<>();
         stacks.add(new ItemStack(1));
         stacks.add(new ItemStack(2));
         stacks.add(new ItemStack(3));
@@ -54,7 +54,7 @@ public class CompositeSerialization extends AbstractTestingBase {
         assertThat(stacks, hasSize(raw.size()));
 
         for (int i = 0; i < 9; i++) {
-            assertThat(String.valueOf(i), (Object) stacks.get(i), is((Object) raw.get(i)));
+            assertThat(String.valueOf(i), (Object) stacks.get(i), is(raw.get(i)));
         }
     }
 }
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java
index 1e5c3ef..69c4bab 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java
@@ -5,7 +5,6 @@ import static org.hamcrest.Matchers.*;
 
 import java.util.ArrayList;
 import java.util.List;
-import org.apache.commons.lang.ArrayUtils;
 
 import org.bukkit.Material;
 import org.bukkit.inventory.ItemFactory;
@@ -26,7 +25,7 @@ public class FactoryItemMaterialTest extends AbstractTestingBase {
 
     static {
         Material[] local_materials = Material.values();
-        List list = new ArrayList(local_materials.length);
+        List list = new ArrayList<>(local_materials.length);
         for (Material material : local_materials) {
             if (INVALIDATED_MATERIALS.contains(material)) {
                 continue;
@@ -34,7 +33,7 @@ public class FactoryItemMaterialTest extends AbstractTestingBase {
 
             list.add(material);
         }
-        materials = list.toArray(new Material[list.size()]);
+        materials = list.toArray(new Material[0]);
     }
 
     static String name(Enum from, Enum to) {
@@ -46,7 +45,7 @@ public class FactoryItemMaterialTest extends AbstractTestingBase {
 
     @Parameters(name="Material[{index}]:{0}")
     public static List data() {
-        List list = new ArrayList();
+        List list = new ArrayList<>();
         for (Material material : materials) {
             list.add(new Object[] {material});
         }
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
index f5bcbdb..8384b1e 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java
@@ -21,7 +21,7 @@ public class ItemFactoryTest extends AbstractTestingBase {
     @Test
     public void testKnownAttributes() throws Throwable {
         final ZipInputStream nmsZipStream = new ZipInputStream(CommandAbstract.class/* Magic class that isn't imported! */.getProtectionDomain().getCodeSource().getLocation().openStream());
-        final Collection names = new HashSet();
+        final Collection names = new HashSet<>();
         for (ZipEntry clazzEntry; (clazzEntry = nmsZipStream.getNextEntry()) != null; ) {
             final String entryName = clazzEntry.getName();
             if (!(entryName.endsWith(".class") && entryName.startsWith("net/minecraft/server/"))) {
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java
index f1b4ec0..928c8f3 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java
@@ -23,8 +23,8 @@ public class ItemMetaImplementationOverrideTest {
 
     @Parameters(name="[{index}]:{1}")
     public static List data() {
-        final List testData = new ArrayList();
-        List> classes = new ArrayList>();
+        final List testData = new ArrayList<>();
+        List> classes = new ArrayList<>();
 
         for (Material material : ItemStackTest.COMPOUND_MATERIALS) {
             Class clazz = CraftItemFactory.instance().getItemMeta(material).getClass().asSubclass(parent);
@@ -33,7 +33,7 @@ public class ItemMetaImplementationOverrideTest {
             }
         }
 
-        List list = new ArrayList();
+        List list = new ArrayList<>();
 
         for (Method method: parent.getDeclaredMethods()) {
             if (method.isAnnotationPresent(Overridden.class)) {
@@ -45,11 +45,7 @@ public class ItemMetaImplementationOverrideTest {
             for (final Method method : list) {
                 testData.add(
                     new Object[] {
-                        new Callable() {
-                            public Method call() throws Exception {
-                                return clazz.getDeclaredMethod(method.getName(), method.getParameterTypes());
-                            }
-                        },
+                            (Callable) () -> clazz.getDeclaredMethod(method.getName(), method.getParameterTypes()),
                         clazz.getSimpleName() + " contains " + method.getName()
                     }
                 );
@@ -57,11 +53,7 @@ public class ItemMetaImplementationOverrideTest {
 
             testData.add(
                 new Object[] {
-                    new Callable() {
-                        public DelegateDeserialization call() throws Exception {
-                            return clazz.getAnnotation(DelegateDeserialization.class);
-                        }
-                    },
+                        (Callable) () -> clazz.getAnnotation(DelegateDeserialization.class),
                     clazz.getSimpleName() + " contains annotation " + DelegateDeserialization.class
                 }
             );
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
index 71a3457..619c3f5 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
@@ -122,7 +122,7 @@ public class ItemMetaTest extends AbstractTestingBase {
         craft.setItemMeta(craft.getItemMeta());
         ItemStack bukkit = new ItemStack(craft);
         assertThat(craft, is(bukkit));
-        assertThat(bukkit, is((ItemStack) craft));
+        assertThat(bukkit, is(craft));
     }
 
     @Test
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java
index a7edc04..0c33eb8 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java
@@ -29,182 +29,136 @@ public class ItemStackBookTest extends ItemStackTest {
             ItemStackLoreEnchantmentTest.operators(),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.addPage("Page 1", "Page 2");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Pages vs. Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.addPage("Page 1", "Page 2");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             cleanStack.setItemMeta(cleanStack.getItemMeta());
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Pages vs. blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.addPage("Page 1", "Page 2");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.addPage("Page 2", "Page 1");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Pages switched"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.addPage("Page 1", "Page 2");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.addPage("Page 1");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Pages short"
                 }
             ),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.setAuthor("AnAuthor");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Author vs. Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.setAuthor("AnAuthor");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             cleanStack.setItemMeta(cleanStack.getItemMeta());
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Author vs. blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.setAuthor("AnAuthor");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.setAuthor("AnotherAuthor");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Authors"
                 }
             ),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.setTitle("Some title");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Title vs. Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.setTitle("Some title");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             cleanStack.setItemMeta(cleanStack.getItemMeta());
                             return cleanStack;
-                        }
-                    },
+                        },
                     "title vs. blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.setTitle("Some title");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             BookMeta meta = (BookMeta) cleanStack.getItemMeta();
                             meta.setTitle("Different title");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Titles"
                 }
             )
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java
index a0499b8..8598eed 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java
@@ -30,76 +30,58 @@ public class ItemStackEnchantStorageTest extends ItemStackTest {
             ItemStackLoreEnchantmentTest.operators(),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             EnchantmentStorageMeta meta = (EnchantmentStorageMeta) cleanStack.getItemMeta();
                             meta.addStoredEnchant(Enchantment.DURABILITY, 1, true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             EnchantmentStorageMeta meta = (EnchantmentStorageMeta) cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Enchantable vs Blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             EnchantmentStorageMeta meta = (EnchantmentStorageMeta) cleanStack.getItemMeta();
                             meta.addStoredEnchant(Enchantment.KNOCKBACK, 1, true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Enchantable vs Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             EnchantmentStorageMeta meta = (EnchantmentStorageMeta) cleanStack.getItemMeta();
                             meta.addStoredEnchant(Enchantment.DAMAGE_UNDEAD, 1, true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             EnchantmentStorageMeta meta = (EnchantmentStorageMeta) cleanStack.getItemMeta();
                             meta.addStoredEnchant(Enchantment.DAMAGE_UNDEAD, 1, true);
                             meta.addStoredEnchant(Enchantment.FIRE_ASPECT, 1, true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Enchantable vs More"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             EnchantmentStorageMeta meta = (EnchantmentStorageMeta) cleanStack.getItemMeta();
                             meta.addStoredEnchant(Enchantment.PROTECTION_FIRE, 1, true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             EnchantmentStorageMeta meta = (EnchantmentStorageMeta) cleanStack.getItemMeta();
                             meta.addEnchant(Enchantment.PROTECTION_FIRE, 2, true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Enchantable vs Other"
                 }
             )
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java
index cb38cd2..175f0a9 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java
@@ -32,94 +32,72 @@ public class ItemStackFireworkChargeTest extends ItemStackTest {
             ItemStackLoreEnchantmentTest.operators(),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkEffectMeta meta = (FireworkEffectMeta) cleanStack.getItemMeta();
                             meta.setEffect(FireworkEffect.builder().withColor(Color.WHITE).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             FireworkEffectMeta meta = (FireworkEffectMeta) cleanStack.getItemMeta();
                             meta.setEffect(FireworkEffect.builder().withColor(Color.BLACK).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Effect Color 1 vs. Effect Color 2"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkEffectMeta meta = (FireworkEffectMeta) cleanStack.getItemMeta();
                             meta.setEffect(FireworkEffect.builder().withColor(Color.WHITE).with(Type.CREEPER).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             FireworkEffectMeta meta = (FireworkEffectMeta) cleanStack.getItemMeta();
                             meta.setEffect(FireworkEffect.builder().withColor(Color.WHITE).with(Type.BURST).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Effect type 1 vs. Effect type 2"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkEffectMeta meta = (FireworkEffectMeta) cleanStack.getItemMeta();
                             meta.setEffect(FireworkEffect.builder().withColor(Color.WHITE).withFade(Color.BLUE).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             FireworkEffectMeta meta = (FireworkEffectMeta) cleanStack.getItemMeta();
                             meta.setEffect(FireworkEffect.builder().withColor(Color.WHITE).withFade(Color.RED).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Effect fade 1 vs. Effect fade 2"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkEffectMeta meta = (FireworkEffectMeta) cleanStack.getItemMeta();
                             meta.setEffect(FireworkEffect.builder().withColor(Color.WHITE).withFlicker().build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             FireworkEffectMeta meta = (FireworkEffectMeta) cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Effect vs. Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkEffectMeta meta = (FireworkEffectMeta) cleanStack.getItemMeta();
                             meta.setEffect(FireworkEffect.builder().withColor(Color.WHITE).withTrail().build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Effect vs. None"
                 }
             )
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java
index 40b1d19..2e65529 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java
@@ -32,150 +32,114 @@ public class ItemStackFireworkTest extends ItemStackTest {
             ItemStackLoreEnchantmentTest.operators(),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.addEffect(FireworkEffect.builder().withColor(Color.WHITE).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.addEffect(FireworkEffect.builder().withColor(Color.BLACK).build());
                             meta.addEffect(FireworkEffect.builder().withColor(Color.GREEN).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Effect Color 1 vs. Effect Color 2"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.addEffect(FireworkEffect.builder().withColor(Color.WHITE).with(Type.CREEPER).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.addEffect(FireworkEffect.builder().withColor(Color.WHITE).with(Type.BURST).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Effect type 1 vs. Effect type 2"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.addEffect(FireworkEffect.builder().withColor(Color.WHITE).withFade(Color.BLUE).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.addEffect(FireworkEffect.builder().withColor(Color.WHITE).withFade(Color.RED).build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Effect fade 1 vs. Effect fade 2"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.addEffect(FireworkEffect.builder().withColor(Color.WHITE).withFlicker().build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Effect vs. Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.addEffect(FireworkEffect.builder().withColor(Color.WHITE).withTrail().build());
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Effect vs. None"
                 }
             ),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.setPower(127);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.setPower(100);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Height vs. Other"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.setPower(42);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Height vs. Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             FireworkMeta meta = (FireworkMeta) cleanStack.getItemMeta();
                             meta.setPower(10);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Height vs. None"
                 }
             )
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java
index 6d68e1f..a69f2d3 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java
@@ -31,56 +31,42 @@ public class ItemStackLeatherTest extends ItemStackTest {
             ItemStackLoreEnchantmentTest.operators(),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             LeatherArmorMeta meta = (LeatherArmorMeta) cleanStack.getItemMeta();
                             meta.setColor(Color.FUCHSIA);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Color vs Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             LeatherArmorMeta meta = (LeatherArmorMeta) cleanStack.getItemMeta();
                             meta.setColor(Color.GRAY);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             LeatherArmorMeta meta = (LeatherArmorMeta) cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Color vs Blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             LeatherArmorMeta meta = (LeatherArmorMeta) cleanStack.getItemMeta();
                             meta.setColor(Color.MAROON);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             LeatherArmorMeta meta = (LeatherArmorMeta) cleanStack.getItemMeta();
                             meta.setColor(Color.ORANGE);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Color vs Other"
                 }
             )
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java
index 32a9184..c1ed1d4 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java
@@ -29,266 +29,196 @@ public class ItemStackLoreEnchantmentTest extends ItemStackTest {
             ~0l,
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.setLore(Arrays.asList("First Lore", "Second Lore"));
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Lore vs Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.setLore(Arrays.asList("Some lore"));
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Lore vs Blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.setLore(Arrays.asList("Some more lore", "Another lore"));
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.setLore(Arrays.asList("Some more lore"));
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Lore vs Other"
                 }
             ),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.setDisplayName("TestItemName");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Name vs Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.setDisplayName("AnotherItemName");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Name vs Blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.setDisplayName("The original ItemName");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.setDisplayName("The other name");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Name vs Other"
                 }
             ),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             cleanStack.addUnsafeEnchantment(Enchantment.DIG_SPEED, 2);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "EnchantStack vs Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             cleanStack.addUnsafeEnchantment(Enchantment.OXYGEN, 1);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "EnchantStack vs Blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             cleanStack.addUnsafeEnchantment(Enchantment.ARROW_DAMAGE, 1);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             cleanStack.addUnsafeEnchantment(Enchantment.ARROW_FIRE, 1);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "EnchantStack vs OtherEnchantStack"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.addEnchant(Enchantment.DURABILITY, 1, true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Enchant vs Blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.addEnchant(Enchantment.KNOCKBACK, 1, true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Enchant vs Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.addEnchant(Enchantment.PROTECTION_FIRE, 1, true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             meta.addEnchant(Enchantment.PROTECTION_FIRE, 2, true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Enchant vs Other"
                 }
             ),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             ((Repairable) meta).setRepairCost(42);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Repair vs Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             ((Repairable) meta).setRepairCost(36);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Repair vs Blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             ((Repairable) meta).setRepairCost(89);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             ItemMeta meta = cleanStack.getItemMeta();
                             ((Repairable) meta).setRepairCost(88);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Repair vs Other"
                 }
             )
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java
index 9c49985..6b5c7e2 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java
@@ -29,90 +29,66 @@ public class ItemStackMapTest extends ItemStackTest {
             ItemStackLoreEnchantmentTest.operators(),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             MapMeta meta = (MapMeta) cleanStack.getItemMeta();
                             meta.setScaling(true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             MapMeta meta = (MapMeta) cleanStack.getItemMeta();
                             meta.setScaling(false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Scale vs. Unscale"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             MapMeta meta = (MapMeta) cleanStack.getItemMeta();
                             meta.setScaling(true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             MapMeta meta = (MapMeta) cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Scale vs. Blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             MapMeta meta = (MapMeta) cleanStack.getItemMeta();
                             meta.setScaling(false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             MapMeta meta = (MapMeta) cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Unscale vs. Blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             MapMeta meta = (MapMeta) cleanStack.getItemMeta();
                             meta.setScaling(true);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Scale vs. None"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             MapMeta meta = (MapMeta) cleanStack.getItemMeta();
                             meta.setScaling(false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Unscale vs. None"
                 }
             )
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java
index c1f9fb7..c7c59e2 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java
@@ -30,114 +30,88 @@ public class ItemStackPotionsTest extends ItemStackTest {
             ItemStackLoreEnchantmentTest.operators(),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             meta.addCustomEffect(PotionEffectType.CONFUSION.createEffect(1, 1), false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Potion vs Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             meta.addCustomEffect(PotionEffectType.HARM.createEffect(2, 1), false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Potion vs Blank"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             meta.addCustomEffect(PotionEffectType.SLOW_DIGGING.createEffect(1, 1), false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             meta.addCustomEffect(PotionEffectType.FAST_DIGGING.createEffect(1, 1), false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Potion vs Harder"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             meta.addCustomEffect(PotionEffectType.JUMP.createEffect(1, 1), false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             meta.addCustomEffect(PotionEffectType.JUMP.createEffect(1, 1), false);
                             meta.addCustomEffect(PotionEffectType.REGENERATION.createEffect(1, 1), false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Potion vs Better"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             meta.addCustomEffect(PotionEffectType.SPEED.createEffect(10, 1), false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             meta.addCustomEffect(PotionEffectType.SPEED.createEffect(5, 1), false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Potion vs Faster"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             meta.addCustomEffect(PotionEffectType.INCREASE_DAMAGE.createEffect(1, 1), false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             final PotionMeta meta = (PotionMeta) cleanStack.getItemMeta();
                             meta.addCustomEffect(PotionEffectType.INCREASE_DAMAGE.createEffect(1, 2), false);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Potion vs Stronger"
                 }
             )
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java
index a79d443..93c2494 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java
@@ -29,57 +29,43 @@ public class ItemStackSkullTest extends ItemStackTest {
             ItemStackLoreEnchantmentTest.operators(),
             Arrays.asList(
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             SkullMeta meta = (SkullMeta) cleanStack.getItemMeta();
                             meta.setOwner("Notch");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             SkullMeta meta = (SkullMeta) cleanStack.getItemMeta();
                             meta.setOwner("Dinnerbone");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Name 1 vs. Name 2"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             SkullMeta meta = (SkullMeta) cleanStack.getItemMeta();
                             meta.setOwner("Notch");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        },
+                        (Operator) cleanStack -> {
                             SkullMeta meta = (SkullMeta) cleanStack.getItemMeta();
                             meta.setOwner(null);
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
+                        },
                     "Name vs. Null"
                 },
                 new Object[] {
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
+                        (Operator) cleanStack -> {
                             SkullMeta meta = (SkullMeta) cleanStack.getItemMeta();
                             meta.setOwner("Notch");
                             cleanStack.setItemMeta(meta);
                             return cleanStack;
-                        }
-                    },
-                    new Operator() {
-                        public ItemStack operate(ItemStack cleanStack) {
-                            return cleanStack;
-                        }
-                    },
+                        },
+                        (Operator) cleanStack -> cleanStack,
                     "Name vs. None"
                 }
             )
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java
index 6140ede..d6b73f2 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java
@@ -74,7 +74,7 @@ public class ItemStackTest extends AbstractTestingBase {
          * @return
          */
         static List compound(final List parameterList, final String nameFormat, final int nameIndex, final Material...materials) {
-            final List out = new ArrayList();
+            final List out = new ArrayList<>();
             for (Object[] params : parameterList) {
                 final int len = params.length;
                 for (final Material material : materials) {
@@ -153,9 +153,9 @@ public class ItemStackTest extends AbstractTestingBase {
          */
         static List compound(final Joiner joiner, final int nameParameter, final long singletonBitmask, final List...originalLists) {
 
-            final List out = new ArrayList();
-            final List> singletons = new ArrayList>();
-            final List> notSingletons = new ArrayList>();
+            final List out = new ArrayList<>();
+            final List> singletons = new ArrayList<>();
+            final List> notSingletons = new ArrayList<>();
 
             { // Separate and prime the 'singletons'
                 int i = 0;
@@ -179,11 +179,7 @@ public class ItemStackTest extends AbstractTestingBase {
                             } else if (toOut[i] instanceof Operator) {
                                 final Operator op1 = (Operator) toOut[i];
                                 final Operator op2 = (Operator) singleton[i];
-                                toOut[i] = new Operator() {
-                                    public ItemStack operate(final ItemStack cleanStack) {
-                                        return op2.operate(op1.operate(cleanStack));
-                                    }
-                                };
+                                toOut[i] = (Operator) cleanStack -> op2.operate(op1.operate(cleanStack));
                             }
                         }
                         out.add(toOut);
@@ -197,7 +193,7 @@ public class ItemStackTest extends AbstractTestingBase {
             notSingletons.toArray(lists);
             lists[lists.length - 1] = out;
 
-            final RecursiveContainer methodParams = new RecursiveContainer(joiner, new Object[lists.length], nameParameter, new ArrayList(lists.length), new ArrayList(), lists);
+            final RecursiveContainer methodParams = new RecursiveContainer(joiner, new Object[lists.length], nameParameter, new ArrayList<>(lists.length), new ArrayList<>(), lists);
 
             recursivelyCompound(methodParams, 0);
             methodParams.out.addAll(out);
@@ -317,7 +313,7 @@ public class ItemStackTest extends AbstractTestingBase {
     static final int NAME_PARAMETER = 2;
     static {
         final ItemFactory factory = CraftItemFactory.instance();
-        final Map, Material> possibleMaterials = new HashMap, Material>();
+        final Map, Material> possibleMaterials = new HashMap<>();
         ItemMeta meta;
         for (final Material material : Material.values()) {
             meta = factory.getItemMeta(material);
@@ -326,7 +322,7 @@ public class ItemStackTest extends AbstractTestingBase {
             possibleMaterials.put(meta.getClass(), material);
 
         }
-        COMPOUND_MATERIALS = possibleMaterials.values().toArray(new Material[possibleMaterials.size()]);
+        COMPOUND_MATERIALS = possibleMaterials.values().toArray(new Material[0]);
     }
 
     @Parameter(0) public StackProvider provider;
@@ -424,19 +420,10 @@ public class ItemStackTest extends AbstractTestingBase {
         final ItemStack unequalStack = unequalProvider.stack();
 
         ByteArrayOutputStream out = new ByteArrayOutputStream();
-        ObjectOutputStream oos = null;
-        try {
-            oos = new BukkitObjectOutputStream(out);
+        try (ObjectOutputStream oos = new BukkitObjectOutputStream(out)) {
 
             oos.writeObject(stack);
             oos.writeObject(unequalStack);
-        } finally {
-            if (oos != null) {
-                try {
-                    oos.close();
-                } catch (IOException ex) {
-                }
-            }
         }
 
         final String data = new String(Base64Coder.encode(out.toByteArray()));
@@ -456,7 +443,7 @@ public class ItemStackTest extends AbstractTestingBase {
             if (ois != null) {
                 try {
                     ois.close();
-                } catch (IOException ex) {
+                } catch (IOException ignored) {
                 }
             }
         }
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/support/DummyServer.java b/TacoSpigot-Server/src/test/java/org/bukkit/support/DummyServer.java
index 05634f4..77504cb 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/support/DummyServer.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/support/DummyServer.java
@@ -12,44 +12,28 @@ import org.bukkit.craftbukkit.inventory.CraftItemFactory;
 import org.bukkit.craftbukkit.util.Versioning;
 
 public class DummyServer implements InvocationHandler {
-    private static interface MethodHandler {
+    private interface MethodHandler {
         Object handle(DummyServer server, Object[] args);
     }
-    private static final HashMap methods = new HashMap();
+    private static final HashMap methods = new HashMap<>();
     static {
         try {
             methods.put(
                     Server.class.getMethod("getItemFactory"),
-                    new MethodHandler() {
-                        public Object handle(DummyServer server, Object[] args) {
-                            return CraftItemFactory.instance();
-                        }
-                    }
-                );
+                    (server, args) -> CraftItemFactory.instance()
+            );
             methods.put(
                     Server.class.getMethod("getName"),
-                    new MethodHandler() {
-                        public Object handle(DummyServer server, Object[] args) {
-                            return DummyServer.class.getName();
-                        }
-                    }
-                );
+                    (server, args) -> DummyServer.class.getName()
+            );
             methods.put(
                     Server.class.getMethod("getVersion"),
-                    new MethodHandler() {
-                        public Object handle(DummyServer server, Object[] args) {
-                            return DummyServer.class.getPackage().getImplementationVersion();
-                        }
-                    }
-                );
+                    (server, args) -> DummyServer.class.getPackage().getImplementationVersion()
+            );
             methods.put(
                     Server.class.getMethod("getBukkitVersion"),
-                    new MethodHandler() {
-                        public Object handle(DummyServer server, Object[] args) {
-                            return Versioning.getBukkitVersion();
-                        }
-                    }
-                );
+                    (server, args) -> Versioning.getBukkitVersion()
+            );
             methods.put(
                     Server.class.getMethod("getLogger"),
                     new MethodHandler() {
@@ -67,7 +51,7 @@ public class DummyServer implements InvocationHandler {
 
     public static void setup() {}
 
-    private DummyServer() {};
+    private DummyServer() {}
 
     public Object invoke(Object proxy, Method method, Object[] args) {
         MethodHandler handler = methods.get(method);
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/support/Matchers.java b/TacoSpigot-Server/src/test/java/org/bukkit/support/Matchers.java
index b190c67..6602029 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/support/Matchers.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/support/Matchers.java
@@ -9,7 +9,7 @@ public final class Matchers {
     private Matchers() {}
 
     public static  Matcher sameHash(T value) {
-        return new SameHash(value);
+        return new SameHash<>(value);
     }
 
     static class SameHash extends BaseMatcher {
diff --git a/TacoSpigot-Server/src/test/java/org/bukkit/support/Util.java b/TacoSpigot-Server/src/test/java/org/bukkit/support/Util.java
index 2f24d9a..8afc4e5 100644
--- a/TacoSpigot-Server/src/test/java/org/bukkit/support/Util.java
+++ b/TacoSpigot-Server/src/test/java/org/bukkit/support/Util.java
@@ -23,8 +23,7 @@ public class Util {
         field.setAccessible(true);
         try {
             return (T) field.get(object);
-        } catch (IllegalArgumentException e) {
-        } catch (IllegalAccessException e) {
+        } catch (IllegalArgumentException | IllegalAccessException ignored) {
         }
         throw new RuntimeException("Unable to get internal value");
     }