From c48a7120e7db82f7ce9c3f10ec4fd638ed41c4af Mon Sep 17 00:00:00 2001 From: disclearing <46827438+disclearing@users.noreply.github.com> Date: Sat, 17 Aug 2019 20:38:37 +0100 Subject: [PATCH] yikeesss :heart: --- .../Maven__org_json_json_20171018.xml | 13 + PaperSpigot-API/.gitignore | 31 + PaperSpigot-API/CONTRIBUTING.md | 497 +++ PaperSpigot-API/LICENCE.txt | 674 ++++ PaperSpigot-API/README.md | 16 + PaperSpigot-API/dependency-reduced-pom.xml | 106 + PaperSpigot-API/pom.xml | 163 + .../aikar/timings/FullServerTickHandler.java | 79 + .../co/aikar/timings/NullTimingHandler.java | 61 + .../co/aikar/timings/TimedEventExecutor.java | 81 + .../main/java/co/aikar/timings/Timing.java | 72 + .../java/co/aikar/timings/TimingData.java | 105 + .../java/co/aikar/timings/TimingHandler.java | 190 + .../java/co/aikar/timings/TimingHistory.java | 276 ++ .../co/aikar/timings/TimingHistoryEntry.java | 59 + .../co/aikar/timings/TimingIdentifier.java | 102 + .../main/java/co/aikar/timings/Timings.java | 273 ++ .../java/co/aikar/timings/TimingsCommand.java | 110 + .../java/co/aikar/timings/TimingsExport.java | 373 ++ .../java/co/aikar/timings/TimingsManager.java | 194 + .../co/aikar/timings/UnsafeTimingHandler.java | 51 + .../src/main/java/co/aikar/util/JSONUtil.java | 123 + .../java/co/aikar/util/LoadingIntMap.java | 63 + .../main/java/co/aikar/util/LoadingMap.java | 323 ++ .../main/java/co/aikar/util/MRUMapCache.java | 100 + .../src/main/java/org/bukkit/Achievement.java | 69 + .../src/main/java/org/bukkit/Art.java | 111 + .../main/java/org/bukkit/AxisAlignedBB.java | 111 + .../src/main/java/org/bukkit/BanEntry.java | 127 + .../src/main/java/org/bukkit/BanList.java | 72 + .../java/org/bukkit/BlockChangeDelegate.java | 104 + .../src/main/java/org/bukkit/Bukkit.java | 776 ++++ .../src/main/java/org/bukkit/ChatColor.java | 253 ++ .../src/main/java/org/bukkit/Chunk.java | 124 + .../main/java/org/bukkit/ChunkSnapshot.java | 129 + .../src/main/java/org/bukkit/CoalType.java | 50 + .../src/main/java/org/bukkit/Color.java | 344 ++ .../src/main/java/org/bukkit/CropState.java | 81 + .../src/main/java/org/bukkit/Difficulty.java | 72 + .../src/main/java/org/bukkit/DyeColor.java | 239 ++ .../src/main/java/org/bukkit/Effect.java | 337 ++ .../main/java/org/bukkit/EntityEffect.java | 136 + .../main/java/org/bukkit/FireworkEffect.java | 421 +++ .../src/main/java/org/bukkit/GameMode.java | 66 + .../main/java/org/bukkit/GrassSpecies.java | 61 + .../src/main/java/org/bukkit/Instrument.java | 67 + .../src/main/java/org/bukkit/Location.java | 560 +++ .../src/main/java/org/bukkit/Material.java | 1034 ++++++ .../java/org/bukkit/NetherWartsState.java | 21 + .../src/main/java/org/bukkit/Note.java | 276 ++ .../main/java/org/bukkit/OfflinePlayer.java | 136 + .../src/main/java/org/bukkit/PortalType.java | 22 + .../src/main/java/org/bukkit/Rotation.java | 47 + .../main/java/org/bukkit/SandstoneType.java | 51 + .../src/main/java/org/bukkit/Server.java | 976 +++++ .../src/main/java/org/bukkit/SkullType.java | 12 + .../src/main/java/org/bukkit/Sound.java | 211 ++ .../src/main/java/org/bukkit/Statistic.java | 108 + .../src/main/java/org/bukkit/TravelAgent.java | 94 + .../src/main/java/org/bukkit/TreeSpecies.java | 74 + .../src/main/java/org/bukkit/TreeType.java | 72 + .../main/java/org/bukkit/UnsafeValues.java | 33 + .../src/main/java/org/bukkit/Utility.java | 18 + .../src/main/java/org/bukkit/Warning.java | 109 + .../src/main/java/org/bukkit/WeatherType.java | 17 + .../src/main/java/org/bukkit/World.java | 1315 +++++++ .../main/java/org/bukkit/WorldCreator.java | 295 ++ .../src/main/java/org/bukkit/WorldType.java | 47 + .../main/java/org/bukkit/block/Beacon.java | 9 + .../src/main/java/org/bukkit/block/Biome.java | 68 + .../src/main/java/org/bukkit/block/Block.java | 393 ++ .../main/java/org/bukkit/block/BlockFace.java | 132 + .../java/org/bukkit/block/BlockState.java | 194 + .../java/org/bukkit/block/BrewingStand.java | 25 + .../src/main/java/org/bukkit/block/Chest.java | 17 + .../java/org/bukkit/block/CommandBlock.java | 40 + .../java/org/bukkit/block/ContainerBlock.java | 11 + .../org/bukkit/block/CreatureSpawner.java | 88 + .../main/java/org/bukkit/block/Dispenser.java | 27 + .../java/org/bukkit/block/DoubleChest.java | 50 + .../main/java/org/bukkit/block/Dropper.java | 25 + .../main/java/org/bukkit/block/Furnace.java | 57 + .../main/java/org/bukkit/block/Hopper.java | 10 + .../main/java/org/bukkit/block/Jukebox.java | 36 + .../main/java/org/bukkit/block/NoteBlock.java | 72 + .../org/bukkit/block/PistonMoveReaction.java | 51 + .../src/main/java/org/bukkit/block/Sign.java | 51 + .../src/main/java/org/bukkit/block/Skull.java | 62 + .../bukkit/command/BlockCommandSender.java | 13 + .../main/java/org/bukkit/command/Command.java | 397 ++ .../org/bukkit/command/CommandException.java | 28 + .../org/bukkit/command/CommandExecutor.java | 18 + .../java/org/bukkit/command/CommandMap.java | 109 + .../org/bukkit/command/CommandSender.java | 35 + .../bukkit/command/ConsoleCommandSender.java | 6 + .../bukkit/command/FormattedCommandAlias.java | 120 + .../bukkit/command/MultipleCommandAlias.java | 33 + .../org/bukkit/command/PluginCommand.java | 160 + .../command/PluginCommandYamlParser.java | 76 + .../command/PluginIdentifiableCommand.java | 19 + .../command/RemoteConsoleCommandSender.java | 4 + .../org/bukkit/command/SimpleCommandMap.java | 300 ++ .../bukkit/command/TabCommandExecutor.java | 16 + .../java/org/bukkit/command/TabCompleter.java | 22 + .../java/org/bukkit/command/TabExecutor.java | 8 + .../command/defaults/AchievementCommand.java | 187 + .../bukkit/command/defaults/BanCommand.java | 55 + .../bukkit/command/defaults/BanIpCommand.java | 77 + .../command/defaults/BanListCommand.java | 73 + .../command/defaults/BukkitCommand.java | 15 + .../bukkit/command/defaults/ClearCommand.java | 114 + .../defaults/DefaultGameModeCommand.java | 70 + .../bukkit/command/defaults/DeopCommand.java | 62 + .../command/defaults/DifficultyCommand.java | 81 + .../command/defaults/EffectCommand.java | 119 + .../command/defaults/EnchantCommand.java | 169 + .../bukkit/command/defaults/ExpCommand.java | 89 + .../command/defaults/GameModeCommand.java | 98 + .../command/defaults/GameRuleCommand.java | 88 + .../bukkit/command/defaults/GiveCommand.java | 129 + .../bukkit/command/defaults/HelpCommand.java | 228 ++ .../bukkit/command/defaults/KickCommand.java | 59 + .../bukkit/command/defaults/ListCommand.java | 54 + .../bukkit/command/defaults/MeCommand.java | 34 + .../bukkit/command/defaults/OpCommand.java | 76 + .../command/defaults/PardonCommand.java | 56 + .../command/defaults/PardonIpCommand.java | 52 + .../command/defaults/PlaySoundCommand.java | 87 + .../command/defaults/PluginsCommand.java | 54 + .../command/defaults/ReloadCommand.java | 36 + .../bukkit/command/defaults/SaveCommand.java | 46 + .../command/defaults/SaveOffCommand.java | 41 + .../command/defaults/SaveOnCommand.java | 41 + .../bukkit/command/defaults/SayCommand.java | 62 + .../command/defaults/ScoreboardCommand.java | 617 +++ .../bukkit/command/defaults/SeedCommand.java | 41 + .../defaults/SetIdleTimeoutCommand.java | 53 + .../defaults/SetWorldSpawnCommand.java | 79 + .../command/defaults/SpawnpointCommand.java | 87 + .../defaults/SpreadPlayersCommand.java | 265 ++ .../bukkit/command/defaults/StopCommand.java | 48 + .../command/defaults/TeleportCommand.java | 124 + .../bukkit/command/defaults/TellCommand.java | 60 + .../command/defaults/TestForCommand.java | 38 + .../bukkit/command/defaults/TimeCommand.java | 88 + .../defaults/ToggleDownfallCommand.java | 56 + .../command/defaults/VanillaCommand.java | 110 + .../command/defaults/VersionCommand.java | 129 + .../command/defaults/WeatherCommand.java | 73 + .../command/defaults/WhitelistCommand.java | 127 + .../bukkit/configuration/Configuration.java | 84 + .../configuration/ConfigurationOptions.java | 90 + .../configuration/ConfigurationSection.java | 851 +++++ .../InvalidConfigurationException.java | 45 + .../configuration/MemoryConfiguration.java | 79 + .../MemoryConfigurationOptions.java | 28 + .../bukkit/configuration/MemorySection.java | 837 +++++ .../configuration/file/FileConfiguration.java | 290 ++ .../file/FileConfigurationOptions.java | 118 + .../configuration/file/YamlConfiguration.java | 249 ++ .../file/YamlConfigurationOptions.java | 71 + .../configuration/file/YamlConstructor.java | 49 + .../configuration/file/YamlRepresenter.java | 38 + .../ConfigurationSerializable.java | 35 + .../ConfigurationSerialization.java | 281 ++ .../DelegateDeserialization.java | 22 + .../serialization/SerializableAs.java | 34 + .../bukkit/conversations/BooleanPrompt.java | 37 + .../org/bukkit/conversations/Conversable.java | 57 + .../bukkit/conversations/Conversation.java | 304 ++ .../ConversationAbandonedEvent.java | 53 + .../ConversationAbandonedListener.java | 15 + .../conversations/ConversationCanceller.java | 34 + .../conversations/ConversationContext.java | 79 + .../conversations/ConversationFactory.java | 228 ++ .../conversations/ConversationPrefix.java | 19 + .../ExactMatchConversationCanceller.java | 29 + .../bukkit/conversations/FixedSetPrompt.java | 46 + .../InactivityConversationCanceller.java | 79 + ...anuallyAbandonedConversationCanceller.java | 20 + .../bukkit/conversations/MessagePrompt.java | 42 + .../conversations/NullConversationPrefix.java | 20 + .../bukkit/conversations/NumericPrompt.java | 83 + .../conversations/PlayerNamePrompt.java | 38 + .../PluginNameConversationPrefix.java | 40 + .../java/org/bukkit/conversations/Prompt.java | 45 + .../org/bukkit/conversations/RegexPrompt.java | 28 + .../bukkit/conversations/StringPrompt.java | 18 + .../conversations/ValidatingPrompt.java | 78 + .../org/bukkit/enchantments/Enchantment.java | 292 ++ .../enchantments/EnchantmentTarget.java | 172 + .../enchantments/EnchantmentWrapper.java | 51 + .../main/java/org/bukkit/entity/Ageable.java | 67 + .../main/java/org/bukkit/entity/Ambient.java | 6 + .../java/org/bukkit/entity/AnimalTamer.java | 20 + .../main/java/org/bukkit/entity/Animals.java | 6 + .../main/java/org/bukkit/entity/Arrow.java | 58 + .../src/main/java/org/bukkit/entity/Bat.java | 27 + .../main/java/org/bukkit/entity/Blaze.java | 8 + .../src/main/java/org/bukkit/entity/Boat.java | 72 + .../java/org/bukkit/entity/CaveSpider.java | 6 + .../main/java/org/bukkit/entity/Chicken.java | 6 + .../org/bukkit/entity/ComplexEntityPart.java | 14 + .../bukkit/entity/ComplexLivingEntity.java | 16 + .../src/main/java/org/bukkit/entity/Cow.java | 6 + .../main/java/org/bukkit/entity/Creature.java | 26 + .../java/org/bukkit/entity/CreatureType.java | 102 + .../main/java/org/bukkit/entity/Creeper.java | 21 + .../java/org/bukkit/entity/Damageable.java | 112 + .../src/main/java/org/bukkit/entity/Egg.java | 6 + .../java/org/bukkit/entity/EnderCrystal.java | 7 + .../java/org/bukkit/entity/EnderDragon.java | 8 + .../org/bukkit/entity/EnderDragonPart.java | 8 + .../java/org/bukkit/entity/EnderPearl.java | 8 + .../java/org/bukkit/entity/EnderSignal.java | 9 + .../main/java/org/bukkit/entity/Enderman.java | 23 + .../main/java/org/bukkit/entity/Entity.java | 345 ++ .../java/org/bukkit/entity/EntityType.java | 267 ++ .../java/org/bukkit/entity/ExperienceOrb.java | 21 + .../java/org/bukkit/entity/Explosive.java | 35 + .../java/org/bukkit/entity/FallingBlock.java | 50 + .../java/org/bukkit/entity/FallingSand.java | 9 + .../main/java/org/bukkit/entity/Fireball.java | 24 + .../main/java/org/bukkit/entity/Firework.java | 26 + .../src/main/java/org/bukkit/entity/Fish.java | 8 + .../main/java/org/bukkit/entity/FishHook.java | 28 + .../main/java/org/bukkit/entity/Flying.java | 6 + .../main/java/org/bukkit/entity/Ghast.java | 6 + .../main/java/org/bukkit/entity/Giant.java | 6 + .../main/java/org/bukkit/entity/Golem.java | 8 + .../main/java/org/bukkit/entity/Hanging.java | 22 + .../main/java/org/bukkit/entity/Horse.java | 256 ++ .../java/org/bukkit/entity/HumanEntity.java | 177 + .../java/org/bukkit/entity/IronGolem.java | 22 + .../src/main/java/org/bukkit/entity/Item.java | 37 + .../java/org/bukkit/entity/ItemFrame.java | 39 + .../java/org/bukkit/entity/LargeFireball.java | 7 + .../java/org/bukkit/entity/LeashHitch.java | 7 + .../org/bukkit/entity/LightningStrike.java | 32 + .../java/org/bukkit/entity/LivingEntity.java | 394 ++ .../java/org/bukkit/entity/MagmaCube.java | 7 + .../main/java/org/bukkit/entity/Minecart.java | 108 + .../main/java/org/bukkit/entity/Monster.java | 6 + .../java/org/bukkit/entity/MushroomCow.java | 8 + .../src/main/java/org/bukkit/entity/NPC.java | 8 + .../main/java/org/bukkit/entity/Ocelot.java | 83 + .../main/java/org/bukkit/entity/Painting.java | 39 + .../src/main/java/org/bukkit/entity/Pig.java | 21 + .../java/org/bukkit/entity/PigZombie.java | 36 + .../main/java/org/bukkit/entity/Player.java | 1194 ++++++ .../org/bukkit/entity/PoweredMinecart.java | 9 + .../java/org/bukkit/entity/Projectile.java | 56 + .../main/java/org/bukkit/entity/Sheep.java | 19 + .../java/org/bukkit/entity/Silverfish.java | 6 + .../main/java/org/bukkit/entity/Skeleton.java | 65 + .../main/java/org/bukkit/entity/Slime.java | 17 + .../java/org/bukkit/entity/SmallFireball.java | 8 + .../main/java/org/bukkit/entity/Snowball.java | 6 + .../main/java/org/bukkit/entity/Snowman.java | 8 + .../main/java/org/bukkit/entity/Spider.java | 6 + .../main/java/org/bukkit/entity/Squid.java | 6 + .../org/bukkit/entity/StorageMinecart.java | 9 + .../java/org/bukkit/entity/TNTPrimed.java | 40 + .../main/java/org/bukkit/entity/Tameable.java | 44 + .../org/bukkit/entity/ThrownExpBottle.java | 8 + .../java/org/bukkit/entity/ThrownPotion.java | 39 + .../main/java/org/bukkit/entity/Vehicle.java | 23 + .../main/java/org/bukkit/entity/Villager.java | 69 + .../main/java/org/bukkit/entity/WaterMob.java | 6 + .../main/java/org/bukkit/entity/Weather.java | 6 + .../main/java/org/bukkit/entity/Witch.java | 7 + .../main/java/org/bukkit/entity/Wither.java | 7 + .../java/org/bukkit/entity/WitherSkull.java | 21 + .../src/main/java/org/bukkit/entity/Wolf.java | 56 + .../main/java/org/bukkit/entity/Zombie.java | 35 + .../entity/minecart/CommandMinecart.java | 36 + .../entity/minecart/ExplosiveMinecart.java | 9 + .../entity/minecart/HopperMinecart.java | 10 + .../entity/minecart/PoweredMinecart.java | 10 + .../entity/minecart/RideableMinecart.java | 14 + .../entity/minecart/SpawnerMinecart.java | 10 + .../entity/minecart/StorageMinecart.java | 12 + .../java/org/bukkit/event/Cancellable.java | 20 + .../src/main/java/org/bukkit/event/Event.java | 96 + .../java/org/bukkit/event/EventException.java | 53 + .../java/org/bukkit/event/EventHandler.java | 37 + .../java/org/bukkit/event/EventPriority.java | 47 + .../java/org/bukkit/event/HandlerList.java | 231 ++ .../main/java/org/bukkit/event/Listener.java | 6 + .../java/org/bukkit/event/block/Action.java | 33 + .../bukkit/event/block/BlockBreakEvent.java | 55 + .../bukkit/event/block/BlockBurnEvent.java | 38 + .../event/block/BlockCanBuildEvent.java | 90 + .../bukkit/event/block/BlockDamageEvent.java | 83 + .../event/block/BlockDispenseEvent.java | 84 + .../org/bukkit/event/block/BlockEvent.java | 24 + .../org/bukkit/event/block/BlockExpEvent.java | 45 + .../bukkit/event/block/BlockFadeEvent.java | 59 + .../bukkit/event/block/BlockFormEvent.java | 39 + .../bukkit/event/block/BlockFromToEvent.java | 71 + .../bukkit/event/block/BlockGrowEvent.java | 56 + .../bukkit/event/block/BlockIgniteEvent.java | 138 + .../event/block/BlockMultiPlaceEvent.java | 36 + .../bukkit/event/block/BlockPhysicsEvent.java | 62 + .../bukkit/event/block/BlockPistonEvent.java | 48 + .../event/block/BlockPistonExtendEvent.java | 59 + .../event/block/BlockPistonRetractEvent.java | 35 + .../bukkit/event/block/BlockPlaceEvent.java | 121 + .../event/block/BlockRedstoneEvent.java | 55 + .../bukkit/event/block/BlockSpreadEvent.java | 49 + .../event/block/EntityBlockFormEvent.java | 32 + .../bukkit/event/block/LeavesDecayEvent.java | 36 + .../org/bukkit/event/block/NotePlayEvent.java | 83 + .../bukkit/event/block/SignChangeEvent.java | 84 + .../event/enchantment/EnchantItemEvent.java | 121 + .../enchantment/PrepareItemEnchantEvent.java | 96 + .../event/entity/CreatureSpawnEvent.java | 165 + .../event/entity/CreeperPowerEvent.java | 93 + .../event/entity/EnderpearlLandEvent.java | 77 + .../event/entity/EntityBreakDoorEvent.java | 22 + .../event/entity/EntityChangeBlockEvent.java | 95 + .../entity/EntityCombustByBlockEvent.java | 27 + .../entity/EntityCombustByEntityEvent.java | 24 + .../event/entity/EntityCombustEvent.java | 59 + .../event/entity/EntityCreatePortalEvent.java | 65 + .../entity/EntityDamageByBlockEvent.java | 39 + .../entity/EntityDamageByEntityEvent.java | 38 + .../event/entity/EntityDamageEvent.java | 410 ++ .../bukkit/event/entity/EntityDeathEvent.java | 72 + .../org/bukkit/event/entity/EntityEvent.java | 34 + .../event/entity/EntityExplodeEvent.java | 85 + .../event/entity/EntityInteractEvent.java | 46 + .../event/entity/EntityPortalEnterEvent.java | 36 + .../event/entity/EntityPortalEvent.java | 82 + .../event/entity/EntityPortalExitEvent.java | 60 + .../event/entity/EntityRegainHealthEvent.java | 137 + .../event/entity/EntityShootBowEvent.java | 84 + .../bukkit/event/entity/EntitySpawnEvent.java | 45 + .../bukkit/event/entity/EntityTameEvent.java | 51 + .../event/entity/EntityTargetEvent.java | 141 + .../entity/EntityTargetLivingEntityEvent.java | 34 + .../event/entity/EntityTeleportEvent.java | 77 + .../event/entity/EntityUnleashEvent.java | 52 + .../bukkit/event/entity/ExpBottleEvent.java | 75 + .../event/entity/ExplosionPrimeEvent.java | 80 + .../event/entity/FoodLevelChangeEvent.java | 67 + .../bukkit/event/entity/HorseJumpEvent.java | 78 + .../bukkit/event/entity/ItemDespawnEvent.java | 55 + .../bukkit/event/entity/ItemSpawnEvent.java | 23 + .../org/bukkit/event/entity/PigZapEvent.java | 64 + .../bukkit/event/entity/PlayerDeathEvent.java | 157 + .../event/entity/PlayerLeashEntityEvent.java | 68 + .../event/entity/PotionEffectAddEvent.java | 34 + .../event/entity/PotionEffectEvent.java | 23 + .../event/entity/PotionEffectExpireEvent.java | 45 + .../event/entity/PotionEffectExtendEvent.java | 26 + .../event/entity/PotionEffectRemoveEvent.java | 35 + .../event/entity/PotionSplashEvent.java | 94 + .../event/entity/ProjectileHitEvent.java | 46 + .../event/entity/ProjectileLaunchEvent.java | 40 + .../event/entity/SheepDyeWoolEvent.java | 62 + .../event/entity/SheepRegrowWoolEvent.java | 41 + .../bukkit/event/entity/SlimeSplitEvent.java | 59 + .../event/entity/SpawnerSpawnEvent.java | 22 + .../hanging/HangingBreakByEntityEvent.java | 25 + .../event/hanging/HangingBreakEvent.java | 71 + .../bukkit/event/hanging/HangingEvent.java | 24 + .../event/hanging/HangingPlaceEvent.java | 70 + .../org/bukkit/event/inventory/BrewEvent.java | 48 + .../org/bukkit/event/inventory/ClickType.java | 115 + .../event/inventory/CraftItemEvent.java | 40 + .../org/bukkit/event/inventory/DragType.java | 17 + .../event/inventory/EquipmentSetEvent.java | 48 + .../event/inventory/FurnaceBurnEvent.java | 99 + .../event/inventory/FurnaceExtractEvent.java | 49 + .../event/inventory/FurnaceSmeltEvent.java | 79 + .../event/inventory/InventoryAction.java | 91 + .../event/inventory/InventoryClickEvent.java | 245 ++ .../event/inventory/InventoryCloseEvent.java | 35 + .../inventory/InventoryCreativeEvent.java | 27 + .../event/inventory/InventoryDragEvent.java | 164 + .../event/inventory/InventoryEvent.java | 59 + .../inventory/InventoryInteractEvent.java | 78 + .../inventory/InventoryMoveItemEvent.java | 108 + .../event/inventory/InventoryOpenEvent.java | 63 + .../inventory/InventoryPickupItemEvent.java | 58 + .../bukkit/event/inventory/InventoryType.java | 124 + .../inventory/PrepareItemCraftEvent.java | 56 + .../painting/PaintingBreakByEntityEvent.java | 31 + .../event/painting/PaintingBreakEvent.java | 76 + .../bukkit/event/painting/PaintingEvent.java | 29 + .../event/painting/PaintingPlaceEvent.java | 76 + .../event/player/AsyncPlayerChatEvent.java | 140 + .../player/AsyncPlayerPreLoginEvent.java | 201 + .../player/PlayerAchievementAwardedEvent.java | 46 + .../event/player/PlayerAnimationEvent.java | 52 + .../event/player/PlayerAnimationType.java | 8 + .../event/player/PlayerBedEnterEvent.java | 46 + .../event/player/PlayerBedLeaveEvent.java | 36 + .../event/player/PlayerBucketEmptyEvent.java | 28 + .../event/player/PlayerBucketEvent.java | 80 + .../event/player/PlayerBucketFillEvent.java | 28 + .../event/player/PlayerChangedWorldEvent.java | 36 + .../event/player/PlayerChannelEvent.java | 31 + .../bukkit/event/player/PlayerChatEvent.java | 125 + .../player/PlayerChatTabCompleteEvent.java | 70 + .../player/PlayerCommandPreprocessEvent.java | 172 + .../event/player/PlayerDropItemEvent.java | 46 + .../event/player/PlayerEditBookEvent.java | 124 + .../event/player/PlayerEggThrowEvent.java | 137 + .../org/bukkit/event/player/PlayerEvent.java | 30 + .../event/player/PlayerExpChangeEvent.java | 44 + .../bukkit/event/player/PlayerFishEvent.java | 138 + .../player/PlayerGameModeChangeEvent.java | 46 + .../player/PlayerInteractEntityEvent.java | 46 + .../event/player/PlayerInteractEvent.java | 187 + .../event/player/PlayerInventoryEvent.java | 44 + .../event/player/PlayerItemBreakEvent.java | 39 + .../event/player/PlayerItemConsumeEvent.java | 74 + .../event/player/PlayerItemDamageEvent.java | 54 + .../event/player/PlayerItemHeldEvent.java | 56 + .../bukkit/event/player/PlayerJoinEvent.java | 44 + .../bukkit/event/player/PlayerKickEvent.java | 75 + .../event/player/PlayerLevelChangeEvent.java | 46 + .../bukkit/event/player/PlayerLoginEvent.java | 207 ++ .../bukkit/event/player/PlayerMoveEvent.java | 95 + .../event/player/PlayerPickupItemEvent.java | 57 + .../event/player/PlayerPortalEvent.java | 87 + .../event/player/PlayerPreLoginEvent.java | 159 + .../bukkit/event/player/PlayerQuitEvent.java | 44 + .../player/PlayerRegisterChannelEvent.java | 13 + .../event/player/PlayerRespawnEvent.java | 60 + .../event/player/PlayerShearEntityEvent.java | 48 + .../player/PlayerStatisticIncrementEvent.java | 116 + .../event/player/PlayerTeleportEvent.java | 73 + .../event/player/PlayerToggleFlightEvent.java | 45 + .../event/player/PlayerToggleSneakEvent.java | 45 + .../event/player/PlayerToggleSprintEvent.java | 45 + .../player/PlayerUnleashEntityEvent.java | 36 + .../player/PlayerUnregisterChannelEvent.java | 13 + .../event/player/PlayerVelocityEvent.java | 55 + .../event/server/MapInitializeEvent.java | 34 + .../event/server/PluginDisableEvent.java | 24 + .../event/server/PluginEnableEvent.java | 24 + .../org/bukkit/event/server/PluginEvent.java | 23 + .../server/RemoteServerCommandEvent.java | 25 + .../event/server/ServerCommandEvent.java | 97 + .../org/bukkit/event/server/ServerEvent.java | 9 + .../event/server/ServerListPingEvent.java | 142 + .../org/bukkit/event/server/ServiceEvent.java | 19 + .../event/server/ServiceRegisterEvent.java | 27 + .../event/server/ServiceUnregisterEvent.java | 27 + .../vehicle/VehicleBlockCollisionEvent.java | 36 + .../event/vehicle/VehicleCollisionEvent.java | 12 + .../event/vehicle/VehicleCreateEvent.java | 24 + .../event/vehicle/VehicleDamageEvent.java | 92 + .../event/vehicle/VehicleDestroyEvent.java | 48 + .../event/vehicle/VehicleEnterEvent.java | 46 + .../vehicle/VehicleEntityCollisionEvent.java | 59 + .../bukkit/event/vehicle/VehicleEvent.java | 24 + .../event/vehicle/VehicleExitEvent.java | 58 + .../event/vehicle/VehicleMoveEvent.java | 49 + .../event/vehicle/VehicleUpdateEvent.java | 24 + .../event/weather/LightningStrikeEvent.java | 46 + .../event/weather/ThunderChangeEvent.java | 45 + .../event/weather/WeatherChangeEvent.java | 45 + .../bukkit/event/weather/WeatherEvent.java | 24 + .../org/bukkit/event/world/ChunkEvent.java | 24 + .../bukkit/event/world/ChunkLoadEvent.java | 37 + .../event/world/ChunkPopulateEvent.java | 28 + .../bukkit/event/world/ChunkUnloadEvent.java | 34 + .../bukkit/event/world/PortalCreateEvent.java | 77 + .../bukkit/event/world/SpawnChangeEvent.java | 37 + .../event/world/StructureGrowEvent.java | 96 + .../org/bukkit/event/world/WorldEvent.java | 24 + .../bukkit/event/world/WorldInitEvent.java | 24 + .../bukkit/event/world/WorldLoadEvent.java | 24 + .../bukkit/event/world/WorldSaveEvent.java | 24 + .../bukkit/event/world/WorldUnloadEvent.java | 34 + .../org/bukkit/generator/BlockPopulator.java | 29 + .../org/bukkit/generator/ChunkGenerator.java | 268 ++ .../bukkit/help/GenericCommandHelpTopic.java | 77 + .../main/java/org/bukkit/help/HelpMap.java | 79 + .../main/java/org/bukkit/help/HelpTopic.java | 121 + .../org/bukkit/help/HelpTopicComparator.java | 48 + .../org/bukkit/help/HelpTopicFactory.java | 42 + .../java/org/bukkit/help/IndexHelpTopic.java | 112 + .../org/bukkit/inventory/AnvilInventory.java | 7 + .../org/bukkit/inventory/BeaconInventory.java | 21 + .../org/bukkit/inventory/BrewerInventory.java | 25 + .../bukkit/inventory/CraftingInventory.java | 45 + .../inventory/DoubleChestInventory.java | 25 + .../bukkit/inventory/EnchantingInventory.java | 21 + .../org/bukkit/inventory/EntityEquipment.java | 236 ++ .../bukkit/inventory/FurnaceInventory.java | 53 + .../org/bukkit/inventory/FurnaceRecipe.java | 100 + .../org/bukkit/inventory/HorseInventory.java | 35 + .../java/org/bukkit/inventory/Inventory.java | 381 ++ .../org/bukkit/inventory/InventoryHolder.java | 11 + .../org/bukkit/inventory/InventoryView.java | 231 ++ .../org/bukkit/inventory/ItemFactory.java | 124 + .../java/org/bukkit/inventory/ItemStack.java | 603 +++ .../bukkit/inventory/MerchantInventory.java | 4 + .../org/bukkit/inventory/PlayerInventory.java | 130 + .../java/org/bukkit/inventory/Recipe.java | 14 + .../org/bukkit/inventory/ShapedRecipe.java | 148 + .../org/bukkit/inventory/ShapelessRecipe.java | 226 ++ .../org/bukkit/inventory/meta/BookMeta.java | 130 + .../meta/EnchantmentStorageMeta.java | 79 + .../inventory/meta/FireworkEffectMeta.java | 34 + .../bukkit/inventory/meta/FireworkMeta.java | 94 + .../org/bukkit/inventory/meta/ItemMeta.java | 157 + .../inventory/meta/LeatherArmorMeta.java | 31 + .../org/bukkit/inventory/meta/MapMeta.java | 23 + .../org/bukkit/inventory/meta/PotionMeta.java | 77 + .../org/bukkit/inventory/meta/Repairable.java | 31 + .../org/bukkit/inventory/meta/SkullMeta.java | 36 + .../main/java/org/bukkit/map/MapCanvas.java | 84 + .../main/java/org/bukkit/map/MapCursor.java | 189 + .../org/bukkit/map/MapCursorCollection.java | 96 + .../src/main/java/org/bukkit/map/MapFont.java | 144 + .../main/java/org/bukkit/map/MapPalette.java | 241 ++ .../main/java/org/bukkit/map/MapRenderer.java | 56 + .../src/main/java/org/bukkit/map/MapView.java | 157 + .../java/org/bukkit/map/MinecraftFont.java | 328 ++ .../java/org/bukkit/material/Attachable.java | 16 + .../main/java/org/bukkit/material/Bed.java | 142 + .../main/java/org/bukkit/material/Button.java | 126 + .../main/java/org/bukkit/material/Cake.java | 91 + .../java/org/bukkit/material/Cauldron.java | 61 + .../main/java/org/bukkit/material/Chest.java | 60 + .../main/java/org/bukkit/material/Coal.java | 77 + .../java/org/bukkit/material/CocoaPlant.java | 132 + .../java/org/bukkit/material/Colorable.java | 24 + .../java/org/bukkit/material/Command.java | 73 + .../main/java/org/bukkit/material/Crops.java | 77 + .../org/bukkit/material/DetectorRail.java | 56 + .../main/java/org/bukkit/material/Diode.java | 123 + .../java/org/bukkit/material/Directional.java | 20 + .../bukkit/material/DirectionalContainer.java | 93 + .../java/org/bukkit/material/Dispenser.java | 112 + .../main/java/org/bukkit/material/Door.java | 160 + .../main/java/org/bukkit/material/Dye.java | 72 + .../java/org/bukkit/material/EnderChest.java | 60 + .../org/bukkit/material/ExtendedRails.java | 73 + .../java/org/bukkit/material/FlowerPot.java | 135 + .../java/org/bukkit/material/Furnace.java | 60 + .../bukkit/material/FurnaceAndDispenser.java | 45 + .../main/java/org/bukkit/material/Gate.java | 91 + .../main/java/org/bukkit/material/Ladder.java | 102 + .../main/java/org/bukkit/material/Leaves.java | 77 + .../main/java/org/bukkit/material/Lever.java | 160 + .../java/org/bukkit/material/LongGrass.java | 77 + .../org/bukkit/material/MaterialData.java | 135 + .../java/org/bukkit/material/MonsterEggs.java | 67 + .../java/org/bukkit/material/Mushroom.java | 197 + .../java/org/bukkit/material/NetherWarts.java | 99 + .../java/org/bukkit/material/Openable.java | 18 + .../bukkit/material/PistonBaseMaterial.java | 111 + .../material/PistonExtensionMaterial.java | 111 + .../java/org/bukkit/material/PoweredRail.java | 61 + .../org/bukkit/material/PressurePlate.java | 57 + .../org/bukkit/material/PressureSensor.java | 5 + .../java/org/bukkit/material/Pumpkin.java | 112 + .../main/java/org/bukkit/material/Rails.java | 176 + .../java/org/bukkit/material/Redstone.java | 15 + .../org/bukkit/material/RedstoneTorch.java | 63 + .../org/bukkit/material/RedstoneWire.java | 63 + .../java/org/bukkit/material/Sandstone.java | 77 + .../main/java/org/bukkit/material/Sign.java | 250 ++ .../SimpleAttachableMaterialData.java | 66 + .../main/java/org/bukkit/material/Skull.java | 114 + .../java/org/bukkit/material/SmoothBrick.java | 68 + .../java/org/bukkit/material/SpawnEgg.java | 65 + .../main/java/org/bukkit/material/Stairs.java | 138 + .../main/java/org/bukkit/material/Step.java | 119 + .../org/bukkit/material/TexturedMaterial.java | 110 + .../main/java/org/bukkit/material/Torch.java | 104 + .../java/org/bukkit/material/TrapDoor.java | 131 + .../main/java/org/bukkit/material/Tree.java | 136 + .../java/org/bukkit/material/Tripwire.java | 85 + .../org/bukkit/material/TripwireHook.java | 128 + .../main/java/org/bukkit/material/Vine.java | 196 + .../java/org/bukkit/material/WoodenStep.java | 103 + .../main/java/org/bukkit/material/Wool.java | 77 + .../bukkit/metadata/FixedMetadataValue.java | 43 + .../bukkit/metadata/LazyMetadataValue.java | 120 + .../metadata/MetadataConversionException.java | 13 + .../metadata/MetadataEvaluationException.java | 13 + .../org/bukkit/metadata/MetadataStore.java | 60 + .../bukkit/metadata/MetadataStoreBase.java | 136 + .../org/bukkit/metadata/MetadataValue.java | 83 + .../bukkit/metadata/MetadataValueAdapter.java | 78 + .../java/org/bukkit/metadata/Metadatable.java | 52 + .../org/bukkit/permissions/Permissible.java | 122 + .../bukkit/permissions/PermissibleBase.java | 246 ++ .../org/bukkit/permissions/Permission.java | 343 ++ .../permissions/PermissionAttachment.java | 139 + .../permissions/PermissionAttachmentInfo.java | 62 + .../bukkit/permissions/PermissionDefault.java | 66 + .../PermissionRemovedExecutor.java | 16 + .../bukkit/permissions/ServerOperator.java | 24 + .../org/bukkit/plugin/AuthorNagException.java | 20 + .../java/org/bukkit/plugin/EventExecutor.java | 12 + .../plugin/IllegalPluginAccessException.java | 25 + .../plugin/InvalidDescriptionException.java | 45 + .../bukkit/plugin/InvalidPluginException.java | 49 + .../main/java/org/bukkit/plugin/Plugin.java | 189 + .../org/bukkit/plugin/PluginAwareness.java | 29 + .../java/org/bukkit/plugin/PluginBase.java | 32 + .../bukkit/plugin/PluginDescriptionFile.java | 1110 ++++++ .../org/bukkit/plugin/PluginLoadOrder.java | 17 + .../java/org/bukkit/plugin/PluginLoader.java | 76 + .../java/org/bukkit/plugin/PluginLogger.java | 36 + .../java/org/bukkit/plugin/PluginManager.java | 294 ++ .../org/bukkit/plugin/RegisteredListener.java | 73 + .../plugin/RegisteredServiceProvider.java | 46 + .../org/bukkit/plugin/ServicePriority.java | 12 + .../org/bukkit/plugin/ServicesManager.java | 106 + .../bukkit/plugin/SimplePluginManager.java | 726 ++++ .../bukkit/plugin/SimpleServicesManager.java | 306 ++ .../plugin/TimedRegisteredListener.java | 97 + .../plugin/UnknownDependencyException.java | 46 + .../org/bukkit/plugin/java/JavaPlugin.java | 546 +++ .../bukkit/plugin/java/JavaPluginLoader.java | 367 ++ .../bukkit/plugin/java/PluginClassLoader.java | 135 + .../ChannelNameTooLongException.java | 15 + .../ChannelNotRegisteredException.java | 15 + .../messaging/MessageTooLargeException.java | 23 + .../bukkit/plugin/messaging/Messenger.java | 216 ++ .../messaging/PluginChannelDirection.java | 17 + .../messaging/PluginMessageListener.java | 20 + .../PluginMessageListenerRegistration.java | 104 + .../messaging/PluginMessageRecipient.java | 38 + .../messaging/ReservedChannelException.java | 16 + .../plugin/messaging/StandardMessenger.java | 489 +++ .../main/java/org/bukkit/potion/Potion.java | 442 +++ .../java/org/bukkit/potion/PotionBrewer.java | 31 + .../java/org/bukkit/potion/PotionEffect.java | 179 + .../org/bukkit/potion/PotionEffectType.java | 269 ++ .../potion/PotionEffectTypeWrapper.java | 31 + .../java/org/bukkit/potion/PotionType.java | 71 + .../projectiles/BlockProjectileSource.java | 13 + .../bukkit/projectiles/ProjectileSource.java | 28 + .../org/bukkit/scheduler/BukkitRunnable.java | 149 + .../org/bukkit/scheduler/BukkitScheduler.java | 319 ++ .../java/org/bukkit/scheduler/BukkitTask.java | 35 + .../org/bukkit/scheduler/BukkitWorker.java | 34 + .../java/org/bukkit/scoreboard/Criterias.java | 20 + .../org/bukkit/scoreboard/DisplaySlot.java | 10 + .../java/org/bukkit/scoreboard/Objective.java | 110 + .../java/org/bukkit/scoreboard/Score.java | 72 + .../org/bukkit/scoreboard/Scoreboard.java | 159 + .../bukkit/scoreboard/ScoreboardManager.java | 29 + .../main/java/org/bukkit/scoreboard/Team.java | 210 ++ .../java/org/bukkit/util/BlockIterator.java | 357 ++ .../java/org/bukkit/util/BlockVector.java | 128 + .../org/bukkit/util/CachedServerIcon.java | 19 + .../java/org/bukkit/util/ChatPaginator.java | 169 + .../main/java/org/bukkit/util/FileUtil.java | 57 + .../java/org/bukkit/util/Java15Compat.java | 21 + .../org/bukkit/util/NumberConversions.java | 104 + .../main/java/org/bukkit/util/StringUtil.java | 57 + .../src/main/java/org/bukkit/util/Vector.java | 667 ++++ .../util/io/BukkitObjectInputStream.java | 63 + .../util/io/BukkitObjectOutputStream.java | 53 + .../main/java/org/bukkit/util/io/Wrapper.java | 23 + .../org/bukkit/util/noise/NoiseGenerator.java | 176 + .../bukkit/util/noise/OctaveGenerator.java | 199 + .../util/noise/PerlinNoiseGenerator.java | 217 ++ .../util/noise/PerlinOctaveGenerator.java | 50 + .../util/noise/SimplexNoiseGenerator.java | 520 +++ .../util/noise/SimplexOctaveGenerator.java | 129 + .../permissions/BroadcastPermissions.java | 22 + .../util/permissions/CommandPermissions.java | 117 + .../util/permissions/DefaultPermissions.java | 82 + .../event/block/BeaconEffectEvent.java | 81 + .../event/player/PlayerMicroMoveEvent.java | 32 + .../event/server/ServerShutdownEvent.java | 33 + .../org/spigotmc/CustomTimingsHandler.java | 74 + .../event/entity/EntityDismountEvent.java | 39 + .../event/entity/EntityMountEvent.java | 52 + .../player/PlayerSpawnLocationEvent.java | 50 + .../org/bukkit/block/package-info.java | 7 + .../bukkit/command/defaults/package-info.java | 7 + .../org/bukkit/command/package-info.java | 6 + .../configuration/file/package-info.java | 8 + .../bukkit/configuration/package-info.java | 6 + .../serialization/package-info.java | 8 + .../bukkit/conversations/package-info.java | 6 + .../org/bukkit/enchantments/package-info.java | 8 + .../bukkit/entity/minecart/package-info.java | 6 + .../org/bukkit/entity/package-info.java | 7 + .../org/bukkit/event/block/package-info.java | 8 + .../event/enchantment/package-info.java | 7 + .../org/bukkit/event/entity/package-info.java | 8 + .../bukkit/event/hanging/package-info.java | 7 + .../bukkit/event/inventory/package-info.java | 7 + .../org/bukkit/event/package-info.java | 6 + .../bukkit/event/painting/package-info.java | 8 + .../org/bukkit/event/player/package-info.java | 7 + .../org/bukkit/event/server/package-info.java | 7 + .../bukkit/event/vehicle/package-info.java | 7 + .../bukkit/event/weather/package-info.java | 6 + .../org/bukkit/event/world/package-info.java | 7 + .../org/bukkit/generator/package-info.java | 7 + .../javadoc/org/bukkit/help/package-info.java | 6 + .../bukkit/inventory/meta/package-info.java | 7 + .../org/bukkit/inventory/package-info.java | 6 + .../javadoc/org/bukkit/map/package-info.java | 7 + .../org/bukkit/material/package-info.java | 6 + .../org/bukkit/metadata/package-info.java | 7 + .../main/javadoc/org/bukkit/package-info.java | 6 + .../org/bukkit/permissions/package-info.java | 6 + .../doc-files/permissions-example_plugin.yml | 64 + .../org/bukkit/plugin/java/package-info.java | 7 + .../bukkit/plugin/messaging/package-info.java | 6 + .../org/bukkit/plugin/package-info.java | 6 + .../org/bukkit/potion/package-info.java | 7 + .../org/bukkit/projectiles/package-info.java | 6 + .../org/bukkit/scheduler/package-info.java | 7 + .../org/bukkit/scoreboard/package-info.java | 6 + .../org/bukkit/util/io/package-info.java | 6 + .../org/bukkit/util/noise/package-info.java | 6 + .../javadoc/org/bukkit/util/package-info.java | 7 + .../bukkit/util/permissions/package-info.java | 7 + .../src/main/javadoc/overview.html | 17 + PaperSpigot-API/src/site/apt/index.apt | 9 + PaperSpigot-API/src/site/site.xml | 29 + .../src/test/java/org/bukkit/ArtTest.java | 45 + .../java/org/bukkit/BukkitMirrorTest.java | 75 + .../test/java/org/bukkit/ChatColorTest.java | 83 + .../java/org/bukkit/ChatPaginatorTest.java | 166 + .../test/java/org/bukkit/CoalTypeTest.java | 15 + .../src/test/java/org/bukkit/ColorTest.java | 365 ++ .../test/java/org/bukkit/CropStateTest.java | 15 + .../test/java/org/bukkit/DifficultyTest.java | 15 + .../test/java/org/bukkit/DyeColorTest.java | 70 + .../src/test/java/org/bukkit/EffectTest.java | 19 + .../java/org/bukkit/EntityEffectTest.java | 15 + .../test/java/org/bukkit/GameModeTest.java | 15 + .../java/org/bukkit/GrassSpeciesTest.java | 15 + .../test/java/org/bukkit/InstrumentTest.java | 15 + .../test/java/org/bukkit/LocationTest.java | 196 + .../test/java/org/bukkit/MaterialTest.java | 85 + .../src/test/java/org/bukkit/NoteTest.java | 156 + .../src/test/java/org/bukkit/TestServer.java | 100 + .../test/java/org/bukkit/TreeSpeciesTest.java | 15 + .../test/java/org/bukkit/WorldTypeTest.java | 15 + .../ConfigurationSectionTest.java | 548 +++ .../configuration/ConfigurationTest.java | 156 + .../MemoryConfigurationTest.java | 8 + .../configuration/MemorySectionTest.java | 8 + .../file/FileConfigurationTest.java | 209 ++ .../file/YamlConfigurationTest.java | 56 + .../ConversationContextTest.java | 34 + .../conversations/ConversationTest.java | 116 + .../bukkit/conversations/FakeConversable.java | 105 + .../conversations/ValidatingPromptTest.java | 115 + .../event/PlayerChatTabCompleteEventTest.java | 28 + .../test/java/org/bukkit/event/TestEvent.java | 19 + .../metadata/FixedMetadataValueTest.java | 42 + .../metadata/LazyMetadataValueTest.java | 135 + .../metadata/MetadataConversionTest.java | 103 + .../bukkit/metadata/MetadataStoreTest.java | 143 + .../metadata/MetadataValueAdapterTest.java | 97 + .../org/bukkit/plugin/PluginManagerTest.java | 176 + .../java/org/bukkit/plugin/TestPlugin.java | 111 + .../plugin/TimedRegisteredListenerTest.java | 56 + .../messaging/StandardMessengerTest.java | 289 ++ .../plugin/messaging/TestMessageListener.java | 29 + .../bukkit/plugin/messaging/TestPlayer.java | 50 + .../java/org/bukkit/potion/PotionTest.java | 169 + .../bukkit/util/StringUtilStartsWithTest.java | 86 + .../java/org/bukkit/util/StringUtilTest.java | 61 + .../util/io/BukkitObjectStreamTest.java | 173 + PaperSpigot-Server/.gitignore | 36 + PaperSpigot-Server/CONTRIBUTING.md | 497 +++ PaperSpigot-Server/LGPL.txt | 165 + PaperSpigot-Server/LICENCE.txt | 674 ++++ PaperSpigot-Server/README.md | 18 + PaperSpigot-Server/dependency-reduced-pom.xml | 275 ++ PaperSpigot-Server/deprecation-mappings.at | 62 + PaperSpigot-Server/deprecation-mappings.csrg | 27 + PaperSpigot-Server/maps.yml | 46 + PaperSpigot-Server/pom.xml | 426 +++ .../aikar/taskchain/AbortChainException.java | 27 + .../java/co/aikar/taskchain/AsyncQueue.java | 42 + .../taskchain/BukkitTaskChainFactory.java | 118 + .../co/aikar/taskchain/GameInterface.java | 95 + .../co/aikar/taskchain/SharedTaskChain.java | 100 + .../java/co/aikar/taskchain/TaskChain.java | 1356 +++++++ .../aikar/taskchain/TaskChainAbortAction.java | 42 + .../aikar/taskchain/TaskChainAsyncQueue.java | 70 + .../taskchain/TaskChainDataWrappers.java | 64 + .../co/aikar/taskchain/TaskChainExample.java | 168 + .../co/aikar/taskchain/TaskChainFactory.java | 107 + .../aikar/taskchain/TaskChainNullAction.java | 60 + .../co/aikar/taskchain/TaskChainTasks.java | 184 + .../co/aikar/taskchain/TaskChainUtil.java | 67 + .../java/co/aikar/timings/SpigotTimings.java | 111 + .../co/aikar/timings/WorldTimingsHandler.java | 69 + .../java/gg/manny/spigot/GenericSpigot.java | 82 + .../gg/manny/spigot/GenericSpigotConfig.java | 228 ++ .../authenticator/AuthenticatorHandler.java | 9 + .../authenticator/AuthenticatorUtil.java | 25 + .../spigot/commands/KnockbackCommand.java | 109 + .../commands/TicksPerSecondCommand.java | 75 + .../commands/TicksPerSecondTwoCommand.java | 7 + .../events/PacketCustomPayloadEvent.java | 34 + .../spigot/events/PlayerAttackEvent.java | 23 + .../gg/manny/spigot/events/ReachEvent.java | 42 + .../manny/spigot/handler/MovementHandler.java | 13 + .../manny/spigot/handler/PacketHandler.java | 12 + .../spigot/handler/SimpleMovementHandler.java | 9 + .../spigot/knockback/AbstractKnockback.java | 27 + .../knockback/preset/KnockbackLoadout.java | 79 + .../knockback/preset/type/DefaultLoadout.java | 38 + .../spigot/legacy/knockback/IKnockback.java | 27 + .../spigot/legacy/knockback/Knockback.java | 75 + .../legacy/knockback/KnockbackType.java | 17 + .../knockback/impl/CustomKnockback.java | 214 ++ .../knockback/impl/KitPvPKnockback.java | 151 + .../legacy/knockback/impl/KohiKnockback.java | 201 + .../knockback/impl/LoungeKnockback.java | 158 + .../knockback/impl/MinemenClubKnockback.java | 159 + .../legacy/knockback/impl/RengoKnockback.java | 197 + .../knockback/impl/SimpleKnockback.java | 134 + .../knockback/impl/TheCraftKnockback.java | 200 + .../knockback/impl/VanillaKnockback.java | 20 + .../legacy/knockback/impl/ZonixKnockback.java | 160 + .../gg/manny/spigot/util/CraftPotionUtil.java | 25 + .../spigot/util/WrappedOverflowArray.java | 26 + .../manny/spigot/util/callback/Callback.java | 14 + .../gg/manny/spigot/util/chatcolor/CC.java | 81 + .../util/compactqueue/ArrayWrapper.java | 14 + .../ArrayWrapperForPrimitiveLong.java | 46 + .../util/compactqueue/CompactQueue.java | 214 ++ .../main/java/jline/AnsiWindowsTerminal.java | 91 + .../jline/internal/TerminalLineSettings.java | 227 ++ .../net/minecraft/server/AttributeRanged.java | 42 + .../minecraft/server/BanEntrySerializer.java | 89 + .../java/net/minecraft/server/BiomeBase.java | 391 ++ .../net/minecraft/server/BiomeDecorator.java | 286 ++ .../java/net/minecraft/server/BiomeMesa.java | 279 ++ .../server/BiomeTheEndDecorator.java | 28 + .../main/java/net/minecraft/server/Block.java | 832 +++++ .../minecraft/server/BlockActionDataList.java | 13 + .../java/net/minecraft/server/BlockAnvil.java | 88 + .../net/minecraft/server/BlockBloodStone.java | 27 + .../minecraft/server/BlockBrewingStand.java | 115 + .../minecraft/server/BlockButtonAbstract.java | 332 ++ .../net/minecraft/server/BlockCactus.java | 86 + .../java/net/minecraft/server/BlockCake.java | 98 + .../java/net/minecraft/server/BlockCocoa.java | 144 + .../net/minecraft/server/BlockCommand.java | 87 + .../java/net/minecraft/server/BlockCrops.java | 136 + .../server/BlockDaylightDetector.java | 85 + .../minecraft/server/BlockDiodeAbstract.java | 259 ++ .../net/minecraft/server/BlockDispenser.java | 189 + .../java/net/minecraft/server/BlockDoor.java | 240 ++ .../net/minecraft/server/BlockDragonEgg.java | 124 + .../net/minecraft/server/BlockDropper.java | 75 + .../minecraft/server/BlockEnderPortal.java | 66 + .../net/minecraft/server/BlockFalling.java | 81 + .../java/net/minecraft/server/BlockFire.java | 281 ++ .../net/minecraft/server/BlockFlowerPot.java | 187 + .../net/minecraft/server/BlockFlowing.java | 373 ++ .../net/minecraft/server/BlockFluids.java | 232 ++ .../java/net/minecraft/server/BlockGrass.java | 122 + .../net/minecraft/server/BlockHopper.java | 190 + .../java/net/minecraft/server/BlockIce.java | 65 + .../net/minecraft/server/BlockLeaves.java | 203 + .../java/net/minecraft/server/BlockLever.java | 278 ++ .../server/BlockMinecartDetector.java | 120 + .../server/BlockMinecartTrackAbstract.java | 149 + .../net/minecraft/server/BlockMobSpawner.java | 41 + .../minecraft/server/BlockMonsterEggs.java | 121 + .../net/minecraft/server/BlockMushroom.java | 126 + .../java/net/minecraft/server/BlockMycel.java | 65 + .../net/minecraft/server/BlockNetherWart.java | 62 + .../java/net/minecraft/server/BlockOre.java | 83 + .../net/minecraft/server/BlockPiston.java | 400 ++ .../server/BlockPistonExtension.java | 169 + .../net/minecraft/server/BlockPortal.java | 122 + .../minecraft/server/BlockPoweredRail.java | 146 + .../server/BlockPressurePlateAbstract.java | 174 + .../server/BlockPressurePlateBinary.java | 74 + .../server/BlockPressurePlateWeighted.java | 58 + .../net/minecraft/server/BlockPumpkin.java | 98 + .../minecraft/server/BlockRedstoneLamp.java | 70 + .../minecraft/server/BlockRedstoneOre.java | 155 + .../minecraft/server/BlockRedstoneTorch.java | 176 + .../minecraft/server/BlockRedstoneWire.java | 323 ++ .../java/net/minecraft/server/BlockReed.java | 81 + .../net/minecraft/server/BlockSapling.java | 203 + .../java/net/minecraft/server/BlockSign.java | 127 + .../java/net/minecraft/server/BlockSkull.java | 251 ++ .../java/net/minecraft/server/BlockSnow.java | 93 + .../java/net/minecraft/server/BlockSoil.java | 121 + .../net/minecraft/server/BlockStationary.java | 93 + .../java/net/minecraft/server/BlockStem.java | 190 + .../java/net/minecraft/server/BlockTNT.java | 91 + .../net/minecraft/server/BlockTallPlant.java | 160 + .../java/net/minecraft/server/BlockTorch.java | 168 + .../net/minecraft/server/BlockTrapdoor.java | 212 ++ .../net/minecraft/server/BlockTripwire.java | 201 + .../minecraft/server/BlockTripwireHook.java | 300 ++ .../java/net/minecraft/server/BlockVine.java | 304 ++ .../main/java/net/minecraft/server/Chunk.java | 1293 +++++++ .../minecraft/server/ChunkProviderFlat.java | 238 ++ .../server/ChunkProviderGenerate.java | 404 ++ .../minecraft/server/ChunkProviderHell.java | 450 +++ .../minecraft/server/ChunkProviderServer.java | 421 +++ .../minecraft/server/ChunkRegionLoader.java | 406 ++ .../net/minecraft/server/ChunkSection.java | 501 +++ .../server/ClientCommandOrdinalWrapper.java | 27 + .../server/CommandBlockListenerAbstract.java | 238 ++ .../minecraft/server/CommandDispatcher.java | 94 + .../java/net/minecraft/server/Container.java | 615 +++ .../net/minecraft/server/ContainerAnvil.java | 400 ++ .../server/ContainerAnvilInventory.java | 58 + .../net/minecraft/server/ContainerBeacon.java | 114 + .../server/ContainerBrewingStand.java | 126 + .../net/minecraft/server/ContainerChest.java | 104 + .../minecraft/server/ContainerDispenser.java | 91 + .../server/ContainerEnchantTable.java | 288 ++ .../ContainerEnchantTableInventory.java | 57 + .../minecraft/server/ContainerFurnace.java | 135 + .../net/minecraft/server/ContainerHopper.java | 85 + .../net/minecraft/server/ContainerHorse.java | 104 + .../minecraft/server/ContainerMerchant.java | 131 + .../net/minecraft/server/ContainerPlayer.java | 157 + .../minecraft/server/ContainerWorkbench.java | 145 + .../net/minecraft/server/ControllerLook.java | 87 + .../net/minecraft/server/ControllerMove.java | 71 + .../net/minecraft/server/CraftingManager.java | 318 ++ .../net/minecraft/server/CrashReport.java | 235 ++ .../net/minecraft/server/DataWatcher.java | 392 ++ .../net/minecraft/server/DedicatedServer.java | 527 +++ .../server/DispenseBehaviorArmor.java | 67 + .../server/DispenseBehaviorBoat.java | 73 + .../server/DispenseBehaviorBonemeal.java | 67 + .../server/DispenseBehaviorEmptyBucket.java | 68 + .../server/DispenseBehaviorFilledBucket.java | 69 + .../server/DispenseBehaviorFireball.java | 65 + .../server/DispenseBehaviorFireworks.java | 58 + .../server/DispenseBehaviorFlintAndSteel.java | 71 + .../server/DispenseBehaviorItem.java | 98 + .../server/DispenseBehaviorMinecart.java | 78 + .../server/DispenseBehaviorMonsterEgg.java | 57 + .../server/DispenseBehaviorProjectile.java | 66 + .../minecraft/server/DispenseBehaviorTNT.java | 55 + .../net/minecraft/server/Enchantment.java | 122 + .../minecraft/server/EnchantmentManager.java | 368 ++ .../server/EnchantmentManagerDamage.java | 17 + .../server/EnchantmentModifierArthropods.java | 17 + .../server/EnchantmentModifierProtection.java | 17 + .../server/EnchantmentModifierThorns.java | 17 + .../java/net/minecraft/server/Entity.java | 1982 ++++++++++ .../net/minecraft/server/EntityAgeable.java | 149 + .../net/minecraft/server/EntityArrow.java | 482 +++ .../java/net/minecraft/server/EntityBoat.java | 501 +++ .../net/minecraft/server/EntityChicken.java | 158 + .../java/net/minecraft/server/EntityCow.java | 110 + .../net/minecraft/server/EntityCreature.java | 313 ++ .../net/minecraft/server/EntityCreeper.java | 228 ++ .../server/EntityDamageSourceIndirect.java | 34 + .../java/net/minecraft/server/EntityEgg.java | 68 + .../minecraft/server/EntityEnderCrystal.java | 88 + .../minecraft/server/EntityEnderDragon.java | 683 ++++ .../minecraft/server/EntityEnderPearl.java | 119 + .../net/minecraft/server/EntityEnderman.java | 383 ++ .../minecraft/server/EntityExperienceOrb.java | 188 + .../minecraft/server/EntityFallingBlock.java | 279 ++ .../net/minecraft/server/EntityFireball.java | 278 ++ .../net/minecraft/server/EntityFireworks.java | 130 + .../minecraft/server/EntityFishingHook.java | 509 +++ .../net/minecraft/server/EntityGhast.java | 238 ++ .../net/minecraft/server/EntityHanging.java | 340 ++ .../net/minecraft/server/EntityHorse.java | 1240 +++++++ .../net/minecraft/server/EntityHuman.java | 1682 +++++++++ .../minecraft/server/EntityInsentient.java | 918 +++++ .../net/minecraft/server/EntityIronGolem.java | 190 + .../java/net/minecraft/server/EntityItem.java | 405 ++ .../net/minecraft/server/EntityItemFrame.java | 161 + .../minecraft/server/EntityLargeFireball.java | 49 + .../net/minecraft/server/EntityLeash.java | 137 + .../net/minecraft/server/EntityLightning.java | 143 + .../net/minecraft/server/EntityLiving.java | 1802 +++++++++ .../server/EntityMinecartAbstract.java | 913 +++++ .../EntityMinecartCommandBlockListener.java | 25 + .../server/EntityMinecartContainer.java | 249 ++ .../net/minecraft/server/EntityMonster.java | 177 + .../minecraft/server/EntityMushroomCow.java | 72 + .../net/minecraft/server/EntityOcelot.java | 258 ++ .../net/minecraft/server/EntityPainting.java | 81 + .../java/net/minecraft/server/EntityPig.java | 159 + .../net/minecraft/server/EntityPigZombie.java | 160 + .../net/minecraft/server/EntityPlayer.java | 1170 ++++++ .../net/minecraft/server/EntityPotion.java | 160 + .../minecraft/server/EntityProjectile.java | 411 ++ .../net/minecraft/server/EntitySheep.java | 219 ++ .../minecraft/server/EntitySilverfish.java | 171 + .../net/minecraft/server/EntitySkeleton.java | 294 ++ .../net/minecraft/server/EntitySlime.java | 265 ++ .../minecraft/server/EntitySmallFireball.java | 85 + .../net/minecraft/server/EntitySnowman.java | 89 + .../net/minecraft/server/EntitySpider.java | 162 + .../net/minecraft/server/EntitySquid.java | 152 + .../net/minecraft/server/EntityTNTPrimed.java | 142 + .../server/EntityThrownExpBottle.java | 53 + .../net/minecraft/server/EntityTracker.java | 200 + .../minecraft/server/EntityTrackerEntry.java | 540 +++ .../net/minecraft/server/EntityTypes.java | 205 + .../net/minecraft/server/EntityWither.java | 478 +++ .../minecraft/server/EntityWitherSkull.java | 97 + .../java/net/minecraft/server/EntityWolf.java | 379 ++ .../net/minecraft/server/EntityZombie.java | 525 +++ .../minecraft/server/ExpirableListEntry.java | 95 + .../java/net/minecraft/server/Explosion.java | 362 ++ .../server/FileConversionException.java | 22 + .../net/minecraft/server/FoodMetaData.java | 116 + .../minecraft/server/GameProfileBanEntry.java | 57 + .../minecraft/server/GenericAttributes.java | 107 + .../net/minecraft/server/GroupDataZombie.java | 21 + .../minecraft/server/HandshakeListener.java | 128 + .../net/minecraft/server/IDataManager.java | 28 + .../java/net/minecraft/server/IInventory.java | 48 + .../java/net/minecraft/server/IRecipe.java | 16 + .../java/net/minecraft/server/IntCache.java | 63 + .../java/net/minecraft/server/IntHashMap.java | 167 + .../server/InventoryCraftResult.java | 96 + .../minecraft/server/InventoryCrafting.java | 149 + .../minecraft/server/InventoryEnderChest.java | 110 + .../minecraft/server/InventoryHorseChest.java | 60 + .../minecraft/server/InventoryLargeChest.java | 129 + .../minecraft/server/InventoryMerchant.java | 192 + .../server/InventorySubcontainer.java | 120 + .../main/java/net/minecraft/server/Item.java | 503 +++ .../java/net/minecraft/server/ItemBlock.java | 83 + .../java/net/minecraft/server/ItemBoat.java | 93 + .../java/net/minecraft/server/ItemBow.java | 109 + .../java/net/minecraft/server/ItemBucket.java | 193 + .../java/net/minecraft/server/ItemDoor.java | 81 + .../java/net/minecraft/server/ItemDye.java | 129 + .../net/minecraft/server/ItemFireball.java | 67 + .../net/minecraft/server/ItemFishingRod.java | 48 + .../minecraft/server/ItemFlintAndSteel.java | 72 + .../net/minecraft/server/ItemHanging.java | 67 + .../java/net/minecraft/server/ItemLeash.java | 70 + .../net/minecraft/server/ItemMapEmpty.java | 37 + .../net/minecraft/server/ItemMilkBucket.java | 52 + .../net/minecraft/server/ItemMinecart.java | 40 + .../net/minecraft/server/ItemMonsterEgg.java | 124 + .../java/net/minecraft/server/ItemSkull.java | 117 + .../java/net/minecraft/server/ItemStack.java | 671 ++++ .../net/minecraft/server/ItemWaterLily.java | 48 + .../net/minecraft/server/ItemWorldMap.java | 231 ++ .../java/net/minecraft/server/JsonList.java | 177 + .../net/minecraft/server/JsonListEntry.java | 26 + .../server/JsonListEntrySerializer.java | 51 + .../net/minecraft/server/LoginListener.java | 194 + .../net/minecraft/server/MerchantRecipe.java | 101 + .../minecraft/server/MerchantRecipeList.java | 96 + .../net/minecraft/server/MethodProfiler.java | 24 + .../net/minecraft/server/MinecraftServer.java | 1509 ++++++++ .../server/MobEffectAttackDamage.java | 15 + .../net/minecraft/server/MobEffectList.java | 231 ++ .../minecraft/server/MobSpawnerAbstract.java | 347 ++ .../java/net/minecraft/server/NBTBase.java | 83 + .../server/NBTCompressedStreamTools.java | 138 + .../net/minecraft/server/NBTTagByteArray.java | 58 + .../net/minecraft/server/NBTTagIntArray.java | 74 + .../java/net/minecraft/server/NBTTagList.java | 169 + .../server/NameReferencingFileConverter.java | 402 ++ .../net/minecraft/server/NetworkManager.java | 296 ++ .../minecraft/server/NextTickListEntry.java | 60 + .../net/minecraft/server/NibbleArray.java | 40 + .../net/minecraft/server/OldChunkLoader.java | 120 + .../java/net/minecraft/server/Packet.java | 90 + .../server/PacketDataSerializer.java | 859 +++++ .../net/minecraft/server/PacketDecoder.java | 49 + .../net/minecraft/server/PacketEncoder.java | 45 + .../PacketHandshakingInSetProtocol.java | 47 + .../server/PacketLoginOutSuccess.java | 44 + .../server/PacketPlayInArmAnimation.java | 42 + .../server/PacketPlayInBlockDig.java | 67 + .../server/PacketPlayInBlockPlace.java | 88 + .../minecraft/server/PacketPlayInChat.java | 64 + .../server/PacketPlayInCloseWindow.java | 29 + .../server/PacketPlayInCustomPayload.java | 53 + .../server/PacketPlayInEntityAction.java | 48 + .../server/PacketPlayInKeepAlive.java | 40 + .../server/PacketPlayInPosition.java | 37 + .../server/PacketPlayInPositionLook.java | 42 + .../server/PacketPlayInSettings.java | 83 + .../server/PacketPlayInSteerVehicle.java | 58 + .../server/PacketPlayInTabComplete.java | 48 + .../server/PacketPlayInUpdateSign.java | 80 + .../server/PacketPlayInUseEntity.java | 51 + .../server/PacketPlayInWindowClick.java | 67 + .../minecraft/server/PacketPlayOutBed.java | 49 + .../server/PacketPlayOutBlockAction.java | 56 + .../PacketPlayOutBlockBreakAnimation.java | 52 + .../server/PacketPlayOutBlockChange.java | 59 + .../minecraft/server/PacketPlayOutChat.java | 74 + .../server/PacketPlayOutCollect.java | 41 + .../server/PacketPlayOutCustomPayload.java | 59 + .../minecraft/server/PacketPlayOutEntity.java | 50 + .../server/PacketPlayOutEntityDestroy.java | 61 + .../server/PacketPlayOutEntityEffect.java | 56 + .../server/PacketPlayOutEntityEquipment.java | 47 + .../PacketPlayOutEntityHeadRotation.java | 44 + .../server/PacketPlayOutEntityLook.java | 44 + .../server/PacketPlayOutEntityMetadata.java | 46 + .../server/PacketPlayOutEntityTeleport.java | 89 + .../server/PacketPlayOutEntityVelocity.java | 82 + .../server/PacketPlayOutExperience.java | 45 + .../server/PacketPlayOutKeepAlive.java | 40 + .../minecraft/server/PacketPlayOutLogin.java | 77 + .../minecraft/server/PacketPlayOutMap.java | 71 + .../server/PacketPlayOutMapChunk.java | 245 ++ .../server/PacketPlayOutMapChunkBulk.java | 229 ++ .../server/PacketPlayOutMultiBlockChange.java | 119 + .../server/PacketPlayOutNamedEntitySpawn.java | 118 + .../server/PacketPlayOutOpenSignEditor.java | 44 + .../server/PacketPlayOutOpenWindow.java | 114 + .../server/PacketPlayOutPlayerInfo.java | 152 + .../server/PacketPlayOutPosition.java | 64 + .../server/PacketPlayOutRelEntityMove.java | 44 + .../PacketPlayOutRelEntityMoveLook.java | 53 + .../PacketPlayOutRemoveEntityEffect.java | 39 + .../PacketPlayOutScoreboardObjective.java | 51 + .../server/PacketPlayOutScoreboardScore.java | 66 + .../server/PacketPlayOutScoreboardTeam.java | 110 + .../server/PacketPlayOutSetSlot.java | 36 + .../server/PacketPlayOutSpawnEntity.java | 171 + .../PacketPlayOutSpawnEntityLiving.java | 108 + .../PacketPlayOutSpawnEntityPainting.java | 84 + .../server/PacketPlayOutSpawnPosition.java | 51 + .../server/PacketPlayOutTileEntityData.java | 52 + .../server/PacketPlayOutUpdateAttributes.java | 94 + .../server/PacketPlayOutUpdateHealth.java | 44 + .../server/PacketPlayOutUpdateSign.java | 66 + .../server/PacketPlayOutWindowItems.java | 54 + .../server/PacketPlayOutWorldEvent.java | 56 + .../server/PacketPlayOutWorldParticles.java | 174 + .../server/PacketStatusListener.java | 156 + .../main/java/net/minecraft/server/Path.java | 128 + .../server/PathfinderGoalArrowAttack.java | 105 + .../server/PathfinderGoalBreakDoor.java | 59 + .../minecraft/server/PathfinderGoalBreed.java | 112 + .../server/PathfinderGoalEatTile.java | 75 + .../minecraft/server/PathfinderGoalFloat.java | 23 + .../server/PathfinderGoalHurtByTarget.java | 48 + .../server/PathfinderGoalMakeLove.java | 90 + .../server/PathfinderGoalMeleeAttack.java | 103 + ...PathfinderGoalNearestAttackableTarget.java | 53 + .../server/PathfinderGoalOcelotAttack.java | 63 + .../minecraft/server/PathfinderGoalPanic.java | 47 + .../server/PathfinderGoalSelector.java | 156 + .../minecraft/server/PathfinderGoalSit.java | 39 + .../minecraft/server/PathfinderGoalSwell.java | 42 + .../minecraft/server/PathfinderGoalTame.java | 72 + .../server/PathfinderGoalTarget.java | 165 + .../server/PersistentCollection.java | 185 + .../net/minecraft/server/PlayerAbilities.java | 54 + .../net/minecraft/server/PlayerChunk.java | 228 ++ .../net/minecraft/server/PlayerChunkMap.java | 406 ++ .../minecraft/server/PlayerConnection.java | 2049 ++++++++++ .../server/PlayerDatFileConverter.java | 98 + .../server/PlayerInteractManager.java | 419 +++ .../net/minecraft/server/PlayerInventory.java | 552 +++ .../java/net/minecraft/server/PlayerList.java | 1349 +++++++ .../net/minecraft/server/PlayerSelector.java | 251 ++ .../net/minecraft/server/PortalCreator.java | 197 + .../minecraft/server/PortalTravelAgent.java | 533 +++ .../net/minecraft/server/PropertyManager.java | 130 + .../server/ProtocolOrdinalWrapper.java | 21 + .../net/minecraft/server/QueuedPacket.java | 23 + .../server/RandomPositionGenerator.java | 81 + .../net/minecraft/server/RecipeArmorDye.java | 124 + .../net/minecraft/server/RecipeBookClone.java | 68 + .../net/minecraft/server/RecipeFireworks.java | 176 + .../net/minecraft/server/RecipeMapClone.java | 82 + .../net/minecraft/server/RecipesFurnace.java | 122 + .../java/net/minecraft/server/RegionFile.java | 289 ++ .../net/minecraft/server/RegionFileCache.java | 67 + .../server/RemoteControlCommandListener.java | 47 + .../minecraft/server/ScoreboardServer.java | 222 ++ .../server/SecondaryWorldServer.java | 14 + .../minecraft/server/ServerConnection.java | 113 + .../server/ServerConnectionChannel.java | 37 + .../server/ServerStatisticManager.java | 212 ++ .../net/minecraft/server/ShapedRecipes.java | 166 + .../minecraft/server/ShapelessRecipes.java | 85 + .../main/java/net/minecraft/server/Slot.java | 74 + .../minecraft/server/SlotFurnaceResult.java | 85 + .../net/minecraft/server/SpawnerCreature.java | 296 ++ .../minecraft/server/StatisticManager.java | 68 + .../minecraft/server/StructureGenerator.java | 229 ++ .../minecraft/server/ThreadCommandReader.java | 45 + .../server/ThreadPlayerLookupUUID.java | 109 + .../java/net/minecraft/server/TileEntity.java | 241 ++ .../minecraft/server/TileEntityBeacon.java | 301 ++ .../server/TileEntityBrewingStand.java | 297 ++ .../net/minecraft/server/TileEntityChest.java | 455 +++ .../server/TileEntityCommandListener.java | 29 + .../minecraft/server/TileEntityDispenser.java | 188 + .../server/TileEntityEnderChest.java | 117 + .../minecraft/server/TileEntityFurnace.java | 351 ++ .../minecraft/server/TileEntityHopper.java | 680 ++++ .../server/TileEntityLightDetector.java | 15 + .../net/minecraft/server/TileEntityNote.java | 61 + .../minecraft/server/TileEntityPiston.java | 132 + .../server/TileEntityRecordPlayer.java | 40 + .../net/minecraft/server/TileEntitySign.java | 63 + .../net/minecraft/server/TileEntitySkull.java | 171 + .../java/net/minecraft/server/UserCache.java | 252 ++ .../net/minecraft/server/UserCacheEntry.java | 34 + .../java/net/minecraft/server/Village.java | 446 +++ .../net/minecraft/server/VillageSiege.java | 182 + .../net/minecraft/server/WatchableObject.java | 44 + .../main/java/net/minecraft/server/World.java | 3298 +++++++++++++++++ .../java/net/minecraft/server/WorldData.java | 437 +++ .../net/minecraft/server/WorldGenBigTree.java | 372 ++ .../minecraft/server/WorldGenForestTree.java | 171 + .../minecraft/server/WorldGenGroundBush.java | 53 + .../server/WorldGenLargeFeature.java | 97 + .../server/WorldGenMegaTreeAbstract.java | 126 + .../minecraft/server/WorldGenPackedIce2.java | 101 + .../net/minecraft/server/WorldGenVillage.java | 75 + .../server/WorldGenVillagePiece.java | 189 + .../server/WorldGenVillagePieces.java | 199 + .../minecraft/server/WorldGenWitchHut.java | 87 + .../net/minecraft/server/WorldManager.java | 83 + .../java/net/minecraft/server/WorldMap.java | 243 ++ .../server/WorldMapHumanTracker.java | 109 + .../net/minecraft/server/WorldNBTStorage.java | 328 ++ .../net/minecraft/server/WorldServer.java | 1132 ++++++ .../log4j/core/appender/ConsoleAppender.java | 245 ++ .../java/org/bukkit/craftbukkit/CraftArt.java | 74 + .../org/bukkit/craftbukkit/CraftChunk.java | 320 ++ .../craftbukkit/CraftChunkSnapshot.java | 97 + .../bukkit/craftbukkit/CraftCrashReport.java | 41 + .../org/bukkit/craftbukkit/CraftEffect.java | 65 + .../bukkit/craftbukkit/CraftIpBanEntry.java | 86 + .../bukkit/craftbukkit/CraftIpBanList.java | 77 + .../craftbukkit/CraftOfflinePlayer.java | 289 ++ .../craftbukkit/CraftProfileBanEntry.java | 87 + .../craftbukkit/CraftProfileBanList.java | 96 + .../org/bukkit/craftbukkit/CraftServer.java | 1839 +++++++++ .../org/bukkit/craftbukkit/CraftSound.java | 231 ++ .../bukkit/craftbukkit/CraftStatistic.java | 142 + .../bukkit/craftbukkit/CraftTravelAgent.java | 79 + .../org/bukkit/craftbukkit/CraftWorld.java | 1431 +++++++ .../craftbukkit/LoggerOutputStream.java | 31 + .../java/org/bukkit/craftbukkit/Main.java | 196 + .../org/bukkit/craftbukkit/Overridden.java | 14 + .../java/org/bukkit/craftbukkit/TrigMath.java | 47 + .../bukkit/craftbukkit/block/CraftBeacon.java | 37 + .../bukkit/craftbukkit/block/CraftBlock.java | 570 +++ .../craftbukkit/block/CraftBlockState.java | 246 ++ .../craftbukkit/block/CraftBrewingStand.java | 41 + .../bukkit/craftbukkit/block/CraftChest.java | 72 + .../craftbukkit/block/CraftCommandBlock.java | 48 + .../block/CraftCreatureSpawner.java | 73 + .../craftbukkit/block/CraftDispenser.java | 64 + .../craftbukkit/block/CraftDropper.java | 49 + .../craftbukkit/block/CraftFurnace.java | 64 + .../bukkit/craftbukkit/block/CraftHopper.java | 33 + .../craftbukkit/block/CraftJukebox.java | 60 + .../craftbukkit/block/CraftNoteBlock.java | 74 + .../bukkit/craftbukkit/block/CraftSign.java | 74 + .../bukkit/craftbukkit/block/CraftSkull.java | 205 + .../craftbukkit/chunkio/ChunkIOExecutor.java | 36 + .../craftbukkit/chunkio/ChunkIOProvider.java | 80 + .../craftbukkit/chunkio/QueuedChunk.java | 38 + .../command/ColouredConsoleSender.java | 74 + .../command/ConsoleCommandCompleter.java | 47 + .../command/CraftBlockCommandSender.java | 45 + .../command/CraftConsoleCommandSender.java | 66 + .../CraftRemoteConsoleCommandSender.java | 37 + .../command/ServerCommandSender.java | 80 + .../command/VanillaCommandWrapper.java | 191 + .../conversations/ConversationTracker.java | 69 + .../enchantments/CraftEnchantment.java | 139 + .../entity/AbstractProjectile.java | 23 + .../craftbukkit/entity/CraftAgeable.java | 67 + .../craftbukkit/entity/CraftAmbient.java | 26 + .../craftbukkit/entity/CraftAnimals.java | 22 + .../bukkit/craftbukkit/entity/CraftArrow.java | 96 + .../bukkit/craftbukkit/entity/CraftBat.java | 36 + .../bukkit/craftbukkit/entity/CraftBlaze.java | 27 + .../bukkit/craftbukkit/entity/CraftBoat.java | 63 + .../craftbukkit/entity/CraftCaveSpider.java | 27 + .../craftbukkit/entity/CraftChicken.java | 28 + .../entity/CraftComplexLivingEntity.java | 21 + .../craftbukkit/entity/CraftComplexPart.java | 43 + .../bukkit/craftbukkit/entity/CraftCow.java | 28 + .../craftbukkit/entity/CraftCreature.java | 42 + .../craftbukkit/entity/CraftCreeper.java | 54 + .../bukkit/craftbukkit/entity/CraftEgg.java | 26 + .../craftbukkit/entity/CraftEnderCrystal.java | 26 + .../craftbukkit/entity/CraftEnderDragon.java | 44 + .../entity/CraftEnderDragonPart.java | 87 + .../craftbukkit/entity/CraftEnderPearl.java | 26 + .../craftbukkit/entity/CraftEnderSignal.java | 26 + .../craftbukkit/entity/CraftEnderman.java | 38 + .../craftbukkit/entity/CraftEntity.java | 450 +++ .../entity/CraftExperienceOrb.java | 34 + .../craftbukkit/entity/CraftFallingSand.java | 57 + .../craftbukkit/entity/CraftFireball.java | 89 + .../craftbukkit/entity/CraftFirework.java | 74 + .../bukkit/craftbukkit/entity/CraftFish.java | 75 + .../craftbukkit/entity/CraftFlying.java | 22 + .../bukkit/craftbukkit/entity/CraftGhast.java | 28 + .../bukkit/craftbukkit/entity/CraftGiant.java | 28 + .../bukkit/craftbukkit/entity/CraftGolem.java | 21 + .../craftbukkit/entity/CraftHanging.java | 83 + .../bukkit/craftbukkit/entity/CraftHorse.java | 146 + .../craftbukkit/entity/CraftHumanEntity.java | 337 ++ .../craftbukkit/entity/CraftIronGolem.java | 35 + .../bukkit/craftbukkit/entity/CraftItem.java | 48 + .../craftbukkit/entity/CraftItemFrame.java | 99 + .../entity/CraftLargeFireball.java | 32 + .../bukkit/craftbukkit/entity/CraftLeash.java | 27 + .../entity/CraftLightningStrike.java | 50 + .../craftbukkit/entity/CraftLivingEntity.java | 507 +++ .../craftbukkit/entity/CraftMagmaCube.java | 27 + .../craftbukkit/entity/CraftMinecart.java | 71 + .../entity/CraftMinecartChest.java | 32 + .../entity/CraftMinecartCommand.java | 127 + .../entity/CraftMinecartFurnace.java | 23 + .../entity/CraftMinecartHopper.java | 31 + .../entity/CraftMinecartMobSpawner.java | 22 + .../entity/CraftMinecartRideable.java | 22 + .../craftbukkit/entity/CraftMinecartTNT.java | 22 + .../craftbukkit/entity/CraftMonster.java | 23 + .../craftbukkit/entity/CraftMushroomCow.java | 27 + .../craftbukkit/entity/CraftOcelot.java | 32 + .../craftbukkit/entity/CraftPainting.java | 81 + .../bukkit/craftbukkit/entity/CraftPig.java | 34 + .../craftbukkit/entity/CraftPigZombie.java | 44 + .../craftbukkit/entity/CraftPlayer.java | 1583 ++++++++ .../craftbukkit/entity/CraftProjectile.java | 62 + .../bukkit/craftbukkit/entity/CraftSheep.java | 44 + .../craftbukkit/entity/CraftSilverfish.java | 27 + .../craftbukkit/entity/CraftSkeleton.java | 38 + .../bukkit/craftbukkit/entity/CraftSlime.java | 36 + .../entity/CraftSmallFireball.java | 26 + .../craftbukkit/entity/CraftSnowball.java | 26 + .../craftbukkit/entity/CraftSnowman.java | 26 + .../craftbukkit/entity/CraftSpider.java | 28 + .../bukkit/craftbukkit/entity/CraftSquid.java | 28 + .../craftbukkit/entity/CraftTNTPrimed.java | 75 + .../entity/CraftTameableAnimal.java | 84 + .../entity/CraftThrownExpBottle.java | 26 + .../craftbukkit/entity/CraftThrownPotion.java | 58 + .../craftbukkit/entity/CraftVehicle.java | 15 + .../craftbukkit/entity/CraftVillager.java | 36 + .../craftbukkit/entity/CraftWaterMob.java | 23 + .../craftbukkit/entity/CraftWeather.java | 26 + .../bukkit/craftbukkit/entity/CraftWitch.java | 26 + .../craftbukkit/entity/CraftWither.java | 26 + .../craftbukkit/entity/CraftWitherSkull.java | 36 + .../bukkit/craftbukkit/entity/CraftWolf.java | 39 + .../craftbukkit/entity/CraftZombie.java | 44 + .../craftbukkit/event/CraftEventFactory.java | 927 +++++ .../generator/CustomChunkGenerator.java | 230 ++ .../generator/InternalChunkGenerator.java | 8 + .../generator/NetherChunkGenerator.java | 12 + .../generator/NormalChunkGenerator.java | 86 + .../generator/SkyLandsChunkGenerator.java | 12 + .../help/CommandAliasHelpTopic.java | 46 + .../craftbukkit/help/CustomHelpTopic.java | 31 + .../help/CustomIndexHelpTopic.java | 40 + .../craftbukkit/help/HelpTopicAmendment.java | 50 + .../craftbukkit/help/HelpYamlReader.java | 119 + .../help/MultipleCommandAliasHelpTopic.java | 54 + .../MultipleCommandAliasHelpTopicFactory.java | 15 + .../craftbukkit/help/SimpleHelpMap.java | 219 ++ .../craftbukkit/inventory/CraftContainer.java | 315 ++ .../inventory/CraftEntityEquipment.java | 144 + .../inventory/CraftFurnaceRecipe.java | 27 + .../craftbukkit/inventory/CraftInventory.java | 481 +++ .../inventory/CraftInventoryAnvil.java | 48 + .../inventory/CraftInventoryBeacon.java | 19 + .../inventory/CraftInventoryBrewer.java | 26 + .../inventory/CraftInventoryCrafting.java | 138 + .../inventory/CraftInventoryCustom.java | 163 + .../inventory/CraftInventoryDoubleChest.java | 60 + .../inventory/CraftInventoryEnchanting.java | 25 + .../inventory/CraftInventoryFurnace.java | 42 + .../inventory/CraftInventoryHorse.java | 28 + .../inventory/CraftInventoryMerchant.java | 10 + .../inventory/CraftInventoryPlayer.java | 173 + .../inventory/CraftInventoryView.java | 142 + .../inventory/CraftItemFactory.java | 142 + .../craftbukkit/inventory/CraftItemStack.java | 411 ++ .../craftbukkit/inventory/CraftMetaBook.java | 265 ++ .../inventory/CraftMetaCharge.java | 128 + .../inventory/CraftMetaEnchantedBook.java | 168 + .../inventory/CraftMetaFirework.java | 386 ++ .../craftbukkit/inventory/CraftMetaItem.java | 857 +++++ .../inventory/CraftMetaLeatherArmor.java | 135 + .../craftbukkit/inventory/CraftMetaMap.java | 135 + .../inventory/CraftMetaPotion.java | 255 ++ .../craftbukkit/inventory/CraftMetaSkull.java | 172 + .../craftbukkit/inventory/CraftRecipe.java | 7 + .../inventory/CraftShapedRecipe.java | 65 + .../inventory/CraftShapelessRecipe.java | 48 + .../inventory/InventoryIterator.java | 64 + .../craftbukkit/inventory/RecipeIterator.java | 53 + .../craftbukkit/map/CraftMapCanvas.java | 110 + .../craftbukkit/map/CraftMapRenderer.java | 49 + .../bukkit/craftbukkit/map/CraftMapView.java | 163 + .../bukkit/craftbukkit/map/RenderData.java | 16 + .../metadata/BlockMetadataStore.java | 94 + .../metadata/EntityMetadataStore.java | 23 + .../metadata/PlayerMetadataStore.java | 23 + .../metadata/WorldMetadataStore.java | 22 + .../craftbukkit/potion/CraftPotionBrewer.java | 47 + .../potion/CraftPotionEffectType.java | 82 + .../CraftBlockProjectileSource.java | 142 + .../scheduler/CraftAsyncDebugger.java | 37 + .../craftbukkit/scheduler/CraftAsyncTask.java | 109 + .../craftbukkit/scheduler/CraftFuture.java | 108 + .../craftbukkit/scheduler/CraftScheduler.java | 484 +++ .../craftbukkit/scheduler/CraftTask.java | 124 + .../craftbukkit/scoreboard/CraftCriteria.java | 68 + .../scoreboard/CraftObjective.java | 112 + .../craftbukkit/scoreboard/CraftScore.java | 70 + .../scoreboard/CraftScoreboard.java | 159 + .../scoreboard/CraftScoreboardComponent.java | 27 + .../scoreboard/CraftScoreboardManager.java | 119 + .../CraftScoreboardTranslations.java | 26 + .../craftbukkit/scoreboard/CraftTeam.java | 180 + .../craftbukkit/updater/ArtifactDetails.java | 128 + .../craftbukkit/updater/AutoUpdater.java | 127 + .../updater/BukkitDLUpdaterService.java | 102 + .../util/AsynchronousExecutor.java | 354 ++ .../util/BlockStateListPopulator.java | 59 + .../craftbukkit/util/CraftChatMessage.java | 130 + .../craftbukkit/util/CraftDamageSource.java | 31 + .../craftbukkit/util/CraftIconCache.java | 16 + .../craftbukkit/util/CraftMagicNumbers.java | 132 + .../craftbukkit/util/DatFileFilter.java | 10 + .../craftbukkit/util/ForwardLogHandler.java | 52 + .../bukkit/craftbukkit/util/HashTreeSet.java | 117 + .../bukkit/craftbukkit/util/Java15Compat.java | 34 + .../bukkit/craftbukkit/util/LazyHashSet.java | 98 + .../craftbukkit/util/LazyPlayerSet.java | 25 + .../org/bukkit/craftbukkit/util/LongHash.java | 15 + .../bukkit/craftbukkit/util/LongHashSet.java | 301 ++ .../craftbukkit/util/LongObjectHashMap.java | 424 +++ .../craftbukkit/util/MojangNameLookup.java | 63 + .../util/ServerShutdownThread.java | 26 + .../util/ShortConsoleLogFormatter.java | 61 + .../util/StructureGrowDelegate.java | 70 + .../util/TerminalConsoleWriterThread.java | 52 + .../bukkit/craftbukkit/util/UnsafeList.java | 277 ++ .../bukkit/craftbukkit/util/Versioning.java | 29 + .../org/bukkit/craftbukkit/util/Waitable.java | 46 + .../craftbukkit/util/WeakCollection.java | 169 + .../github/paperspigot/PaperSpigotConfig.java | 241 ++ .../paperspigot/PaperSpigotWorldConfig.java | 338 ++ .../java/org/spigotmc/ActivationRange.java | 315 ++ .../src/main/java/org/spigotmc/AntiXray.java | 293 ++ .../main/java/org/spigotmc/AsyncCatcher.java | 10 + .../spigotmc/CachedMojangAPIConnection.java | 145 + .../spigotmc/CachedStreamHandlerFactory.java | 117 + .../main/java/org/spigotmc/LimitStream.java | 39 + .../src/main/java/org/spigotmc/Metrics.java | 645 ++++ .../main/java/org/spigotmc/ProtocolData.java | 190 + .../java/org/spigotmc/ProtocolInjector.java | 253 ++ .../java/org/spigotmc/RestartCommand.java | 115 + .../main/java/org/spigotmc/SneakyThrow.java | 15 + .../org/spigotmc/SpigotComponentReverter.java | 105 + .../java/org/spigotmc/SpigotCompressor.java | 43 + .../main/java/org/spigotmc/SpigotConfig.java | 435 +++ .../java/org/spigotmc/SpigotDebreakifier.java | 102 + .../java/org/spigotmc/SpigotDecompressor.java | 42 + .../java/org/spigotmc/SpigotWorldConfig.java | 360 ++ .../main/java/org/spigotmc/TrackingRange.java | 51 + .../main/java/org/spigotmc/ValidateUtils.java | 14 + .../java/org/spigotmc/WatchdogThread.java | 126 + .../org/spigotmc/WorldTileEntityList.java | 174 + .../src/main/resources/blocks.json | 1 + .../main/resources/configurations/bukkit.yml | 52 + .../resources/configurations/commands.yml | 16 + .../main/resources/configurations/help.yml | 55 + .../src/main/resources/log4j2.xml | 27 + .../resources/org/spigotmc/SneakyThrow.class | Bin 0 -> 184 bytes .../src/test/java/org/bukkit/ArtTest.java | 65 + .../test/java/org/bukkit/DyeColorsTest.java | 47 + .../test/java/org/bukkit/MaterialTest.java | 48 + .../test/java/org/bukkit/PerMaterialTest.java | 146 + .../src/test/java/org/bukkit/SoundTest.java | 18 + .../bukkit/StatisticsAndAchievementsTest.java | 61 + .../test/java/org/bukkit/WorldTypeTest.java | 18 + .../inventory/CompositeSerialization.java | 61 + .../inventory/FactoryItemMaterialTest.java | 156 + .../inventory/ItemFactoryTest.java | 47 + .../ItemMetaImplementationOverrideTest.java | 80 + .../craftbukkit/inventory/ItemMetaTest.java | 228 ++ .../inventory/ItemStackBookTest.java | 213 ++ .../ItemStackEnchantStorageTest.java | 108 + .../ItemStackFireworkChargeTest.java | 128 + .../inventory/ItemStackFireworkTest.java | 184 + .../inventory/ItemStackLeatherTest.java | 89 + .../ItemStackLoreEnchantmentTest.java | 297 ++ .../inventory/ItemStackMapTest.java | 121 + .../inventory/ItemStackPotionsTest.java | 146 + .../inventory/ItemStackSkullTest.java | 88 + .../craftbukkit/inventory/ItemStackTest.java | 493 +++ .../inventory/NMSCraftItemStackTest.java | 36 + .../updater/BukkitDLUpdaterServiceTest.java | 32 + .../java/org/bukkit/potion/PotionTest.java | 45 + .../bukkit/support/AbstractTestingBase.java | 27 + .../org/bukkit/support/DummyEnchantments.java | 12 + .../java/org/bukkit/support/DummyPotions.java | 17 + .../java/org/bukkit/support/DummyServer.java | 79 + .../java/org/bukkit/support/Matchers.java | 30 + .../test/java/org/bukkit/support/Util.java | 31 + README.md | 37 +- SoranSpigot.ipr | 628 ++++ SoranSpigot.iws | 919 +++++ paperspigot-parent.iml | 12 + pom.xml | 48 + 1531 files changed, 195346 insertions(+), 1 deletion(-) create mode 100644 .idea/libraries/Maven__org_json_json_20171018.xml create mode 100644 PaperSpigot-API/.gitignore create mode 100644 PaperSpigot-API/CONTRIBUTING.md create mode 100644 PaperSpigot-API/LICENCE.txt create mode 100644 PaperSpigot-API/README.md create mode 100644 PaperSpigot-API/dependency-reduced-pom.xml create mode 100644 PaperSpigot-API/pom.xml create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/FullServerTickHandler.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/NullTimingHandler.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/TimedEventExecutor.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/Timing.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/TimingData.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/TimingHandler.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/TimingHistory.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/TimingHistoryEntry.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/TimingIdentifier.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/Timings.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/TimingsCommand.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/TimingsExport.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/TimingsManager.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/timings/UnsafeTimingHandler.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/util/JSONUtil.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/util/LoadingIntMap.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/util/LoadingMap.java create mode 100644 PaperSpigot-API/src/main/java/co/aikar/util/MRUMapCache.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Achievement.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Art.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/AxisAlignedBB.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/BanEntry.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/BanList.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/BlockChangeDelegate.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Bukkit.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/ChatColor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Chunk.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/ChunkSnapshot.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/CoalType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Color.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/CropState.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Difficulty.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/DyeColor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Effect.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/EntityEffect.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/FireworkEffect.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/GameMode.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/GrassSpecies.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Instrument.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Location.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Material.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/NetherWartsState.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Note.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/OfflinePlayer.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/PortalType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Rotation.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/SandstoneType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Server.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/SkullType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Sound.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Statistic.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/TravelAgent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/TreeSpecies.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/TreeType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/UnsafeValues.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Utility.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/Warning.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/WeatherType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/World.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/WorldCreator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/WorldType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Beacon.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Biome.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Block.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/BlockFace.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/BlockState.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/BrewingStand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Chest.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/CommandBlock.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/ContainerBlock.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/CreatureSpawner.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Dispenser.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/DoubleChest.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Dropper.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Furnace.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Hopper.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Jukebox.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/NoteBlock.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/PistonMoveReaction.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Sign.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/block/Skull.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/BlockCommandSender.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/Command.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/CommandException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/CommandExecutor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/CommandMap.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/CommandSender.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/ConsoleCommandSender.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/FormattedCommandAlias.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/MultipleCommandAlias.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/PluginCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/PluginCommandYamlParser.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/PluginIdentifiableCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/RemoteConsoleCommandSender.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/SimpleCommandMap.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/TabCommandExecutor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/TabCompleter.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/TabExecutor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/AchievementCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/BanCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/BanIpCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/BanListCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/BukkitCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/ClearCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/DefaultGameModeCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/DeopCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/DifficultyCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/EffectCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/EnchantCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/ExpCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/GameModeCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/GameRuleCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/GiveCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/HelpCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/KickCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/ListCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/MeCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/OpCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/PardonCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/PardonIpCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/PlaySoundCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/PluginsCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/ReloadCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/SaveCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/SaveOffCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/SaveOnCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/SayCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/ScoreboardCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/SeedCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/SetIdleTimeoutCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/SetWorldSpawnCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/SpawnpointCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/SpreadPlayersCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/StopCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/TeleportCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/TellCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/TestForCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/TimeCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/ToggleDownfallCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/VanillaCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/VersionCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/WeatherCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/Configuration.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/ConfigurationOptions.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/ConfigurationSection.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/InvalidConfigurationException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/MemoryConfiguration.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/MemoryConfigurationOptions.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/MemorySection.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/file/FileConfiguration.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/file/FileConfigurationOptions.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConfigurationOptions.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/file/YamlConstructor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/file/YamlRepresenter.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerializable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/serialization/ConfigurationSerialization.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/serialization/DelegateDeserialization.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/configuration/serialization/SerializableAs.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/BooleanPrompt.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/Conversable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/Conversation.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/ConversationAbandonedEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/ConversationAbandonedListener.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/ConversationCanceller.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/ConversationContext.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/ConversationFactory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/ConversationPrefix.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/ExactMatchConversationCanceller.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/FixedSetPrompt.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/InactivityConversationCanceller.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/ManuallyAbandonedConversationCanceller.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/MessagePrompt.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/NullConversationPrefix.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/NumericPrompt.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/PlayerNamePrompt.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/PluginNameConversationPrefix.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/Prompt.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/RegexPrompt.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/StringPrompt.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/conversations/ValidatingPrompt.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/enchantments/Enchantment.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/enchantments/EnchantmentTarget.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/enchantments/EnchantmentWrapper.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Ageable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Ambient.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/AnimalTamer.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Animals.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Arrow.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Bat.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Blaze.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Boat.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/CaveSpider.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Chicken.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/ComplexEntityPart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/ComplexLivingEntity.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Cow.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Creature.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/CreatureType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Creeper.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Damageable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Egg.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/EnderCrystal.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/EnderDragon.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/EnderDragonPart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/EnderPearl.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/EnderSignal.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Enderman.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Entity.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/EntityType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/ExperienceOrb.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Explosive.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/FallingBlock.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/FallingSand.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Fireball.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Firework.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Fish.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/FishHook.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Flying.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Ghast.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Giant.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Golem.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Hanging.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Horse.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/HumanEntity.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/IronGolem.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Item.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/ItemFrame.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/LargeFireball.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/LeashHitch.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/LightningStrike.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/LivingEntity.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/MagmaCube.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Minecart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Monster.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/MushroomCow.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/NPC.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Ocelot.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Painting.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Pig.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/PigZombie.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Player.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/PoweredMinecart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Projectile.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Sheep.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Silverfish.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Skeleton.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Slime.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/SmallFireball.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Snowball.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Snowman.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Spider.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Squid.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/StorageMinecart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/TNTPrimed.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Tameable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/ThrownExpBottle.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/ThrownPotion.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Vehicle.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Villager.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/WaterMob.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Weather.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Witch.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Wither.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/WitherSkull.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Wolf.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/Zombie.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/minecart/CommandMinecart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/minecart/ExplosiveMinecart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/minecart/HopperMinecart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/minecart/PoweredMinecart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/minecart/RideableMinecart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/minecart/SpawnerMinecart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/entity/minecart/StorageMinecart.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/Cancellable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/Event.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/EventException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/EventHandler.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/EventPriority.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/HandlerList.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/Listener.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/Action.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockBreakEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockBurnEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockCanBuildEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockDamageEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockDispenseEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockExpEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockFadeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockFormEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockFromToEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockGrowEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockMultiPlaceEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockPhysicsEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockPistonEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockPistonExtendEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockRedstoneEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/BlockSpreadEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/EntityBlockFormEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/LeavesDecayEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/NotePlayEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/block/SignChangeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/enchantment/EnchantItemEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/CreeperPowerEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EnderpearlLandEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityBreakDoorEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityChangeBlockEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityCombustByBlockEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityCombustByEntityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityCombustEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityCreatePortalEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityInteractEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityPortalEnterEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityPortalEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityPortalExitEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityShootBowEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntitySpawnEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityTameEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityTargetLivingEntityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityTeleportEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/EntityUnleashEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/ExpBottleEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/ExplosionPrimeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/FoodLevelChangeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/HorseJumpEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/ItemDespawnEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/ItemSpawnEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/PigZapEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/PlayerLeashEntityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/PotionEffectAddEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/PotionEffectEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/PotionEffectExpireEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/PotionEffectExtendEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/PotionEffectRemoveEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/PotionSplashEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/ProjectileLaunchEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/SheepDyeWoolEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/SheepRegrowWoolEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/SlimeSplitEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/entity/SpawnerSpawnEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/hanging/HangingBreakByEntityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/hanging/HangingBreakEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/hanging/HangingEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/hanging/HangingPlaceEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/BrewEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/ClickType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/CraftItemEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/DragType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/EquipmentSetEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/FurnaceBurnEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/FurnaceExtractEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/FurnaceSmeltEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryAction.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryClickEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryCloseEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryCreativeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryDragEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryInteractEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryMoveItemEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryOpenEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryPickupItemEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/InventoryType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/inventory/PrepareItemCraftEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/painting/PaintingBreakByEntityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/painting/PaintingBreakEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/painting/PaintingEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/painting/PaintingPlaceEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/AsyncPlayerChatEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/AsyncPlayerPreLoginEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerAchievementAwardedEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerAnimationType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerBedEnterEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerBucketEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerBucketFillEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerChangedWorldEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerChannelEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerChatEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerChatTabCompleteEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerEditBookEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerExpChangeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerFishEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerGameModeChangeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerInteractEntityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerInventoryEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerItemBreakEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerItemConsumeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerItemDamageEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerItemHeldEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerKickEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerLevelChangeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerPickupItemEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerPortalEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerRegisterChannelEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerShearEntityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerStatisticIncrementEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerToggleFlightEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerToggleSneakEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerToggleSprintEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerUnleashEntityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerUnregisterChannelEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/player/PlayerVelocityEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/MapInitializeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/PluginDisableEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/PluginEnableEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/PluginEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/RemoteServerCommandEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/ServerCommandEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/ServerEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/ServerListPingEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/ServiceEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/ServiceRegisterEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/server/ServiceUnregisterEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleDestroyEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleEnterEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/vehicle/VehicleUpdateEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/weather/LightningStrikeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/weather/ThunderChangeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/weather/WeatherChangeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/weather/WeatherEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/ChunkEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/ChunkLoadEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/ChunkPopulateEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/ChunkUnloadEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/PortalCreateEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/SpawnChangeEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/StructureGrowEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/WorldEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/WorldInitEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/WorldLoadEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/WorldSaveEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/event/world/WorldUnloadEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/generator/BlockPopulator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/generator/ChunkGenerator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/help/GenericCommandHelpTopic.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/help/HelpMap.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/help/HelpTopic.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/help/HelpTopicComparator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/help/HelpTopicFactory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/help/IndexHelpTopic.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/AnvilInventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/BeaconInventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/BrewerInventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/CraftingInventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/DoubleChestInventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/EnchantingInventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/EntityEquipment.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/FurnaceInventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/FurnaceRecipe.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/HorseInventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/Inventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/InventoryHolder.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/InventoryView.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/ItemFactory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/ItemStack.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/MerchantInventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/PlayerInventory.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/Recipe.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/ShapedRecipe.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/ShapelessRecipe.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/meta/BookMeta.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/meta/EnchantmentStorageMeta.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/meta/FireworkEffectMeta.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/meta/FireworkMeta.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/meta/ItemMeta.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/meta/LeatherArmorMeta.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/meta/MapMeta.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/meta/PotionMeta.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/meta/Repairable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/inventory/meta/SkullMeta.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/map/MapCanvas.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/map/MapCursor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/map/MapCursorCollection.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/map/MapFont.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/map/MapPalette.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/map/MapRenderer.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/map/MapView.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/map/MinecraftFont.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Attachable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Bed.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Button.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Cake.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Cauldron.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Chest.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Coal.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/CocoaPlant.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Colorable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Command.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Crops.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/DetectorRail.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Diode.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Directional.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/DirectionalContainer.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Dispenser.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Door.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Dye.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/EnderChest.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/ExtendedRails.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/FlowerPot.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Furnace.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/FurnaceAndDispenser.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Gate.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Ladder.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Leaves.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Lever.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/LongGrass.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/MaterialData.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/MonsterEggs.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Mushroom.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/NetherWarts.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Openable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/PistonBaseMaterial.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/PistonExtensionMaterial.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/PoweredRail.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/PressurePlate.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/PressureSensor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Pumpkin.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Rails.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Redstone.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/RedstoneTorch.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/RedstoneWire.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Sandstone.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Sign.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Skull.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/SmoothBrick.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/SpawnEgg.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Stairs.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Step.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/TexturedMaterial.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Torch.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/TrapDoor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Tree.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Tripwire.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/TripwireHook.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Vine.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/WoodenStep.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/material/Wool.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/metadata/FixedMetadataValue.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/metadata/LazyMetadataValue.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/metadata/MetadataConversionException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/metadata/MetadataEvaluationException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/metadata/MetadataStore.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/metadata/MetadataStoreBase.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/metadata/MetadataValue.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/metadata/MetadataValueAdapter.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/metadata/Metadatable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/permissions/Permissible.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/permissions/PermissibleBase.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/permissions/Permission.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/permissions/PermissionAttachment.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/permissions/PermissionAttachmentInfo.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/permissions/PermissionDefault.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/permissions/PermissionRemovedExecutor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/permissions/ServerOperator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/AuthorNagException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/EventExecutor.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/IllegalPluginAccessException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/InvalidDescriptionException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/InvalidPluginException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/Plugin.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/PluginAwareness.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/PluginBase.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/PluginLoadOrder.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/PluginLoader.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/PluginLogger.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/PluginManager.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/RegisteredListener.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/RegisteredServiceProvider.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/ServicePriority.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/ServicesManager.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/SimplePluginManager.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/SimpleServicesManager.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/TimedRegisteredListener.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/UnknownDependencyException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/java/JavaPlugin.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/messaging/ChannelNameTooLongException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/messaging/ChannelNotRegisteredException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/messaging/MessageTooLargeException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/messaging/Messenger.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginChannelDirection.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageListener.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageListenerRegistration.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/messaging/PluginMessageRecipient.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/messaging/ReservedChannelException.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/plugin/messaging/StandardMessenger.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/potion/Potion.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/potion/PotionBrewer.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/potion/PotionEffect.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/potion/PotionEffectType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/potion/PotionEffectTypeWrapper.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/potion/PotionType.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/projectiles/BlockProjectileSource.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/projectiles/ProjectileSource.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scheduler/BukkitRunnable.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scheduler/BukkitScheduler.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scheduler/BukkitTask.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scheduler/BukkitWorker.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scoreboard/Criterias.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scoreboard/DisplaySlot.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scoreboard/Objective.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scoreboard/Score.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scoreboard/Scoreboard.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scoreboard/ScoreboardManager.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/scoreboard/Team.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/BlockIterator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/BlockVector.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/CachedServerIcon.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/ChatPaginator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/FileUtil.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/Java15Compat.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/NumberConversions.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/StringUtil.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/Vector.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/io/BukkitObjectInputStream.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/io/BukkitObjectOutputStream.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/io/Wrapper.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/noise/NoiseGenerator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/noise/OctaveGenerator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/noise/PerlinNoiseGenerator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/noise/PerlinOctaveGenerator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/noise/SimplexNoiseGenerator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/noise/SimplexOctaveGenerator.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/permissions/BroadcastPermissions.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/permissions/CommandPermissions.java create mode 100644 PaperSpigot-API/src/main/java/org/bukkit/util/permissions/DefaultPermissions.java create mode 100644 PaperSpigot-API/src/main/java/org/github/paperspigot/event/block/BeaconEffectEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/github/paperspigot/event/player/PlayerMicroMoveEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/github/paperspigot/event/server/ServerShutdownEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/spigotmc/CustomTimingsHandler.java create mode 100644 PaperSpigot-API/src/main/java/org/spigotmc/event/entity/EntityDismountEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/spigotmc/event/entity/EntityMountEvent.java create mode 100644 PaperSpigot-API/src/main/java/org/spigotmc/event/player/PlayerSpawnLocationEvent.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/block/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/command/defaults/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/command/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/configuration/file/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/configuration/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/configuration/serialization/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/conversations/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/enchantments/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/entity/minecart/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/entity/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/block/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/enchantment/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/entity/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/hanging/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/inventory/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/painting/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/player/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/server/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/vehicle/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/weather/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/event/world/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/generator/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/help/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/inventory/meta/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/inventory/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/map/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/material/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/metadata/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/permissions/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/plugin/doc-files/permissions-example_plugin.yml create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/plugin/java/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/plugin/messaging/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/plugin/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/potion/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/projectiles/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/scheduler/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/scoreboard/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/util/io/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/util/noise/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/util/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/org/bukkit/util/permissions/package-info.java create mode 100644 PaperSpigot-API/src/main/javadoc/overview.html create mode 100644 PaperSpigot-API/src/site/apt/index.apt create mode 100644 PaperSpigot-API/src/site/site.xml create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/ArtTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/BukkitMirrorTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/ChatColorTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/ChatPaginatorTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/CoalTypeTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/ColorTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/CropStateTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/DifficultyTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/DyeColorTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/EffectTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/EntityEffectTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/GameModeTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/GrassSpeciesTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/InstrumentTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/LocationTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/MaterialTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/NoteTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/TestServer.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/TreeSpeciesTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/WorldTypeTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/configuration/ConfigurationSectionTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/configuration/ConfigurationTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/configuration/MemoryConfigurationTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/configuration/MemorySectionTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/configuration/file/FileConfigurationTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/configuration/file/YamlConfigurationTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/conversations/ConversationContextTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/conversations/ConversationTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/conversations/FakeConversable.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/conversations/ValidatingPromptTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/event/PlayerChatTabCompleteEventTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/event/TestEvent.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/metadata/FixedMetadataValueTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/metadata/LazyMetadataValueTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/metadata/MetadataConversionTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/metadata/MetadataStoreTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/metadata/MetadataValueAdapterTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/plugin/PluginManagerTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/plugin/TestPlugin.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/plugin/TimedRegisteredListenerTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/plugin/messaging/StandardMessengerTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/plugin/messaging/TestMessageListener.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/plugin/messaging/TestPlayer.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/potion/PotionTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/util/StringUtilStartsWithTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/util/StringUtilTest.java create mode 100644 PaperSpigot-API/src/test/java/org/bukkit/util/io/BukkitObjectStreamTest.java create mode 100644 PaperSpigot-Server/.gitignore create mode 100644 PaperSpigot-Server/CONTRIBUTING.md create mode 100644 PaperSpigot-Server/LGPL.txt create mode 100644 PaperSpigot-Server/LICENCE.txt create mode 100644 PaperSpigot-Server/README.md create mode 100644 PaperSpigot-Server/dependency-reduced-pom.xml create mode 100644 PaperSpigot-Server/deprecation-mappings.at create mode 100644 PaperSpigot-Server/deprecation-mappings.csrg create mode 100644 PaperSpigot-Server/maps.yml create mode 100644 PaperSpigot-Server/pom.xml create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/AbortChainException.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/AsyncQueue.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/BukkitTaskChainFactory.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/GameInterface.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/SharedTaskChain.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/TaskChain.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/TaskChainAbortAction.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/TaskChainAsyncQueue.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/TaskChainDataWrappers.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/TaskChainExample.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/TaskChainFactory.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/TaskChainNullAction.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/TaskChainTasks.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/taskchain/TaskChainUtil.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/timings/SpigotTimings.java create mode 100644 PaperSpigot-Server/src/main/java/co/aikar/timings/WorldTimingsHandler.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/GenericSpigot.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/GenericSpigotConfig.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/authenticator/AuthenticatorHandler.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/authenticator/AuthenticatorUtil.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/commands/KnockbackCommand.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/commands/TicksPerSecondCommand.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/commands/TicksPerSecondTwoCommand.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/events/PacketCustomPayloadEvent.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/events/PlayerAttackEvent.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/events/ReachEvent.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/handler/MovementHandler.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/handler/PacketHandler.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/handler/SimpleMovementHandler.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/knockback/AbstractKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/knockback/preset/KnockbackLoadout.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/knockback/preset/type/DefaultLoadout.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/IKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/Knockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/KnockbackType.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/impl/CustomKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/impl/KitPvPKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/impl/KohiKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/impl/LoungeKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/impl/MinemenClubKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/impl/RengoKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/impl/SimpleKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/impl/TheCraftKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/impl/VanillaKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/legacy/knockback/impl/ZonixKnockback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/util/CraftPotionUtil.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/util/WrappedOverflowArray.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/util/callback/Callback.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/util/chatcolor/CC.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/util/compactqueue/ArrayWrapper.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/util/compactqueue/ArrayWrapperForPrimitiveLong.java create mode 100644 PaperSpigot-Server/src/main/java/gg/manny/spigot/util/compactqueue/CompactQueue.java create mode 100644 PaperSpigot-Server/src/main/java/jline/AnsiWindowsTerminal.java create mode 100644 PaperSpigot-Server/src/main/java/jline/internal/TerminalLineSettings.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/AttributeRanged.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BanEntrySerializer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BiomeBase.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BiomeDecorator.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BiomeMesa.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BiomeTheEndDecorator.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Block.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockActionDataList.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockAnvil.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockBloodStone.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockBrewingStand.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockButtonAbstract.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockCactus.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockCake.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockCocoa.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockCommand.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockCrops.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockDaylightDetector.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockDiodeAbstract.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockDispenser.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockDoor.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockDragonEgg.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockDropper.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockEnderPortal.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockFalling.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockFire.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockFlowerPot.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockFlowing.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockFluids.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockGrass.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockHopper.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockIce.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockLeaves.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockLever.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockMinecartDetector.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockMinecartTrackAbstract.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockMobSpawner.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockMonsterEggs.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockMushroom.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockMycel.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockNetherWart.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockOre.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockPiston.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockPistonExtension.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockPortal.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockPoweredRail.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateAbstract.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateBinary.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockPressurePlateWeighted.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockPumpkin.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneLamp.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneOre.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneTorch.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockRedstoneWire.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockReed.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockSapling.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockSign.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockSkull.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockSnow.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockSoil.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockStationary.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockStem.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockTNT.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockTallPlant.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockTorch.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockTrapdoor.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockTripwire.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockTripwireHook.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/BlockVine.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Chunk.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderFlat.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderGenerate.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderHell.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ChunkProviderServer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ChunkRegionLoader.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ChunkSection.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ClientCommandOrdinalWrapper.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/CommandDispatcher.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Container.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerAnvil.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerAnvilInventory.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerBeacon.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerBrewingStand.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerChest.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerDispenser.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerEnchantTable.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerEnchantTableInventory.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerFurnace.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerHopper.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerHorse.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerMerchant.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerPlayer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ContainerWorkbench.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ControllerLook.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ControllerMove.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/CraftingManager.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/CrashReport.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DataWatcher.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DedicatedServer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorArmor.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorBoat.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorBonemeal.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorEmptyBucket.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorFilledBucket.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorFireball.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorFireworks.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorFlintAndSteel.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorItem.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorMinecart.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorMonsterEgg.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorProjectile.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/DispenseBehaviorTNT.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Enchantment.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EnchantmentManager.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EnchantmentManagerDamage.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EnchantmentModifierArthropods.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EnchantmentModifierProtection.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EnchantmentModifierThorns.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Entity.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityAgeable.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityArrow.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityBoat.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityChicken.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityCow.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityCreature.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityCreeper.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityDamageSourceIndirect.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityEgg.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityEnderCrystal.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityEnderDragon.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityEnderPearl.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityEnderman.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityExperienceOrb.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityFallingBlock.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityFireball.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityFireworks.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityFishingHook.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityGhast.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityHanging.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityHorse.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityHuman.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityInsentient.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityIronGolem.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityItem.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityItemFrame.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityLargeFireball.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityLeash.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityLightning.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityLiving.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartAbstract.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartCommandBlockListener.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityMinecartContainer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityMonster.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityMushroomCow.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityOcelot.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityPainting.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityPig.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityPigZombie.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityPlayer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityPotion.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityProjectile.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntitySheep.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntitySilverfish.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntitySkeleton.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntitySlime.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntitySmallFireball.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntitySnowman.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntitySpider.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntitySquid.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityTNTPrimed.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityThrownExpBottle.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityTracker.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityTrackerEntry.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityTypes.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityWither.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityWitherSkull.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityWolf.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/EntityZombie.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ExpirableListEntry.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Explosion.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/FileConversionException.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/FoodMetaData.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/GameProfileBanEntry.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/GenericAttributes.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/GroupDataZombie.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/HandshakeListener.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/IDataManager.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/IInventory.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/IRecipe.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/IntCache.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/IntHashMap.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/InventoryCraftResult.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/InventoryCrafting.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/InventoryEnderChest.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/InventoryHorseChest.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/InventoryLargeChest.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/InventoryMerchant.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/InventorySubcontainer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Item.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemBlock.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemBoat.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemBow.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemBucket.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemDoor.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemDye.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemFireball.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemFishingRod.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemFlintAndSteel.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemHanging.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemLeash.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemMapEmpty.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemMilkBucket.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemMinecart.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemMonsterEgg.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemSkull.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemStack.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemWaterLily.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ItemWorldMap.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/JsonList.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/JsonListEntry.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/JsonListEntrySerializer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/LoginListener.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/MerchantRecipe.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/MerchantRecipeList.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/MethodProfiler.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/MinecraftServer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/MobEffectAttackDamage.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/MobEffectList.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/MobSpawnerAbstract.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/NBTBase.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/NBTCompressedStreamTools.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/NBTTagByteArray.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/NBTTagIntArray.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/NBTTagList.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/NameReferencingFileConverter.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/NetworkManager.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/NextTickListEntry.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/NibbleArray.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/OldChunkLoader.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Packet.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketDataSerializer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketDecoder.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketEncoder.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketLoginOutSuccess.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInArmAnimation.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInBlockDig.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInBlockPlace.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInChat.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInCloseWindow.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInCustomPayload.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInEntityAction.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInKeepAlive.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInPosition.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInPositionLook.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInSettings.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInSteerVehicle.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInTabComplete.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInUpdateSign.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayInWindowClick.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutBed.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutBlockAction.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutBlockBreakAnimation.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutBlockChange.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutChat.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutCollect.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutCustomPayload.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutEntity.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutEntityDestroy.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutEntityEffect.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutEntityEquipment.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutEntityHeadRotation.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutEntityLook.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutEntityMetadata.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutEntityTeleport.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutEntityVelocity.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutExperience.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutKeepAlive.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutLogin.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutMap.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutMapChunkBulk.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutMultiBlockChange.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutNamedEntitySpawn.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutOpenSignEditor.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutOpenWindow.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutPlayerInfo.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutPosition.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutRelEntityMove.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutRelEntityMoveLook.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutRemoveEntityEffect.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutScoreboardObjective.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutScoreboardScore.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutSetSlot.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutSpawnEntity.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutSpawnEntityLiving.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutSpawnEntityPainting.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutSpawnPosition.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutTileEntityData.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutUpdateAttributes.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutUpdateHealth.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutUpdateSign.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutWorldEvent.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketPlayOutWorldParticles.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PacketStatusListener.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Path.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalArrowAttack.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalBreakDoor.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalBreed.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalEatTile.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalFloat.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalHurtByTarget.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalMakeLove.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalNearestAttackableTarget.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalOcelotAttack.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalPanic.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSelector.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSit.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalSwell.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTame.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PathfinderGoalTarget.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PersistentCollection.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PlayerAbilities.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PlayerChunk.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PlayerChunkMap.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PlayerConnection.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PlayerDatFileConverter.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PlayerInteractManager.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PlayerInventory.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PlayerList.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PlayerSelector.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PortalCreator.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PortalTravelAgent.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/PropertyManager.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ProtocolOrdinalWrapper.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/QueuedPacket.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/RandomPositionGenerator.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/RecipeArmorDye.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/RecipeBookClone.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/RecipeFireworks.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/RecipeMapClone.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/RecipesFurnace.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/RegionFile.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/RegionFileCache.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/RemoteControlCommandListener.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ScoreboardServer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/SecondaryWorldServer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ServerConnection.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ServerConnectionChannel.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ServerStatisticManager.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ShapedRecipes.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ShapelessRecipes.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Slot.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/SlotFurnaceResult.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/SpawnerCreature.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/StatisticManager.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/StructureGenerator.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ThreadCommandReader.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/ThreadPlayerLookupUUID.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntity.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityBeacon.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityBrewingStand.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityChest.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityCommandListener.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityDispenser.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityEnderChest.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityFurnace.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityHopper.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityLightDetector.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityNote.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityPiston.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntityRecordPlayer.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntitySign.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/TileEntitySkull.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/UserCache.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/UserCacheEntry.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/Village.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/VillageSiege.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WatchableObject.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/World.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldData.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldGenBigTree.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldGenForestTree.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldGenGroundBush.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldGenLargeFeature.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldGenMegaTreeAbstract.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldGenPackedIce2.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillage.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillagePiece.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldGenVillagePieces.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldGenWitchHut.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldManager.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldMap.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldMapHumanTracker.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldNBTStorage.java create mode 100644 PaperSpigot-Server/src/main/java/net/minecraft/server/WorldServer.java create mode 100644 PaperSpigot-Server/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftArt.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftEffect.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftIpBanEntry.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanEntry.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftProfileBanList.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftServer.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftSound.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/LoggerOutputStream.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/Main.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/Overridden.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/TrigMath.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOExecutor.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/chunkio/QueuedChunk.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/AbstractProjectile.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexLivingEntity.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderPearl.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingSand.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftGolem.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftSmallFireball.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownExpBottle.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWeather.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/generator/NetherChunkGenerator.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/generator/SkyLandsChunkGenerator.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/CommandAliasHelpTopic.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/CustomHelpTopic.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/HelpTopicAmendment.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/MultipleCommandAliasHelpTopic.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/MultipleCommandAliasHelpTopicFactory.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBeacon.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryEnchanting.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCanvas.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/map/RenderData.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/metadata/EntityMetadataStore.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/metadata/PlayerMetadataStore.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/metadata/WorldMetadataStore.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionBrewer.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncDebugger.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardComponent.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/updater/ArtifactDetails.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/updater/AutoUpdater.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/updater/BukkitDLUpdaterService.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/AsynchronousExecutor.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/DatFileFilter.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/Java15Compat.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LazyHashSet.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongHash.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongHashSet.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/LongObjectHashMap.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/MojangNameLookup.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/ShortConsoleLogFormatter.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/StructureGrowDelegate.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/Versioning.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/Waitable.java create mode 100644 PaperSpigot-Server/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java create mode 100644 PaperSpigot-Server/src/main/java/org/github/paperspigot/PaperSpigotConfig.java create mode 100644 PaperSpigot-Server/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/ActivationRange.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/AntiXray.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/AsyncCatcher.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/CachedMojangAPIConnection.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/CachedStreamHandlerFactory.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/LimitStream.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/Metrics.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/ProtocolData.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/ProtocolInjector.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/RestartCommand.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/SneakyThrow.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/SpigotComponentReverter.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/SpigotCompressor.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/SpigotConfig.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/SpigotDebreakifier.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/SpigotDecompressor.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/SpigotWorldConfig.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/TrackingRange.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/ValidateUtils.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/WatchdogThread.java create mode 100644 PaperSpigot-Server/src/main/java/org/spigotmc/WorldTileEntityList.java create mode 100644 PaperSpigot-Server/src/main/resources/blocks.json create mode 100644 PaperSpigot-Server/src/main/resources/configurations/bukkit.yml create mode 100644 PaperSpigot-Server/src/main/resources/configurations/commands.yml create mode 100644 PaperSpigot-Server/src/main/resources/configurations/help.yml create mode 100644 PaperSpigot-Server/src/main/resources/log4j2.xml create mode 100644 PaperSpigot-Server/src/main/resources/org/spigotmc/SneakyThrow.class create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/ArtTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/DyeColorsTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/MaterialTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/PerMaterialTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/SoundTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/WorldTypeTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemFactoryTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/craftbukkit/updater/BukkitDLUpdaterServiceTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/potion/PotionTest.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/support/AbstractTestingBase.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/support/DummyEnchantments.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/support/DummyPotions.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/support/DummyServer.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/support/Matchers.java create mode 100644 PaperSpigot-Server/src/test/java/org/bukkit/support/Util.java create mode 100644 SoranSpigot.ipr create mode 100644 SoranSpigot.iws create mode 100644 paperspigot-parent.iml create mode 100644 pom.xml diff --git a/.idea/libraries/Maven__org_json_json_20171018.xml b/.idea/libraries/Maven__org_json_json_20171018.xml new file mode 100644 index 0000000..69697b6 --- /dev/null +++ b/.idea/libraries/Maven__org_json_json_20171018.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/PaperSpigot-API/.gitignore b/PaperSpigot-API/.gitignore new file mode 100644 index 0000000..edf9e5c --- /dev/null +++ b/PaperSpigot-API/.gitignore @@ -0,0 +1,31 @@ +# Eclipse stuff +/.classpath +/.project +/.settings + +# netbeans +/nbproject + +# we use maven! +/build.xml + +# maven +/target + +# vim +.*.sw[a-p] + +# various other potential build files +/build +/bin +/dist +/manifest.mf + +# Mac filesystem dust +.DS_Store + +# intellij +*.iml +*.ipr +*.iws +.idea/ diff --git a/PaperSpigot-API/CONTRIBUTING.md b/PaperSpigot-API/CONTRIBUTING.md new file mode 100644 index 0000000..3031b97 --- /dev/null +++ b/PaperSpigot-API/CONTRIBUTING.md @@ -0,0 +1,497 @@ +# How to Contribute + +The Bukkit project prides itself on being community built and driven. We love it when members of our community want to jump right in and get involved, so here's what you need to know. + +## Quick Guide +1. Create or find an issue to address on our [JIRA issue tracker](http://leaky.bukkit.org). +- Does your proposed change [fit Bukkit's goals](#does-the-change-fit-bukkits-goals)? +- Fork the repository if you haven't done so already. +- Make your changes in a new branch (if your change affects both Bukkit and CraftBukkit, we highly suggest you use the same name for your branches in both repos). +- Test your changes. +- Push to your fork and submit a pull request. +- **Note:** The project is put under a code freeze leading up to the release of a Minecraft update in order to give the Bukkit team a static code base to work on. + +![Life Cycle of a Bukkit Improvement](http://i.imgur.com/Ed6T7AE.png) + +## Getting Started +- You'll need a free [JIRA account](http://leaky.bukkit.org) (on our issue tracker affectionately called Leaky). +- You'll need a free [GitHub account](https://github.com/signup/free). +- Make sure you have a JIRA ticket for your issue at hand. + * Either search the list of current issues and find an appropriate issue. + * Or create one yourself if one does not already exist. + * When creating an issue, make sure to clearly describe the issue (including steps to reproduce it if it is a bug). +- Fork the repository on GitHub. +- **Note:** The project is put under a code freeze leading up to the release of a Minecraft update in order to give the Bukkit team a static code base to work on. + +## Does the Change Fit Bukkit's Goals? +As a rough guideline, ask yourself the following questions to determine if your proposed change fits the Bukkit project's goals. Please remember that this is only a rough guideline and may or may not reflect the definitive answer to this question. + +* Does it expose an implementation detail of the server software, the protocol or file formats? + + If your change revolves around an implementation detail then it is not proper API design. Examples of bad API design would be along the lines of a packet API, an NBT storage API, or basing an enum on implementation values. + +* Does it result in unexpected behaviour as defined by the Vanilla specification? + + One of the goals of the Bukkit project is to be an extended Minecraft vanilla server - meaning: if you choose to run the Bukkit server without any plugins, it should function exactly as the Minecraft server would with some rare exceptions. If your change alters the behaviour of the server in such a way that you would not have the same experience as you would in Vanilla, your change does not fit the Bukkit project's goals. + +* Does it expose an issue or vulnerability when operating within the Vanilla environment? + + One of the goals of the Bukkit project is to be able to operate within the limitations of the Vanilla environment. If your change results in or exposes the ability to, for example, crash the client when invalid data is set, it does not fit the Bukkit project's needs. + +If you answered yes to any of these questions, chances are high your change does not fit the Bukkit project's goals and will most likely not be accepted. Regardless, there are a few other important questions you need to ask yourself before you start working on a change: + +* Is this change reasonably supportable and maintainable? + +* Is this change future proof? + +## Making the Changes +* Create a branch on your fork where you'll be making your changes. + * Name your branch something relevant to the change you are looking to make. + * Note: if your changes affect both Bukkit and CraftBukkit, it is highly suggested you use the same branch name on both repos. + * To create a branch in Git; + * `git branch relevantBranchName` + * Then checkout the new branch with `git checkout relevantBranchName` +* Check for unnecessary whitespace with `git diff --check` before committing. +* Make sure your code meets [our requirements](#code-requirements). +* If the work you want to do involves editing Minecraft classes, be sure to read over the [Using Minecraft Internals](#using-minecraft-internals) section. +* Make sure your commit messages are in the [proper format](#commit-message-example). +* Test your changes to make sure it actually addresses the issue it should. +* Make sure your code compiles under Java 6, as that is what the project has to be built with. + +### Code Requirements +* We generally follow the [Sun/Oracle coding standards](http://www.oracle.com/technetwork/java/javase/documentation/codeconvtoc-136057.html). + +* No tabs; use 4 spaces instead. + +* No trailing whitespaces. + +* No CRLF line endings, LF only, set your Gits 'core.autocrlf' to 'true'. + + These whitespace requirements are easily and often overlooked. They are critical formatting requirements designed to help simplify a shared heterogeneous development environment. Learn how your IDE functions in order to show you these characters and verify them. Analyse the git diff closely to verify every character and if the PR should include the character change. It is tedious and it is critical. + + Eclipse: http://stackoverflow.com/a/11596227/532590 + NetBeans: http://stackoverflow.com/a/1866385/532590 + +* No 80 column limit or 'weird' midstatement newlines. + +* Any major additions should have documentation ready and provided if applicable (this is usually the case). + +* Try to follow test driven development where applicable. + + Bukkit employs JUnit (http://www.vogella.com/articles/JUnit/article.html) for testing and PRs should attempt to integrate with that framework as appropriate. Bukkit is a large project and what seems simple to a PR author at the time of writing a PR may easily be overlooked later by other authors and updates. Including unit tests with your PR will help to ensure the PR can be easily maintained over time and encourage the Bukkit Team to pull the PR. + +* There needs to be a new line at the end of every file. + +* Imports should be organised by alphabetical order, separated and grouped by package. + + **For example:** + + ```java + import java.io.ByteArrayInputStream; + import java.io.DataInputStream; + import java.io.IOException; + import java.util.ArrayList; + import java.util.Iterator; + import java.util.Random; + import java.util.concurrent.Callable; + + // CraftBukkit start + import java.io.UnsupportedEncodingException; + import java.util.concurrent.ExecutionException; + import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; + import java.util.logging.Level; + import java.util.HashSet; + + import org.bukkit.Bukkit; + import org.bukkit.Location; + import org.bukkit.craftbukkit.CraftWorld; + import org.bukkit.craftbukkit.inventory.CraftInventoryView; + import org.bukkit.craftbukkit.inventory.CraftItemStack; + import org.bukkit.craftbukkit.util.LazyPlayerSet; + import org.bukkit.craftbukkit.util.Waitable; + import org.bukkit.craftbukkit.entity.CraftPlayer; + import org.bukkit.craftbukkit.event.CraftEventFactory; + import org.bukkit.entity.Player; + import org.bukkit.event.Event; + import org.bukkit.event.block.Action; + import org.bukkit.event.block.SignChangeEvent; + import org.bukkit.event.player.AsyncPlayerChatEvent; + import org.bukkit.event.player.PlayerAnimationEvent; + import org.bukkit.event.player.PlayerChatEvent; + import org.bukkit.event.player.PlayerCommandPreprocessEvent; + import org.bukkit.event.player.PlayerInteractEntityEvent; + import org.bukkit.event.player.PlayerItemHeldEvent; + import org.bukkit.event.player.PlayerKickEvent; + import org.bukkit.event.player.PlayerMoveEvent; + import org.bukkit.event.player.PlayerTeleportEvent; + import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; + import org.bukkit.event.player.PlayerToggleSneakEvent; + import org.bukkit.event.player.PlayerToggleSprintEvent; + import org.bukkit.event.inventory.*; + import org.bukkit.event.inventory.InventoryType.SlotType; + import org.bukkit.event.player.PlayerPortalEvent; + import org.bukkit.event.player.PlayerToggleFlightEvent; + import org.bukkit.inventory.CraftingInventory; + import org.bukkit.inventory.InventoryView; + // CraftBukkit end + ``` + +### Using Minecraft Internals +#### Importing a New Minecraft Class +When contributing to the Bukkit project, you will likely find that you need to edit a Minecraft class that isn't already found within the project. In this case, you need to look at [our mc-dev repository](https://github.com/Bukkit/mc-dev), find the class you need, add it to the CraftBukkit repo and include it in its own special commit separate from your other changes. The commit message of this special commit should simply be "Add x for diff visibility", where x is the name of the file you are adding from mc-dev. + +If, however, you need to import multiple files from mc-dev into the Bukkit project, they should all be contained in the same special commit with the commit message "Add files for diff visibility". Note how the commit message no longer specifically mentions any class names. + +#### Making Changes to Minecraft Classes +The Bukkit project employs a Minimal Diff policy to help guide when changes should be made to Minecraft classes and what those changes should be. This is to ensure that any changes made have the smallest impact possible on the update process we go through whenever a Minecraft update is released. As well as keeping the Minimal Diff policy in mind, every change made to a Minecraft class needs to be marked as such with the appropriate CraftBukkit comment. + +##### Minimal Diff Policy +The Minimal Diff policy is a really important part of the project as it reminds us that every change to the Minecraft Internals has an impact on our update process. When people think of the phrase "minimal diffs", they often take it to the extreme - they go completely out of their way to abstract the changes they are trying to make away from editing Minecraft's classes as much as possible. However, this isn't what we mean by "minimal diffs". Instead, when trying to understand the minimal diffs policy, it helps to keep in mind its end goal: to reduce the impact changes we make to Minecraft's internals have on our update process. + +Put simply, the Minimal Diffs Policy simply means to make the smallest change in a Minecraft class possible without duplicating logic. + +Here are a few tips you should keep in mind or common areas you should focus on: + +* Try to avoid duplicating logic or code when making changes. + +* Try to keep your changes easily discernible - don't nest or group several unrelated changes together. + +* If you only use an import once within a class, don't import it and use fully qualified names instead. + +* Try to employ "short circuiting" of logic if at all possible. This means that you should force a conditional to be the value needed to side-step the code block if you would like to ignore that block of code. + + **For example, to short circuit this:** + + ```java + if (!this.world.isStatic && !this.dead && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) { + this.die(); + this.h(); + } + ``` + **You would do this:** + + ```java + if (false && !this.world.isStatic && !this.dead && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) { // CraftBukkit - not needed + this.die(); + this.h(); + } + ``` + +* When adding a validation check, see if the Validate package we already use has a better, more concise method you can use instead. + + **For example, you should use:** + + ```java + Validate.notNull(sender, "Sender cannot be null"); + ``` + + **Instead of:** + + ```java + if (sender == null) { + throw new IllegalArgumentException("Sender cannot be null"); + } + ``` + +* When the change you are attempting to make involves removing code, instead of removing it outright, you should comment it out. + + **For example:** + + ```java + // CraftBukkit start - special case dropping so we can get info from the tile entity + public void dropNaturally(World world, int i, int j, int k, int l, float f, int i1) { + if (world.random.nextFloat() < f) { + ItemStack itemstack = new ItemStack(Item.SKULL.id, 1, this.getDropData(world, i, j, k)); + TileEntitySkull tileentityskull = (TileEntitySkull) world.getTileEntity(i, j, k); + + if (tileentityskull.getSkullType() == 3 && tileentityskull.getExtraType() != null && tileentityskull.getExtraType().length() > 0) { + itemstack.setTag(new NBTTagCompound()); + itemstack.getTag().setString("SkullOwner", tileentityskull.getExtraType()); + } + + this.b(world, i, j, k, itemstack); + } + } + // CraftBukkit end + + public void a(World world, int i, int j, int k, int l, EntityHuman entityhuman) { + if (entityhuman.abilities.canInstantlyBuild) { + l |= 8; + world.setData(i, j, k, l, 4); + } + + super.a(world, i, j, k, l, entityhuman); + } + + public void remove(World world, int i, int j, int k, int l, int i1) { + if (!world.isStatic) { + /* CraftBukkit start - drop item in code above, not here + if ((i1 & 8) == 0) { + ItemStack itemstack = new ItemStack(Item.SKULL.id, 1, this.getDropData(world, i, j, k)); + TileEntitySkull tileentityskull = (TileEntitySkull) world.getTileEntity(i, j, k); + + if (tileentityskull.getSkullType() == 3 && tileentityskull.getExtraType() != null && tileentityskull.getExtraType().length() > 0) { + itemstack.setTag(new NBTTagCompound()); + itemstack.getTag().setString("SkullOwner", tileentityskull.getExtraType()); + } + + this.b(world, i, j, k, itemstack); + } + // CraftBukkit end */ + + super.remove(world, i, j, k, l, i1); + } + } + ``` + +##### General Guidelines +When editing Minecraft's classes, we have a set of rules and guidelines that need to be followed to keep us sane when it comes time for us to update Bukkit. + +**CraftBukkit comments** +Changes to a Minecraft class should be clearly marked using CraftBukkit comments. Here are a few tips to help explain what kind of CraftBukkit comment to use and where to use them: + +* Regardless of what kind of CraftBukkit comment you use, please take care to be explicit and exact with your usage. If the "C" in "CraftBukkit" is capitalised in the example, you should capitalise it when you use it. If the "start" begins with a lowercase "s", you should make sure yours does too. + +* If the change only affects one line of code, you should use an end of line CraftBukkit comment. + + **Examples:** + + If the change is obvious when looking at the diff, then you just need a simple end of line CraftBukkit comment. + + ```java + if (true || minecraftserver.getAllowNether()) { // CraftBukkit + ``` + + If, however, the change is something important to note or difficult to discern, you should include a reason at the end of the end of line CraftBukkit comment. + + ```java + public int fireTicks; // CraftBukkit - private -> public + ``` + + If adding the CraftBukkit comment to the end of the line negatively affects the readability of the code, then you should place the CraftBukkit comment on a new line above the change you made. + + ```java + // CraftBukkit + if (!isEffect && !world.isStatic && world.difficulty >= 2 && world.areChunksLoaded(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2), 10)) { + ``` + +* If the change affects more than one line, you should use a multi-line CraftBukkit comment. + + **Examples:** + + The majority of the time multi-line changes should be accompanied by a reason since they're usually much more complicated than a single line change. We'd like to suggest you follow the same rule as above: if the change is something important to note or difficult to discern, you should include a reason at the end of the end of line CraftBukkit comment, however it is not always clear if this is the case. Looking through the code in the project, you'll see that we sometimes include a reason when we should have left it off and vice versa. + + ```java + // CraftBukkit start - special case dropping so we can get info from the tile entity + public void dropNaturally(World world, int i, int j, int k, int l, float f, int i1) { + if (world.random.nextFloat() < f) { + ItemStack itemstack = new ItemStack(Item.SKULL.id, 1, this.getDropData(world, i, j, k)); + TileEntitySkull tileentityskull = (TileEntitySkull) world.getTileEntity(i, j, k); + + if (tileentityskull.getSkullType() == 3 && tileentityskull.getExtraType() != null && tileentityskull.getExtraType().length() > 0) { + itemstack.setTag(new NBTTagCompound()); + itemstack.getTag().setString("SkullOwner", tileentityskull.getExtraType()); + } + + this.b(world, i, j, k, itemstack); + } + } + // CraftBukkit end + ```` + + Otherwise, just use a multi-line CraftBukkit comment without a reason. + + ```java + // CraftBukkit start + BlockIgniteEvent event = new BlockIgniteEvent(this.cworld.getBlockAt(i, j, k), BlockIgniteEvent.IgniteCause.LIGHTNING, null); + world.getServer().getPluginManager().callEvent(event); + + if (!event.isCancelled()) { + world.setTypeIdUpdate(i, j, k, Block.FIRE.id); + } + // CraftBukkit end + ``` + +* CraftBukkit comments should be on the same indentation level of the code block it is in. + + **For example:** + + ```java + if (j == 1) { + // CraftBukkit start - store a reference + ItemStack itemstack4 = playerinventory.getCarried(); + if (itemstack4.count > 0) { + entityhuman.drop(itemstack4.a(1)); + } + + if (itemstack4.count == 0) { + // CraftBukkit end + playerinventory.setCarried((ItemStack) null); + } + } + ``` + +**Other guidelines** + +* When adding imports to a Minecraft class, they should be organised by alphabetical order, separated and grouped by package. + + **For example:** + + ```java + import java.io.ByteArrayInputStream; + import java.io.DataInputStream; + import java.io.IOException; + import java.util.ArrayList; + import java.util.Iterator; + import java.util.Random; + import java.util.concurrent.Callable; + + // CraftBukkit start + import java.io.UnsupportedEncodingException; + import java.util.concurrent.ExecutionException; + import java.util.concurrent.atomic.AtomicIntegerFieldUpdater; + import java.util.logging.Level; + import java.util.HashSet; + + import org.bukkit.Bukkit; + import org.bukkit.Location; + import org.bukkit.craftbukkit.CraftWorld; + import org.bukkit.craftbukkit.inventory.CraftInventoryView; + import org.bukkit.craftbukkit.inventory.CraftItemStack; + import org.bukkit.craftbukkit.util.LazyPlayerSet; + import org.bukkit.craftbukkit.util.Waitable; + import org.bukkit.craftbukkit.entity.CraftPlayer; + import org.bukkit.craftbukkit.event.CraftEventFactory; + import org.bukkit.entity.Player; + import org.bukkit.event.Event; + import org.bukkit.event.block.Action; + import org.bukkit.event.block.SignChangeEvent; + import org.bukkit.event.player.AsyncPlayerChatEvent; + import org.bukkit.event.player.PlayerAnimationEvent; + import org.bukkit.event.player.PlayerChatEvent; + import org.bukkit.event.player.PlayerCommandPreprocessEvent; + import org.bukkit.event.player.PlayerInteractEntityEvent; + import org.bukkit.event.player.PlayerItemHeldEvent; + import org.bukkit.event.player.PlayerKickEvent; + import org.bukkit.event.player.PlayerMoveEvent; + import org.bukkit.event.player.PlayerTeleportEvent; + import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; + import org.bukkit.event.player.PlayerToggleSneakEvent; + import org.bukkit.event.player.PlayerToggleSprintEvent; + import org.bukkit.event.inventory.*; + import org.bukkit.event.inventory.InventoryType.SlotType; + import org.bukkit.event.player.PlayerPortalEvent; + import org.bukkit.event.player.PlayerToggleFlightEvent; + import org.bukkit.inventory.CraftingInventory; + import org.bukkit.inventory.InventoryView; + // CraftBukkit end + ``` + +* Do not remove unused imports if they are not marked by CraftBukkit comments. + +### Commit Message Example +> Provide an example commit for CONTRIBUTING.md. Fixes BUKKIT-1 +> +> The CONTRIBUTING.md is missing an example commit message. Without this +> commit, we are unable to provide potential contributors with a helpful example, +> forcing developers to guess at what an acceptable commit message would look +> like. This commit fixes this issue by providing a clear and informative example +> for contributors to base their work off of. + +### Commit Message Expectations +The first line in a commit message is an imperative statement briefly explaining what the commit is achieving with an associated ticket number from our JIRA, in the form of BUKKIT-#. See the list of acceptable keywords to reference tickets with for more information on this. + +The body of the commit message needs to describe how the code behaves without this change, why this is a problem and how this commit addresses it. The body of the commit message should be restricted by a 78 character, plus newline, limit per line (meaning: once you hit about 78 characters, you should explicitly start a new line in the commit message). + +Acceptable keywords to reference tickets with: + +* **Fixes** BUKKIT-1 - this commit fixes the bug detailed in BUKKIT-1 +* **Adds** BUKKIT-2 - this commit adds the new feature requested by BUKKIT-2 + +You can reference multiple tickets in a single commit message, for example: "Fixes BUKKIT-1, BUKKIT-2" or "Adds BUKKIT-1, BUKKIT-2" without closing punctuation. + +## Submitting the Changes + +* Push your changes to a topic branch in your fork of the repository. +* Submit a pull request to the relevant repository in the Bukkit organization. + * Make sure your pull request meets [our expectations](#pull-request-formatting-expectations) before submitting. + * No merges should be included in any pull requests. +* Update your JIRA ticket to reflect that you have submitted a pull request and are ready for it to be reviewed. + * Include a link to the pull request in the ticket. +* Follow our [Tips to Get Your Pull Request Accepted](#tips-to-get-your-pull-request-accepted). +* **Note:** The project is put under a code freeze leading up to the release of a Minecraft update in order to give the Bukkit team a static code base to work on. + +### Pull Request Formatting Expectations +#### Title +> [PR Type] Brief summary. Fixes BUKKIT-#### +> PR Type can be B for Bukkit, C for CraftBukkit, B+C for a PR in both sides +> +> Title Example: +> [B+C] Provide an example commit for CONTRIBUTING.md. Fixes BUKKIT-1 + +#### Description: +> ##### The Issue: +> Paragraphs explaining what the issue the PR is meant to be addressing. +> +> ##### Justification for this PR: +> Paragraphs providing justification for the PR +> +> ##### PR Breakdown: +> Paragraphs breaking down what the PR is doing, in detail. +> +> ##### Testing Results and Materials: +> Paragraphs describing what you did to test the code in this PR and links to pre-compiled test binaries and source. +> +> ##### Relevant PR(s): +> This should be links to accompanying PRs, or alternate PRs that attempted to perform the task. Each reference should have a reason attached as to why it is being referenced (for example: "Similar to PR ### but won't empty your Bukkits"). Accompanying PRs need no explanation, but still need to be linked. +> +> B-#### - https://github.com/Bukkit/Bukkit/pull/#### - Reason +> CB-#### - https://github.com/Bukkit/CraftBukkit/pull/#### - Reason +> +> ##### JIRA Ticket: +> BUKKIT-#### - https://bukkit.atlassian.net/browse/BUKKIT-#### +> +> ##### Pull Request Check List (For Your Use): +> +>**General:** +> +>- [ ] Fits Bukkit's Goals +>- [ ] Leaky Ticket Ready +>- [ ] Code Meets Requirements +>- [ ] Code is Documented +>- [ ] Code Addresses Leaky Ticket +>- [ ] Followed Pull Request Format +>- [ ] Tested Code +>- [ ] Included Test Material and Source +> +>**If Applicable:** +> +>- [ ] Importing New Minecraft Classes In Special Commit +>- [ ] Follows Minimal Diff Policy +>- [ ] Uses Proper CraftBukkit Comments +>- [ ] Imports Are Ordered, Separated and Organised Properly + +### Tips to Get Your Pull Request Accepted +Making sure you follow the above conventions is important, but just the beginning. Follow these tips to better the chances of your pull request being accepted and pulled. + +* Your change should [fit with Bukkit's goals](#does-the-change-fit-bukkits-goals). +* Make sure you follow all of our conventions to the letter. +* Make sure your code compiles under Java 6. +* Check for misplaced whitespaces. It may be invisible, but [we notice](https://github.com/Bukkit/CraftBukkit/pull/1070). +* Provide proper JavaDocs where appropriate. + * JavaDocs should detail every limitation, caveat and gotcha the code has. +* Provide proper accompanying documentation where appropriate. +* Test your code and provide testing material. + * For example: adding an event? Test it with a test plugin and provide us with that plugin and its source. +* Make sure to follow coding best practises. +* Your pull request should adhere to our [Pull Request Formatting Expectations](#pull-request-formatting-expectations). +* **Note:** The project is put under a code freeze leading up to the release of a Minecraft update in order to give the Bukkit team a static code base to work on. + +## Useful Resources +* [An example pull request demonstrating the things we look out for](https://github.com/Bukkit/CraftBukkit/pull/1070) +* [Handy gist version of our Pull Request Format Template](https://gist.github.com/EvilSeph/35bb477eaa1dffc5f1d7) +* [More information on contributing](http://wiki.bukkit.org/Getting_Involved) +* [Leaky, Our Issue Tracker (JIRA)](http://leaky.bukkit.org) +* [General GitHub documentation](http://help.github.com/) +* [GitHub pull request documentation](http://help.github.com/send-pull-requests/) +* [Join us on IRC - #bukkitdev @ irc.esper.net](http://wiki.bukkit.org/IRC) diff --git a/PaperSpigot-API/LICENCE.txt b/PaperSpigot-API/LICENCE.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/PaperSpigot-API/LICENCE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/PaperSpigot-API/README.md b/PaperSpigot-API/README.md new file mode 100644 index 0000000..1905b8d --- /dev/null +++ b/PaperSpigot-API/README.md @@ -0,0 +1,16 @@ +Spigot-API +====== + +A Minecraft Server API. + +Website: [http://spigotmc.org](http://spigotmc.org) +Bugs/Suggestions: [http://www.spigotmc.org/forums/bugs-feature-requests.8/](http://www.spigotmc.org/forums/bugs-feature-requests.8/) +Contributing Guidelines: [CONTRIBUTING.md](https://github.com/SpigotMC/Spigot-API/blob/master/CONTRIBUTING.md) + +Compilation +----------- + +We use maven to handle our dependencies. + +* Install [Maven 3](http://maven.apache.org/download.html) +* Check out this repo and: `mvn clean install` diff --git a/PaperSpigot-API/dependency-reduced-pom.xml b/PaperSpigot-API/dependency-reduced-pom.xml new file mode 100644 index 0000000..7a5acc2 --- /dev/null +++ b/PaperSpigot-API/dependency-reduced-pom.xml @@ -0,0 +1,106 @@ + + + + paperspigot-parent + org.github.paperspigot + dev-SNAPSHOT + + 4.0.0 + gg.manny + genericspigot-api + PaperSpigot-API + 1.7.10-R0.1-SNAPSHOT + https://github.com/PaperSpigot/Spigot + + + + maven-compiler-plugin + 3.8.0 + + 1.8 + 1.8 + true + + + + maven-shade-plugin + 2.3 + + + package + + shade + + + + + + maven-site-plugin + 3.0-beta-3 + + + + org.codehaus.mojo + jxr-maven-plugin + 2.0-beta-1 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.7 + + true + + + + + javadoc + + + + + + + + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/public + + + + + junit + junit + 4.11 + test + + + hamcrest-core + org.hamcrest + + + + + org.hamcrest + hamcrest-library + 1.3 + test + + + hamcrest-core + org.hamcrest + + + + + + 1.8 + UTF-8 + -Xdoclint:none + 1.8 + + + diff --git a/PaperSpigot-API/pom.xml b/PaperSpigot-API/pom.xml new file mode 100644 index 0000000..24863bf --- /dev/null +++ b/PaperSpigot-API/pom.xml @@ -0,0 +1,163 @@ + + 4.0.0 + gg.manny + genericspigot-api + 1.7.10-R0.1-SNAPSHOT + PaperSpigot-API + https://github.com/PaperSpigot/Spigot + + + -Xdoclint:none + UTF-8 + 1.8 + 1.8 + + + + org.github.paperspigot + paperspigot-parent + dev-SNAPSHOT + ../pom.xml + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/public + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 1.8 + 1.8 + true + + + + org.apache.maven.plugins + maven-shade-plugin + 2.3 + + + package + + shade + + + + + + org.apache.maven.plugins + maven-site-plugin + 3.0-beta-3 + + + + org.codehaus.mojo + jxr-maven-plugin + 2.0-beta-1 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.7 + + true + + + + + javadoc + + + + + + + + + + + + net.md-5 + bungeecord-chat + 1.8-SNAPSHOT + jar + compile + + + com.google.code.gson + gson + + + net.sf.trove4j + trove4j + + + + + org.yaml + snakeyaml + 1.12 + jar + compile + + + com.googlecode.json-simple + json-simple + 1.1.1 + jar + compile + + + com.google.code.gson + gson + 2.1 + + + org.avaje + ebean + 2.8.1 + jar + compile + + + com.google.guava + guava + 19.0 + jar + compile + + + commons-lang + commons-lang + 2.6 + + + + net.sf.trove4j + trove4j + 3.0.3 + + + + + junit + junit + 4.11 + test + + + org.hamcrest + hamcrest-library + 1.3 + test + + + diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/FullServerTickHandler.java b/PaperSpigot-API/src/main/java/co/aikar/timings/FullServerTickHandler.java new file mode 100644 index 0000000..cb4e7ba --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/FullServerTickHandler.java @@ -0,0 +1,79 @@ +package co.aikar.timings; + +import static co.aikar.timings.TimingsManager.*; + +public class FullServerTickHandler extends TimingHandler { + static final TimingIdentifier IDENTITY = new TimingIdentifier("Minecraft", "Full Server Tick", null, false); + final TimingData minuteData; + double avgFreeMemory = -1D; + double avgUsedMemory = -1D; + FullServerTickHandler() { + super(IDENTITY); + minuteData = new TimingData(id); + + TIMING_MAP.put(IDENTITY, this); + } + + @Override + public void startTiming() { + if (TimingsManager.needsFullReset) { + TimingsManager.resetTimings(); + } else if (TimingsManager.needsRecheckEnabled) { + TimingsManager.recheckEnabled(); + } + super.startTiming(); + } + + @Override + public void stopTiming() { + super.stopTiming(); + if (!enabled) { + return; + } + if (TimingHistory.timedTicks % 20 == 0) { + final Runtime runtime = Runtime.getRuntime(); + double usedMemory = runtime.totalMemory() - runtime.freeMemory(); + double freeMemory = runtime.maxMemory() - usedMemory; + if (this.avgFreeMemory == -1) { + this.avgFreeMemory = freeMemory; + } else { + this.avgFreeMemory = (this.avgFreeMemory * (59 / 60D)) + (freeMemory * (1 / 60D)); + } + + if (this.avgUsedMemory == -1) { + this.avgUsedMemory = usedMemory; + } else { + this.avgUsedMemory = (this.avgUsedMemory * (59 / 60D)) + (usedMemory * (1 / 60D)); + } + } + + long start = System.nanoTime(); + TimingsManager.tick(); + long diff = System.nanoTime() - start; + CURRENT = TIMINGS_TICK; + TIMINGS_TICK.addDiff(diff); + // addDiff for TIMINGS_TICK incremented this, bring it back down to 1 per tick. + record.curTickCount--; + minuteData.curTickTotal = record.curTickTotal; + minuteData.curTickCount = 1; + boolean violated = isViolated(); + minuteData.processTick(violated); + TIMINGS_TICK.processTick(violated); + processTick(violated); + + + if (TimingHistory.timedTicks % 1200 == 0) { + MINUTE_REPORTS.add(new TimingHistory.MinuteReport()); + TimingHistory.resetTicks(false); + minuteData.reset(); + } + if (TimingHistory.timedTicks % Timings.getHistoryInterval() == 0) { + TimingsManager.HISTORY.add(new TimingHistory()); + TimingsManager.resetTimings(); + } + } + + boolean isViolated() { + return record.curTickTotal > 50000000; + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/NullTimingHandler.java b/PaperSpigot-API/src/main/java/co/aikar/timings/NullTimingHandler.java new file mode 100644 index 0000000..c73b617 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/NullTimingHandler.java @@ -0,0 +1,61 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +public final class NullTimingHandler implements Timing { + @Override + public void startTiming() { + + } + + @Override + public void stopTiming() { + + } + + @Override + public void startTimingIfSync() { + + } + + @Override + public void stopTimingIfSync() { + + } + + @Override + public void abort() { + + } + + @Override + public TimingHandler getTimingHandler() { + return null; + } + + @Override + public void close() { + + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/TimedEventExecutor.java b/PaperSpigot-API/src/main/java/co/aikar/timings/TimedEventExecutor.java new file mode 100644 index 0000000..e3da034 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/TimedEventExecutor.java @@ -0,0 +1,81 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import org.bukkit.Bukkit; +import org.bukkit.event.Event; +import org.bukkit.event.EventException; +import org.bukkit.event.Listener; +import org.bukkit.plugin.EventExecutor; +import org.bukkit.plugin.Plugin; + +import java.lang.reflect.Method; + +public class TimedEventExecutor implements EventExecutor { + + private final EventExecutor executor; + private final Timing timings; + + /** + * Wraps an event executor and associates a timing handler to it. + * + * @param executor + * @param plugin + * @param method + * @param eventClass + */ + public TimedEventExecutor(EventExecutor executor, Plugin plugin, Method method, Class eventClass) { + this.executor = executor; + String id; + + if (method == null) { + if (executor.getClass().getEnclosingClass() != null) { // Oh Skript, how we love you + method = executor.getClass().getEnclosingMethod(); + } + } + + if (method != null) { + id = method.getDeclaringClass().getName(); + } else { + id = executor.getClass().getName(); + } + + + final String eventName = eventClass.getSimpleName(); + boolean verbose = "BlockPhysicsEvent".equals(eventName) || "Drain".equals(eventName) || "Fill".equals(eventName); + this.timings = Timings.ofSafe(plugin.getName(), (verbose ? "## " : "") + + "Event: " + id + " (" + eventName + ")", null); + } + + @Override + public void execute(Listener listener, Event event) throws EventException { + if (event.isAsynchronous() || !Timings.timingsEnabled || !Bukkit.isPrimaryThread()) { + executor.execute(listener, event); + return; + } + timings.startTiming(); + executor.execute(listener, event); + timings.stopTiming(); + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/Timing.java b/PaperSpigot-API/src/main/java/co/aikar/timings/Timing.java new file mode 100644 index 0000000..4d990b1 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/Timing.java @@ -0,0 +1,72 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +/** + * Provides an ability to time sections of code within the Minecraft Server + */ +public interface Timing extends AutoCloseable { + /** + * Starts timing the execution until {@link #stopTiming()} is called. + */ + public 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(); + + /** + * Starts timing the execution until {@link #stopTiming()} is called. + * + * But only if we are on the primary thread. + */ + public void startTimingIfSync(); + + /** + *

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

+ * + * But only if we are on the primary thread. + */ + public void stopTimingIfSync(); + + /** + * Stops timing and disregards current timing data. + */ + public void abort(); + + /** + * Used internally to get the actual backing Handler in the case of delegated Handlers + * + * @return TimingHandler + */ + TimingHandler getTimingHandler(); + + @Override + void close(); +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/TimingData.java b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingData.java new file mode 100644 index 0000000..b62e428 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingData.java @@ -0,0 +1,105 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import com.google.common.base.Function; + +import java.util.List; + +import static co.aikar.util.JSONUtil.toArray; + +/** + *

Lightweight object for tracking timing data

+ * + * 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); + } + }; + int id; + int count = 0; + int lagCount = 0; + long totalTime = 0; + long lagTotalTime = 0; + + int curTickCount = 0; + int curTickTotal = 0; + + TimingData(int id) { + this.id = id; + } + + TimingData(TimingData data) { + this.id = data.id; + this.totalTime = data.totalTime; + this.lagTotalTime = data.lagTotalTime; + this.count = data.count; + this.lagCount = data.lagCount; + } + + void add(long diff) { + ++curTickCount; + curTickTotal += diff; + } + + void processTick(boolean violated) { + totalTime += curTickTotal; + count += curTickCount; + if (violated) { + lagTotalTime += curTickTotal; + lagCount += curTickCount; + } + curTickTotal = 0; + curTickCount = 0; + } + + void reset() { + count = 0; + lagCount = 0; + curTickTotal = 0; + curTickCount = 0; + totalTime = 0; + lagTotalTime = 0; + } + + protected TimingData clone() { + return new TimingData(this); + } + + public List export() { + List list = toArray( + id, + count, + totalTime); + if (lagCount > 0) { + list.add(lagCount); + list.add(lagTotalTime); + } + return list; + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/TimingHandler.java b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingHandler.java new file mode 100644 index 0000000..e1fada8 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingHandler.java @@ -0,0 +1,190 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import co.aikar.util.LoadingIntMap; +import gnu.trove.map.hash.TIntObjectHashMap; +import org.bukkit.Bukkit; + +import java.util.logging.Level; + +class TimingHandler implements Timing { + + private static int idPool = 1; + final int id = idPool++; + + final String name; + final boolean verbose; + + final TIntObjectHashMap children = new LoadingIntMap(TimingData.LOADER); + + final TimingData record; + final TimingHandler groupHandler; + + long start = 0; + int timingDepth = 0; + boolean added; + boolean timed; + boolean enabled; + TimingHandler parent; + + TimingHandler(TimingIdentifier id) { + if (id.name.startsWith("##")) { + verbose = true; + this.name = id.name.substring(3); + } else { + this.name = id.name; + verbose = false; + } + + this.record = new TimingData(this.id); + this.groupHandler = id.groupHandler; + + TimingIdentifier.getGroup(id.group).handlers.add(this); + checkEnabled(); + } + + final void checkEnabled() { + enabled = Timings.timingsEnabled && (!verbose || Timings.verboseEnabled); + } + + void processTick(boolean violated) { + if (timingDepth != 0 || record.curTickCount == 0) { + timingDepth = 0; + start = 0; + return; + } + + record.processTick(violated); + for (TimingData handler : children.valueCollection()) { + handler.processTick(violated); + } + } + + @Override + public void startTimingIfSync() { + if (Bukkit.isPrimaryThread()) { + startTiming(); + } + } + + @Override + public void stopTimingIfSync() { + if (Bukkit.isPrimaryThread()) { + stopTiming(); + } + } + + public void startTiming() { + if (enabled && ++timingDepth == 1) { + start = System.nanoTime(); + parent = TimingsManager.CURRENT; + TimingsManager.CURRENT = this; + } + } + + public void stopTiming() { + if (enabled && --timingDepth == 0 && start != 0) { + if (!Bukkit.isPrimaryThread()) { + Bukkit.getLogger().log(Level.SEVERE, "stopTiming called async for " + name); + new Throwable().printStackTrace(); + start = 0; + return; + } + addDiff(System.nanoTime() - start); + start = 0; + } + } + + @Override + public void abort() { + if (enabled && timingDepth > 0) { + start = 0; + } + } + + void addDiff(long diff) { + if (TimingsManager.CURRENT == this) { + TimingsManager.CURRENT = parent; + if (parent != null) { + parent.children.get(id).add(diff); + } + } + record.add(diff); + if (!added) { + added = true; + timed = true; + TimingsManager.HANDLERS.add(this); + } + if (groupHandler != null) { + groupHandler.addDiff(diff); + groupHandler.children.get(id).add(diff); + } + } + + /** + * Reset this timer, setting all values to zero. + * + * @param full + */ + void reset(boolean full) { + record.reset(); + if (full) { + timed = false; + } + start = 0; + timingDepth = 0; + added = false; + children.clear(); + checkEnabled(); + } + + @Override + public TimingHandler getTimingHandler() { + return this; + } + + @Override + public boolean equals(Object o) { + return (this == o); + } + + @Override + public int hashCode() { + return id; + } + + /** + * This is simply for the Closeable interface so it can be used with + * try-with-resources () + */ + @Override + public void close() { + stopTimingIfSync(); + } + + public boolean isSpecial() { + return this == TimingsManager.FULL_SERVER_TICK || this == TimingsManager.TIMINGS_TICK; + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/TimingHistory.java b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingHistory.java new file mode 100644 index 0000000..e3c7751 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingHistory.java @@ -0,0 +1,276 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import com.google.common.base.Function; +import com.google.common.collect.Sets; +import org.bukkit.Bukkit; +import org.bukkit.Chunk; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.block.BlockState; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; +import co.aikar.util.LoadingMap; +import co.aikar.util.MRUMapCache; + +import java.lang.management.ManagementFactory; +import java.util.Collection; +import java.util.EnumMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import static co.aikar.timings.TimingsManager.FULL_SERVER_TICK; +import static co.aikar.timings.TimingsManager.MINUTE_REPORTS; +import static co.aikar.util.JSONUtil.*; + +@SuppressWarnings({"deprecation", "SuppressionAnnotation"}) +public class TimingHistory { + public static long lastMinuteTime; + public static long timedTicks; + public static long playerTicks; + public static long entityTicks; + 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++; + } + }); + final long endTime; + final long startTime; + final long totalTicks; + final long totalTime; // Represents all time spent running the server this history + final MinuteReport[] minuteReports; + + final TimingHistoryEntry[] entries; + final Set tileEntityTypeSet = Sets.newHashSet(); + final Set entityTypeSet = Sets.newHashSet(); + final Map worlds; + + TimingHistory() { + this.endTime = System.currentTimeMillis() / 1000; + this.startTime = TimingsManager.historyStart / 1000; + if (timedTicks % 1200 != 0 || MINUTE_REPORTS.isEmpty()) { + 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()]); + } + long ticks = 0; + for (MinuteReport mp : this.minuteReports) { + ticks += mp.ticksRecord.timed; + } + this.totalTicks = ticks; + this.totalTime = FULL_SERVER_TICK.record.totalTime; + this.entries = new TimingHistoryEntry[TimingsManager.HANDLERS.size()]; + + int i = 0; + for (TimingHandler handler : TimingsManager.HANDLERS) { + entries[i++] = new TimingHistoryEntry(handler); + } + + final Map entityCounts = MRUMapCache.of(LoadingMap.of( + new EnumMap(EntityType.class), Counter.LOADER + )); + final Map tileEntityCounts = MRUMapCache.of(LoadingMap.of( + 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(); + + for (Entity entity : chunk.getEntities()) { + entityCounts.get(entity.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) { + entityTypeSet.add(entry.getKey()); + return pair( + String.valueOf(entry.getKey().getTypeId()), + entry.getValue().count() + ); + } + } + ), + toObjectMapper(tileEntityCounts.entrySet(), + new Function, JSONPair>() { + @Override + public JSONPair apply(Map.Entry entry) { + tileEntityTypeSet.add(entry.getKey()); + return pair( + String.valueOf(entry.getKey().getId()), + entry.getValue().count() + ); + } + } + ) + ); + } + }) + ); + } + }); + } + + public static void resetTicks(boolean fullReset) { + if (fullReset) { + // Non full is simply for 1 minute reports + timedTicks = 0; + } + lastMinuteTime = System.nanoTime(); + playerTicks = 0; + tileEntityTicks = 0; + entityTicks = 0; + activatedEntityTicks = 0; + } + + Object export() { + return createObject( + pair("s", startTime), + pair("e", endTime), + 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("mp", toArrayMapper(minuteReports, new Function() { + @Override + public Object apply(MinuteReport input) { + return input.export(); + } + })) + ); + } + + static class MinuteReport { + final long time = System.currentTimeMillis() / 1000; + + final TicksRecord ticksRecord = new TicksRecord(); + final PingRecord pingRecord = new PingRecord(); + final TimingData fst = TimingsManager.FULL_SERVER_TICK.minuteData.clone(); + final double tps = 1E9 / ( System.nanoTime() - lastMinuteTime ) * ticksRecord.timed; + final double usedMemory = TimingsManager.FULL_SERVER_TICK.avgUsedMemory; + final double freeMemory = TimingsManager.FULL_SERVER_TICK.avgFreeMemory; + final double loadAvg = ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage(); + + public List export() { + return toArray( + time, + Math.round(tps * 100D) / 100D, + Math.round(pingRecord.avg * 100D) / 100D, + fst.export(), + toArray(ticksRecord.timed, + ticksRecord.player, + ticksRecord.entity, + ticksRecord.activatedEntity, + ticksRecord.tileEntity + ), + usedMemory, + freeMemory, + loadAvg + ); + } + } + + static class TicksRecord { + final long timed; + final long player; + final long entity; + final long tileEntity; + final long activatedEntity; + + TicksRecord() { + timed = timedTicks - (TimingsManager.MINUTE_REPORTS.size() * 1200); + player = playerTicks; + entity = entityTicks; + tileEntity = tileEntityTicks; + activatedEntity = activatedEntityTicks; + } + + } + + static class PingRecord { + final double avg; + + PingRecord() { + final Collection onlinePlayers = Bukkit.getOnlinePlayers(); + int totalPing = 0; + for (Player player : onlinePlayers) { + totalPing += player.getPing(); + } + avg = onlinePlayers.isEmpty() ? 0 : totalPing / onlinePlayers.size(); + } + } + + static class Counter { + int count = 0; + @SuppressWarnings({"rawtypes", "SuppressionAnnotation"}) + static Function LOADER = new LoadingMap.Feeder() { + @Override + public Counter apply() { + return new Counter(); + } + }; + public int increment() { + return ++count; + } + public int count() { + return count; + } + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingHistoryEntry.java new file mode 100644 index 0000000..eac4e21 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingHistoryEntry.java @@ -0,0 +1,59 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import com.google.common.base.Function; + +import java.util.List; + +import static co.aikar.util.JSONUtil.toArrayMapper; + +class TimingHistoryEntry { + final TimingData data; + final TimingData[] children; + + TimingHistoryEntry(TimingHandler handler) { + this.data = handler.record.clone(); + children = new TimingData[handler.children.size()]; + int i = 0; + for (TimingData child : handler.children.valueCollection()) { + children[i++] = child.clone(); + } + } + + List export() { + List result = data.export(); + if (children.length > 0) { + result.add( + toArrayMapper(children, new Function() { + @Override + public Object apply(TimingData child) { + return child.export(); + } + }) + ); + } + return result; + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/TimingIdentifier.java b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingIdentifier.java new file mode 100644 index 0000000..623dda4 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingIdentifier.java @@ -0,0 +1,102 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import com.google.common.base.Function; +import co.aikar.util.LoadingMap; +import co.aikar.util.MRUMapCache; + +import java.util.ArrayDeque; +import java.util.Map; + +/** + *

Used as a basis for fast HashMap key comparisons for the Timing Map.

+ * + * This class uses interned strings giving us the ability to do an identity check instead of equals() on the strings + */ +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) + ); + static final TimingGroup DEFAULT_GROUP = getGroup("Minecraft"); + final String group; + final String name; + final TimingHandler groupHandler; + final boolean protect; + private final int hashCode; + + TimingIdentifier(String group, String name, Timing groupHandler, boolean protect) { + this.group = group != null ? group.intern() : DEFAULT_GROUP.name; + this.name = name.intern(); + this.groupHandler = groupHandler != null ? groupHandler.getTimingHandler() : null; + this.protect = protect; + this.hashCode = (31 * this.group.hashCode()) + this.name.hashCode(); + } + + static TimingGroup getGroup(String groupName) { + if (groupName == null) { + return DEFAULT_GROUP; + } + + return GROUP_MAP.get(groupName.intern()); + } + + // We are using .intern() on the strings so it is guaranteed to be an identity comparison. + @SuppressWarnings("StringEquality") + @Override + public boolean equals(Object o) { + if (o == null) { + return false; + } + + TimingIdentifier that = (TimingIdentifier) o; + return group == that.group && name == that.name; + } + + @Override + public int hashCode() { + return hashCode; + } + + static class TimingGroup { + + private static int idPool = 1; + final int id = idPool++; + + final String name; + ArrayDeque handlers = new ArrayDeque(64); + + private TimingGroup(String name) { + this.name = name; + } + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/Timings.java b/PaperSpigot-API/src/main/java/co/aikar/timings/Timings.java new file mode 100644 index 0000000..0f7be03 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/Timings.java @@ -0,0 +1,273 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import com.google.common.base.Preconditions; +import com.google.common.collect.EvictingQueue; +import org.bukkit.Bukkit; +import org.bukkit.command.CommandSender; +import org.bukkit.plugin.Plugin; + +import java.util.Queue; +import java.util.logging.Level; + +@SuppressWarnings("UnusedDeclaration") +public final class Timings { + + private static final int MAX_HISTORY_FRAMES = 12; + public static final Timing NULL_HANDLER = new NullTimingHandler(); + static boolean timingsEnabled = false; + static boolean verboseEnabled = false; + private static int historyInterval = -1; + private static int historyLength = -1; + + private Timings() {} + + /** + * Returns a Timing for a plugin corresponding to a name. + * + * @param plugin Plugin to own the Timing + * @param name Name of Timing + * @return Handler + */ + public static Timing of(Plugin plugin, String name) { + Timing pluginHandler = null; + if (plugin != null) { + pluginHandler = ofSafe(plugin.getName(), "Combined Total", TimingsManager.PLUGIN_GROUP_HANDLER); + } + return of(plugin, name, pluginHandler); + } + + /** + *

Returns a handler that has a groupHandler timer handler. Parent timers should not have their + * start/stop methods called directly, as the children will call it for you.

+ * + * Parent Timers are used to group multiple subsections together and get a summary of them combined + * Parent Handler can not be changed after first call + * + * @param plugin Plugin to own the Timing + * @param name Name of Timing + * @param groupHandler Parent handler to mirror .start/stop calls to + * @return Timing Handler + */ + public static Timing of(Plugin plugin, String name, Timing groupHandler) { + Preconditions.checkNotNull(plugin, "Plugin can not be null"); + return TimingsManager.getHandler(plugin.getName(), name, groupHandler, true); + } + + /** + * Returns a Timing object after starting it, useful for Java7 try-with-resources. + * + * try (Timing ignored = Timings.ofStart(plugin, someName)) { + * // timed section + * } + * + * @param plugin Plugin to own the Timing + * @param name Name of Timing + * @return Timing Handler + */ + public static Timing ofStart(Plugin plugin, String name) { + return ofStart(plugin, name, null); + } + + /** + * Returns a Timing object after starting it, useful for Java7 try-with-resources. + * + * try (Timing ignored = Timings.ofStart(plugin, someName, groupHandler)) { + * // timed section + * } + * + * @param plugin Plugin to own the Timing + * @param name Name of Timing + * @param groupHandler Parent handler to mirror .start/stop calls to + * @return Timing Handler + */ + public static Timing ofStart(Plugin plugin, String name, Timing groupHandler) { + Timing timing = of(plugin, name, groupHandler); + timing.startTimingIfSync(); + return timing; + } + + /** + * Gets whether or not the Spigot Timings system is enabled + * + * @return Enabled or not + */ + public static boolean isTimingsEnabled() { + return timingsEnabled; + } + + /** + *

Sets whether or not the Spigot Timings system should be enabled

+ * + * Calling this will reset timing data. + * + * @param enabled Should timings be reported + */ + public static void setTimingsEnabled(boolean enabled) { + timingsEnabled = enabled; + reset(); + } + + /** + *

Sets whether or not the Timings should monitor at Verbose level.

+ * + *

When Verbose is disabled, high-frequency timings will not be available.

+ * + * @return Enabled or not + */ + public static boolean isVerboseTimingsEnabled() { + return timingsEnabled; + } + + /** + * Sets whether or not the Timings should monitor at Verbose level. + *

+ * When Verbose is disabled, high-frequency timings will not be available. + * Calling this will reset timing data. + * + * @param enabled Should high-frequency timings be reported + */ + public static void setVerboseTimingsEnabled(boolean enabled) { + verboseEnabled = enabled; + TimingsManager.needsRecheckEnabled = true; + } + + /** + *

Gets the interval between Timing History report generation.

+ * + * Defaults to 5 minutes (6000 ticks) + * + * @return Interval in ticks + */ + public static int getHistoryInterval() { + return historyInterval; + } + + /** + *

Sets the interval between Timing History report generations.

+ * + *

Defaults to 5 minutes (6000 ticks)

+ * + * This will recheck your history length, so lowering this value will lower your + * history length if you need more than 60 history windows. + * + * @param interval Interval in ticks + */ + public static void setHistoryInterval(int interval) { + historyInterval = Math.max(20*60, interval); + // Recheck the history length with the new Interval + if (historyLength != -1) { + setHistoryLength(historyLength); + } + } + + /** + * Gets how long in ticks Timings history is kept for the server. + * + * Defaults to 1 hour (72000 ticks) + * + * @return Duration in Ticks + */ + public static int getHistoryLength() { + return historyLength; + } + + /** + * Sets how long Timing History reports are kept for the server. + * + * Defaults to 1 hours(72000 ticks) + * + * This value is capped at a maximum of getHistoryInterval() * MAX_HISTORY_FRAMES (12) + * + * Will not reset Timing Data but may truncate old history if the new length is less than old length. + * + * @param length Duration in ticks + */ + public static void setHistoryLength(int length) { + // Cap at 12 History Frames, 1 hour at 5 minute frames. + int maxLength = historyInterval * MAX_HISTORY_FRAMES; + // For special cases of servers with special permission to bypass the max. + // This max helps keep data file sizes reasonable for processing on Aikar's Timing parser side. + // Setting this will not help you bypass the max unless Aikar has added an exception on the API side. + if (System.getProperty("timings.bypassMax") != null) { + maxLength = Integer.MAX_VALUE; + } + historyLength = Math.max(Math.min(maxLength, length), historyInterval); + Queue oldQueue = TimingsManager.HISTORY; + int frames = (getHistoryLength() / getHistoryInterval()); + if (length > maxLength) { + Bukkit.getLogger().log(Level.WARNING, "Timings Length too high. Requested " + length + ", max is " + maxLength + ". To get longer history, you must increase your interval. Set Interval to " + Math.ceil(length / MAX_HISTORY_FRAMES) + " to achieve this length."); + } + TimingsManager.HISTORY = EvictingQueue.create(frames); + TimingsManager.HISTORY.addAll(oldQueue); + } + + /** + * Resets all Timing Data + */ + public static void reset() { + TimingsManager.reset(); + } + + /** + * Generates a report and sends it to the specified command sender. + * + * If sender is null, ConsoleCommandSender will be used. + * @param sender The sender to send to, or null to use the ConsoleCommandSender + */ + public static void generateReport(CommandSender sender) { + if (sender == null) { + sender = Bukkit.getConsoleSender(); + } + TimingsExport.reportTimings(sender); + } + + /* + ================= + Protected API: These are for internal use only in Bukkit/CraftBukkit + These do not have isPrimaryThread() checks in the startTiming/stopTiming + ================= + */ + + static TimingHandler ofSafe(String name) { + return ofSafe(null, name, null); + } + + static Timing ofSafe(Plugin plugin, String name) { + Timing pluginHandler = null; + if (plugin != null) { + pluginHandler = ofSafe(plugin.getName(), "Combined Total", TimingsManager.PLUGIN_GROUP_HANDLER); + } + return ofSafe(plugin != null ? plugin.getName() : "Minecraft - Invalid Plugin", name, pluginHandler); + } + + static TimingHandler ofSafe(String name, Timing groupHandler) { + return ofSafe(null, name, groupHandler); + } + + static TimingHandler ofSafe(String groupName, String name, Timing groupHandler) { + return TimingsManager.getHandler(groupName, name, groupHandler, false); + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/TimingsCommand.java b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingsCommand.java new file mode 100644 index 0000000..3dba3aa --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingsCommand.java @@ -0,0 +1,110 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import com.google.common.collect.ImmutableList; +import org.apache.commons.lang.Validate; +import org.bukkit.ChatColor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.defaults.BukkitCommand; +import org.bukkit.util.StringUtil; + +import java.util.ArrayList; +import java.util.List; + + +public class TimingsCommand extends BukkitCommand { + public static final List TIMINGS_SUBCOMMANDS = ImmutableList.of("report", "reset", "on", "off", "paste", "verbon", "verboff"); + + public TimingsCommand(String name) { + super(name); + this.description = "Manages Spigot Timings data to see performance of the server."; + this.usageMessage = "/timings "; + this.setPermission("bukkit.command.timings"); + } + + @Override + public boolean execute(CommandSender sender, String currentAlias, String[] args) { + if (!testPermission(sender)) { + return true; + } + if (args.length < 1) { + sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage); + return true; + } + final String arg = args[0]; + if ("on".equalsIgnoreCase(arg)) { + Timings.setTimingsEnabled(true); + sender.sendMessage("Enabled Timings & Reset"); + return true; + } else if ("off".equalsIgnoreCase(arg)) { + Timings.setTimingsEnabled(false); + sender.sendMessage("Disabled Timings"); + return true; + } + + if (!Timings.isTimingsEnabled()) { + sender.sendMessage("Please enable timings by typing /timings on"); + return true; + } + if ("verbon".equalsIgnoreCase(arg)) { + Timings.setVerboseTimingsEnabled(true); + sender.sendMessage("Enabled Verbose Timings"); + return true; + } else if ("verboff".equalsIgnoreCase(arg)) { + Timings.setVerboseTimingsEnabled(false); + sender.sendMessage("Disabled Verbose Timings"); + return true; + } else if ("reset".equalsIgnoreCase(arg)) { + TimingsManager.reset(); + sender.sendMessage("Timings reset"); + } else if ("cost".equals(arg)) { + sender.sendMessage("Timings cost: " + TimingsExport.getCost()); + } else if ( + "paste".equalsIgnoreCase(arg) || + "report".equalsIgnoreCase(arg) || + "get".equalsIgnoreCase(arg) || + "merged".equalsIgnoreCase(arg) || + "separate".equalsIgnoreCase(arg) + ) { + TimingsExport.reportTimings(sender); + } else { + sender.sendMessage(ChatColor.RED + "Usage: " + usageMessage); + } + return true; + } + + @Override + public List tabComplete(CommandSender sender, String alias, String[] args) { + Validate.notNull(sender, "Sender cannot be null"); + Validate.notNull(args, "Arguments cannot be null"); + Validate.notNull(alias, "Alias cannot be null"); + + if (args.length == 1) { + return StringUtil.copyPartialMatches(args[0], TIMINGS_SUBCOMMANDS, + new ArrayList(TIMINGS_SUBCOMMANDS.size())); + } + return ImmutableList.of(); + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/TimingsExport.java b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingsExport.java new file mode 100644 index 0000000..fe19ea0 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingsExport.java @@ -0,0 +1,373 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import com.google.common.base.Function; +import com.google.common.collect.Sets; +import org.apache.commons.lang.StringUtils; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.Material; +import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.command.RemoteConsoleCommandSender; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.configuration.MemorySection; +import org.bukkit.entity.EntityType; +import org.bukkit.plugin.Plugin; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +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.util.List; +import java.util.Map; +import java.util.Set; +import java.util.logging.Level; +import java.util.zip.GZIPOutputStream; + +import static co.aikar.timings.TimingsManager.HISTORY; +import static co.aikar.util.JSONUtil.*; + +@SuppressWarnings({"rawtypes", "SuppressionAnnotation"}) +class TimingsExport extends Thread { + + private final CommandSender sender; + private final Map out; + private final TimingHistory[] history; + + TimingsExport(CommandSender sender, Map out, TimingHistory[] history) { + super("Timings paste thread"); + this.sender = sender; + this.out = out; + this.history = history; + } + + + /** + * Builds an XML report of the timings to be uploaded for parsing. + * + * @param sender Who to report to + */ + static void reportTimings(CommandSender sender) { + Map parent = createObject( + // Get some basic system details about the server + pair("version", Bukkit.getVersion()), + pair("maxplayers", Bukkit.getMaxPlayers()), + pair("start", TimingsManager.timingStart / 1000), + pair("end", System.currentTimeMillis() / 1000), + pair("sampletime", (System.currentTimeMillis() - TimingsManager.timingStart) / 1000) + ); + if (!TimingsManager.privacy) { + appendObjectData(parent, + pair("server", Bukkit.getServerName()), + pair("motd", Bukkit.getServer().getMotd()), + pair("online-mode", Bukkit.getServer().getOnlineMode()), + pair("icon", Bukkit.getServer().getServerIcon().getData()) + ); + } + + final Runtime runtime = Runtime.getRuntime(); + RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean(); + + parent.put("system", createObject( + pair("timingcost", getCost()), + pair("name", System.getProperty("os.name")), + pair("version", System.getProperty("os.version")), + pair("jvmversion", System.getProperty("java.version")), + pair("arch", System.getProperty("os.arch")), + pair("maxmem", runtime.maxMemory()), + 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())); + } + })) + ) + ); + + Set tileEntityTypeSet = Sets.newHashSet(); + Set entityTypeSet = Sets.newHashSet(); + + int size = HISTORY.size(); + TimingHistory[] history = new TimingHistory[size + 1]; + int i = 0; + for (TimingHistory timingHistory : HISTORY) { + tileEntityTypeSet.addAll(timingHistory.tileEntityTypeSet); + entityTypeSet.addAll(timingHistory.entityTypeSet); + history[i++] = timingHistory; + } + + history[i] = new TimingHistory(); // Current snapshot + tileEntityTypeSet.addAll(history[i].tileEntityTypeSet); + entityTypeSet.addAll(history[i].entityTypeSet); + + + Map handlers = createObject(); + for (TimingIdentifier.TimingGroup group : TimingIdentifier.GROUP_MAP.values()) { + for (TimingHandler id : group.handlers) { + if (!id.timed && !id.isSpecial()) { + continue; + } + handlers.put(id.id, toArray( + group.id, + id.name + )); + } + } + + 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); + } + })), + 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("tileentity", + toObjectMapper(tileEntityTypeSet, new Function() { + @Override + public JSONPair apply(Material input) { + return pair(input.getId(), input.name()); + } + })), + pair("entity", + toObjectMapper(entityTypeSet, new Function() { + @Override + public JSONPair apply(EntityType input) { + return 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(), ", ")) + )); + } + })); + + + + // Information on the users Config + + parent.put("config", createObject( + pair("spigot", mapAsJSON(Bukkit.spigot().getSpigotConfig(), null)), + pair("bukkit", mapAsJSON(Bukkit.spigot().getBukkitConfig(), null)), + pair("paperspigot", mapAsJSON(Bukkit.spigot().getPaperSpigotConfig(), null)) + )); + + new TimingsExport(sender, parent, history).start(); + } + + static long getCost() { + // Benchmark the users System.nanotime() for cost basis + int passes = 100; + TimingHandler SAMPLER1 = Timings.ofSafe("Timings Sampler 1"); + TimingHandler SAMPLER2 = Timings.ofSafe("Timings Sampler 2"); + TimingHandler SAMPLER3 = Timings.ofSafe("Timings Sampler 3"); + TimingHandler SAMPLER4 = Timings.ofSafe("Timings Sampler 4"); + TimingHandler SAMPLER5 = Timings.ofSafe("Timings Sampler 5"); + TimingHandler SAMPLER6 = Timings.ofSafe("Timings Sampler 6"); + + long start = System.nanoTime(); + for (int i = 0; i < passes; i++) { + SAMPLER1.startTiming(); + SAMPLER2.startTiming(); + SAMPLER3.startTiming(); + SAMPLER3.stopTiming(); + SAMPLER4.startTiming(); + SAMPLER5.startTiming(); + SAMPLER6.startTiming(); + SAMPLER6.stopTiming(); + SAMPLER5.stopTiming(); + SAMPLER4.stopTiming(); + SAMPLER2.stopTiming(); + SAMPLER1.stopTiming(); + } + long timingsCost = (System.nanoTime() - start) / passes / 6; + SAMPLER1.reset(true); + SAMPLER2.reset(true); + SAMPLER3.reset(true); + SAMPLER4.reset(true); + SAMPLER5.reset(true); + SAMPLER6.reset(true); + return timingsCost; + } + + private static JSONObject mapAsJSON(ConfigurationSection config, String parentKey) { + + JSONObject object = new JSONObject(); + for (String key : config.getKeys(false)) { + String fullKey = (parentKey != null ? parentKey + "." + key : key); + if (fullKey.equals("database") || fullKey.equals("settings.bungeecord-addresses") || TimingsManager.hiddenConfigs.contains(fullKey)) { + continue; + } + final Object val = config.get(key); + + object.put(key, valAsJSON(val, fullKey)); + } + return object; + } + + private static Object valAsJSON(Object val, final String parentKey) { + 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); + } + }); + } else { + return val.toString(); + } + } else { + return mapAsJSON((ConfigurationSection) val, parentKey); + } + } + + @SuppressWarnings("CallToThreadRun") + @Override + public synchronized void start() { + if (sender instanceof RemoteConsoleCommandSender) { + sender.sendMessage(ChatColor.RED + "Warning: Timings report done over RCON will cause lag spikes."); + sender.sendMessage(ChatColor.RED + "You should use " + ChatColor.YELLOW + + "/timings report" + ChatColor.RED + " in game or console."); + run(); + } else { + super.start(); + } + } + + @Override + public void run() { + sender.sendMessage(ChatColor.GREEN + "Preparing Timings Report..."); + + + out.put("data", toArrayMapper(history, new Function() { + @Override + public Object apply(TimingHistory input) { + return input.export(); + } + })); + + + String response = null; + try { + HttpURLConnection con = (HttpURLConnection) new URL("http://timings.aikar.co/post").openConnection(); + con.setDoOutput(true); + con.setRequestProperty("User-Agent", "Spigot/" + Bukkit.getServerName() + "/" + InetAddress.getLocalHost().getHostName()); + con.setRequestMethod("POST"); + con.setInstanceFollowRedirects(false); + + OutputStream request = new GZIPOutputStream(con.getOutputStream()) {{ + this.def.setLevel(7); + }}; + + request.write(JSONValue.toJSONString(out).getBytes("UTF-8")); + request.close(); + + response = getResponse(con); + + if (con.getResponseCode() != 302) { + sender.sendMessage( + ChatColor.RED + "Upload Error: " + con.getResponseCode() + ": " + con.getResponseMessage()); + sender.sendMessage(ChatColor.RED + "Check your logs for more information"); + if (response != null) { + Bukkit.getLogger().log(Level.SEVERE, response); + } + return; + } + + String location = con.getHeaderField("Location"); + sender.sendMessage(ChatColor.GREEN + "View Timings Report: " + location); + if (!(sender instanceof ConsoleCommandSender)) { + Bukkit.getLogger().log(Level.INFO, "View Timings Report: " + location); + } + + if (response != null && !response.isEmpty()) { + Bukkit.getLogger().log(Level.INFO, "Timing Response: " + response); + } + } catch (IOException ex) { + sender.sendMessage(ChatColor.RED + "Error uploading timings, check your logs for more information"); + if (response != null) { + Bukkit.getLogger().log(Level.SEVERE, response); + } + Bukkit.getLogger().log(Level.SEVERE, "Could not paste timings", ex); + } + } + + private String getResponse(HttpURLConnection con) throws IOException { + InputStream is = null; + try { + is = con.getInputStream(); + ByteArrayOutputStream bos = new ByteArrayOutputStream(); + + byte[] b = new byte[1024]; + int bytesRead; + while ((bytesRead = is.read(b)) != -1) { + bos.write(b, 0, bytesRead); + } + return bos.toString(); + + } catch (IOException ex) { + 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/PaperSpigot-API/src/main/java/co/aikar/timings/TimingsManager.java b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingsManager.java new file mode 100644 index 0000000..67c39df --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/TimingsManager.java @@ -0,0 +1,194 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import com.google.common.base.Function; +import com.google.common.collect.EvictingQueue; +import org.bukkit.Bukkit; +import org.bukkit.Server; +import org.bukkit.command.Command; +import org.bukkit.plugin.Plugin; +import org.bukkit.plugin.java.PluginClassLoader; +import co.aikar.util.LoadingMap; + +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; +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) + ); + } + }, + 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 boolean privacy = false; + + static final Collection HANDLERS = new ArrayDeque(); + static final ArrayDeque MINUTE_REPORTS = new ArrayDeque(); + + static EvictingQueue HISTORY = EvictingQueue.create(12); + static TimingHandler CURRENT; + static long timingStart = 0; + static long historyStart = 0; + static boolean needsFullReset = false; + static boolean needsRecheckEnabled = false; + + private TimingsManager() {} + + /** + * Resets all timing data on the next tick + */ + static void reset() { + needsFullReset = true; + } + + /** + * Ticked every tick by CraftBukkit to count the number of times a timer + * caused TPS loss. + */ + static void tick() { + if (Timings.timingsEnabled) { + boolean violated = FULL_SERVER_TICK.isViolated(); + + for (TimingHandler handler : HANDLERS) { + if (handler.isSpecial()) { + // We manually call this + continue; + } + handler.processTick(violated); + } + + TimingHistory.playerTicks += Bukkit.getOnlinePlayers().size(); + TimingHistory.timedTicks++; + // Generate TPS/Ping/Tick reports every minute + } + } + static void stopServer() { + Timings.timingsEnabled = false; + recheckEnabled(); + } + static void recheckEnabled() { + synchronized (TIMING_MAP) { + for (TimingHandler timings : TIMING_MAP.values()) { + timings.checkEnabled(); + } + } + needsRecheckEnabled = false; + } + static void resetTimings() { + if (needsFullReset) { + // Full resets need to re-check every handlers enabled state + // Timing map can be modified from async so we must sync on it. + synchronized (TIMING_MAP) { + for (TimingHandler timings : TIMING_MAP.values()) { + timings.reset(true); + } + } + Bukkit.getLogger().log(Level.INFO, "Timings Reset"); + HISTORY.clear(); + needsFullReset = false; + needsRecheckEnabled = false; + timingStart = System.currentTimeMillis(); + } else { + // Soft resets only need to act on timings that have done something + // Handlers can only be modified on main thread. + for (TimingHandler timings : HANDLERS) { + timings.reset(false); + } + } + + HANDLERS.clear(); + MINUTE_REPORTS.clear(); + + TimingHistory.resetTicks(true); + historyStart = System.currentTimeMillis(); + } + + static TimingHandler getHandler(String group, String name, Timing parent, boolean protect) { + return TIMING_MAP.get(new TimingIdentifier(group, name, parent, protect)); + } + + + /** + *

Due to access restrictions, we need a helper method to get a Command TimingHandler with String group

+ * + * Plugins should never call this + * + * @param pluginName Plugin this command is associated with + * @param command Command to get timings for + * @return TimingHandler + */ + public static Timing getCommandTiming(String pluginName, Command command) { + Plugin plugin = null; + final Server server = Bukkit.getServer(); + if (!("minecraft".equals(pluginName) || "bukkit".equals(pluginName) || "Spigot".equals(pluginName) || + server == null)) { + plugin = server.getPluginManager().getPlugin(pluginName); + if (plugin == null) { + // Plugin is passing custom fallback prefix, try to look up by class loader + plugin = getPluginByClassloader(command.getClass()); + } + } + if (plugin == null) { + return Timings.ofSafe("Command: " + pluginName + ":" + command.getTimingName()); + } + + return Timings.ofSafe(plugin, "Command: " + pluginName + ":" + command.getTimingName()); + } + + /** + * Looks up the class loader for the specified class, and if it is a PluginClassLoader, return the + * Plugin that created this class. + * + * @param clazz Class to check + * @return Plugin if created by a plugin + */ + public static Plugin getPluginByClassloader(Class clazz) { + if (clazz == null) { + return null; + } + final ClassLoader classLoader = clazz.getClassLoader(); + if (classLoader instanceof PluginClassLoader) { + PluginClassLoader pluginClassLoader = (PluginClassLoader) classLoader; + return pluginClassLoader.getPlugin(); + } + return null; + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/PaperSpigot-API/src/main/java/co/aikar/timings/UnsafeTimingHandler.java new file mode 100644 index 0000000..e3b0ed8 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/timings/UnsafeTimingHandler.java @@ -0,0 +1,51 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.timings; + +import org.bukkit.Bukkit; + +class UnsafeTimingHandler extends TimingHandler { + + UnsafeTimingHandler(TimingIdentifier id) { + super(id); + } + + private static void checkThread() { + if (!Bukkit.isPrimaryThread()) { + throw new IllegalStateException("Calling Timings from Async Operation"); + } + } + + @Override + public void startTiming() { + checkThread(); + super.startTiming(); + } + + @Override + public void stopTiming() { + checkThread(); + super.stopTiming(); + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/util/JSONUtil.java b/PaperSpigot-API/src/main/java/co/aikar/util/JSONUtil.java new file mode 100644 index 0000000..5fdf7c4 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/util/JSONUtil.java @@ -0,0 +1,123 @@ +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; + +/** + * Provides Utility methods that assist with generating JSON Objects + */ +@SuppressWarnings({"rawtypes", "SuppressionAnnotation"}) +public final class JSONUtil { + private JSONUtil() {} + + /** + * Creates a key/value "JSONPair" object + * @param key + * @param obj + * @return + */ + public static JSONPair pair(String key, Object obj) { + return new JSONPair(key, obj); + } + + public static JSONPair pair(long key, Object obj) { + return new JSONPair(String.valueOf(key), obj); + } + + /** + * Creates a new JSON object from multiple JsonPair key/value pairs + * @param data + * @return + */ + public static Map createObject(JSONPair... data) { + return appendObjectData(new LinkedHashMap(), data); + } + + /** + * This appends multiple key/value Obj pairs into a JSON Object + * @param parent + * @param data + * @return + */ + public static Map appendObjectData(Map parent, JSONPair... data) { + for (JSONPair JSONPair : data) { + parent.put(JSONPair.key, JSONPair.val); + } + return parent; + } + + /** + * This builds a JSON array from a set of data + * @param data + * @return + */ + public static List toArray(Object... data) { + return Lists.newArrayList(data); + } + + /** + * These help build a single JSON array using a mapper function + * @param collection + * @param mapper + * @param + * @return + */ + public static List toArrayMapper(E[] collection, Function mapper) { + return toArrayMapper(Lists.newArrayList(collection), mapper); + } + + public static List toArrayMapper(Iterable collection, Function mapper) { + List array = Lists.newArrayList(); + for (E e : collection) { + Object object = mapper.apply(e); + if (object != null) { + array.add(object); + } + } + return array; + } + + /** + * These help build a single JSON Object from a collection, using a mapper function + * @param collection + * @param mapper + * @param + * @return + */ + public static Map toObjectMapper(E[] collection, Function mapper) { + return toObjectMapper(Lists.newArrayList(collection), mapper); + } + + public static Map toObjectMapper(Iterable collection, Function mapper) { + Map object = Maps.newLinkedHashMap(); + for (E e : collection) { + JSONPair JSONPair = mapper.apply(e); + if (JSONPair != null) { + object.put(JSONPair.key, JSONPair.val); + } + } + return object; + } + + /** + * Simply stores a key and a value, used internally by many methods below. + */ + @SuppressWarnings("PublicInnerClass") + public static class JSONPair { + final String key; + final Object val; + + JSONPair(String key, Object val) { + this.key = key; + this.val = val; + } + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/util/LoadingIntMap.java b/PaperSpigot-API/src/main/java/co/aikar/util/LoadingIntMap.java new file mode 100644 index 0000000..8d0f269 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/util/LoadingIntMap.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2015. Starlis LLC / dba Empire Minecraft + * + * This source code is proprietary software and must not be redistributed without Starlis LLC's approval + * + */ +package co.aikar.util; + + +import com.google.common.base.Function; +import gnu.trove.map.hash.TIntObjectHashMap; + +/** + * Allows you to pass a Loader function that when a key is accessed that doesn't exist, + * automatically loads the entry into the map by calling the loader Function. + * + * .get() Will only return null if the Loader can return null. + * + * You may pass any backing Map to use. + * + * This class is not thread safe and should be wrapped with Collections.synchronizedMap on the OUTSIDE of the LoadingMap if needed. + * + * Do not wrap the backing map with Collections.synchronizedMap. + * + * @param Value + */ +public class LoadingIntMap extends TIntObjectHashMap { + private final Function loader; + + /** + * Initializes an auto loading map using specified loader and backing map + * @param loader The loader + */ + public LoadingIntMap(Function loader) { + this.loader = loader; + } + + + @Override + public V get(int key) { + V res = super.get(key); + if (res == null) { + res = loader.apply(key); + if (res != null) { + put(key, res); + } + } + return res; + } + + /** + * Due to java stuff, you will need to cast it to (Function) for some cases + * @param + */ + public abstract static class Feeder implements Function { + @Override + public T apply(Object input) { + return apply(); + } + + public abstract T apply(); + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/util/LoadingMap.java b/PaperSpigot-API/src/main/java/co/aikar/util/LoadingMap.java new file mode 100644 index 0000000..27065e1 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/util/LoadingMap.java @@ -0,0 +1,323 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.util; + + +import com.google.common.base.Function; + +import java.lang.reflect.Constructor; +import java.util.*; + +/** + * Allows you to pass a Loader function that when a key is accessed that doesn't exists, + * automatically loads the entry into the map by calling the loader Function. + * + * .get() Will only return null if the Loader can return null. + * + * You may pass any backing Map to use. + * + * This class is not thread safe and should be wrapped with Collections.synchronizedMap on the OUTSIDE of the LoadingMap if needed. + * + * Do not wrap the backing map with Collections.synchronizedMap. + * + * @param Key + * @param Value + */ +public class LoadingMap extends AbstractMap { + private final Map backingMap; + private final Function loader; + + /** + * Initializes an auto loading map using specified loader and backing map + * @param backingMap + * @param loader + */ + public LoadingMap(Map backingMap, Function loader) { + this.backingMap = backingMap; + this.loader = loader; + } + + /** + * Creates a new LoadingMap with the specified map and loader + * @param backingMap + * @param loader + * @param + * @param + * @return + */ + public static Map of(Map backingMap, Function loader) { + return new LoadingMap(backingMap, loader); + } + + /** + * Creates a LoadingMap with an auto instantiating loader. + * + * Will auto construct class of of Value when not found + * + * Since this uses Reflection, It is more effecient to define your own static loader + * than using this helper, but if performance is not critical, this is easier. + * + * @param backingMap Actual map being used. + * @param keyClass Class used for the K generic + * @param valueClass Class used for the V generic + * @param Key Type of the Map + * @param Value Type of the Map + * @return Map that auto instantiates on .get() + */ + public static Map newAutoMap(Map backingMap, final Class keyClass, + final Class valueClass) { + return new LoadingMap(backingMap, new AutoInstantiatingLoader(keyClass, valueClass)); + } + /** + * Creates a LoadingMap with an auto instantiating loader. + * + * Will auto construct class of of Value when not found + * + * Since this uses Reflection, It is more effecient to define your own static loader + * than using this helper, but if performance is not critical, this is easier. + * + * @param backingMap Actual map being used. + * @param valueClass Class used for the V generic + * @param Key Type of the Map + * @param Value Type of the Map + * @return Map that auto instantiates on .get() + */ + public static Map newAutoMap(Map backingMap, + final Class valueClass) { + return newAutoMap(backingMap, null, valueClass); + } + + /** + * @see #newAutoMap + * + * new Auto initializing map using a HashMap. + * @param keyClass + * @param valueClass + * @param + * @param + * @return + */ + public static Map newHashAutoMap(final Class keyClass, final Class valueClass) { + return newAutoMap(new HashMap(), keyClass, valueClass); + } + + /** + * @see #newAutoMap + * + * new Auto initializing map using a HashMap. + * @param valueClass + * @param + * @param + * @return + */ + public static Map newHashAutoMap(final Class valueClass) { + return newHashAutoMap(null, valueClass); + } + + /** + * @see #newAutoMap + * + * new Auto initializing map using a HashMap. + * + * @param keyClass + * @param valueClass + * @param initialCapacity + * @param loadFactor + * @param + * @param + * @return + */ + public static Map newHashAutoMap(final Class keyClass, final Class valueClass, int initialCapacity, float loadFactor) { + return newAutoMap(new HashMap(initialCapacity, loadFactor), keyClass, valueClass); + } + + /** + * @see #newAutoMap + * + * new Auto initializing map using a HashMap. + * + * @param valueClass + * @param initialCapacity + * @param loadFactor + * @param + * @param + * @return + */ + public static Map newHashAutoMap(final Class valueClass, int initialCapacity, float loadFactor) { + return newHashAutoMap(null, valueClass, initialCapacity, loadFactor); + } + + /** + * Initializes an auto loading map using a HashMap + * @param loader + * @param + * @param + * @return + */ + public static Map newHashMap(Function loader) { + return new LoadingMap(new HashMap(), loader); + } + + /** + * Initializes an auto loading map using a HashMap + * @param loader + * @param initialCapacity + * @param loadFactor + * @param + * @param + * @return + */ + public static Map newHashMap(Function loader, int initialCapacity, float loadFactor) { + return new LoadingMap(new HashMap(initialCapacity, loadFactor), loader); + } + + /** + * Initializes an auto loading map using an Identity HashMap + * @param loader + * @param + * @param + * @return + */ + public static Map newIdentityHashMap(Function loader) { + return new LoadingMap(new IdentityHashMap(), loader); + } + + /** + * Initializes an auto loading map using an Identity HashMap + * @param loader + * @param initialCapacity + * @param + * @param + * @return + */ + public static Map newIdentityHashMap(Function loader, int initialCapacity) { + return new LoadingMap(new IdentityHashMap(initialCapacity), loader); + } + + @Override + public int size() {return backingMap.size();} + + @Override + public boolean isEmpty() {return backingMap.isEmpty();} + + @Override + public boolean containsKey(Object key) {return backingMap.containsKey(key);} + + @Override + public boolean containsValue(Object value) {return backingMap.containsValue(value);} + + @Override + public V get(Object key) { + V res = backingMap.get(key); + if (res == null && key != null) { + res = loader.apply((K) key); + if (res != null) { + backingMap.put((K) key, res); + } + } + return res; + } + + public V put(K key, V value) {return backingMap.put(key, value);} + + @Override + public V remove(Object key) {return backingMap.remove(key);} + + public void putAll(Map m) {backingMap.putAll(m);} + + @Override + public void clear() {backingMap.clear();} + + @Override + public Set keySet() {return backingMap.keySet();} + + @Override + public Collection values() {return backingMap.values();} + + @Override + public boolean equals(Object o) {return backingMap.equals(o);} + + @Override + public int hashCode() {return backingMap.hashCode();} + + @Override + public Set> entrySet() { + return backingMap.entrySet(); + } + + public LoadingMap clone() { + return new LoadingMap(backingMap, loader); + } + + private static class AutoInstantiatingLoader implements Function { + final Constructor constructor; + private final Class valueClass; + + AutoInstantiatingLoader(Class keyClass, Class valueClass) { + try { + this.valueClass = valueClass; + if (keyClass != null) { + constructor = valueClass.getConstructor(keyClass); + } else { + constructor = null; + } + } catch (NoSuchMethodException e) { + throw new IllegalStateException( + valueClass.getName() + " does not have a constructor for " + (keyClass != null ? keyClass.getName() : null)); + } + } + + @Override + public V apply(K input) { + try { + return (constructor != null ? constructor.newInstance(input) : valueClass.newInstance()); + } catch (Exception e) { + throw new ExceptionInInitializerError(e); + } + } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(Object object) { + return false; + } + } + + /** + * Due to java stuff, you will need to cast it to (Function) for some cases + * @param + */ + public abstract static class Feeder implements Function { + @Override + public T apply(Object input) { + return apply(); + } + + public abstract T apply(); + } +} diff --git a/PaperSpigot-API/src/main/java/co/aikar/util/MRUMapCache.java b/PaperSpigot-API/src/main/java/co/aikar/util/MRUMapCache.java new file mode 100644 index 0000000..1028dd3 --- /dev/null +++ b/PaperSpigot-API/src/main/java/co/aikar/util/MRUMapCache.java @@ -0,0 +1,100 @@ +/* + * This file is licensed under the MIT License (MIT). + * + * Copyright (c) 2014 Daniel Ennis + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +package co.aikar.util; + +import java.util.AbstractMap; +import java.util.Collection; +import java.util.Map; +import java.util.Set; + +/** + * Implements a Most Recently Used cache in front of a backing map, to quickly access the last accessed result. + * @param + * @param + */ +public class MRUMapCache extends AbstractMap { + final Map backingMap; + Object cacheKey; + V cacheValue; + public MRUMapCache(final Map backingMap) { + this.backingMap = backingMap; + } + + public int size() {return backingMap.size();} + + public boolean isEmpty() {return backingMap.isEmpty();} + + public boolean containsKey(Object key) { + return key != null && key.equals(cacheKey) || backingMap.containsKey(key); + } + + public boolean containsValue(Object value) { + return value != null && value == cacheValue || backingMap.containsValue(value); + } + + public V get(Object key) { + if (cacheKey != null && cacheKey.equals(key)) { + return cacheValue; + } + cacheKey = key; + return cacheValue = backingMap.get(key); + } + + public V put(K key, V value) { + cacheKey = key; + return cacheValue = backingMap.put(key, value); + } + + public V remove(Object key) { + if (key != null && key.equals(cacheKey)) { + cacheKey = null; + } + return backingMap.remove(key); + } + + public void putAll(Map m) {backingMap.putAll(m);} + + public void clear() { + cacheKey = null; + cacheValue = null; + backingMap.clear(); + } + + public Set keySet() {return backingMap.keySet();} + + public Collection values() {return backingMap.values();} + + public Set> entrySet() {return backingMap.entrySet();} + + /** + * Wraps the specified map with a most recently used cache + * @param map + * @param + * @param + * @return + */ + public static Map of(Map map) { + return new MRUMapCache(map); + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/Achievement.java b/PaperSpigot-API/src/main/java/org/bukkit/Achievement.java new file mode 100644 index 0000000..928b6d5 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/Achievement.java @@ -0,0 +1,69 @@ +package org.bukkit; + +/** + * Represents an achievement, which may be given to players. + */ +public enum Achievement { + OPEN_INVENTORY, + MINE_WOOD (OPEN_INVENTORY), + BUILD_WORKBENCH (MINE_WOOD), + BUILD_PICKAXE (BUILD_WORKBENCH), + BUILD_FURNACE (BUILD_PICKAXE), + ACQUIRE_IRON (BUILD_FURNACE), + BUILD_HOE (BUILD_WORKBENCH), + MAKE_BREAD (BUILD_HOE), + BAKE_CAKE (BUILD_HOE), + BUILD_BETTER_PICKAXE (BUILD_PICKAXE), + COOK_FISH (BUILD_FURNACE), + ON_A_RAIL (ACQUIRE_IRON), + BUILD_SWORD (BUILD_WORKBENCH), + KILL_ENEMY (BUILD_SWORD), + KILL_COW (BUILD_SWORD), + FLY_PIG (KILL_COW), + SNIPE_SKELETON (KILL_ENEMY), + GET_DIAMONDS (ACQUIRE_IRON), + NETHER_PORTAL (GET_DIAMONDS), + GHAST_RETURN (NETHER_PORTAL), + GET_BLAZE_ROD (NETHER_PORTAL), + BREW_POTION (GET_BLAZE_ROD), + END_PORTAL (GET_BLAZE_ROD), + THE_END (END_PORTAL), + ENCHANTMENTS (GET_DIAMONDS), + OVERKILL (ENCHANTMENTS), + BOOKCASE (ENCHANTMENTS), + EXPLORE_ALL_BIOMES (END_PORTAL), + SPAWN_WITHER (THE_END), + KILL_WITHER (SPAWN_WITHER), + FULL_BEACON (KILL_WITHER), + BREED_COW (KILL_COW), + DIAMONDS_TO_YOU (GET_DIAMONDS), + ; + + private final Achievement parent; + + private Achievement() { + parent = null; + } + + private Achievement(Achievement parent) { + this.parent = parent; + } + + /** + * Returns whether or not this achievement has a parent achievement. + * + * @return whether the achievement has a parent achievement + */ + public boolean hasParent() { + return parent != null; + } + + /** + * Returns the parent achievement of this achievement, or null if none. + * + * @return the parent achievement or null + */ + public Achievement getParent() { + return parent; + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/Art.java b/PaperSpigot-API/src/main/java/org/bukkit/Art.java new file mode 100644 index 0000000..ba66f16 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/Art.java @@ -0,0 +1,111 @@ +package org.bukkit; + +import java.util.HashMap; + +import org.apache.commons.lang.Validate; + +import com.google.common.collect.Maps; + +/** + * Represents the art on a painting + */ +public enum Art { + KEBAB(0, 1, 1), + AZTEC(1, 1, 1), + ALBAN(2, 1, 1), + AZTEC2(3, 1, 1), + BOMB(4, 1, 1), + PLANT(5, 1, 1), + WASTELAND(6, 1, 1), + POOL(7, 2, 1), + COURBET(8, 2, 1), + SEA(9, 2, 1), + SUNSET(10, 2, 1), + CREEBET(11, 2, 1), + WANDERER(12, 1, 2), + GRAHAM(13, 1, 2), + MATCH(14, 2, 2), + BUST(15, 2, 2), + STAGE(16, 2, 2), + VOID(17, 2, 2), + SKULL_AND_ROSES(18, 2, 2), + WITHER(19, 2, 2), + FIGHTERS(20, 4, 2), + POINTER(21, 4, 4), + PIGSCENE(22, 4, 4), + BURNINGSKULL(23, 4, 4), + SKELETON(24, 4, 3), + DONKEYKONG(25, 4, 3); + + private int id, width, height; + private static final HashMap BY_NAME = Maps.newHashMap(); + private static final HashMap BY_ID = Maps.newHashMap(); + + private Art(int id, int width, int height) { + this.id = id; + this.width = width; + this.height = height; + } + + /** + * Gets the width of the painting, in blocks + * + * @return The width of the painting, in blocks + */ + public int getBlockWidth() { + return width; + } + + /** + * Gets the height of the painting, in blocks + * + * @return The height of the painting, in blocks + */ + public int getBlockHeight() { + return height; + } + + /** + * Get the ID of this painting. + * + * @return The ID of this painting + * @deprecated Magic value + */ + @Deprecated + public int getId() { + return id; + } + + /** + * Get a painting by its numeric ID + * + * @param id The ID + * @return The painting + * @deprecated Magic value + */ + @Deprecated + public static Art getById(int id) { + return BY_ID.get(id); + } + + /** + * Get a painting by its unique name + *

+ * This ignores underscores and capitalization + * + * @param name The name + * @return The painting + */ + public static Art getByName(String name) { + Validate.notNull(name, "Name cannot be null"); + + return BY_NAME.get(name.toLowerCase().replaceAll("_", "")); + } + + static { + for (Art art : values()) { + BY_ID.put(art.id, art); + BY_NAME.put(art.toString().toLowerCase().replaceAll("_", ""), art); + } + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/AxisAlignedBB.java b/PaperSpigot-API/src/main/java/org/bukkit/AxisAlignedBB.java new file mode 100644 index 0000000..3b2c6b4 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/AxisAlignedBB.java @@ -0,0 +1,111 @@ +package org.bukkit; + +/** + * A static representation of the bounding box of some Entity or Block + */ +public class AxisAlignedBB { + + private final double minX; + private final double minY; + private final double minZ; + private final double maxX; + private final double maxY; + private final double maxZ; + + public AxisAlignedBB(double minX, double minY, double minZ, + double maxX, double maxY, double maxZ) { + this.minX = minX; + this.minY = minY; + this.minZ = minZ; + this.maxX = maxX; + this.maxY = maxY; + this.maxZ = maxZ; + } + + /** + * Gets the minimum x-coordinate of this bounding box. + * + * @return minimum x-coordinate + */ + public double getMinX() { + return minX; + } + + /** + * Gets the minimum y-coordinate of this bounding box. + * + * @return minimum y-coordinate + */ + public double getMinY() { + return minY; + } + + /** + * Gets the minimum z-coordinate of this bounding box. + * + * @return minimum z-coordinate + */ + public double getMinZ() { + return minZ; + } + + /** + * Gets the maximum x-coordinate of this bounding box. + * + * @return maximum x-coordinate + */ + public double getMaxX() { + return maxX; + } + + /** + * Gets the maximum y-coordinate of this bounding box. + * + * @return maximum y-coordinate + */ + public double getMaxY() { + return maxY; + } + + /** + * Gets the minimum z-coordinate of this bounding box. + * + * @return maximum z-coordinate + */ + public double getMaxZ() { + return maxZ; + } + + @Override + public int hashCode() { + int hash = 3; + hash = 19 * hash + (int) (Double.doubleToLongBits(this.minX) ^ (Double.doubleToLongBits(this.minX) >>> 32)); + hash = 19 * hash + (int) (Double.doubleToLongBits(this.minY) ^ (Double.doubleToLongBits(this.minY) >>> 32)); + hash = 19 * hash + (int) (Double.doubleToLongBits(this.minZ) ^ (Double.doubleToLongBits(this.minZ) >>> 32)); + hash = 19 * hash + (int) (Double.doubleToLongBits(this.maxX) ^ (Double.doubleToLongBits(this.maxX) >>> 32)); + hash = 19 * hash + (int) (Double.doubleToLongBits(this.maxY) ^ (Double.doubleToLongBits(this.maxY) >>> 32)); + hash = 19 * hash + (int) (Double.doubleToLongBits(this.maxZ) ^ (Double.doubleToLongBits(this.maxZ) >>> 32)); + return hash; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } else if (!(other instanceof AxisAlignedBB)) { + return false; + } + AxisAlignedBB aabb = (AxisAlignedBB) other; + return Double.compare(aabb.minX, minX) == 0 + && Double.compare(aabb.minY, minY) == 0 + && Double.compare(aabb.minZ, minZ) == 0 + && Double.compare(aabb.maxX, maxX) == 0 + && Double.compare(aabb.maxY, maxY) == 0 + && Double.compare(aabb.maxZ, maxZ) == 0; + } + + @Override + public String toString() { + return "AxisAlignedBB[" + minX + ", " + minY + ", " + minZ + " -> " + maxX + ", " + maxY + ", " + maxZ + "]"; + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/BanEntry.java b/PaperSpigot-API/src/main/java/org/bukkit/BanEntry.java new file mode 100644 index 0000000..986120e --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/BanEntry.java @@ -0,0 +1,127 @@ +package org.bukkit; + +import java.util.Date; + +/** + * A single entry from a ban list. This may represent either a player ban or + * an IP ban. + *

+ * Ban entries include the following properties: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
PropertyDescription
Target Name / IP AddressThe target name or IP address
Creation DateThe creation date of the ban
SourceThe source of the ban, such as a player, console, plugin, etc
Expiration DateThe expiration date of the ban
ReasonThe reason for the ban
+ *

+ * Unsaved information is not automatically written to the implementation's + * ban list, instead, the {@link #save()} method must be called to write the + * changes to the ban list. If this ban entry has expired (such as from an + * unban) and is no longer found in the list, the {@link #save()} call will + * re-add it to the list, therefore banning the victim specified. + *

+ * Likewise, changes to the associated {@link BanList} or other entries may or + * may not be reflected in this entry. + */ +public interface BanEntry { + + /** + * Gets the target involved. This may be in the form of an IP or a player + * name. + * + * @return the target name or IP address + */ + public String getTarget(); + + /** + * Gets the date this ban entry was created. + * + * @return the creation date + */ + public Date getCreated(); + + /** + * Sets the date this ban entry was created. + * + * @param created the new created date, cannot be null + * @see #save() saving changes + */ + public void setCreated(Date created); + + /** + * Gets the source of this ban. + *

+ * Note: A source is considered any String, although this is generally a + * player name. + * + * @return the source of the ban + */ + public String getSource(); + + /** + * Sets the source of this ban. + *

+ * Note: A source is considered any String, although this is generally a + * player name. + * + * @param source the new source where null values become empty strings + * @see #save() saving changes + */ + public 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(); + + /** + * Sets the date this ban expires on. Null values are considered + * "infinite" bans. + * + * @param expiration the new expiration date, or null to indicate an + * eternity + * @see #save() saving changes + */ + public void setExpiration(Date expiration); + + /** + * Gets the reason for this ban. + * + * @return the ban reason, or null if not set + */ + public String getReason(); + + /** + * Sets the reason for this ban. Reasons must not be null. + * + * @param reason the new reason, null values assume the implementation + * default + * @see #save() saving changes + */ + public void setReason(String reason); + + /** + * Saves the ban entry, overwriting any previous data in the ban list. + *

+ * Saving the ban entry of an unbanned player will cause the player to be + * banned once again. + */ + public void save(); +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/BanList.java b/PaperSpigot-API/src/main/java/org/bukkit/BanList.java new file mode 100644 index 0000000..c21b858 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/BanList.java @@ -0,0 +1,72 @@ +package org.bukkit; + +import java.util.Date; +import java.util.Set; + +/** + * A ban list, containing bans of some {@link Type}. + */ +public interface BanList { + + /** + * Represents a ban-type that a {@link BanList} may track. + */ + public enum Type { + /** + * Banned player names + */ + NAME, + /** + * Banned player IP addresses + */ + IP, + ; + } + + /** + * Gets a {@link BanEntry} by target. + * + * @param target entry parameter to search for + * @return the corresponding entry, or null if none found + */ + public BanEntry getBanEntry(String target); + + /** + * Adds a ban to the this list. If a previous ban exists, this will + * update the previous entry. + * + * @param target the target of the ban + * @param reason reason for the ban, null indicates implementation default + * @param expires date for the ban's expiration (unban), or null to imply + * forever + * @param source source of the ban, null indicates implementation default + * @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); + + /** + * Gets a set containing every {@link BanEntry} in this list. + * + * @return an immutable set containing every entry tracked by this list + */ + public Set getBanEntries(); + + /** + * Gets if a {@link BanEntry} exists for the target, indicating an active + * ban status. + * + * @param target the target to find + * @return true if a {@link BanEntry} exists for the name, indicating an + * active ban status, false otherwise + */ + public boolean isBanned(String target); + + /** + * Removes the specified target from this list, therefore indicating a + * "not banned" status. + * + * @param target the target to remove from this list + */ + public void pardon(String target); +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/BlockChangeDelegate.java b/PaperSpigot-API/src/main/java/org/bukkit/BlockChangeDelegate.java new file mode 100644 index 0000000..e6b9f0e --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/BlockChangeDelegate.java @@ -0,0 +1,104 @@ +package org.bukkit; + +/** + * A delegate for handling block changes. This serves as a direct interface + * between generation algorithms in the server implementation and utilizing + * code. + */ +public interface BlockChangeDelegate { + + /** + * Set a block type at the specified coordinates without doing all world + * updates and notifications. + *

+ * It is safe to have this call World.setTypeId, but it may be slower than + * World.setRawTypeId. + * + * @param x X coordinate + * @param y Y coordinate + * @param z Z coordinate + * @param typeId New block ID + * @return true if the block was set successfully + * @deprecated Magic value + */ + @Deprecated + public boolean setRawTypeId(int x, int y, int z, int typeId); + + /** + * Set a block type and data at the specified coordinates without doing + * all world updates and notifications. + *

+ * It is safe to have this call World.setTypeId, but it may be slower than + * World.setRawTypeId. + * + * @param x X coordinate + * @param y Y coordinate + * @param z Z coordinate + * @param typeId New block ID + * @param data Block data + * @return true if the block was set successfully + * @deprecated Magic value + */ + @Deprecated + public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data); + + /** + * Set a block type at the specified coordinates. + *

+ * This method cannot call World.setRawTypeId, a full update is needed. + * + * @param x X coordinate + * @param y Y coordinate + * @param z Z coordinate + * @param typeId New block ID + * @return true if the block was set successfully + * @deprecated Magic value + */ + @Deprecated + public boolean setTypeId(int x, int y, int z, int typeId); + + /** + * Set a block type and data at the specified coordinates. + *

+ * This method cannot call World.setRawTypeId, a full update is needed. + * + * @param x X coordinate + * @param y Y coordinate + * @param z Z coordinate + * @param typeId New block ID + * @param data Block data + * @return true if the block was set successfully + * @deprecated Magic value + */ + @Deprecated + public boolean setTypeIdAndData(int x, int y, int z, int typeId, int data); + + /** + * Get the block type at the location. + * + * @param x X coordinate + * @param y Y coordinate + * @param z Z coordinate + * @return The block ID + * @deprecated Magic value + */ + @Deprecated + public int getTypeId(int x, int y, int z); + + /** + * Gets the height of the world. + * + * @return Height of the world + */ + public int getHeight(); + + /** + * Checks if the specified block is empty (air) or not. + * + * @param x X coordinate + * @param y Y coordinate + * @param z Z coordinate + * @return True if the block is considered empty. + */ + public boolean isEmpty(int x, int y, int z); +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/Bukkit.java b/PaperSpigot-API/src/main/java/org/bukkit/Bukkit.java new file mode 100644 index 0000000..dcadc5c --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/Bukkit.java @@ -0,0 +1,776 @@ +package org.bukkit; + +import java.awt.image.BufferedImage; +import java.io.File; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.logging.Logger; + +import co.aikar.timings.Timings; +import org.bukkit.Warning.WarningState; +import org.bukkit.command.CommandException; +import org.bukkit.command.CommandSender; +import org.bukkit.command.ConsoleCommandSender; +import org.bukkit.command.PluginCommand; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.inventory.InventoryType; +import org.bukkit.help.HelpMap; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryHolder; +import org.bukkit.inventory.ItemFactory; +import org.bukkit.inventory.Recipe; +import org.bukkit.map.MapView; +import org.bukkit.metadata.MetadataStore; +import org.bukkit.plugin.PluginManager; +import org.bukkit.plugin.ServicesManager; +import org.bukkit.plugin.messaging.Messenger; +import org.bukkit.scheduler.BukkitScheduler; +import org.bukkit.scoreboard.ScoreboardManager; +import org.bukkit.util.CachedServerIcon; + +import com.avaje.ebean.config.ServerConfig; + +/** + * Represents the Bukkit core, for version and Server singleton handling + */ +public final class Bukkit { + private static Server server; + + /** + * Static class cannot be initialized. + */ + private Bukkit() {} + + /** + * Gets the current {@link Server} singleton + * + * @return Server instance being ran + */ + public static Server getServer() { + return server; + } + + /** + * Attempts to set the {@link Server} singleton. + *

+ * This cannot be done if the Server is already set. + * + * @param server Server instance + */ + public static void setServer(Server server) { + if (Bukkit.server != null) { + throw new UnsupportedOperationException("Cannot redefine singleton Server"); + } + + Bukkit.server = server; + server.getLogger().info("This server is running " + getName() + " version " + getVersion() + " (Implementing API version " + getBukkitVersion() + ")"); + } + + /** + * @see Server#getName() + */ + public static String getName() { + return server.getName(); + } + + /** + * @see Server#getVersion() + */ + public static String getVersion() { + return server.getVersion(); + } + + /** + * @see Server#getBukkitVersion() + */ + public static String getBukkitVersion() { + return server.getBukkitVersion(); + } + + /** + * This method exists for legacy reasons to provide backwards + * compatibility. It will not exist at runtime and should not be used + * under any circumstances. + * + * @Deprecated + * @see Server#_INVALID_getOnlinePlayers() + */ + @Deprecated + public static Player[] _INVALID_getOnlinePlayers() { + return server._INVALID_getOnlinePlayers(); + } + + /** + * @see Server#getOnlinePlayers() + */ + public static Collection getOnlinePlayers() { + return server.getOnlinePlayers(); + } + + /** + * @see Server#getMaxPlayers() + */ + public static int getMaxPlayers() { + return server.getMaxPlayers(); + } + + /** + * @see Server#getPort() + */ + public static int getPort() { + return server.getPort(); + } + + /** + * @see Server#getViewDistance() + */ + public static int getViewDistance() { + return server.getViewDistance(); + } + + /** + * @see Server#getIp() + */ + public static String getIp() { + return server.getIp(); + } + + /** + * @see Server#getServerName() + */ + public static String getServerName() { + return server.getServerName(); + } + + /** + * @see Server#getServerId() + */ + public static String getServerId() { + return server.getServerId(); + } + + /** + * @see Server#getWorldType() + */ + public static String getWorldType() { + return server.getWorldType(); + } + + /** + * @see Server#getGenerateStructures() + */ + public static boolean getGenerateStructures() { + return server.getGenerateStructures(); + } + + /** + * @see Server#getAllowNether() + */ + public static boolean getAllowNether() { + return server.getAllowNether(); + } + + /** + * @see Server#hasWhitelist() + */ + public static boolean hasWhitelist() { + return server.hasWhitelist(); + } + + /** + * @see Server#broadcastMessage(String message) + */ + public static int broadcastMessage(String message) { + return server.broadcastMessage(message); + } + + /** + * @see Server#getUpdateFolder() + */ + public static String getUpdateFolder() { + return server.getUpdateFolder(); + } + + /** + * @see Server#getPlayer(String name) + */ + public static Player getPlayer(String name) { + return server.getPlayer(name); + } + + /** + * @see Server#matchPlayer(String name) + */ + public static List matchPlayer(String name) { + return server.matchPlayer(name); + } + + /** + * @see Server#getPlayer(java.util.UUID) + */ + public static Player getPlayer(UUID id) { + return server.getPlayer(id); + } + + /** + * @see Server#getPluginManager() + */ + public static PluginManager getPluginManager() { + return server.getPluginManager(); + } + + /** + * @see Server#getScheduler() + */ + public static BukkitScheduler getScheduler() { + return server.getScheduler(); + } + + /** + * @see Server#getServicesManager() + */ + public static ServicesManager getServicesManager() { + return server.getServicesManager(); + } + + /** + * @see Server#getWorlds() + */ + public static List getWorlds() { + return server.getWorlds(); + } + + /** + * @see Server#createWorld(WorldCreator options) + */ + public static World createWorld(WorldCreator options) { + return server.createWorld(options); + } + + /** + * @see Server#unloadWorld(String name, boolean save) + */ + public static boolean unloadWorld(String name, boolean save) { + return server.unloadWorld(name, save); + } + + /** + * @see Server#unloadWorld(World world, boolean save) + */ + public static boolean unloadWorld(World world, boolean save) { + return server.unloadWorld(world, save); + } + + /** + * @see Server#getWorld(String name) + */ + public static World getWorld(String name) { + return server.getWorld(name); + } + + /** + * @see Server#getWorld(UUID uid) + */ + public static World getWorld(UUID uid) { + return server.getWorld(uid); + } + + /** + * @see Server#getMap(short id) + * @deprecated Magic value + */ + @Deprecated + public static MapView getMap(short id) { + return server.getMap(id); + } + + /** + * @see Server#createMap(World world) + */ + public static MapView createMap(World world) { + return server.createMap(world); + } + + /** + * @see Server#reload() + */ + public static void reload() { + server.reload(); + } + + /** + * @see Server#getLogger() + */ + public static Logger getLogger() { + return server.getLogger(); + } + + /** + * @see Server#getPluginCommand(String name) + */ + public static PluginCommand getPluginCommand(String name) { + return server.getPluginCommand(name); + } + + /** + * @see Server#savePlayers() + */ + public static void savePlayers() { + server.savePlayers(); + } + + /** + * @see Server#dispatchCommand(CommandSender sender, String commandLine) + */ + public static boolean dispatchCommand(CommandSender sender, String commandLine) throws CommandException { + return server.dispatchCommand(sender, commandLine); + } + + /** + * @see Server#configureDbConfig(ServerConfig config) + */ + public static void configureDbConfig(ServerConfig config) { + server.configureDbConfig(config); + } + + /** + * @see Server#addRecipe(Recipe recipe) + */ + public static boolean addRecipe(Recipe recipe) { + return server.addRecipe(recipe); + } + + /** + * @see Server#getRecipesFor(ItemStack result) + */ + public static List getRecipesFor(ItemStack result) { + return server.getRecipesFor(result); + } + + /** + * @see Server#recipeIterator() + */ + public static Iterator recipeIterator() { + return server.recipeIterator(); + } + + /** + * @see Server#clearRecipes() + */ + public static void clearRecipes() { + server.clearRecipes(); + } + + /** + * @see Server#resetRecipes() + */ + public static void resetRecipes() { + server.resetRecipes(); + } + + /** + * @see Server#getCommandAliases() + */ + public static Map getCommandAliases() { + return server.getCommandAliases(); + } + + /** + * @see Server#getSpawnRadius() + */ + public static int getSpawnRadius() { + return server.getSpawnRadius(); + } + + /** + * @see Server#setSpawnRadius(int value) + */ + public static void setSpawnRadius(int value) { + server.setSpawnRadius(value); + } + + /** + * @see Server#getOnlineMode() + */ + public static boolean getOnlineMode() { + return server.getOnlineMode(); + } + + /** + * @see Server#getAllowFlight() + */ + public static boolean getAllowFlight() { + return server.getAllowFlight(); + } + + /** + * @see Server#isHardcore() + */ + public static boolean isHardcore() { + return server.isHardcore(); + } + + /** + * @see Server#shutdown() + */ + public static void shutdown() { + server.shutdown(); + } + + /** + * @see Server#broadcast(String message, String permission) + */ + public static int broadcast(String message, String permission) { + return server.broadcast(message, permission); + } + + /** + * @see Server#getOfflinePlayer(String name) + */ + @Deprecated + public static OfflinePlayer getOfflinePlayer(String name) { + return server.getOfflinePlayer(name); + } + + /** + * @see Server#getOfflinePlayer(java.util.UUID) + */ + public static OfflinePlayer getOfflinePlayer(UUID id) { + return server.getOfflinePlayer(id); + } + + /** + * @see Server#getPlayerExact(String name) + */ + public static Player getPlayerExact(String name) { + return server.getPlayerExact(name); + } + + /** + * @see Server#getIPBans() + */ + public static Set getIPBans() { + return server.getIPBans(); + } + + /** + * @see Server#banIP(String address) + */ + public static void banIP(String address) { + server.banIP(address); + } + + /** + * @see Server#unbanIP(String address) + */ + public static void unbanIP(String address) { + server.unbanIP(address); + } + + /** + * @see Server#getBannedPlayers() + */ + public static Set getBannedPlayers() { + return server.getBannedPlayers(); + } + + /** + * @see Server#getBanList(BanList.Type) + */ + public static BanList getBanList(BanList.Type type){ + return server.getBanList(type); + } + + /** + * @see Server#setWhitelist(boolean value) + */ + public static void setWhitelist(boolean value) { + server.setWhitelist(value); + } + + /** + * @see Server#getWhitelistedPlayers() + */ + public static Set getWhitelistedPlayers() { + return server.getWhitelistedPlayers(); + } + + /** + * @see Server#reloadWhitelist() + */ + public static void reloadWhitelist() { + server.reloadWhitelist(); + } + + /** + * @see Server#getConsoleSender() + */ + public static ConsoleCommandSender getConsoleSender() { + return server.getConsoleSender(); + } + + /** + * @see Server#getOperators() + */ + public static Set getOperators() { + return server.getOperators(); + } + + /** + * @see Server#getEntityMetadata() + */ + public static MetadataStore getEntityMetadata() { + return server.getEntityMetadata(); + } + + /** + * @see Server#getPlayerMetadata() + */ + public static MetadataStore getPlayerMetadata() { + return server.getPlayerMetadata(); + } + + /** + * @see Server#getWorldMetadata() + */ + public static MetadataStore getWorldMetadata() { + return server.getWorldMetadata(); + } + + /** + * @see Server#getWorldContainer() + */ + public static File getWorldContainer() { + return server.getWorldContainer(); + } + + /** + * @see Server#getMessenger() + */ + public static Messenger getMessenger() { + return server.getMessenger(); + } + + /** + * @see Server#getAllowEnd() + */ + public static boolean getAllowEnd() { + return server.getAllowEnd(); + } + + /** + * @see Server#getUpdateFolderFile() + */ + public static File getUpdateFolderFile() { + return server.getUpdateFolderFile(); + } + + /** + * @see Server#getConnectionThrottle() + */ + public static long getConnectionThrottle() { + return server.getConnectionThrottle(); + } + + /** + * @see Server#getTicksPerAnimalSpawns() + */ + public static int getTicksPerAnimalSpawns() { + return server.getTicksPerAnimalSpawns(); + } + + /** + * @see Server#getTicksPerMonsterSpawns() + */ + public static int getTicksPerMonsterSpawns() { + return server.getTicksPerMonsterSpawns(); + } + + /** + * @see Server#useExactLoginLocation() + */ + public static boolean useExactLoginLocation() { + return server.useExactLoginLocation(); + } + + /** + * @see Server#getDefaultGameMode() + */ + public static GameMode getDefaultGameMode() { + return server.getDefaultGameMode(); + } + + /** + * @see Server#setDefaultGameMode(GameMode mode) + */ + public static void setDefaultGameMode(GameMode mode) { + server.setDefaultGameMode(mode); + } + + /** + * @see Server#getOfflinePlayers() + */ + public static OfflinePlayer[] getOfflinePlayers() { + return server.getOfflinePlayers(); + } + + /** + * @see Server#createInventory(InventoryHolder owner, InventoryType type) + */ + public static Inventory createInventory(InventoryHolder owner, InventoryType type) { + return server.createInventory(owner, type); + } + + /** + * @see Server#createInventory(InventoryHolder owner, InventoryType type, String title) + */ + public static Inventory createInventory(InventoryHolder owner, InventoryType type, String title) { + return server.createInventory(owner, type, title); + } + + /** + * @see Server#createInventory(InventoryHolder owner, int size) + */ + public static Inventory createInventory(InventoryHolder owner, int size) throws IllegalArgumentException { + return server.createInventory(owner, size); + } + + /** + * @see Server#createInventory(InventoryHolder owner, int size, String + * title) + */ + public static Inventory createInventory(InventoryHolder owner, int size, String title) throws IllegalArgumentException { + return server.createInventory(owner, size, title); + } + + /** + * @see Server#getHelpMap() + */ + public static HelpMap getHelpMap() { + return server.getHelpMap(); + } + + /** + * @see Server#getMonsterSpawnLimit() + */ + public static int getMonsterSpawnLimit() { + return server.getMonsterSpawnLimit(); + } + + /** + * @see Server#getAnimalSpawnLimit() + */ + public static int getAnimalSpawnLimit() { + return server.getAnimalSpawnLimit(); + } + + /** + * @see Server#getWaterAnimalSpawnLimit() + */ + public static int getWaterAnimalSpawnLimit() { + return server.getWaterAnimalSpawnLimit(); + } + + /** + * @see Server#getAmbientSpawnLimit() + */ + public static int getAmbientSpawnLimit() { + return server.getAmbientSpawnLimit(); + } + + /** + * @see Server#isPrimaryThread() + */ + public static boolean isPrimaryThread() { + return server.isPrimaryThread(); + } + + /** + * @see Server#getMotd() + */ + public static String getMotd() { + return server.getMotd(); + } + + /** + * @see Server#getShutdownMessage() + */ + public static String getShutdownMessage() { + return server.getShutdownMessage(); + } + + /** + * @see Server#getWarningState() + */ + public static WarningState getWarningState() { + return server.getWarningState(); + } + + /** + * @see Server#getItemFactory() + */ + public static ItemFactory getItemFactory() { + return server.getItemFactory(); + } + + /** + * @see Server#getScoreboardManager() + */ + public static ScoreboardManager getScoreboardManager() { + return server.getScoreboardManager(); + } + + /** + * @see Server#getServerIcon() + */ + public static CachedServerIcon getServerIcon() { + return server.getServerIcon(); + } + + /** + * @see Server#loadServerIcon(File) + */ + public static CachedServerIcon loadServerIcon(File file) throws IllegalArgumentException, Exception { + return server.loadServerIcon(file); + } + + /** + * @see Server#loadServerIcon(BufferedImage) + */ + public static CachedServerIcon loadServerIcon(BufferedImage image) throws IllegalArgumentException, Exception { + return server.loadServerIcon(image); + } + + /** + * @see Server#setIdleTimeout(int) + */ + public static void setIdleTimeout(int threshold) { + server.setIdleTimeout(threshold); + } + + /** + * @see Server#getIdleTimeout() + */ + public static int getIdleTimeout() { + return server.getIdleTimeout(); + } + + /** + * @see Server#getUnsafe() + */ + @Deprecated + public static UnsafeValues getUnsafe() { + return server.getUnsafe(); + } + + public static Server.Spigot spigot() + { + return server.spigot(); + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/ChatColor.java b/PaperSpigot-API/src/main/java/org/bukkit/ChatColor.java new file mode 100644 index 0000000..0bbc9fa --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/ChatColor.java @@ -0,0 +1,253 @@ +package org.bukkit; + +import java.util.Map; +import java.util.regex.Pattern; + +import org.apache.commons.lang.Validate; + +import com.google.common.collect.Maps; + +/** + * All supported color values for chat + */ +public enum ChatColor { + /** + * Represents black + */ + BLACK('0', 0x00), + /** + * Represents dark blue + */ + DARK_BLUE('1', 0x1), + /** + * Represents dark green + */ + DARK_GREEN('2', 0x2), + /** + * Represents dark blue (aqua) + */ + DARK_AQUA('3', 0x3), + /** + * Represents dark red + */ + DARK_RED('4', 0x4), + /** + * Represents dark purple + */ + DARK_PURPLE('5', 0x5), + /** + * Represents gold + */ + GOLD('6', 0x6), + /** + * Represents gray + */ + GRAY('7', 0x7), + /** + * Represents dark gray + */ + DARK_GRAY('8', 0x8), + /** + * Represents blue + */ + BLUE('9', 0x9), + /** + * Represents green + */ + GREEN('a', 0xA), + /** + * Represents aqua + */ + AQUA('b', 0xB), + /** + * Represents red + */ + RED('c', 0xC), + /** + * Represents light purple + */ + LIGHT_PURPLE('d', 0xD), + /** + * Represents yellow + */ + YELLOW('e', 0xE), + /** + * Represents white + */ + WHITE('f', 0xF), + /** + * Represents magical characters that change around randomly + */ + MAGIC('k', 0x10, true), + /** + * Makes the text bold. + */ + BOLD('l', 0x11, true), + /** + * Makes a line appear through the text. + */ + STRIKETHROUGH('m', 0x12, true), + /** + * Makes the text appear underlined. + */ + UNDERLINE('n', 0x13, true), + /** + * Makes the text italic. + */ + ITALIC('o', 0x14, true), + /** + * Resets all previous chat colors or formats. + */ + RESET('r', 0x15); + + /** + * The special character which prefixes all chat colour codes. Use this if + * 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 final int intCode; + private final char code; + private final boolean isFormat; + private final String toString; + private final static Map BY_ID = Maps.newHashMap(); + private final static Map BY_CHAR = Maps.newHashMap(); + + private ChatColor(char code, int intCode) { + this(code, intCode, false); + } + + private ChatColor(char code, int intCode, boolean isFormat) { + this.code = code; + this.intCode = intCode; + this.isFormat = isFormat; + this.toString = new String(new char[] {COLOR_CHAR, code}); + } + + /** + * Gets the char value associated with this color + * + * @return A char value of this color code + */ + public char getChar() { + return code; + } + + @Override + public String toString() { + return toString; + } + + /** + * Checks if this code is a format code as opposed to a color code. + */ + public boolean isFormat() { + return isFormat; + } + + /** + * Checks if this code is a color code as opposed to a format code. + */ + public boolean isColor() { + return !isFormat && this != RESET; + } + + /** + * Gets the color represented by the specified color code + * + * @param code Code to check + * @return Associative {@link org.bukkit.ChatColor} with the given code, + * or null if it doesn't exist + */ + public static ChatColor getByChar(char code) { + return BY_CHAR.get(code); + } + + /** + * Gets the color represented by the specified color code + * + * @param code Code to check + * @return Associative {@link org.bukkit.ChatColor} with the given code, + * or null if it doesn't exist + */ + public static ChatColor getByChar(String code) { + Validate.notNull(code, "Code cannot be null"); + Validate.isTrue(code.length() > 0, "Code must have at least one char"); + + return BY_CHAR.get(code.charAt(0)); + } + + /** + * Strips the given message of all color codes + * + * @param input String to strip of color + * @return A copy of the input string, without any coloring + */ + public static String stripColor(final String input) { + if (input == null) { + return null; + } + + return STRIP_COLOR_PATTERN.matcher(input).replaceAll(""); + } + + /** + * Translates a string using an alternate color code character into a + * string that uses the internal ChatColor.COLOR_CODE color code + * character. The alternate color code character will only be replaced if + * it is immediately followed by 0-9, A-F, a-f, K-O, k-o, R or r. + * + * @param altColorChar The alternate color code character to replace. Ex: & + * @param textToTranslate Text containing the alternate color code character. + * @return Text containing the ChatColor.COLOR_CODE color code character. + */ + public static String translateAlternateColorCodes(char altColorChar, String textToTranslate) { + char[] b = textToTranslate.toCharArray(); + for (int i = 0; i < b.length - 1; i++) { + if (b[i] == altColorChar && "0123456789AaBbCcDdEeFfKkLlMmNnOoRr".indexOf(b[i+1]) > -1) { + b[i] = ChatColor.COLOR_CHAR; + b[i+1] = Character.toLowerCase(b[i+1]); + } + } + return new String(b); + } + + /** + * Gets the ChatColors used at the end of the given input string. + * + * @param input Input string to retrieve the colors from. + * @return Any remaining ChatColors to pass onto the next line. + */ + public static String getLastColors(String input) { + String result = ""; + int length = input.length(); + + // Search backwards from the end as it is faster + for (int index = length - 1; index > -1; index--) { + char section = input.charAt(index); + if (section == COLOR_CHAR && index < length - 1) { + char c = input.charAt(index + 1); + ChatColor color = getByChar(c); + + if (color != null) { + result = color.toString() + result; + + // Once we find a color or reset we can stop searching + if (color.isColor() || color.equals(RESET)) { + break; + } + } + } + } + + return result; + } + + static { + for (ChatColor color : values()) { + BY_ID.put(color.intCode, color); + BY_CHAR.put(color.code, color); + } + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/Chunk.java b/PaperSpigot-API/src/main/java/org/bukkit/Chunk.java new file mode 100644 index 0000000..0510151 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/Chunk.java @@ -0,0 +1,124 @@ +package org.bukkit; + +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; +import org.bukkit.entity.Entity; + +/** + * Represents a chunk of blocks + */ +public interface Chunk { + + /** + * Gets the X-coordinate of this chunk + * + * @return X-coordinate + */ + int getX(); + + /** + * Gets the Z-coordinate of this chunk + * + * @return Z-coordinate + */ + int getZ(); + + /** + * Gets the world containing this chunk + * + * @return Parent World + */ + World getWorld(); + + /** + * Gets a block from this chunk + * + * @param x 0-15 + * @param y 0-127 + * @param z 0-15 + * @return the Block + */ + Block getBlock(int x, int y, int z); + + /** + * Capture thread-safe read-only snapshot of chunk data + * + * @return ChunkSnapshot + */ + ChunkSnapshot getChunkSnapshot(); + + /** + * Capture thread-safe read-only snapshot of chunk data + * + * @param includeMaxblocky - if true, snapshot includes per-coordinate + * maximum Y values + * @param includeBiome - if true, snapshot includes per-coordinate biome + * type + * @param includeBiomeTempRain - if true, snapshot includes per-coordinate + * raw biome temperature and rainfall + * @return ChunkSnapshot + */ + ChunkSnapshot getChunkSnapshot(boolean includeMaxblocky, boolean includeBiome, boolean includeBiomeTempRain); + + /** + * Get a list of all entities in the chunk. + * + * @return The entities. + */ + Entity[] getEntities(); + + /** + * Get a list of all tile entities in the chunk. + * + * @return The tile entities. + */ + BlockState[] getTileEntities(); + + /** + * Checks if the chunk is loaded. + * + * @return True if it is loaded. + */ + boolean isLoaded(); + + /** + * Loads the chunk. + * + * @param generate Whether or not to generate a chunk if it doesn't + * already exist + * @return true if the chunk has loaded successfully, otherwise false + */ + boolean load(boolean generate); + + /** + * Loads the chunk. + * + * @return true if the chunk has loaded successfully, otherwise false + */ + boolean load(); + + /** + * Unloads and optionally saves the Chunk + * + * @param save Controls whether the chunk is saved + * @param safe Controls whether to unload the chunk when players are + * nearby + * @return true if the chunk has unloaded successfully, otherwise false + */ + boolean unload(boolean save, boolean safe); + + /** + * Unloads and optionally saves the Chunk + * + * @param save Controls whether the chunk is saved + * @return true if the chunk has unloaded successfully, otherwise false + */ + boolean unload(boolean save); + + /** + * Unloads and optionally saves the Chunk + * + * @return true if the chunk has unloaded successfully, otherwise false + */ + boolean unload(); +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/ChunkSnapshot.java b/PaperSpigot-API/src/main/java/org/bukkit/ChunkSnapshot.java new file mode 100644 index 0000000..83fccc8 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/ChunkSnapshot.java @@ -0,0 +1,129 @@ +package org.bukkit; + +import org.bukkit.block.Biome; + +/** + * Represents a static, thread-safe snapshot of chunk of blocks. + *

+ * Purpose is to allow clean, efficient copy of a chunk data to be made, and + * then handed off for processing in another thread (e.g. map rendering) + */ +public interface ChunkSnapshot { + + /** + * Gets the X-coordinate of this chunk + * + * @return X-coordinate + */ + int getX(); + + /** + * Gets the Z-coordinate of this chunk + * + * @return Z-coordinate + */ + int getZ(); + + /** + * Gets name of the world containing this chunk + * + * @return Parent World Name + */ + String getWorldName(); + + /** + * Get block type for block at corresponding coordinate in the chunk + * + * @param x 0-15 + * @param y 0-127 + * @param z 0-15 + * @return 0-255 + * @deprecated Magic value + */ + @Deprecated + int getBlockTypeId(int x, int y, int z); + + /** + * Get block data for block at corresponding coordinate in the chunk + * + * @param x 0-15 + * @param y 0-127 + * @param z 0-15 + * @return 0-15 + * @deprecated Magic value + */ + @Deprecated + int getBlockData(int x, int y, int z); + + /** + * Get sky light level for block at corresponding coordinate in the chunk + * + * @param x 0-15 + * @param y 0-127 + * @param z 0-15 + * @return 0-15 + */ + int getBlockSkyLight(int x, int y, int z); + + /** + * Get light level emitted by block at corresponding coordinate in the + * chunk + * + * @param x 0-15 + * @param y 0-127 + * @param z 0-15 + * @return 0-15 + */ + int getBlockEmittedLight(int x, int y, int z); + + /** + * Gets the highest non-air coordinate at the given coordinates + * + * @param x X-coordinate of the blocks + * @param z Z-coordinate of the blocks + * @return Y-coordinate of the highest non-air block + */ + int getHighestBlockYAt(int x, int z); + + /** + * Get biome at given coordinates + * + * @param x X-coordinate + * @param z Z-coordinate + * @return Biome at given coordinate + */ + Biome getBiome(int x, int z); + + /** + * Get raw biome temperature (0.0-1.0) at given coordinate + * + * @param x X-coordinate + * @param z Z-coordinate + * @return temperature at given coordinate + */ + double getRawBiomeTemperature(int x, int z); + + /** + * Get raw biome rainfall (0.0-1.0) at given coordinate + * + * @param x X-coordinate + * @param z Z-coordinate + * @return rainfall at given coordinate + */ + double getRawBiomeRainfall(int x, int z); + + /** + * Get world full time when chunk snapshot was captured + * + * @return time in ticks + */ + long getCaptureFullTime(); + + /** + * Test if section is empty + * + * @param sy - section Y coordinate (block Y / 16) + * @return true if empty, false if not + */ + boolean isSectionEmpty(int sy); +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/CoalType.java b/PaperSpigot-API/src/main/java/org/bukkit/CoalType.java new file mode 100644 index 0000000..4fcccd2 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/CoalType.java @@ -0,0 +1,50 @@ +package org.bukkit; + +import java.util.Map; + +import com.google.common.collect.Maps; + +/** + * Represents the two types of coal + */ +public enum CoalType { + COAL(0x0), + CHARCOAL(0x1); + + private final byte data; + private final static Map BY_DATA = Maps.newHashMap(); + + private CoalType(final int data) { + this.data = (byte) data; + } + + /** + * Gets the associated data value representing this type of coal + * + * @return A byte containing the data value of this coal type + * @deprecated Magic value + */ + @Deprecated + public byte getData() { + return data; + } + + /** + * Gets the type of coal with the given data value + * + * @param data Data value to fetch + * @return The {@link CoalType} representing the given value, or null if + * it doesn't exist + * @deprecated Magic value + */ + @Deprecated + public static CoalType getByData(final byte data) { + return BY_DATA.get(data); + } + + static { + for (CoalType type : values()) { + BY_DATA.put(type.data, type); + } + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/Color.java b/PaperSpigot-API/src/main/java/org/bukkit/Color.java new file mode 100644 index 0000000..76ff651 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/Color.java @@ -0,0 +1,344 @@ +package org.bukkit; + +import java.util.Map; + +import org.apache.commons.lang.Validate; +import org.bukkit.configuration.serialization.ConfigurationSerializable; +import org.bukkit.configuration.serialization.SerializableAs; + +import com.google.common.collect.ImmutableMap; + +/** + * A container for a color palette. This class is immutable; the set methods + * return a new color. The color names listed as fields are HTML4 standards, + * but subject to change. + */ +@SerializableAs("Color") +public final class Color implements ConfigurationSerializable { + private static final int BIT_MASK = 0xff; + + /** + * White, or (0xFF,0xFF,0xFF) in (R,G,B) + */ + public static final Color WHITE = fromRGB(0xFFFFFF); + + /** + * Silver, or (0xC0,0xC0,0xC0) in (R,G,B) + */ + public static final Color SILVER = fromRGB(0xC0C0C0); + + /** + * Gray, or (0x80,0x80,0x80) in (R,G,B) + */ + public static final Color GRAY = fromRGB(0x808080); + + /** + * Black, or (0x00,0x00,0x00) in (R,G,B) + */ + public static final Color BLACK = fromRGB(0x000000); + + /** + * Red, or (0xFF,0x00,0x00) in (R,G,B) + */ + public static final Color RED = fromRGB(0xFF0000); + + /** + * Maroon, or (0x80,0x00,0x00) in (R,G,B) + */ + public static final Color MAROON = fromRGB(0x800000); + + /** + * Yellow, or (0xFF,0xFF,0x00) in (R,G,B) + */ + public static final Color YELLOW = fromRGB(0xFFFF00); + + /** + * Olive, or (0x80,0x80,0x00) in (R,G,B) + */ + public static final Color OLIVE = fromRGB(0x808000); + + /** + * Lime, or (0x00,0xFF,0x00) in (R,G,B) + */ + public static final Color LIME = fromRGB(0x00FF00); + + /** + * Green, or (0x00,0x80,0x00) in (R,G,B) + */ + public static final Color GREEN = fromRGB(0x008000); + + /** + * Aqua, or (0x00,0xFF,0xFF) in (R,G,B) + */ + public static final Color AQUA = fromRGB(0x00FFFF); + + /** + * Teal, or (0x00,0x80,0x80) in (R,G,B) + */ + public static final Color TEAL = fromRGB(0x008080); + + /** + * Blue, or (0x00,0x00,0xFF) in (R,G,B) + */ + public static final Color BLUE = fromRGB(0x0000FF); + + /** + * Navy, or (0x00,0x00,0x80) in (R,G,B) + */ + public static final Color NAVY = fromRGB(0x000080); + + /** + * Fuchsia, or (0xFF,0x00,0xFF) in (R,G,B) + */ + public static final Color FUCHSIA = fromRGB(0xFF00FF); + + /** + * Purple, or (0x80,0x00,0x80) in (R,G,B) + */ + public static final Color PURPLE = fromRGB(0x800080); + + /** + * Orange, or (0xFF,0xA5,0x00) in (R,G,B) + */ + public static final Color ORANGE = fromRGB(0xFFA500); + + private final byte red; + private final byte green; + private final byte blue; + + /** + * Creates a new Color object from a red, green, and blue + * + * @param red integer from 0-255 + * @param green integer from 0-255 + * @param blue integer from 0-255 + * @return a new Color object for the red, green, blue + * @throws IllegalArgumentException if any value is strictly >255 or <0 + */ + public static Color fromRGB(int red, int green, int blue) throws IllegalArgumentException { + return new Color(red, green, blue); + } + + /** + * Creates a new Color object from a blue, green, and red + * + * @param blue integer from 0-255 + * @param green integer from 0-255 + * @param red integer from 0-255 + * @return a new Color object for the red, green, blue + * @throws IllegalArgumentException if any value is strictly >255 or <0 + */ + public static Color fromBGR(int blue, int green, int red) throws IllegalArgumentException { + return new Color(red, green, blue); + } + + /** + * Creates a new color object from an integer that contains the red, + * green, and blue bytes in the lowest order 24 bits. + * + * @param rgb the integer storing the red, green, and blue values + * @return a new color object for specified values + * @throws IllegalArgumentException if any data is in the highest order 8 + * bits + */ + 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); + } + + /** + * Creates a new color object from an integer that contains the blue, + * green, and red bytes in the lowest order 24 bits. + * + * @param bgr the integer storing the blue, green, and red values + * @return a new color object for specified values + * @throws IllegalArgumentException if any data is in the highest order 8 + * bits + */ + 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); + } + + private Color(int red, int green, int blue) { + Validate.isTrue(red >= 0 && red <= BIT_MASK, "Red is not between 0-255: ", red); + Validate.isTrue(green >= 0 && green <= BIT_MASK, "Green is not between 0-255: ", green); + Validate.isTrue(blue >= 0 && blue <= BIT_MASK, "Blue is not between 0-255: ", blue); + + this.red = (byte) red; + this.green = (byte) green; + this.blue = (byte) blue; + } + + /** + * Gets the red component + * + * @return red component, from 0 to 255 + */ + public int getRed() { + return BIT_MASK & red; + } + + /** + * Creates a new Color object with specified component + * + * @param red the red component, from 0 to 255 + * @return a new color object with the red component + */ + public Color setRed(int red) { + return fromRGB(red, getGreen(), getBlue()); + } + + /** + * Gets the green component + * + * @return green component, from 0 to 255 + */ + public int getGreen() { + return BIT_MASK & green; + } + + /** + * Creates a new Color object with specified component + * + * @param green the red component, from 0 to 255 + * @return a new color object with the red component + */ + public Color setGreen(int green) { + return fromRGB(getRed(), green, getBlue()); + } + + /** + * Gets the blue component + * + * @return blue component, from 0 to 255 + */ + public int getBlue() { + return BIT_MASK & blue; + } + + /** + * Creates a new Color object with specified component + * + * @param blue the red component, from 0 to 255 + * @return a new color object with the red component + */ + public Color setBlue(int blue) { + return fromRGB(getRed(), getGreen(), blue); + } + + /** + * + * @return An integer representation of this color, as 0xRRGGBB + */ + public int asRGB() { + return getRed() << 16 | getGreen() << 8 | getBlue() << 0; + } + + /** + * + * @return An integer representation of this color, as 0xBBGGRR + */ + public int asBGR() { + return getBlue() << 16 | getGreen() << 8 | getRed() << 0; + } + + /** + * Creates a new color with its RGB components changed as if it was dyed + * with the colors passed in, replicating vanilla workbench dyeing + * + * @param colors The DyeColors to dye with + * @return A new color with the changed rgb components + */ + // TODO: Javadoc what this method does, not what it mimics. API != Implementation + public Color mixDyes(DyeColor... colors) { + Validate.noNullElements(colors, "Colors cannot be null"); + + Color[] toPass = new Color[colors.length]; + for (int i = 0; i < colors.length; i++) { + toPass[i] = colors[i].getColor(); + } + + return mixColors(toPass); + } + + /** + * Creates a new color with its RGB components changed as if it was dyed + * with the colors passed in, replicating vanilla workbench dyeing + * + * @param colors The colors to dye with + * @return A new color with the changed rgb components + */ + // TODO: Javadoc what this method does, not what it mimics. API != Implementation + public Color mixColors(Color... colors) { + Validate.noNullElements(colors, "Colors cannot be null"); + + int totalRed = this.getRed(); + int totalGreen = this.getGreen(); + int totalBlue = this.getBlue(); + int totalMax = Math.max(Math.max(totalRed, totalGreen), totalBlue); + for (Color color : colors) { + totalRed += color.getRed(); + totalGreen += color.getGreen(); + totalBlue += color.getBlue(); + totalMax += Math.max(Math.max(color.getRed(), color.getGreen()), color.getBlue()); + } + + float averageRed = totalRed / (colors.length + 1); + float averageGreen = totalGreen / (colors.length + 1); + float averageBlue = totalBlue / (colors.length + 1); + float averageMax = totalMax / (colors.length + 1); + + float maximumOfAverages = Math.max(Math.max(averageRed, averageGreen), averageBlue); + float gainFactor = averageMax / maximumOfAverages; + + return Color.fromRGB((int) (averageRed * gainFactor), (int) (averageGreen * gainFactor), (int) (averageBlue * gainFactor)); + } + + @Override + public boolean equals(Object o) { + if (!(o instanceof Color)) { + return false; + } + final Color that = (Color) o; + return this.blue == that.blue && this.green == that.green && this.red == that.red; + } + + @Override + public int hashCode() { + return asRGB() ^ Color.class.hashCode(); + } + + public Map serialize() { + return ImmutableMap.of( + "RED", getRed(), + "BLUE", getBlue(), + "GREEN", getGreen() + ); + } + + @SuppressWarnings("javadoc") + public static Color deserialize(Map map) { + return fromRGB( + asInt("RED", map), + asInt("GREEN", map), + asInt("BLUE", map) + ); + } + + private static int asInt(String string, Map map) { + Object value = map.get(string); + if (value == null) { + throw new IllegalArgumentException(string + " not in map " + map); + } + if (!(value instanceof Number)) { + throw new IllegalArgumentException(string + '(' + value + ") is not a number"); + } + return ((Number) value).intValue(); + } + + @Override + public String toString() { + return "Color:[rgb0x" + Integer.toHexString(getRed()).toUpperCase() + Integer.toHexString(getGreen()).toUpperCase() + Integer.toHexString(getBlue()).toUpperCase() + "]"; + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/CropState.java b/PaperSpigot-API/src/main/java/org/bukkit/CropState.java new file mode 100644 index 0000000..ef0faf9 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/CropState.java @@ -0,0 +1,81 @@ +package org.bukkit; + +import java.util.Map; + +import com.google.common.collect.Maps; + +/** + * Represents the different growth states of crops + */ +public enum CropState { + + /** + * State when first seeded + */ + SEEDED(0x0), + /** + * First growth stage + */ + GERMINATED(0x1), + /** + * Second growth stage + */ + VERY_SMALL(0x2), + /** + * Third growth stage + */ + SMALL(0x3), + /** + * Fourth growth stage + */ + MEDIUM(0x4), + /** + * Fifth growth stage + */ + TALL(0x5), + /** + * Almost ripe stage + */ + VERY_TALL(0x6), + /** + * Ripe stage + */ + RIPE(0x7); + + private final byte data; + private final static Map BY_DATA = Maps.newHashMap(); + + private CropState(final int data) { + this.data = (byte) data; + } + + /** + * Gets the associated data value representing this growth state + * + * @return A byte containing the data value of this growth state + * @deprecated Magic value + */ + @Deprecated + public byte getData() { + return data; + } + + /** + * Gets the CropState with the given data value + * + * @param data Data value to fetch + * @return The {@link CropState} representing the given value, or null if + * it doesn't exist + * @deprecated Magic value + */ + @Deprecated + public static CropState getByData(final byte data) { + return BY_DATA.get(data); + } + + static { + for (CropState cropState : values()) { + BY_DATA.put(cropState.getData(), cropState); + } + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/Difficulty.java b/PaperSpigot-API/src/main/java/org/bukkit/Difficulty.java new file mode 100644 index 0000000..a8a5a78 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/Difficulty.java @@ -0,0 +1,72 @@ +package org.bukkit; + +import java.util.Map; + +import com.google.common.collect.Maps; + +/** + * Represents the various difficulty levels that are available. + */ +public enum Difficulty { + /** + * Players regain health over time, hostile mobs don't spawn, the hunger + * bar does not deplete. + */ + PEACEFUL(0), + + /** + * Hostile mobs spawn, enemies deal less damage than on normal difficulty, + * the hunger bar does deplete and starving deals up to 5 hearts of + * damage. (Default value) + */ + EASY(1), + + /** + * Hostile mobs spawn, enemies deal normal amounts of damage, the hunger + * bar does deplete and starving deals up to 9.5 hearts of damage. + */ + NORMAL(2), + + /** + * Hostile mobs spawn, enemies deal greater damage than on normal + * difficulty, the hunger bar does deplete and starving can kill players. + */ + HARD(3); + + private final int value; + private final static Map BY_ID = Maps.newHashMap(); + + private Difficulty(final int value) { + this.value = value; + } + + /** + * Gets the difficulty value associated with this Difficulty. + * + * @return An integer value of this difficulty + * @deprecated Magic value + */ + @Deprecated + public int getValue() { + return value; + } + + /** + * Gets the Difficulty represented by the specified value + * + * @param value Value to check + * @return Associative {@link Difficulty} with the given value, or null if + * it doesn't exist + * @deprecated Magic value + */ + @Deprecated + public static Difficulty getByValue(final int value) { + return BY_ID.get(value); + } + + static { + for (Difficulty diff : values()) { + BY_ID.put(diff.value, diff); + } + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/DyeColor.java b/PaperSpigot-API/src/main/java/org/bukkit/DyeColor.java new file mode 100644 index 0000000..214806e --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/DyeColor.java @@ -0,0 +1,239 @@ +package org.bukkit; + +import java.util.Map; + +import com.google.common.collect.ImmutableMap; + +/** + * All supported color values for dyes and cloth + */ +public enum DyeColor { + + /** + * Represents white dye. + */ + WHITE(0x0, 0xF, Color.WHITE, Color.fromRGB(0xF0F0F0)), + /** + * Represents orange dye. + */ + ORANGE(0x1, 0xE, Color.fromRGB(0xD87F33), Color.fromRGB(0xEB8844)), + /** + * Represents magenta dye. + */ + MAGENTA(0x2, 0xD, Color.fromRGB(0xB24CD8), Color.fromRGB(0xC354CD)), + /** + * Represents light blue dye. + */ + LIGHT_BLUE(0x3, 0xC, Color.fromRGB(0x6699D8), Color.fromRGB(0x6689D3)), + /** + * Represents yellow dye. + */ + YELLOW(0x4, 0xB, Color.fromRGB(0xE5E533), Color.fromRGB(0xDECF2A)), + /** + * Represents lime dye. + */ + LIME(0x5, 0xA, Color.fromRGB(0x7FCC19), Color.fromRGB(0x41CD34)), + /** + * Represents pink dye. + */ + PINK(0x6, 0x9, Color.fromRGB(0xF27FA5), Color.fromRGB(0xD88198)), + /** + * Represents gray dye. + */ + GRAY(0x7, 0x8, Color.fromRGB(0x4C4C4C), Color.fromRGB(0x434343)), + /** + * Represents silver dye. + */ + SILVER(0x8, 0x7, Color.fromRGB(0x999999), Color.fromRGB(0xABABAB)), + /** + * Represents cyan dye. + */ + CYAN(0x9, 0x6, Color.fromRGB(0x4C7F99), Color.fromRGB(0x287697)), + /** + * Represents purple dye. + */ + PURPLE(0xA, 0x5, Color.fromRGB(0x7F3FB2), Color.fromRGB(0x7B2FBE)), + /** + * Represents blue dye. + */ + BLUE(0xB, 0x4, Color.fromRGB(0x334CB2), Color.fromRGB(0x253192)), + /** + * Represents brown dye. + */ + BROWN(0xC, 0x3, Color.fromRGB(0x664C33), Color.fromRGB(0x51301A)), + /** + * Represents green dye. + */ + GREEN(0xD, 0x2, Color.fromRGB(0x667F33), Color.fromRGB(0x3B511A)), + /** + * Represents red dye. + */ + RED(0xE, 0x1, Color.fromRGB(0x993333), Color.fromRGB(0xB3312C)), + /** + * Represents black dye. + */ + BLACK(0xF, 0x0, Color.fromRGB(0x191919), Color.fromRGB(0x1E1B1B)); + + private final byte woolData; + private final byte dyeData; + private final Color color; + private final Color firework; + private final static DyeColor[] BY_WOOL_DATA; + private final static DyeColor[] BY_DYE_DATA; + private final static Map BY_COLOR; + private final static Map BY_FIREWORK; + + private DyeColor(final int woolData, final int dyeData, Color color, Color firework) { + this.woolData = (byte) woolData; + this.dyeData = (byte) dyeData; + this.color = color; + this.firework = firework; + } + + /** + * Gets the associated (wool) data value representing this color. + * + * @return A byte containing the (wool) data value of this color + * @deprecated The name is misleading. It would imply {@link + * Material#INK_SACK} but uses {@link Material#WOOL} + * @see #getWoolData() + * @see #getDyeData() + */ + @Deprecated + public byte getData() { + return getWoolData(); + } + + /** + * Gets the associated wool data value representing this color. + * + * @return A byte containing the wool data value of this color + * @see #getDyeData() + * @deprecated Magic value + */ + @Deprecated + public byte getWoolData() { + return woolData; + } + + /** + * Gets the associated dye data value representing this color. + * + * @return A byte containing the dye data value of this color + * @see #getWoolData() + * @deprecated Magic value + */ + @Deprecated + public byte getDyeData() { + return dyeData; + } + + /** + * Gets the color that this dye represents. + * + * @return The {@link Color} that this dye represents + */ + public Color getColor() { + return color; + } + + /** + * Gets the firework color that this dye represents. + * + * @return The {@link Color} that this dye represents + */ + public Color getFireworkColor() { + return firework; + } + + /** + * Gets the DyeColor with the given (wool) data value. + * + * @param data (wool) data value to fetch + * @return The {@link DyeColor} representing the given value, or null if + * it doesn't exist + * @deprecated The name is misleading. It would imply {@link + * Material#INK_SACK} but uses {@link Material#WOOL} + * @see #getByDyeData(byte) + * @see #getByWoolData(byte) + */ + @Deprecated + public static DyeColor getByData(final byte data) { + return getByWoolData(data); + } + + /** + * Gets the DyeColor with the given wool data value. + * + * @param data Wool data value to fetch + * @return The {@link DyeColor} representing the given value, or null if + * it doesn't exist + * @see #getByDyeData(byte) + * @deprecated Magic value + */ + @Deprecated + public static DyeColor getByWoolData(final byte data) { + int i = 0xff & data; + if (i >= BY_WOOL_DATA.length) { + return null; + } + return BY_WOOL_DATA[i]; + } + + /** + * Gets the DyeColor with the given dye data value. + * + * @param data Dye data value to fetch + * @return The {@link DyeColor} representing the given value, or null if + * it doesn't exist + * @see #getByWoolData(byte) + * @deprecated Magic value + */ + @Deprecated + public static DyeColor getByDyeData(final byte data) { + int i = 0xff & data; + if (i >= BY_DYE_DATA.length) { + return null; + } + return BY_DYE_DATA[i]; + } + + /** + * Gets the DyeColor with the given color value. + * + * @param color Color value to get the dye by + * @return The {@link DyeColor} representing the given value, or null if + * it doesn't exist + */ + public static DyeColor getByColor(final Color color) { + return BY_COLOR.get(color); + } + + /** + * Gets the DyeColor with the given firework color value. + * + * @param color Color value to get dye by + * @return The {@link DyeColor} representing the given value, or null if + * it doesn't exist + */ + public static DyeColor getByFireworkColor(final Color color) { + return BY_FIREWORK.get(color); + } + + static { + BY_WOOL_DATA = values(); + BY_DYE_DATA = values(); + ImmutableMap.Builder byColor = ImmutableMap.builder(); + ImmutableMap.Builder byFirework = ImmutableMap.builder(); + + for (DyeColor color : values()) { + BY_WOOL_DATA[color.woolData & 0xff] = color; + BY_DYE_DATA[color.dyeData & 0xff] = color; + byColor.put(color.getColor(), color); + byFirework.put(color.getFireworkColor(), color); + } + + BY_COLOR = byColor.build(); + BY_FIREWORK = byFirework.build(); + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/Effect.java b/PaperSpigot-API/src/main/java/org/bukkit/Effect.java new file mode 100644 index 0000000..37f29e2 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/Effect.java @@ -0,0 +1,337 @@ +package org.bukkit; + +import java.util.Map; + +import com.google.common.collect.Maps; + +import org.bukkit.block.BlockFace; +import org.bukkit.material.MaterialData; +import org.bukkit.potion.Potion; + +/** + * A list of effects that the server is able to send to players. + */ +public enum Effect { + /** + * An alternate click sound. + */ + CLICK2(1000, Type.SOUND), + /** + * A click sound. + */ + CLICK1(1001, Type.SOUND), + /** + * Sound of a bow firing. + */ + BOW_FIRE(1002, Type.SOUND), + /** + * Sound of a door opening/closing. + */ + DOOR_TOGGLE(1003, Type.SOUND), + /** + * Sound of fire being extinguished. + */ + EXTINGUISH(1004, Type.SOUND), + /** + * A song from a record. Needs the record item ID as additional info + */ + RECORD_PLAY(1005, Type.SOUND, Material.class), + /** + * Sound of ghast shrieking. + */ + GHAST_SHRIEK(1007, Type.SOUND), + /** + * Sound of ghast firing. + */ + GHAST_SHOOT(1008, Type.SOUND), + /** + * Sound of blaze firing. + */ + BLAZE_SHOOT(1009, Type.SOUND), + /** + * Sound of zombies chewing on wooden doors. + */ + ZOMBIE_CHEW_WOODEN_DOOR(1010, Type.SOUND), + /** + * Sound of zombies chewing on iron doors. + */ + ZOMBIE_CHEW_IRON_DOOR(1011, Type.SOUND), + /** + * Sound of zombies destroying a door. + */ + ZOMBIE_DESTROY_DOOR(1012, Type.SOUND), + /** + * A visual smoke effect. Needs direction as additional info. + */ + SMOKE(2000, Type.VISUAL, BlockFace.class), + /** + * Sound of a block breaking. Needs block ID as additional info. + */ + STEP_SOUND(2001, Type.SOUND, Material.class), + /** + * Visual effect of a splash potion breaking. Needs potion data value as + * additional info. + */ + POTION_BREAK(2002, Type.VISUAL, Potion.class), + /** + * An ender eye signal; a visual effect. + */ + ENDER_SIGNAL(2003, Type.VISUAL), + /** + * The flames seen on a mobspawner; a visual effect. + */ + MOBSPAWNER_FLAMES(2004, Type.VISUAL), + /** + * The spark that comes off a fireworks + */ + FIREWORKS_SPARK("fireworksSpark", Type.PARTICLE), + /** + * Critical hit particles + */ + CRIT("crit", Type.PARTICLE), + /** + * Blue critical hit particles + */ + MAGIC_CRIT("magicCrit", Type.PARTICLE), + /** + * Multicolored potion effect particles + */ + POTION_SWIRL("mobSpell", Type.PARTICLE), + /** + * Multicolored potion effect particles that are slightly transparent + */ + POTION_SWIRL_TRANSPARENT("mobSpellAmbient", Type.PARTICLE), + /** + * A puff of white potion swirls + */ + SPELL("spell", Type.PARTICLE), + /** + * A puff of white stars + */ + INSTANT_SPELL("instantSpell", Type.PARTICLE), + /** + * A puff of purple particles + */ + WITCH_MAGIC("witchMagic", Type.PARTICLE), + /** + * The note that appears above note blocks + */ + NOTE("note", Type.PARTICLE), + /** + * The particles shown at nether portals + */ + PORTAL("portal", Type.PARTICLE), + /** + * The symbols that fly towards the enchantment table + */ + FLYING_GLYPH("enchantmenttable", Type.PARTICLE), + /** + * Fire particles + */ + FLAME("flame", Type.PARTICLE), + /** + * The particles that pop out of lava + */ + LAVA_POP("lava", Type.PARTICLE), + /** + * A small gray square + */ + FOOTSTEP("footstep", Type.PARTICLE), + /** + * Water particles + */ + SPLASH("splash", Type.PARTICLE), + /** + * Smoke particles + */ + PARTICLE_SMOKE("smoke", Type.PARTICLE), + /** + * The biggest explosion particle effect + */ + EXPLOSION_HUGE("hugeexplosion", Type.PARTICLE), + /** + * A larger version of the explode particle + */ + EXPLOSION_LARGE("largeexplode", Type.PARTICLE), + /** + * Explosion particles + */ + EXPLOSION("explode", Type.PARTICLE), + /** + * Small gray particles + */ + VOID_FOG("depthsuspend", Type.PARTICLE), + /** + * Small gray particles + */ + SMALL_SMOKE("townaura", Type.PARTICLE), + /** + * A puff of white smoke + */ + CLOUD("cloud", Type.PARTICLE), + /** + * Multicolored dust particles + */ + COLOURED_DUST("reddust", Type.PARTICLE), + /** + * Snowball breaking + */ + SNOWBALL_BREAK("snowballpoof", Type.PARTICLE), + /** + * The water drip particle that appears on blocks under water + */ + WATERDRIP("dripWater", Type.PARTICLE), + /** + * The lava drip particle that appears on blocks under lava + */ + LAVADRIP("dripLava", Type.PARTICLE), + /** + * White particles + */ + SNOW_SHOVEL("snowshovel", Type.PARTICLE), + /** + * The particle shown when a slime jumps + */ + SLIME("slime", Type.PARTICLE), + /** + * The particle that appears when breading animals + */ + HEART("heart", Type.PARTICLE), + /** + * The particle that appears when hitting a villager + */ + VILLAGER_THUNDERCLOUD("angryVillager", Type.PARTICLE), + /** + * The particle that appears when trading with a villager + */ + HAPPY_VILLAGER("happyVillager", Type.PARTICLE), + /** + * The smoke particles that appears on blazes, minecarts + * with furnaces and fire + */ + LARGE_SMOKE("largesmoke", Type.PARTICLE), + /** + * The particles generated when a tool breaks. + * This particle requires a Material so that the client can select the correct texture. + */ + ITEM_BREAK("iconcrack", Type.PARTICLE, Material.class), + /** + * The particles generated while breaking a block. + * This particle requires a Material and data value so that the client can select the correct texture. + */ + TILE_BREAK("blockcrack", Type.PARTICLE, MaterialData.class), + /** + * The particles generated while sprinting a block + * This particle requires a Material and data value so that the client can select the correct texture. + */ + TILE_DUST("blockdust", Type.PARTICLE, MaterialData.class); + + private final int id; + private final Type type; + private final Class data; + private static final Map BY_ID = Maps.newHashMap(); + private static final Map BY_NAME = Maps.newHashMap(); + private final String particleName; + + private Effect(int id, Type type) { + this(id,type,null); + } + + private Effect(int id, Type type, Class data) { + this.id = id; + this.type = type; + this.data = data; + particleName = null; + } + + private Effect(String particleName, Type type, Class data) { + this.particleName = particleName; + this.type = type; + id = 0; + this.data = data; + } + + private Effect(String particleName, Type type) { + this.particleName = particleName; + this.type = type; + id = 0; + this.data = null; + } + + /** + * Gets the ID for this effect. + * + * @return if this Effect isn't of type PARTICLE it returns ID of this effect + * @deprecated Magic value + */ + @Deprecated + public int getId() { + return this.id; + } + + /** + * Returns the effect's name. This returns null if the effect is not a particle + * + * @return The effect's name + */ + public String getName() { + return particleName; + } + + /** + * @return The type of the effect. + */ + public Type getType() { + return this.type; + } + + /** + * @return if this Effect isn't of type PARTICLE it returns the class which represents data for this effect, or null if none + */ + public Class getData() { + return this.data; + } + + /** + * Gets the Effect associated with the given ID. + * + * @param id ID of the Effect to return + * @return Effect with the given ID + * @deprecated Magic value + */ + @Deprecated + public static Effect getById(int id) { + return BY_ID.get(id); + } + + static { + for (Effect effect : values()) { + if (effect.type != Type.PARTICLE) { + BY_ID.put(effect.id, effect); + } + } + } + + /** + * Gets the Effect associated with the given name. + * + * @param name name of the Effect to return + * @return Effect with the given name + */ + public static Effect getByName(String name) { + return BY_NAME.get(name); + } + + static { + for (Effect effect : values()) { + if (effect.type == Type.PARTICLE) { + BY_NAME.put(effect.particleName, effect); + } + } + } + + /** + * Represents the type of an effect. + */ + public enum Type {SOUND, VISUAL, PARTICLE} +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/EntityEffect.java b/PaperSpigot-API/src/main/java/org/bukkit/EntityEffect.java new file mode 100644 index 0000000..ec7d1e3 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/EntityEffect.java @@ -0,0 +1,136 @@ +package org.bukkit; + +import java.util.Map; + +import com.google.common.collect.Maps; + +/** + * A list of all Effects that can happen to entities. + */ +public enum EntityEffect { + + /** + * When mobs get hurt. + */ + HURT(2), + + /** + * When a mob dies. + *

+ * This will cause client-glitches! + */ + DEATH(3), + + /** + * The smoke when taming a wolf fails. + *

+ * Without client-mods this will be ignored if the entity is not a wolf. + */ + WOLF_SMOKE(6), + + /** + * The hearts when taming a wolf succeeds. + *

+ * Without client-mods this will be ignored if the entity is not a wolf. + */ + WOLF_HEARTS(7), + + /** + * When a wolf shakes (after being wet). + *

+ * Without client-mods this will be ignored if the entity is not a wolf. + */ + WOLF_SHAKE(8), + + /** + * When a sheep eats a LONG_GRASS block. + */ + SHEEP_EAT(10), + + /** + * When an Iron Golem gives a rose. + *

+ * This will not play an effect if the entity is not an iron golem. + */ + IRON_GOLEM_ROSE(11), + + /** + * Hearts from a villager. + *

+ * This will not play an effect if the entity is not a villager. + */ + VILLAGER_HEART(12), + + /** + * When a villager is angry. + *

+ * This will not play an effect if the entity is not a villager. + */ + VILLAGER_ANGRY(13), + + /** + * Happy particles from a villager. + *

+ * This will not play an effect if the entity is not a villager. + */ + VILLAGER_HAPPY(14), + + /** + * Magic particles from a witch. + *

+ * This will not play an effect if the entity is not a witch. + */ + WITCH_MAGIC(15), + + /** + * When a zombie transforms into a villager by shaking violently. + *

+ * This will not play an effect if the entity is not a zombie. + */ + ZOMBIE_TRANSFORM(16), + + /** + * When a firework explodes. + *

+ * This will not play an effect if the entity is not a firework. + */ + FIREWORK_EXPLODE(17); + + private final byte data; + private final static Map BY_DATA = Maps.newHashMap(); + + EntityEffect(final int data) { + this.data = (byte) data; + } + + /** + * Gets the data value of this EntityEffect + * + * @return The data value + * @deprecated Magic value + */ + @Deprecated + public byte getData() { + return data; + } + + /** + * Gets the EntityEffect with the given data value + * + * @param data Data value to fetch + * @return The {@link EntityEffect} representing the given value, or null + * if it doesn't exist + * @deprecated Magic value + */ + @Deprecated + public static EntityEffect getByData(final byte data) { + return BY_DATA.get(data); + } + + + static { + for (EntityEffect entityEffect : values()) { + BY_DATA.put(entityEffect.data, entityEffect); + } + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/FireworkEffect.java b/PaperSpigot-API/src/main/java/org/bukkit/FireworkEffect.java new file mode 100644 index 0000000..6f2d096 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/FireworkEffect.java @@ -0,0 +1,421 @@ +package org.bukkit; + +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.Validate; +import org.bukkit.configuration.serialization.ConfigurationSerializable; +import org.bukkit.configuration.serialization.SerializableAs; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; + +/** + * Represents a single firework effect. + */ +@SerializableAs("Firework") +public final class FireworkEffect implements ConfigurationSerializable { + + /** + * The type or shape of the effect. + */ + public enum Type { + /** + * A small ball effect. + */ + BALL, + /** + * A large ball effect. + */ + BALL_LARGE, + /** + * A star-shaped effect. + */ + STAR, + /** + * A burst effect. + */ + BURST, + /** + * A creeper-face effect. + */ + CREEPER, + ; + } + + /** + * Construct a firework effect. + * + * @return A utility object for building a firework effect + */ + public static Builder builder() { + return new Builder(); + } + + /** + * This is a builder for FireworkEffects. + * + * @see FireworkEffect#builder() + */ + public static final class Builder { + boolean flicker = false; + boolean trail = false; + final ImmutableList.Builder colors = ImmutableList.builder(); + ImmutableList.Builder fadeColors = null; + Type type = Type.BALL; + + Builder() {} + + /** + * Specify the type of the firework effect. + * + * @param type The effect type + * @return This object, for chaining + * @throws IllegalArgumentException If type is null + */ + public Builder with(Type type) throws IllegalArgumentException { + Validate.notNull(type, "Cannot have null type"); + this.type = type; + return this; + } + + /** + * Add a flicker to the firework effect. + * + * @return This object, for chaining + */ + public Builder withFlicker() { + flicker = true; + return this; + } + + /** + * Set whether the firework effect should flicker. + * + * @param flicker true if it should flicker, false if not + * @return This object, for chaining + */ + public Builder flicker(boolean flicker) { + this.flicker = flicker; + return this; + } + + /** + * Add a trail to the firework effect. + * + * @return This object, for chaining + */ + public Builder withTrail() { + trail = true; + return this; + } + + /** + * Set whether the firework effect should have a trail. + * + * @param trail true if it should have a trail, false for no trail + * @return This object, for chaining + */ + public Builder trail(boolean trail) { + this.trail = trail; + return this; + } + + /** + * Add a primary color to the firework effect. + * + * @param color The color to add + * @return This object, for chaining + * @throws IllegalArgumentException If color is null + */ + public Builder withColor(Color color) throws IllegalArgumentException { + Validate.notNull(color, "Cannot have null color"); + + colors.add(color); + + return this; + } + + /** + * Add several primary colors to the firework effect. + * + * @param colors The colors to add + * @return This object, for chaining + * @throws IllegalArgumentException If colors is null + * @throws IllegalArgumentException If any color is null (may be + * thrown after changes have occurred) + */ + public Builder withColor(Color...colors) throws IllegalArgumentException { + Validate.notNull(colors, "Cannot have null colors"); + if (colors.length == 0) { + return this; + } + + ImmutableList.Builder list = this.colors; + for (Color color : colors) { + Validate.notNull(color, "Color cannot be null"); + list.add(color); + } + + return this; + } + + /** + * Add several primary colors to the firework effect. + * + * @param colors An iterable object whose iterator yields the desired + * colors + * @return This object, for chaining + * @throws IllegalArgumentException If colors is null + * @throws IllegalArgumentException If any color is null (may be + * thrown after changes have occurred) + */ + public Builder withColor(Iterable colors) throws IllegalArgumentException { + Validate.notNull(colors, "Cannot have null colors"); + + ImmutableList.Builder list = this.colors; + for (Object color : colors) { + if (!(color instanceof Color)) { + throw new IllegalArgumentException(color + " is not a Color in " + colors); + } + list.add((Color) color); + } + + return this; + } + + /** + * Add a fade color to the firework effect. + * + * @param color The color to add + * @return This object, for chaining + * @throws IllegalArgumentException If colors is null + * @throws IllegalArgumentException If any color is null (may be + * thrown after changes have occurred) + */ + public Builder withFade(Color color) throws IllegalArgumentException { + Validate.notNull(color, "Cannot have null color"); + + if (fadeColors == null) { + fadeColors = ImmutableList.builder(); + } + + fadeColors.add(color); + + return this; + } + + /** + * Add several fade colors to the firework effect. + * + * @param colors The colors to add + * @return This object, for chaining + * @throws IllegalArgumentException If colors is null + * @throws IllegalArgumentException If any color is null (may be + * thrown after changes have occurred) + */ + public Builder withFade(Color...colors) throws IllegalArgumentException { + Validate.notNull(colors, "Cannot have null colors"); + if (colors.length == 0) { + return this; + } + + ImmutableList.Builder list = this.fadeColors; + if (list == null) { + list = this.fadeColors = ImmutableList.builder(); + } + + for (Color color : colors) { + Validate.notNull(color, "Color cannot be null"); + list.add(color); + } + + return this; + } + + /** + * Add several fade colors to the firework effect. + * + * @param colors An iterable object whose iterator yields the desired + * colors + * @return This object, for chaining + * @throws IllegalArgumentException If colors is null + * @throws IllegalArgumentException If any color is null (may be + * thrown after changes have occurred) + */ + public Builder withFade(Iterable colors) throws IllegalArgumentException { + Validate.notNull(colors, "Cannot have null colors"); + + ImmutableList.Builder list = this.fadeColors; + if (list == null) { + list = this.fadeColors = ImmutableList.builder(); + } + + for (Object color : colors) { + if (!(color instanceof Color)) { + throw new IllegalArgumentException(color + " is not a Color in " + colors); + } + list.add((Color) color); + } + + return this; + } + + /** + * Create a {@link FireworkEffect} from the current contents of this + * builder. + *

+ * To successfully build, you must have specified at least one color. + * + * @return The representative firework effect + */ + public FireworkEffect build() { + return new FireworkEffect( + flicker, + trail, + colors.build(), + fadeColors == null ? ImmutableList.of() : fadeColors.build(), + type + ); + } + } + + private static final String FLICKER = "flicker"; + private static final String TRAIL = "trail"; + private static final String COLORS = "colors"; + private static final String FADE_COLORS = "fade-colors"; + private static final String TYPE = "type"; + + private final boolean flicker; + private final boolean trail; + private final ImmutableList colors; + private final ImmutableList fadeColors; + private final Type type; + private String string = null; + + FireworkEffect(boolean flicker, boolean trail, ImmutableList colors, ImmutableList fadeColors, Type type) { + if (colors.isEmpty()) { + throw new IllegalStateException("Cannot make FireworkEffect without any color"); + } + this.flicker = flicker; + this.trail = trail; + this.colors = colors; + this.fadeColors = fadeColors; + this.type = type; + } + + /** + * Get whether the firework effect flickers. + * + * @return true if it flickers, false if not + */ + public boolean hasFlicker() { + return flicker; + } + + /** + * Get whether the firework effect has a trail. + * + * @return true if it has a trail, false if not + */ + public boolean hasTrail() { + return trail; + } + + /** + * Get the primary colors of the firework effect. + * + * @return An immutable list of the primary colors + */ + public List getColors() { + return colors; + } + + /** + * Get the fade colors of the firework effect. + * + * @return An immutable list of the fade colors + */ + public List getFadeColors() { + return fadeColors; + } + + /** + * Get the type of the firework effect. + * + * @return The effect type + */ + public Type getType() { + return type; + } + + /** + * @see ConfigurationSerializable + */ + public static ConfigurationSerializable deserialize(Map map) { + Type type = Type.valueOf((String) map.get(TYPE)); + if (type == null) { + throw new IllegalArgumentException(map.get(TYPE) + " is not a valid Type"); + } + + return builder() + .flicker((Boolean) map.get(FLICKER)) + .trail((Boolean) map.get(TRAIL)) + .withColor((Iterable) map.get(COLORS)) + .withFade((Iterable) map.get(FADE_COLORS)) + .with(type) + .build(); + } + + public Map serialize() { + return ImmutableMap.of( + FLICKER, flicker, + TRAIL, trail, + COLORS, colors, + FADE_COLORS, fadeColors, + TYPE, type.name() + ); + } + + @Override + public String toString() { + final String string = this.string; + if (string == null) { + return this.string = "FireworkEffect:" + serialize(); + } + return string; + } + + @Override + public int hashCode() { + /** + * TRUE and FALSE as per boolean.hashCode() + */ + final int PRIME = 31, TRUE = 1231, FALSE = 1237; + int hash = 1; + hash = hash * PRIME + (flicker ? TRUE : FALSE); + hash = hash * PRIME + (trail ? TRUE : FALSE); + hash = hash * PRIME + type.hashCode(); + hash = hash * PRIME + colors.hashCode(); + hash = hash * PRIME + fadeColors.hashCode(); + return hash; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (!(obj instanceof FireworkEffect)) { + return false; + } + + FireworkEffect that = (FireworkEffect) obj; + return this.flicker == that.flicker + && this.trail == that.trail + && this.type == that.type + && this.colors.equals(that.colors) + && this.fadeColors.equals(that.fadeColors); + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/GameMode.java b/PaperSpigot-API/src/main/java/org/bukkit/GameMode.java new file mode 100644 index 0000000..f85ed0b --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/GameMode.java @@ -0,0 +1,66 @@ +package org.bukkit; + +import java.util.Map; + +import org.bukkit.entity.HumanEntity; + +import com.google.common.collect.Maps; + +/** + * Represents the various type of game modes that {@link HumanEntity}s may + * have + */ +public enum GameMode { + /** + * Creative mode may fly, build instantly, become invulnerable and create + * free items. + */ + CREATIVE(1), + + /** + * Survival mode is the "normal" gameplay type, with no special features. + */ + SURVIVAL(0), + + /** + * Adventure mode cannot break blocks without the correct tools. + */ + ADVENTURE(2); + + private final int value; + private final static Map BY_ID = Maps.newHashMap(); + + private GameMode(final int value) { + this.value = value; + } + + /** + * Gets the mode value associated with this GameMode + * + * @return An integer value of this gamemode + * @deprecated Magic value + */ + @Deprecated + public int getValue() { + return value; + } + + /** + * Gets the GameMode represented by the specified value + * + * @param value Value to check + * @return Associative {@link GameMode} with the given value, or null if + * it doesn't exist + * @deprecated Magic value + */ + @Deprecated + public static GameMode getByValue(final int value) { + return BY_ID.get(value); + } + + static { + for (GameMode mode : values()) { + BY_ID.put(mode.getValue(), mode); + } + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/GrassSpecies.java b/PaperSpigot-API/src/main/java/org/bukkit/GrassSpecies.java new file mode 100644 index 0000000..1111515 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/GrassSpecies.java @@ -0,0 +1,61 @@ +package org.bukkit; + +import java.util.Map; + +import com.google.common.collect.Maps; + +/** + * Represents the different types of grass. + */ +public enum GrassSpecies { + + /** + * Represents the dead looking grass. + */ + DEAD(0x0), + /** + * Represents the normal grass species. + */ + NORMAL(0x1), + /** + * Represents the fern-looking grass species. + */ + FERN_LIKE(0x2); + + private final byte data; + private final static Map BY_DATA = Maps.newHashMap(); + + private GrassSpecies(final int data) { + this.data = (byte) data; + } + + /** + * Gets the associated data value representing this species + * + * @return A byte containing the data value of this grass species + * @deprecated Magic value + */ + @Deprecated + public byte getData() { + return data; + } + + /** + * Gets the GrassSpecies with the given data value + * + * @param data Data value to fetch + * @return The {@link GrassSpecies} representing the given value, or null + * if it doesn't exist + * @deprecated Magic value + */ + @Deprecated + public static GrassSpecies getByData(final byte data) { + return BY_DATA.get(data); + } + + static { + for (GrassSpecies grassSpecies : values()) { + BY_DATA.put(grassSpecies.getData(), grassSpecies); + } + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/Instrument.java b/PaperSpigot-API/src/main/java/org/bukkit/Instrument.java new file mode 100644 index 0000000..891a2b1 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/Instrument.java @@ -0,0 +1,67 @@ +package org.bukkit; + +import java.util.Map; + +import com.google.common.collect.Maps; + +public enum Instrument { + + /** + * Piano is the standard instrument for a note block. + */ + PIANO(0x0), + /** + * Bass drum is normally played when a note block is on top of a + * stone-like block + */ + BASS_DRUM(0x1), + /** + * Snare drum is normally played when a note block is on top of a sandy + * block. + */ + SNARE_DRUM(0x2), + /** + * Sticks are normally played when a note block is on top of a glass + * block. + */ + STICKS(0x3), + /** + * Bass guitar is normally played when a note block is on top of a wooden + * block. + */ + BASS_GUITAR(0x4); + + private final byte type; + private final static Map BY_DATA = Maps.newHashMap(); + + private Instrument(final int type) { + this.type = (byte) type; + } + + /** + * @return The type ID of this instrument. + * @deprecated Magic value + */ + @Deprecated + public byte getType() { + return this.type; + } + + /** + * Get an instrument by its type ID. + * + * @param type The type ID + * @return The instrument + * @deprecated Magic value + */ + @Deprecated + public static Instrument getByType(final byte type) { + return BY_DATA.get(type); + } + + static { + for (Instrument instrument : Instrument.values()) { + BY_DATA.put(instrument.getType(), instrument); + } + } +} diff --git a/PaperSpigot-API/src/main/java/org/bukkit/Location.java b/PaperSpigot-API/src/main/java/org/bukkit/Location.java new file mode 100644 index 0000000..5c18507 --- /dev/null +++ b/PaperSpigot-API/src/main/java/org/bukkit/Location.java @@ -0,0 +1,560 @@ +package org.bukkit; + +import org.bukkit.block.Block; +import org.bukkit.util.NumberConversions; +import org.bukkit.util.Vector; + +/** + * Represents a 3-dimensional position in a world + */ +public class Location implements Cloneable { + private World world; + private double x; + private double y; + private double z; + private float pitch; + private float yaw; + + /** + * Constructs a new Location with the given coordinates + * + * @param world The world in which this location resides + * @param x The x-coordinate of this new location + * @param y The y-coordinate of this new location + * @param z The z-coordinate of this new location + */ + public Location(final World world, final double x, final double y, final double z) { + this(world, x, y, z, 0, 0); + } + + /** + * Constructs a new Location with the given coordinates and direction + * + * @param world The world in which this location resides + * @param x The x-coordinate of this new location + * @param y The y-coordinate of this new location + * @param z The z-coordinate of this new location + * @param yaw The absolute rotation on the x-plane, in degrees + * @param pitch The absolute rotation on the y-plane, in degrees + */ + public Location(final World world, final double x, final double y, final double z, final float yaw, final float pitch) { + this.world = world; + this.x = x; + this.y = y; + this.z = z; + this.pitch = pitch; + this.yaw = yaw; + } + + /** + * Sets the world that this location resides in + * + * @param world New world that this location resides in + */ + public void setWorld(World world) { + this.world = world; + } + + /** + * Gets the world that this location resides in + * + * @return World that contains this location + */ + public World getWorld() { + return world; + } + + /** + * Gets the chunk at the represented location + * + * @return Chunk at the represented location + */ + public Chunk getChunk() { + return world.getChunkAt(this); + } + + /** + * Gets the block at the represented location + * + * @return Block at the represented location + */ + public Block getBlock() { + return world.getBlockAt(this); + } + + /** + * Sets the x-coordinate of this location + * + * @param x X-coordinate + */ + public void setX(double x) { + this.x = x; + } + + /** + * Gets the x-coordinate of this location + * + * @return x-coordinate + */ + public double getX() { + return x; + } + + /** + * Gets the floored value of the X component, indicating the block that + * this location is contained with. + * + * @return block X + */ + public int getBlockX() { + return locToBlock(x); + } + + /** + * Sets the y-coordinate of this location + * + * @param y y-coordinate + */ + public void setY(double y) { + this.y = y; + } + + /** + * Gets the y-coordinate of this location + * + * @return y-coordinate + */ + public double getY() { + return y; + } + + /** + * Gets the floored value of the Y component, indicating the block that + * this location is contained with. + * + * @return block y + */ + public int getBlockY() { + return locToBlock(y); + } + + /** + * Sets the z-coordinate of this location + * + * @param z z-coordinate + */ + public void setZ(double z) { + this.z = z; + } + + /** + * Gets the z-coordinate of this location + * + * @return z-coordinate + */ + public double getZ() { + return z; + } + + /** + * Gets the floored value of the Z component, indicating the block that + * this location is contained with. + * + * @return block z + */ + public int getBlockZ() { + return locToBlock(z); + } + + /** + * Sets the yaw of this location, measured in degrees. + *

    + *
  • A yaw of 0 or 360 represents the positive z direction. + *
  • A yaw of 180 represents the negative z direction. + *
  • A yaw of 90 represents the negative x direction. + *
  • A yaw of 270 represents the positive x direction. + *
+ * Increasing yaw values are the equivalent of turning to your + * right-facing, increasing the scale of the next respective axis, and + * decreasing the scale of the previous axis. + * + * @param yaw new rotation's yaw + */ + public void setYaw(float yaw) { + this.yaw = yaw; + } + + /** + * Gets the yaw of this location, measured in degrees. + *
    + *
  • A yaw of 0 or 360 represents the positive z direction. + *
  • A yaw of 180 represents the negative z direction. + *
  • A yaw of 90 represents the negative x direction. + *
  • A yaw of 270 represents the positive x direction. + *
+ * Increasing yaw values are the equivalent of turning to your + * right-facing, increasing the scale of the next respective axis, and + * decreasing the scale of the previous axis. + * + * @return the rotation's yaw + */ + public float getYaw() { + return yaw; + } + + /** + * Sets the pitch of this location, measured in degrees. + *