├── .checkstyle ├── .gitattributes ├── .gitignore ├── .gitmodules ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE ├── LICENSE-AGPL ├── LICENSE-MIT ├── README.md ├── ap ├── build.gradle └── src │ └── main │ ├── java │ └── blue │ │ └── lapis │ │ └── pore │ │ └── ap │ │ └── event │ │ └── EventProcessor.java │ └── resources │ └── META-INF │ └── services │ └── javax.annotation.processing.Processor ├── build.gradle ├── bukkit.gradle ├── etc ├── checkstyle-suppressions.xml ├── checkstyle.xml ├── formatted-license.txt ├── poredev ├── poredev.bat ├── progress.sh └── update_porekit ├── gradle ├── deploy.gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── patches ├── 0001-Disable-Spigot-version-check.patch ├── 0002-Remove-final-from-event-getters.patch ├── 0003-Add-HandlerList-adapters.patch ├── 0004-Make-events-properly-initialisable.patch ├── 0005-Add-method-to-get-EntityType-from-Class.patch ├── 0006-Disable-reload-command.patch ├── 0007-Remove-plugin-prefixes-and-use-normal-logger-instead.patch ├── 0008-Add-Reflection-Remapping-Support.patch ├── 0009-Add-missing-GameMode-used-by-FakePlayers-in-Bukkit-A.patch ├── 0010-Add-ability-to-add-materials-to-Material-thx-Cauldro.patch └── LICENCE.txt ├── settings.gradle └── src ├── event ├── README.md └── java │ └── blue │ └── lapis │ └── pore │ └── impl │ └── event │ ├── block │ ├── PoreBlockCanBuildEvent.java │ ├── PoreBlockDamageEvent.java │ ├── PoreBlockDispenseEvent.java │ ├── PoreBlockExpEvent.java │ ├── PoreBlockExplodeEvent.java │ ├── PoreBlockFadeEvent.java │ ├── PoreBlockFormEvent.java │ ├── PoreBlockIgniteEvent.java │ ├── PoreBlockMultiPlaceEvent.java │ ├── PoreBlockPhysicsEvent.java │ ├── PoreBlockSpreadEvent.java │ ├── PoreEntityBlockFormEvent.java │ └── PoreNotePlayEvent.java │ ├── enchantment │ ├── PoreEnchantItemEvent.java │ └── PorePrepareItemEnchantEvent.java │ ├── entity │ ├── PoreCreeperPowerEvent.java │ ├── PoreEntityBreakDoorEvent.java │ ├── PoreEntityCombustByBlockEvent.java │ ├── PoreEntityCreatePortalEvent.java │ ├── PoreEntityDamageByBlockEvent.java │ ├── PoreEntityPortalEnterEvent.java │ ├── PoreEntityPortalEvent.java │ ├── PoreEntityPortalExitEvent.java │ ├── PoreEntityRegainHealthEvent.java │ ├── PoreEntityShootBowEvent.java │ ├── PoreEntityTameEvent.java │ ├── PoreEntityTargetEvent.java │ ├── PoreEntityTargetLivingEntityEvent.java │ ├── PoreEntityTeleportEvent.java │ ├── PoreEntityUnleashEvent.java │ ├── PoreExpBottleEvent.java │ ├── PoreFireworkExplodeEvent.java │ ├── PoreFoodLevelChangeEvent.java │ ├── PoreHorseJumpEvent.java │ ├── PoreItemDespawnEvent.java │ ├── PoreItemMergeEvent.java │ ├── PoreItemSpawnEvent.java │ ├── PorePigZapEvent.java │ ├── PoreProjectileLaunchEvent.java │ ├── PoreSheepDyeWoolEvent.java │ ├── PoreSheepRegrowWoolEvent.java │ └── PoreSlimeSplitEvent.java │ ├── hanging │ ├── PoreHangingBreakByEntityEvent.java │ ├── PoreHangingBreakEvent.java │ └── PoreHangingPlaceEvent.java │ ├── inventory │ ├── PoreCraftItemEvent.java │ ├── PoreInventoryMoveItemEvent.java │ ├── PoreInventoryPickupItemEvent.java │ └── PorePrepareItemCraftEvent.java │ ├── player │ ├── PoreAsyncPlayerPreLoginEvent.java │ ├── PorePlayerAchievementAwardedEvent.java │ ├── PorePlayerAnimationEvent.java │ ├── PorePlayerArmorStandManipulateEvent.java │ ├── PorePlayerBedEnterEvent.java │ ├── PorePlayerBedLeaveEvent.java │ ├── PorePlayerBucketEmptyEvent.java │ ├── PorePlayerBucketFillEvent.java │ ├── PorePlayerDropItemEvent.java │ ├── PorePlayerEditBookEvent.java │ ├── PorePlayerEggThrowEvent.java │ ├── PorePlayerExpChangeEvent.java │ ├── PorePlayerFishEvent.java │ ├── PorePlayerGameModeChangeEvent.java │ ├── PorePlayerInteractAtEntityEvent.java │ ├── PorePlayerInteractEntityEvent.java │ ├── PorePlayerInventoryEvent.java │ ├── PorePlayerItemBreakEvent.java │ ├── PorePlayerItemConsumeEvent.java │ ├── PorePlayerItemHeldEvent.java │ ├── PorePlayerKickEvent.java │ ├── PorePlayerLevelChangeEvent.java │ ├── PorePlayerLoginEvent.java │ ├── PorePlayerPickupItemEvent.java │ ├── PorePlayerPortalEvent.java │ ├── PorePlayerPreLoginEvent.java │ ├── PorePlayerRegisterChannelEvent.java │ ├── PorePlayerResourcePackStatusEvent.java │ ├── PorePlayerShearEntityEvent.java │ ├── PorePlayerStatisticIncrementEvent.java │ ├── PorePlayerTeleportEvent.java │ ├── PorePlayerToggleFlightEvent.java │ ├── PorePlayerToggleSneakEvent.java │ ├── PorePlayerToggleSprintEvent.java │ ├── PorePlayerUnleashEntityEvent.java │ ├── PorePlayerUnregisterChannelEvent.java │ └── PorePlayerVelocityEvent.java │ ├── server │ ├── PoreMapInitializeEvent.java │ ├── PoreRemoteServerCommandEvent.java │ ├── PoreServiceRegisterEvent.java │ └── PoreServiceUnregisterEvent.java │ ├── vehicle │ ├── PoreVehicleBlockCollisionEvent.java │ ├── PoreVehicleCreateEvent.java │ ├── PoreVehicleDamageEvent.java │ ├── PoreVehicleDestroyEvent.java │ ├── PoreVehicleEnterEvent.java │ ├── PoreVehicleEntityCollisionEvent.java │ ├── PoreVehicleExitEvent.java │ ├── PoreVehicleMoveEvent.java │ └── PoreVehicleUpdateEvent.java │ ├── weather │ ├── PoreLightningStrikeEvent.java │ ├── PoreThunderChangeEvent.java │ └── PoreWeatherChangeEvent.java │ └── world │ ├── PoreChunkPopulateEvent.java │ ├── PorePortalCreateEvent.java │ ├── PoreSpawnChangeEvent.java │ ├── PoreStructureGrowEvent.java │ └── PoreWorldInitEvent.java ├── main ├── java │ ├── blue │ │ └── lapis │ │ │ └── pore │ │ │ ├── Pore.java │ │ │ ├── PoreVersion.java │ │ │ ├── command │ │ │ └── PoreCommandCallable.java │ │ │ ├── converter │ │ │ ├── data │ │ │ │ ├── AbstractDataValue.java │ │ │ │ ├── DataConverter.java │ │ │ │ ├── DataTypeConverter.java │ │ │ │ └── block │ │ │ │ │ ├── BlockDataConverter.java │ │ │ │ │ └── type │ │ │ │ │ ├── BigMushroomDataConverter.java │ │ │ │ │ ├── BrickDataConverter.java │ │ │ │ │ ├── Leaves2DataConverter.java │ │ │ │ │ ├── LeavesDataConverter.java │ │ │ │ │ ├── Log2DataConverter.java │ │ │ │ │ ├── LogDataConverter.java │ │ │ │ │ └── PlanksDataConverter.java │ │ │ ├── modifier │ │ │ │ └── DamageModifierConverter.java │ │ │ ├── type │ │ │ │ ├── TypeConverter.java │ │ │ │ ├── attribute │ │ │ │ │ ├── EventResultConverter.java │ │ │ │ │ └── InventoryTypeConverter.java │ │ │ │ ├── cause │ │ │ │ │ ├── DamageCauseConverter.java │ │ │ │ │ └── SpawnReasonConverter.java │ │ │ │ ├── entity │ │ │ │ │ ├── EntityConverter.java │ │ │ │ │ ├── HorseConverter.java │ │ │ │ │ ├── LlamaConverter.java │ │ │ │ │ ├── OcelotConverter.java │ │ │ │ │ ├── PoreElderGuardian.java │ │ │ │ │ ├── ProfessionConverter.java │ │ │ │ │ ├── RabbitConverter.java │ │ │ │ │ ├── SkeletonConverter.java │ │ │ │ │ └── player │ │ │ │ │ │ ├── GameModeConverter.java │ │ │ │ │ │ └── HandTypeConverter.java │ │ │ │ ├── material │ │ │ │ │ ├── ArtConverter.java │ │ │ │ │ ├── DurabilityConverter.java │ │ │ │ │ ├── DyeColorConverter.java │ │ │ │ │ ├── ItemStackConverter.java │ │ │ │ │ ├── MaterialConverter.java │ │ │ │ │ ├── PotionEffectConverter.java │ │ │ │ │ └── PotionEffectTypeConverter.java │ │ │ │ ├── plugin │ │ │ │ │ └── EventPriorityConverter.java │ │ │ │ ├── scoreboard │ │ │ │ │ ├── DisplaySlotConverter.java │ │ │ │ │ ├── NameTagVisibilityConverter.java │ │ │ │ │ └── OptionStatusConverter.java │ │ │ │ ├── statistic │ │ │ │ │ ├── AchievementConverter.java │ │ │ │ │ └── StatisticConverter.java │ │ │ │ └── world │ │ │ │ │ ├── BiomeConverter.java │ │ │ │ │ ├── DifficultyConverter.java │ │ │ │ │ ├── DirectionConverter.java │ │ │ │ │ ├── EnvironmentConverter.java │ │ │ │ │ ├── GeneratorTypeConverter.java │ │ │ │ │ ├── RotationConverter.java │ │ │ │ │ ├── WorldArchetypeConverter.java │ │ │ │ │ └── effect │ │ │ │ │ ├── EffectConverter.java │ │ │ │ │ ├── NoteConverter.java │ │ │ │ │ ├── ParticleConverter.java │ │ │ │ │ ├── SoundCategoryConverter.java │ │ │ │ │ └── SoundConverter.java │ │ │ ├── vector │ │ │ │ ├── EulerAngleConverter.java │ │ │ │ ├── LocationConverter.java │ │ │ │ └── VectorConverter.java │ │ │ └── wrapper │ │ │ │ ├── CachedWrapperConverter.java │ │ │ │ ├── WrapperConverter.java │ │ │ │ └── world │ │ │ │ ├── BiomeVolumeWrapper.java │ │ │ │ └── ChunkGeneratorWrapper.java │ │ │ ├── event │ │ │ ├── EventConstructor.java │ │ │ ├── PoreEvent.java │ │ │ ├── PoreEventCache.java │ │ │ ├── PoreEventRegistry.java │ │ │ ├── PoreEventWrapper.java │ │ │ ├── RegisterEvent.java │ │ │ ├── RegisteredPoreEvent.java │ │ │ ├── Source.java │ │ │ ├── SpongeEvent.java │ │ │ └── SpongeEventHandler.java │ │ │ ├── impl │ │ │ ├── PoreBanEntry.java │ │ │ ├── PoreBanList.java │ │ │ ├── PoreBlockChangeDelegate.java │ │ │ ├── PoreChunk.java │ │ │ ├── PoreChunkSnapshot.java │ │ │ ├── PoreIpBanList.java │ │ │ ├── PoreOfflinePlayer.java │ │ │ ├── PoreServer.java │ │ │ ├── PoreUnsafeValues.java │ │ │ ├── PoreUserBanList.java │ │ │ ├── PoreWorld.java │ │ │ ├── PoreWorldBorder.java │ │ │ ├── block │ │ │ │ ├── PoreBanner.java │ │ │ │ ├── PoreBeacon.java │ │ │ │ ├── PoreBlock.java │ │ │ │ ├── PoreBlockState.java │ │ │ │ ├── PoreBrewingStand.java │ │ │ │ ├── PoreChest.java │ │ │ │ ├── PoreCommandBlock.java │ │ │ │ ├── PoreContainer.java │ │ │ │ ├── PoreCreatureSpawner.java │ │ │ │ ├── PoreDispenser.java │ │ │ │ ├── PoreDropper.java │ │ │ │ ├── PoreFlowerPot.java │ │ │ │ ├── PoreFurnace.java │ │ │ │ ├── PoreHopper.java │ │ │ │ ├── PoreJukebox.java │ │ │ │ ├── PoreNoteBlock.java │ │ │ │ ├── PoreShulkerBox.java │ │ │ │ ├── PoreSign.java │ │ │ │ └── PoreSkull.java │ │ │ ├── command │ │ │ │ ├── PoreBlockCommandSender.java │ │ │ │ ├── PoreCommandMap.java │ │ │ │ ├── PoreCommandSender.java │ │ │ │ ├── PoreConsoleCommandSender.java │ │ │ │ └── PoreRemoteConsoleCommandSender.java │ │ │ ├── conversations │ │ │ │ ├── PoreConversable.java │ │ │ │ ├── PoreConversationAbandonedListener.java │ │ │ │ ├── PoreConversationCanceller.java │ │ │ │ ├── PoreConversationPrefix.java │ │ │ │ └── PorePrompt.java │ │ │ ├── enchantments │ │ │ │ └── PoreEnchantment.java │ │ │ ├── entity │ │ │ │ ├── PoreAbstractHorse.java │ │ │ │ ├── PoreAgeable.java │ │ │ │ ├── PoreAmbient.java │ │ │ │ ├── PoreAnimalTamer.java │ │ │ │ ├── PoreAnimals.java │ │ │ │ ├── PoreAreaEffectCloud.java │ │ │ │ ├── PoreArmorStand.java │ │ │ │ ├── PoreArrow.java │ │ │ │ ├── PoreBat.java │ │ │ │ ├── PoreBlaze.java │ │ │ │ ├── PoreBoat.java │ │ │ │ ├── PoreCaveSpider.java │ │ │ │ ├── PoreChestedHorse.java │ │ │ │ ├── PoreChicken.java │ │ │ │ ├── PoreComplexEntityPart.java │ │ │ │ ├── PoreComplexLivingEntity.java │ │ │ │ ├── PoreCow.java │ │ │ │ ├── PoreCreature.java │ │ │ │ ├── PoreCreeper.java │ │ │ │ ├── PoreDonkey.java │ │ │ │ ├── PoreDragonFireball.java │ │ │ │ ├── PoreEgg.java │ │ │ │ ├── PoreEnderCrystal.java │ │ │ │ ├── PoreEnderDragon.java │ │ │ │ ├── PoreEnderDragonPart.java │ │ │ │ ├── PoreEnderPearl.java │ │ │ │ ├── PoreEnderSignal.java │ │ │ │ ├── PoreEnderman.java │ │ │ │ ├── PoreEndermite.java │ │ │ │ ├── PoreEntity.java │ │ │ │ ├── PoreEvoker.java │ │ │ │ ├── PoreExperienceOrb.java │ │ │ │ ├── PoreFallingBlock.java │ │ │ │ ├── PoreFireball.java │ │ │ │ ├── PoreFirework.java │ │ │ │ ├── PoreFishHook.java │ │ │ │ ├── PoreFlying.java │ │ │ │ ├── PoreGhast.java │ │ │ │ ├── PoreGiant.java │ │ │ │ ├── PoreGolem.java │ │ │ │ ├── PoreGuardian.java │ │ │ │ ├── PoreHanging.java │ │ │ │ ├── PoreHorse.java │ │ │ │ ├── PoreHumanEntity.java │ │ │ │ ├── PoreHusk.java │ │ │ │ ├── PoreIronGolem.java │ │ │ │ ├── PoreItem.java │ │ │ │ ├── PoreItemFrame.java │ │ │ │ ├── PoreLargeFireball.java │ │ │ │ ├── PoreLeashHitch.java │ │ │ │ ├── PoreLightningStrike.java │ │ │ │ ├── PoreLivingEntity.java │ │ │ │ ├── PoreLlama.java │ │ │ │ ├── PoreLlamaSpit.java │ │ │ │ ├── PoreMagmaCube.java │ │ │ │ ├── PoreMonster.java │ │ │ │ ├── PoreMule.java │ │ │ │ ├── PoreMushroomCow.java │ │ │ │ ├── PoreOcelot.java │ │ │ │ ├── PorePainting.java │ │ │ │ ├── PorePig.java │ │ │ │ ├── PorePigZombie.java │ │ │ │ ├── PorePlayer.java │ │ │ │ ├── PorePolarBear.java │ │ │ │ ├── PoreProjectile.java │ │ │ │ ├── PoreRabbit.java │ │ │ │ ├── PoreSheep.java │ │ │ │ ├── PoreShulker.java │ │ │ │ ├── PoreShulkerBullet.java │ │ │ │ ├── PoreSilverfish.java │ │ │ │ ├── PoreSkeleton.java │ │ │ │ ├── PoreSkeletonHorse.java │ │ │ │ ├── PoreSlime.java │ │ │ │ ├── PoreSmallFireball.java │ │ │ │ ├── PoreSnowball.java │ │ │ │ ├── PoreSnowman.java │ │ │ │ ├── PoreSpider.java │ │ │ │ ├── PoreSquid.java │ │ │ │ ├── PoreStray.java │ │ │ │ ├── PoreTNTPrimed.java │ │ │ │ ├── PoreTameable.java │ │ │ │ ├── PoreThrownExpBottle.java │ │ │ │ ├── PoreThrownPotion.java │ │ │ │ ├── PoreVehicle.java │ │ │ │ ├── PoreVex.java │ │ │ │ ├── PoreVillager.java │ │ │ │ ├── PoreVindicator.java │ │ │ │ ├── PoreWaterMob.java │ │ │ │ ├── PoreWeather.java │ │ │ │ ├── PoreWitch.java │ │ │ │ ├── PoreWither.java │ │ │ │ ├── PoreWitherSkeleton.java │ │ │ │ ├── PoreWitherSkull.java │ │ │ │ ├── PoreWolf.java │ │ │ │ ├── PoreZombie.java │ │ │ │ ├── PoreZombieHorse.java │ │ │ │ ├── PoreZombieVillager.java │ │ │ │ └── minecart │ │ │ │ │ ├── PoreCommandMinecart.java │ │ │ │ │ ├── PoreExplosiveMinecart.java │ │ │ │ │ ├── PoreHopperMinecart.java │ │ │ │ │ ├── PoreMinecart.java │ │ │ │ │ ├── PorePoweredMinecart.java │ │ │ │ │ ├── PoreRideableMinecart.java │ │ │ │ │ ├── PoreSpawnerMinecart.java │ │ │ │ │ └── PoreStorageMinecart.java │ │ │ ├── event │ │ │ │ ├── block │ │ │ │ │ ├── PoreBlockBreakEvent.java │ │ │ │ │ ├── PoreBlockBurnEvent.java │ │ │ │ │ ├── PoreBlockFromToEvent.java │ │ │ │ │ ├── PoreBlockGrowEvent.java │ │ │ │ │ ├── PoreBlockPistonExtendEvent.java │ │ │ │ │ ├── PoreBlockPistonRetractEvent.java │ │ │ │ │ ├── PoreBlockPlaceEvent.java │ │ │ │ │ ├── PoreBlockRedstoneEvent.java │ │ │ │ │ ├── PoreLeavesDecayEvent.java │ │ │ │ │ └── PoreSignChangeEvent.java │ │ │ │ ├── entity │ │ │ │ │ ├── PoreCreatureSpawnEvent.java │ │ │ │ │ ├── PoreEntityChangeBlockEvent.java │ │ │ │ │ ├── PoreEntityCombustByEntityEvent.java │ │ │ │ │ ├── PoreEntityCombustEvent.java │ │ │ │ │ ├── PoreEntityDamageByEntityEvent.java │ │ │ │ │ ├── PoreEntityDamageEvent.java │ │ │ │ │ ├── PoreEntityDeathEvent.java │ │ │ │ │ ├── PoreEntityExplodeEvent.java │ │ │ │ │ ├── PoreEntityInteractEvent.java │ │ │ │ │ ├── PoreExplosionPrimeEvent.java │ │ │ │ │ ├── PorePlayerDeathEvent.java │ │ │ │ │ ├── PorePlayerLeashEntityEvent.java │ │ │ │ │ ├── PorePotionSplashEvent.java │ │ │ │ │ └── PoreProjectileHitEvent.java │ │ │ │ ├── inventory │ │ │ │ │ ├── PoreBrewEvent.java │ │ │ │ │ ├── PoreFurnaceBurnEvent.java │ │ │ │ │ ├── PoreFurnaceExtractEvent.java │ │ │ │ │ ├── PoreFurnaceSmeltEvent.java │ │ │ │ │ ├── PoreInventoryClickEvent.java │ │ │ │ │ ├── PoreInventoryCloseEvent.java │ │ │ │ │ ├── PoreInventoryCreativeEvent.java │ │ │ │ │ ├── PoreInventoryDragEvent.java │ │ │ │ │ ├── PoreInventoryInteractEvent.java │ │ │ │ │ └── PoreInventoryOpenEvent.java │ │ │ │ ├── player │ │ │ │ │ ├── PoreAsyncPlayerChatEvent.java │ │ │ │ │ ├── PorePlayerChangedWorldEvent.java │ │ │ │ │ ├── PorePlayerChatEvent.java │ │ │ │ │ ├── PorePlayerChatTabCompleteEvent.java │ │ │ │ │ ├── PorePlayerCommandPreprocessEvent.java │ │ │ │ │ ├── PorePlayerInteractEvent.java │ │ │ │ │ ├── PorePlayerJoinEvent.java │ │ │ │ │ ├── PorePlayerMoveEvent.java │ │ │ │ │ ├── PorePlayerQuitEvent.java │ │ │ │ │ ├── PorePlayerRegisterChannelEvent.java │ │ │ │ │ └── PorePlayerRespawnEvent.java │ │ │ │ ├── server │ │ │ │ │ ├── PoreServerCommandEvent.java │ │ │ │ │ ├── PoreServerListPingEvent.java │ │ │ │ │ └── PoreTabCompleteEvent.java │ │ │ │ └── world │ │ │ │ │ ├── PoreChunkLoadEvent.java │ │ │ │ │ ├── PoreChunkUnloadEvent.java │ │ │ │ │ ├── PoreWorldLoadEvent.java │ │ │ │ │ ├── PoreWorldSaveEvent.java │ │ │ │ │ └── PoreWorldUnloadEvent.java │ │ │ ├── generator │ │ │ │ └── PoreChunkData.java │ │ │ ├── help │ │ │ │ └── PoreHelpMap.java │ │ │ ├── inventory │ │ │ │ ├── ItemStackIterator.java │ │ │ │ ├── PoreAnvilInventory.java │ │ │ │ ├── PoreBeaconInventory.java │ │ │ │ ├── PoreBrewerInventory.java │ │ │ │ ├── PoreCraftingInventory.java │ │ │ │ ├── PoreDoubleChestInventory.java │ │ │ │ ├── PoreEnchantingInventory.java │ │ │ │ ├── PoreEntityEquipment.java │ │ │ │ ├── PoreFurnaceInventory.java │ │ │ │ ├── PoreHorseInventory.java │ │ │ │ ├── PoreInventory.java │ │ │ │ ├── PoreInventoryHolder.java │ │ │ │ ├── PoreInventoryView.java │ │ │ │ ├── PoreItemFactory.java │ │ │ │ ├── PoreItemStack.java │ │ │ │ ├── PoreMerchantInventory.java │ │ │ │ ├── PorePlayerInventory.java │ │ │ │ ├── PoreRecipe.java │ │ │ │ └── meta │ │ │ │ │ ├── PoreBannerMeta.java │ │ │ │ │ ├── PoreBookMeta.java │ │ │ │ │ ├── PoreEnchantmentStorageMeta.java │ │ │ │ │ ├── PoreFireworkMeta.java │ │ │ │ │ ├── PoreItemMeta.java │ │ │ │ │ ├── PoreLeatherArmorMeta.java │ │ │ │ │ ├── PoreMapMeta.java │ │ │ │ │ ├── PorePotionMeta.java │ │ │ │ │ └── PoreSkullMeta.java │ │ │ ├── map │ │ │ │ ├── PoreMapCanvas.java │ │ │ │ ├── PoreMapRenderer.java │ │ │ │ └── PoreMapView.java │ │ │ ├── metadata │ │ │ │ └── PoreMetadataStore.java │ │ │ ├── permissions │ │ │ │ └── PorePermissible.java │ │ │ ├── potion │ │ │ │ └── PorePotionBrewer.java │ │ │ ├── projectiles │ │ │ │ └── PoreBlockProjectileSource.java │ │ │ ├── scheduler │ │ │ │ ├── PoreBukkitScheduler.java │ │ │ │ ├── PoreBukkitTask.java │ │ │ │ ├── PoreBukkitWorker.java │ │ │ │ └── PoreFuture.java │ │ │ ├── scoreboard │ │ │ │ ├── PoreObjective.java │ │ │ │ ├── PoreScore.java │ │ │ │ ├── PoreScoreboard.java │ │ │ │ ├── PoreScoreboardManager.java │ │ │ │ └── PoreTeam.java │ │ │ └── util │ │ │ │ └── PoreCachedServerIcon.java │ │ │ ├── launch │ │ │ ├── PoreBootstrap.java │ │ │ └── PoreEventManager.java │ │ │ ├── lib │ │ │ └── org │ │ │ │ └── slf4j │ │ │ │ └── bridge │ │ │ │ └── SLF4JBridgeHandler.java │ │ │ ├── mixin │ │ │ ├── net │ │ │ │ └── minecraft │ │ │ │ │ ├── block │ │ │ │ │ └── MixinBlockButton.java │ │ │ │ │ ├── entity │ │ │ │ │ └── player │ │ │ │ │ │ └── MixinEntityPlayerMP.java │ │ │ │ │ ├── item │ │ │ │ │ └── MixinItemStack.java │ │ │ │ │ └── network │ │ │ │ │ ├── MixinNetHandlerPlayServer.java │ │ │ │ │ └── MixinNetworkManager.java │ │ │ └── org │ │ │ │ ├── apache │ │ │ │ └── commons │ │ │ │ │ └── lang3 │ │ │ │ │ └── MixinNotImplementedException.java │ │ │ │ └── bukkit │ │ │ │ └── plugin │ │ │ │ └── messaging │ │ │ │ └── MixinStandardMessenger.java │ │ │ ├── plugin │ │ │ └── PorePluginContainer.java │ │ │ ├── util │ │ │ ├── InfoMain.java │ │ │ ├── PoreCollections.java │ │ │ ├── PoreText.java │ │ │ ├── PoreWrapper.java │ │ │ ├── ProjectileUtil.java │ │ │ ├── classloader │ │ │ │ ├── LocalClassLoader.java │ │ │ │ ├── LocalClassLoaders.java │ │ │ │ ├── LocalReflectClassLoader.java │ │ │ │ └── PoreClassLoader.java │ │ │ └── constructor │ │ │ └── vault │ │ │ ├── PoreVaultChat.java │ │ │ ├── PoreVaultEconomy.java │ │ │ ├── PoreVaultHook.java │ │ │ ├── PoreVaultInjector.java │ │ │ └── PoreVaultPermissions.java │ └── org │ │ ├── bstats │ │ └── sponge │ │ │ └── Metrics.java │ │ └── spigotmc │ │ ├── LimitStream.java │ │ ├── SneakyThrow.java │ │ └── SpigotConfig.java └── resources │ ├── configurations │ ├── bukkit.yml │ ├── commands.yml │ └── help.yml │ ├── log4j2.xml │ ├── mixins.pore.bukkit.json │ ├── mixins.pore.core.json │ ├── mixins.pore.lib.json │ └── remap.txt └── test └── java └── blue └── lapis └── pore ├── PoreTests.java ├── converter ├── data │ └── block │ │ └── type │ │ ├── BTDCTestUtil.java │ │ └── BlockTypeDataConverterTest.java ├── type │ └── TypeConverterTest.java └── wrapper │ └── WrapperConverterTest.java ├── impl ├── WorldEntitiesTest.java ├── block │ └── PoreBlockTest.java ├── entity │ └── PoreEntityTest.java └── event │ ├── PoreEventImplTest.java │ └── PoreEventTest.java └── test └── IgnoreResult.java /.checkstyle: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.bat text eol=crlf 3 | gradlew text eol=lf 4 | *.sh text eol=lf 5 | 6 | ################# 7 | ## Java 8 | ################# 9 | *.java text 10 | *.java diff=java -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/Bukkit"] 2 | path = lib/Bukkit 3 | url = https://hub.spigotmc.org/stash/scm/spigot/bukkit.git 4 | [submodule "lib/ReflectionRemapper"] 5 | path = lib/ReflectionRemapper 6 | url = https://git.coding.net/IceSoulHanxi/ReflectionRemapper.git 7 | [submodule "lib/SpongeRemapping"] 8 | path = lib/SpongeRemapping 9 | url = https://git.coding.net/IceSoulHanxi/SpongeRemapping.git 10 | [submodule "lib/Spigot"] 11 | path = lib/Spigot 12 | url = https://hub.spigotmc.org/stash/scm/spigot/spigot.git 13 | [submodule "lib/Paper"] 14 | path = lib/Paper 15 | url = https://git.coding.net/IceSoulHanxi/Paper.git 16 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: java 4 | jdk: 5 | - oraclejdk8 6 | #- openjdk8 7 | 8 | before_install: 9 | - git config --global user.name "Lapislazuli" 10 | - git config --global user.email "lapislazuli@lapis.blue" 11 | 12 | env: 13 | global: 14 | - LAPIS_DEPLOY=https://github.com/LapisBlue/Deploy.git DEPLOY_ROOT=/tmp/lapis/deploy 15 | - secure: "zjPKbHmJf/XmRRdfsfCVSwXA0V6nzuqGwZeEi95UVTBuGANklLh47k2ChuX94E9sx9ZoaGcJoiruAEZ0Bke2iObLP/n1uzZvf+rWBBfkx4Q0D1s19hq7NraKUOWfvD+CC9b9MBfulYFaXek56udbE7HZsLQgOryogm4D68vg+oE=" 16 | 17 | after_success: ./etc/update_porekit 18 | 19 | notifications: 20 | email: false 21 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing 2 | ============ 3 | 4 | Requirements 5 | ------------ 6 | At stage in development Pore's contribution guidelines are fairly loose, though this is subject to change as development 7 | progresses. Currently, the only criteria are that contributions compile, and that they adhere to Pore's goals as a 8 | project: 9 | - Pore should serve only as an abstraction layer between Bukkit and Sponge. 10 | As such, it should use the most direct implementation possible while still keeping overhead in mind. 11 | - Pore follows a minimal-diff policy for the sake of maintained compatibility. 12 | As such, contributions should avoid adding patches to the `Porekit` submodule unless absolutely necessary. 13 | 14 | Submitting a Pull Request 15 | ------------------------- 16 | Once you've ensured that your contribution meets the above requirements, you may submit them as a pull request to the 17 | main repository. The pull request must include information regarding what has been changed and what is accomplished in 18 | as much detail as possible without redundancy. 19 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Pore(RT) 2 | Copyright (c) 2014-2016, Lapis 3 | Copyright (c) 2014-2016, Contributors 4 | 5 | The MIT License 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /ap/build.gradle: -------------------------------------------------------------------------------- 1 | // Project information 2 | version = '1.0.0-SNAPSHOT' 3 | 4 | dependencies { 5 | compile 'com.google.guava:guava:17.0' 6 | compile 'org.apache.commons:commons-lang3:3.3.2' 7 | } 8 | 9 | -------------------------------------------------------------------------------- /ap/src/main/resources/META-INF/services/javax.annotation.processing.Processor: -------------------------------------------------------------------------------- 1 | blue.lapis.pore.ap.event.EventProcessor 2 | -------------------------------------------------------------------------------- /bukkit.gradle: -------------------------------------------------------------------------------- 1 | defaultTasks 'clean', 'build' 2 | 3 | version = '1.12.2-R0.1-SNAPSHOT' // TODO: Keep up to date 4 | 5 | // Project dependencies 6 | dependencies { 7 | // TODO: Keep up to date 8 | compile 'commons-lang:commons-lang:2.6' 9 | // Not sure why this is including junit as dependency 10 | compile('com.googlecode.json-simple:json-simple:1.1.1') { 11 | exclude module: 'junit' 12 | } 13 | compile 'com.google.guava:guava:17.0' 14 | compile 'com.google.code.gson:gson:2.2.4' 15 | compile 'org.avaje:ebean:2.8.1' 16 | compile 'org.yaml:snakeyaml:1.17' 17 | compile ('net.md-5:bungeecord-chat:1.10-SNAPSHOT') { 18 | transitive = false 19 | } 20 | compile (project(':ReflectionRemapper')) { 21 | exclude module: 'guava' 22 | } 23 | 24 | testCompile 'junit:junit:4.12' 25 | testCompile 'org.hamcrest:hamcrest-library:1.3' 26 | } 27 | -------------------------------------------------------------------------------- /etc/checkstyle-suppressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /etc/formatted-license.txt: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016-2017, Maxqia AGPLv3 5 | * Copyright (c) 2014-2016, Lapis MIT 6 | * Copyright (c) Spigot/Craftbukkit Project LGPLv3 7 | * Copyright (c) Contributors 8 | * 9 | * This program is free software: you can redistribute it and/or modify 10 | * it under the terms of the GNU Affero General Public License as published by 11 | * the Free Software Foundation, either version 3 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU Affero General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU Affero General Public License 20 | * along with this program. If not, see . 21 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 22 | */ 23 | -------------------------------------------------------------------------------- /etc/progress.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # constants 3 | IMPL_DIR="./src/main/java/blue/lapis/pore/impl" 4 | OVERRIDE_STR="@Override" 5 | NOT_IMPLD_STR="throw new NotImplementedException" 6 | 7 | # grep matches 8 | OVERRIDES=`grep -r "$OVERRIDE_STR" $IMPL_DIR | wc -l | tr -d ' '` 9 | NOT_IMPLD=`grep -r "$NOT_IMPLD_STR" $IMPL_DIR | wc -l | tr -d ' '` 10 | 11 | # math to get a percentage (yay integer math :P) 12 | IMPLD_FRACTION=$[($OVERRIDES - $NOT_IMPLD) * 10000 / $OVERRIDES] 13 | WHOLE=$[$IMPLD_FRACTION / 100] 14 | DECIMAL=$[$IMPLD_FRACTION % 100] 15 | if [ $DECIMAL -lt 10 ] 16 | then 17 | DECIMAL="0"$DECIMAL 18 | fi 19 | PERCENT_IMPLD=$WHOLE"."$DECIMAL 20 | 21 | echo "Bukkit is roughly "$PERCENT_IMPLD"% implemented." 22 | -------------------------------------------------------------------------------- /etc/update_porekit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # JDK to publish the repo with 4 | jdk=${1:-oraclejdk8} 5 | 6 | # Ensure all commands complete successfully 7 | set -e 8 | 9 | # Make sure we're running the right Travis JDK version 10 | [[ -z "$TRAVIS_JDK_VERSION" || "$TRAVIS_JDK_VERSION" = "$jdk" ]] 11 | [[ "$TRAVIS_BRANCH" = "master" ]] 12 | 13 | git clone $LAPIS_DEPLOY $DEPLOY_ROOT 14 | 15 | echo "Updating Porekit..." 16 | 17 | # Initialize the ssh-agent so we can use Git later for deploying 18 | eval $(ssh-agent) 19 | # Set up our Git environment 20 | $DEPLOY_ROOT/setup_git 21 | 22 | root=$PWD 23 | 24 | push() { 25 | cd $root/$1 26 | git remote add porekit git@github.com:LapisBlue/Porekit.git 27 | git checkout -B $2 28 | git push -f porekit $2 29 | } 30 | 31 | push lib/Bukkit spigot 32 | push Porekit master 33 | 34 | # Kill the ssh-agent because we're done with deploying 35 | eval $(ssh-agent -k) 36 | 37 | echo "Done! Successfully updated Porekit! :)" 38 | -------------------------------------------------------------------------------- /gradle/deploy.gradle: -------------------------------------------------------------------------------- 1 | // We end up with a format like 1.0.0-SNAPSHOT-git(master-f874a8b)-jnks174 2 | // the Git commit or the build number will be excluded if they can't be determined, respectively 3 | ext.versionSuffix = version.contains('SNAPSHOT') ? ( 4 | ( 5 | System.getenv('GIT_COMMIT') ? ('-git(' 6 | + System.getenv('GIT_BRANCH') 7 | .substring(System.getenv('GIT_BRANCH').split('/')[0].length() + 1) + '-' 8 | + System.getenv('GIT_COMMIT').substring(0, 7) + ')') : '' 9 | ) 10 | + (System.getenv('BUILD_NUMBER') ? '-jnks' + System.getenv('BUILD_NUMBER') : '') 11 | ) : '' 12 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IceSoulHanxi/PoreRT/dec8e97811b20abe597fa85d473acce1b7e24b18/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Nov 22 19:27:27 PST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.2-bin.zip 7 | -------------------------------------------------------------------------------- /patches/0001-Disable-Spigot-version-check.patch: -------------------------------------------------------------------------------- 1 | From 4feb3b3cc66c1333ed1440ec5d46eea3115b5c56 Mon Sep 17 00:00:00 2001 2 | From: Minecrell 3 | Date: Thu, 22 Jan 2015 18:20:44 +0100 4 | Subject: [PATCH] Disable Spigot version check 5 | 6 | 7 | diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java 8 | index b55abdb..87f54ee 100644 9 | --- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java 10 | +++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java 11 | @@ -44,7 +44,7 @@ public class VersionCommand extends BukkitCommand { 12 | 13 | if (args.length == 0) { 14 | sender.sendMessage("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")"); 15 | - sendVersion(sender); 16 | + //sendVersion(sender); 17 | } else { 18 | StringBuilder name = new StringBuilder(); 19 | 20 | @@ -142,7 +142,7 @@ public class VersionCommand extends BukkitCommand { 21 | return ImmutableList.of(); 22 | } 23 | 24 | - private final ReentrantLock versionLock = new ReentrantLock(); 25 | + /*private final ReentrantLock versionLock = new ReentrantLock(); 26 | private boolean hasVersion = false; 27 | private String versionMessage = null; 28 | private final Set versionWaiters = new HashSet(); 29 | @@ -251,5 +251,5 @@ public class VersionCommand extends BukkitCommand { 30 | e.printStackTrace(); 31 | return -1; 32 | } 33 | - } 34 | + }*/ 35 | } 36 | -- 37 | 2.2.2 38 | 39 | -------------------------------------------------------------------------------- /patches/0005-Add-method-to-get-EntityType-from-Class.patch: -------------------------------------------------------------------------------- 1 | From 24dab083350f735264c8bcb86204926d50f08e11 Mon Sep 17 00:00:00 2001 2 | From: caseif 3 | Date: Mon, 30 Mar 2015 23:21:20 -0400 4 | Subject: [PATCH] Add method to get EntityType from Class 5 | 6 | 7 | diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java 8 | index 588e6048..fb32d71f 100644 9 | --- a/src/main/java/org/bukkit/entity/EntityType.java 10 | +++ b/src/main/java/org/bukkit/entity/EntityType.java 11 | @@ -274,6 +274,8 @@ public enum EntityType { 12 | 13 | private static final Map NAME_MAP = new HashMap(); 14 | private static final Map ID_MAP = new HashMap(); 15 | + private static final Map, EntityType> CLASS_MAP = 16 | + new HashMap, EntityType>(); 17 | 18 | static { 19 | for (EntityType type : values()) { 20 | @@ -283,7 +285,13 @@ public enum EntityType { 21 | if (type.typeId > 0) { 22 | ID_MAP.put(type.typeId, type); 23 | } 24 | + if (type.clazz != null) { 25 | + CLASS_MAP.put(type.clazz, type); 26 | + } 27 | } 28 | + 29 | + // Alias Fireball.class as FIREBALL so we don't return null 30 | + CLASS_MAP.put(Fireball.class, EntityType.FIREBALL); 31 | } 32 | 33 | private EntityType(String name, Class clazz, int typeId) { 34 | @@ -352,6 +360,10 @@ public enum EntityType { 35 | return ID_MAP.get((short) id); 36 | } 37 | 38 | + public static EntityType fromClass(Class clazz) { 39 | + return CLASS_MAP.get(clazz); 40 | + } 41 | + 42 | /** 43 | * Some entities cannot be spawned using {@link 44 | * World#spawnEntity(Location, EntityType)} or {@link 45 | -- 46 | 2.16.2.windows.1 47 | 48 | -------------------------------------------------------------------------------- /patches/0006-Disable-reload-command.patch: -------------------------------------------------------------------------------- 1 | From e158ceea4bdc0fe924cf325c6c44ef4314d04f0d Mon Sep 17 00:00:00 2001 2 | From: Minecrell 3 | Date: Thu, 14 May 2015 12:30:12 +0200 4 | Subject: [PATCH] Disable reload command 5 | 6 | 7 | diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java 8 | index a229d08..513485c 100644 9 | --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java 10 | +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java 11 | @@ -29,7 +29,7 @@ public class SimpleCommandMap implements CommandMap { 12 | 13 | private void setDefaultCommands() { 14 | register("bukkit", new VersionCommand("version")); 15 | - register("bukkit", new ReloadCommand("reload")); 16 | + //register("bukkit", new ReloadCommand("reload")); 17 | register("bukkit", new PluginsCommand("plugins")); 18 | register("bukkit", new TimingsCommand("timings")); 19 | } 20 | -- 21 | 2.4.0 22 | 23 | -------------------------------------------------------------------------------- /patches/0009-Add-missing-GameMode-used-by-FakePlayers-in-Bukkit-A.patch: -------------------------------------------------------------------------------- 1 | From 95df14db22d7c473bcb52469445b7e8b10bb6fdb Mon Sep 17 00:00:00 2001 2 | From: bloodshot 3 | Date: Wed, 18 Jun 2014 22:20:10 -0400 4 | Subject: [PATCH] Add missing GameMode used by FakePlayers in Bukkit API. Fixes 5 | #1233 6 | 7 | FakePlayers do not set their GameMode which results in using the default 8 | 'NOT_SET(-1)' GameMode. Since this does not exist in Bukkit's API, any 9 | references from plugins to player.getGameMode() will be null. This commit 10 | simply adds the missing gamemode. 11 | 12 | diff --git a/src/main/java/org/bukkit/GameMode.java b/src/main/java/org/bukkit/GameMode.java 13 | index 803944ea..9b6d220f 100644 14 | --- a/src/main/java/org/bukkit/GameMode.java 15 | +++ b/src/main/java/org/bukkit/GameMode.java 16 | @@ -11,6 +11,12 @@ import com.google.common.collect.Maps; 17 | * have 18 | */ 19 | public enum GameMode { 20 | + // Cauldron start - FakePlayers do not set their gametype and use the default 21 | + /** 22 | + * Default mode 23 | + */ 24 | + NOT_SET(-1), 25 | + // Cauldron end 26 | /** 27 | * Creative mode may fly, build instantly, become invulnerable and create 28 | * free items. 29 | -- 30 | 2.16.2.windows.1 31 | 32 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'PoreRT' 2 | include 'Porekit', 'ap', 'ReflectionRemapper' 3 | project(":ReflectionRemapper").projectDir = new File(rootDir, "lib/ReflectionRemapper") 4 | -------------------------------------------------------------------------------- /src/event/README.md: -------------------------------------------------------------------------------- 1 | These are old events and aren't actively being used, they're just here 2 | for historical purposes. 3 | -------------------------------------------------------------------------------- /src/event/java/blue/lapis/pore/impl/event/server/PoreMapInitializeEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore 3 | * Copyright (c) 2014-2015, Lapis 4 | * 5 | * The MIT License 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | * THE SOFTWARE. 24 | */ 25 | package blue.lapis.pore.impl.event.server; 26 | 27 | import static com.google.common.base.Preconditions.checkNotNull; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.event.server.MapInitializeEvent; 31 | import org.bukkit.map.MapView; 32 | import org.spongepowered.api.event.GameEvent; 33 | 34 | public class PoreMapInitializeEvent extends MapInitializeEvent { 35 | 36 | private final GameEvent handle; 37 | 38 | public PoreMapInitializeEvent(GameEvent handle) { 39 | super(null); 40 | this.handle = checkNotNull(handle, "handle"); 41 | } 42 | 43 | public GameEvent getHandle() { 44 | return handle; 45 | } 46 | 47 | @Override 48 | public MapView getMap() { 49 | throw new NotImplementedException("TODO"); // TODO 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/event/java/blue/lapis/pore/impl/event/server/PoreServiceRegisterEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore 3 | * Copyright (c) 2014-2015, Lapis 4 | * 5 | * The MIT License 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | * THE SOFTWARE. 24 | */ 25 | package blue.lapis.pore.impl.event.server; 26 | 27 | import static com.google.common.base.Preconditions.checkNotNull; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.event.server.ServiceRegisterEvent; 31 | import org.bukkit.plugin.RegisteredServiceProvider; 32 | import org.spongepowered.api.event.GameEvent; 33 | 34 | public class PoreServiceRegisterEvent extends ServiceRegisterEvent { 35 | 36 | private final GameEvent handle; 37 | 38 | public PoreServiceRegisterEvent(GameEvent handle) { 39 | super(null); 40 | this.handle = checkNotNull(handle, "handle"); 41 | } 42 | 43 | public GameEvent getHandle() { 44 | return handle; 45 | } 46 | 47 | @Override 48 | public RegisteredServiceProvider getProvider() { 49 | throw new NotImplementedException("TODO"); // TODO 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/event/java/blue/lapis/pore/impl/event/server/PoreServiceUnregisterEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore 3 | * Copyright (c) 2014-2015, Lapis 4 | * 5 | * The MIT License 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | * THE SOFTWARE. 24 | */ 25 | package blue.lapis.pore.impl.event.server; 26 | 27 | import static com.google.common.base.Preconditions.checkNotNull; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.event.server.ServiceUnregisterEvent; 31 | import org.bukkit.plugin.RegisteredServiceProvider; 32 | import org.spongepowered.api.event.GameEvent; 33 | 34 | public class PoreServiceUnregisterEvent extends ServiceUnregisterEvent { 35 | 36 | private final GameEvent handle; 37 | 38 | public PoreServiceUnregisterEvent(GameEvent handle) { 39 | super(null); 40 | this.handle = checkNotNull(handle, "handle"); 41 | } 42 | 43 | public GameEvent getHandle() { 44 | return handle; 45 | } 46 | 47 | @Override 48 | public RegisteredServiceProvider getProvider() { 49 | throw new NotImplementedException("TODO"); // TODO 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/event/java/blue/lapis/pore/impl/event/vehicle/PoreVehicleCreateEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore 3 | * Copyright (c) 2014-2015, Lapis 4 | * 5 | * The MIT License 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | * THE SOFTWARE. 24 | */ 25 | package blue.lapis.pore.impl.event.vehicle; 26 | 27 | import static com.google.common.base.Preconditions.checkNotNull; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.entity.Vehicle; 31 | import org.bukkit.event.vehicle.VehicleCreateEvent; 32 | import org.spongepowered.api.event.entity.EntitySpawnEvent; 33 | 34 | public class PoreVehicleCreateEvent extends VehicleCreateEvent { 35 | 36 | private final EntitySpawnEvent handle; 37 | 38 | public PoreVehicleCreateEvent(EntitySpawnEvent handle) { 39 | super(null); 40 | this.handle = checkNotNull(handle, "handle"); 41 | } 42 | 43 | public EntitySpawnEvent getHandle() { 44 | return handle; 45 | } 46 | 47 | @Override 48 | public Vehicle getVehicle() { 49 | throw new NotImplementedException("TODO"); // TODO 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/event/java/blue/lapis/pore/impl/event/vehicle/PoreVehicleUpdateEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore 3 | * Copyright (c) 2014-2015, Lapis 4 | * 5 | * The MIT License 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | * THE SOFTWARE. 24 | */ 25 | package blue.lapis.pore.impl.event.vehicle; 26 | 27 | import static com.google.common.base.Preconditions.checkNotNull; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.entity.Vehicle; 31 | import org.bukkit.event.vehicle.VehicleUpdateEvent; 32 | import org.spongepowered.api.event.entity.EntityUpdateEvent; 33 | 34 | public class PoreVehicleUpdateEvent extends VehicleUpdateEvent { 35 | 36 | private final EntityUpdateEvent handle; 37 | 38 | public PoreVehicleUpdateEvent(EntityUpdateEvent handle) { 39 | super(null); 40 | this.handle = checkNotNull(handle, "handle"); 41 | } 42 | 43 | public EntityUpdateEvent getHandle() { 44 | return handle; 45 | } 46 | 47 | @Override 48 | public Vehicle getVehicle() { 49 | throw new NotImplementedException("TODO"); // TODO 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/event/java/blue/lapis/pore/impl/event/world/PoreSpawnChangeEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore 3 | * Copyright (c) 2014-2015, Lapis 4 | * 5 | * The MIT License 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | * THE SOFTWARE. 24 | */ 25 | package blue.lapis.pore.impl.event.world; 26 | 27 | import static com.google.common.base.Preconditions.checkNotNull; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.Location; 31 | import org.bukkit.World; 32 | import org.bukkit.event.world.SpawnChangeEvent; 33 | import org.spongepowered.api.event.world.WorldEvent; 34 | 35 | public class PoreSpawnChangeEvent extends SpawnChangeEvent { 36 | 37 | private final WorldEvent handle; 38 | 39 | public PoreSpawnChangeEvent(WorldEvent handle) { 40 | super(null, null); 41 | this.handle = checkNotNull(handle, "handle"); 42 | } 43 | 44 | public WorldEvent getHandle() { 45 | return handle; 46 | } 47 | 48 | @Override 49 | public World getWorld() { 50 | throw new NotImplementedException("TODO"); // TODO 51 | } 52 | 53 | @Override 54 | public Location getPreviousLocation() { 55 | throw new NotImplementedException("TODO"); // TODO 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /src/event/java/blue/lapis/pore/impl/event/world/PoreWorldInitEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore 3 | * Copyright (c) 2014-2015, Lapis 4 | * 5 | * The MIT License 6 | * 7 | * Permission is hereby granted, free of charge, to any person obtaining a copy 8 | * of this software and associated documentation files (the "Software"), to deal 9 | * in the Software without restriction, including without limitation the rights 10 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | * copies of the Software, and to permit persons to whom the Software is 12 | * furnished to do so, subject to the following conditions: 13 | * 14 | * The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | * THE SOFTWARE. 24 | */ 25 | package blue.lapis.pore.impl.event.world; 26 | 27 | import static com.google.common.base.Preconditions.checkNotNull; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.World; 31 | import org.bukkit.event.world.WorldInitEvent; 32 | import org.spongepowered.api.event.world.WorldEvent; 33 | 34 | public class PoreWorldInitEvent extends WorldInitEvent { 35 | 36 | private final WorldEvent handle; 37 | 38 | public PoreWorldInitEvent(WorldEvent handle) { 39 | super(null); 40 | this.handle = checkNotNull(handle, "handle"); 41 | } 42 | 43 | public WorldEvent getHandle() { 44 | return handle; 45 | } 46 | 47 | @Override 48 | public World getWorld() { 49 | throw new NotImplementedException("TODO"); // TODO 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/PoreVersion.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore; 28 | 29 | import com.google.common.base.MoreObjects; 30 | import com.google.common.base.Objects; 31 | 32 | public final class PoreVersion { 33 | 34 | private PoreVersion() { 35 | } 36 | 37 | public static final String API_NAME = nullToUnknown(getPackage().getSpecificationTitle()); 38 | public static final String API_VERSION = nullToUnknown(getPackage().getSpecificationVersion()); 39 | public static final String NAME = nullToUnknown(getPackage().getImplementationTitle()); 40 | public static final String VERSION = nullToUnknown(getPackage().getImplementationVersion()); 41 | 42 | private static Package getPackage() { 43 | return PoreVersion.class.getPackage(); 44 | } 45 | 46 | private static String nullToUnknown(String s) { 47 | return MoreObjects.firstNonNull(s, "UNKNOWN"); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/converter/data/DataConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.converter.data; 28 | 29 | public interface DataConverter { 30 | 31 | byte getDataValue(T target); 32 | 33 | void setDataValue(T target, byte dataValue); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/converter/modifier/DamageModifierConverter.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.converter.modifier; 2 | 3 | import blue.lapis.pore.converter.type.TypeConverter; 4 | import com.google.common.base.Converter; 5 | import org.bukkit.event.entity.EntityDamageEvent.DamageModifier; 6 | import org.spongepowered.api.event.cause.entity.damage.DamageModifierType; 7 | import org.spongepowered.api.event.cause.entity.damage.DamageModifierTypes; 8 | 9 | public class DamageModifierConverter { 10 | private static final Converter CONVERTER = 11 | TypeConverter.builder(DamageModifier.class, DamageModifierType.class) 12 | .add(DamageModifier.BASE, DamageModifierTypes.DIFFICULTY) 13 | .add(DamageModifier.HARD_HAT, DamageModifierTypes.HARD_HAT) 14 | //.add(DamageModifier.BLOCKING, DamageModifierTypes.) 15 | .add(DamageModifier.ARMOR, DamageModifierTypes.ARMOR) 16 | .add(DamageModifier.RESISTANCE, DamageModifierTypes.NEGATIVE_POTION_EFFECT) 17 | .add(DamageModifier.MAGIC, DamageModifierTypes.MAGIC) 18 | .add(DamageModifier.ABSORPTION, DamageModifierTypes.ABSORPTION) 19 | .build(); 20 | public static DamageModifierType of(DamageModifier type) { 21 | try { 22 | return CONVERTER.convert(type); 23 | } catch (UnsupportedOperationException ex) { 24 | return DamageModifierTypes.DIFFICULTY; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/converter/type/entity/LlamaConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.converter.type.entity; 23 | 24 | import blue.lapis.pore.converter.type.TypeConverter; 25 | 26 | import com.google.common.base.Converter; 27 | import org.bukkit.entity.Llama; 28 | import org.spongepowered.api.data.type.LlamaVariant; 29 | import org.spongepowered.api.data.type.LlamaVariants; 30 | 31 | public final class LlamaConverter { 32 | 33 | private static final Converter CONVERTER = 34 | TypeConverter.builder(Llama.Color.class, LlamaVariant.class) 35 | .add(Llama.Color.CREAMY, LlamaVariants.CREAMY) 36 | .add(Llama.Color.WHITE, LlamaVariants.WHITE) 37 | .add(Llama.Color.BROWN, LlamaVariants.BROWN) 38 | .add(Llama.Color.GRAY, LlamaVariants.GRAY) 39 | .build(); 40 | 41 | public static LlamaVariant of(Llama.Color color) { 42 | return CONVERTER.convert(color); 43 | } 44 | 45 | public static Llama.Color of(LlamaVariant color) { 46 | return CONVERTER.reverse().convert(color); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/converter/type/entity/PoreElderGuardian.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.converter.type.entity; 23 | 24 | import blue.lapis.pore.impl.entity.PoreGuardian; 25 | 26 | import org.bukkit.block.PistonMoveReaction; 27 | import org.bukkit.entity.Entity; 28 | import org.spongepowered.api.entity.living.monster.Guardian; 29 | 30 | import java.util.List; 31 | 32 | public class PoreElderGuardian extends PoreGuardian implements org.bukkit.entity.ElderGuardian { 33 | 34 | //TODO waiting on Sponge for this 35 | protected PoreElderGuardian(Guardian handle) { 36 | super(handle); 37 | } 38 | 39 | @Override 40 | public double getHeight() { 41 | return 0; 42 | } 43 | 44 | @Override 45 | public double getWidth() { 46 | return 0; 47 | } 48 | 49 | @Override 50 | public List getPassengers() { 51 | return null; 52 | } 53 | 54 | @Override 55 | public boolean addPassenger(Entity passenger) { 56 | return false; 57 | } 58 | 59 | @Override 60 | public boolean removePassenger(Entity passenger) { 61 | return false; 62 | } 63 | 64 | @Override 65 | public PistonMoveReaction getPistonMoveReaction() { 66 | return null; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/converter/type/entity/player/HandTypeConverter.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.converter.type.entity.player; 2 | 3 | import blue.lapis.pore.converter.type.TypeConverter; 4 | import com.google.common.base.Converter; 5 | import org.bukkit.inventory.EquipmentSlot; 6 | import org.spongepowered.api.data.type.HandType; 7 | import org.spongepowered.api.data.type.HandTypes; 8 | 9 | public final class HandTypeConverter { 10 | 11 | private static final Converter CONVERTER = 12 | TypeConverter.builder(EquipmentSlot.class, HandType.class) 13 | .add(EquipmentSlot.HAND, HandTypes.MAIN_HAND) 14 | .add(EquipmentSlot.OFF_HAND, HandTypes.OFF_HAND) 15 | .build(); 16 | 17 | public static HandType of(EquipmentSlot handType){ 18 | return CONVERTER.convert(handType); 19 | } 20 | 21 | public static EquipmentSlot of(HandType handType){ 22 | return CONVERTER.reverse().convert(handType); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/converter/type/world/WorldArchetypeConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016-2017, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.converter.type.world; 23 | 24 | import blue.lapis.pore.converter.type.TypeConverter; 25 | 26 | import com.google.common.base.Converter; 27 | import org.bukkit.World; 28 | import org.spongepowered.api.world.WorldArchetype; 29 | import org.spongepowered.api.world.WorldArchetypes; 30 | 31 | public class WorldArchetypeConverter { 32 | 33 | private WorldArchetypeConverter() { 34 | } 35 | 36 | private static final Converter CONVERTER = 37 | TypeConverter.builder(World.Environment.class, WorldArchetype.class) 38 | .add(World.Environment.NORMAL, WorldArchetypes.OVERWORLD) 39 | .add(World.Environment.NETHER, WorldArchetypes.THE_NETHER) 40 | .add(World.Environment.THE_END, WorldArchetypes.THE_END) 41 | .build(); 42 | 43 | public static WorldArchetype of(World.Environment worldType) { 44 | return CONVERTER.convert(worldType); 45 | } 46 | 47 | public static World.Environment of(WorldArchetype dimension) { 48 | return CONVERTER.reverse().convert(dimension); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/converter/vector/EulerAngleConverter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.converter.vector; 28 | 29 | import com.flowpowered.math.vector.Vector3d; 30 | import org.bukkit.util.EulerAngle; 31 | 32 | public final class EulerAngleConverter { 33 | 34 | private EulerAngleConverter() { 35 | } 36 | 37 | public static EulerAngle of(Vector3d dir) { 38 | return new EulerAngle(dir.getX(), dir.getY(), dir.getZ()); 39 | } 40 | 41 | public static Vector3d of(EulerAngle angle) { 42 | return new Vector3d(angle.getX(), angle.getY(), angle.getZ()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/converter/wrapper/world/BiomeVolumeWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016-2017, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.converter.wrapper.world; 23 | 24 | import blue.lapis.pore.converter.type.world.BiomeConverter; 25 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 26 | import blue.lapis.pore.util.PoreWrapper; 27 | 28 | import org.bukkit.block.Biome; 29 | import org.bukkit.generator.ChunkGenerator; 30 | import org.spongepowered.api.world.extent.MutableBiomeVolume; 31 | import org.spongepowered.api.world.extent.MutableBlockVolume; 32 | 33 | public class BiomeVolumeWrapper extends PoreWrapper implements ChunkGenerator.BiomeGrid { 34 | 35 | public static BiomeVolumeWrapper of(MutableBlockVolume handle) { 36 | return WrapperConverter.of(BiomeVolumeWrapper.class, handle); 37 | } 38 | 39 | protected BiomeVolumeWrapper(MutableBiomeVolume handle) { 40 | super(handle); 41 | } 42 | 43 | @Override 44 | public Biome getBiome(int x, int z) { 45 | return BiomeConverter.of(getHandle().getBiome(x, 0, z)); 46 | } 47 | 48 | @Override 49 | public void setBiome(int x, int z, Biome bio) { 50 | getHandle().setBiome(x, 0, z, BiomeConverter.of(bio)); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/event/PoreEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.event; 28 | 29 | import com.google.common.base.MoreObjects; 30 | import com.google.common.base.Objects; 31 | import org.spongepowered.api.event.Event; 32 | 33 | public interface PoreEvent { 34 | 35 | S getHandle(); 36 | 37 | default MoreObjects.ToStringHelper toStringHelper() { 38 | return MoreObjects.toStringHelper(this) 39 | .addValue(getHandle()); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/event/PoreEventCache.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.event; 2 | 3 | import org.bukkit.event.Event; 4 | 5 | import java.util.HashMap; 6 | 7 | public class PoreEventCache { 8 | private HashMap, Event> eventCache = new HashMap<>(); 9 | 10 | public PoreEvent getLastEvent(Class eventClass){ 11 | Event event = eventCache.get(eventClass); 12 | PoreEvent poreEvent = null; 13 | if (event instanceof PoreEvent){ 14 | poreEvent = (PoreEvent) event; 15 | } 16 | return poreEvent; 17 | } 18 | 19 | void addEventToCache(Class eventClass, Event event){ 20 | eventCache.put(eventClass, event); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/event/RegisterEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.event; 28 | 29 | import java.lang.annotation.ElementType; 30 | import java.lang.annotation.Retention; 31 | import java.lang.annotation.RetentionPolicy; 32 | import java.lang.annotation.Target; 33 | 34 | /** 35 | * Denotes that an event wrapper should be dynamically registered. 36 | * 37 | *

This should be applied to event classes in which the Bukkit event will 38 | * always be called alongside the wrapped (Sponge) event, completely 39 | * unconditionally.

40 | */ 41 | @Retention(RetentionPolicy.SOURCE) 42 | @Target({ElementType.TYPE, ElementType.METHOD}) 43 | public @interface RegisterEvent { 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/event/Source.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.event; 28 | 29 | import java.lang.annotation.ElementType; 30 | import java.lang.annotation.Retention; 31 | import java.lang.annotation.RetentionPolicy; 32 | import java.lang.annotation.Target; 33 | 34 | @Retention(RetentionPolicy.RUNTIME) 35 | @Target(ElementType.PARAMETER) 36 | public @interface Source { 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/block/PoreFlowerPot.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.impl.block; 2 | 3 | import blue.lapis.pore.converter.type.material.MaterialConverter; 4 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 5 | 6 | import org.bukkit.material.MaterialData; 7 | import org.spongepowered.api.block.tileentity.FlowerPot; 8 | import org.spongepowered.api.data.manipulator.mutable.RepresentedItemData; 9 | 10 | import java.util.Optional; 11 | 12 | public class PoreFlowerPot extends PoreBlockState implements org.bukkit.block.FlowerPot { 13 | 14 | public static PoreFlowerPot of(FlowerPot handle) { 15 | return WrapperConverter.of(PoreFlowerPot.class, handle); 16 | } 17 | 18 | protected PoreFlowerPot(FlowerPot handle) { 19 | super(handle); 20 | } 21 | 22 | @Override 23 | FlowerPot getTileEntity() { 24 | return (FlowerPot) super.getTileEntity(); 25 | } 26 | 27 | @Override 28 | public MaterialData getContents() { 29 | Optional opt = getTileEntity().get(RepresentedItemData.class); 30 | if (opt.isPresent()) { 31 | return new MaterialData(MaterialConverter.of(opt.get().item().get().getType())); 32 | } 33 | return null; 34 | } 35 | 36 | @Override 37 | public void setContents(MaterialData item) { 38 | Optional opt = getTileEntity().getOrCreate(RepresentedItemData.class); 39 | if (opt.isPresent()) { 40 | opt.get().item().set(MaterialConverter.asItem(item.getItemType()).getTemplate()); 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/block/PoreHopper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.block; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | import blue.lapis.pore.impl.inventory.PoreInventory; 31 | 32 | import org.bukkit.inventory.Inventory; 33 | import org.spongepowered.api.block.tileentity.carrier.Hopper; 34 | 35 | public class PoreHopper extends PoreContainer implements org.bukkit.block.Hopper { 36 | 37 | public static PoreHopper of(Hopper handle) { 38 | return WrapperConverter.of(PoreHopper.class, handle); 39 | } 40 | 41 | protected PoreHopper(Hopper handle) { 42 | super(handle); 43 | } 44 | 45 | @Override 46 | Hopper getTileEntity() { 47 | return (Hopper) super.getTileEntity(); 48 | } 49 | 50 | @Override 51 | public Inventory getInventory() { 52 | return PoreInventory.of(getTileEntity().getInventory()); 53 | } 54 | 55 | @Override 56 | public Inventory getSnapshotInventory() { 57 | return null; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/block/PoreShulkerBox.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.block; 23 | 24 | import blue.lapis.pore.impl.inventory.PoreInventory; 25 | 26 | import org.apache.commons.lang.NotImplementedException; 27 | import org.bukkit.DyeColor; 28 | import org.bukkit.inventory.Inventory; 29 | import org.spongepowered.api.block.tileentity.carrier.ShulkerBox; 30 | 31 | public class PoreShulkerBox extends PoreContainer implements org.bukkit.block.ShulkerBox { 32 | 33 | protected PoreShulkerBox(ShulkerBox handle) { 34 | super(handle); 35 | } 36 | 37 | @Override 38 | ShulkerBox getTileEntity() { 39 | return (ShulkerBox) super.getTileEntity(); 40 | } 41 | 42 | @Override 43 | public Inventory getInventory() { 44 | return PoreInventory.of(getTileEntity().getInventory()); 45 | } 46 | 47 | @Override 48 | public Inventory getSnapshotInventory() { 49 | return null; 50 | } 51 | 52 | @Override 53 | public DyeColor getColor() { 54 | throw new NotImplementedException("Not available in Sponge"); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/command/PoreRemoteConsoleCommandSender.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.command; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.command.RemoteConsoleCommandSender; 32 | import org.spongepowered.api.command.source.RemoteSource; 33 | 34 | public class PoreRemoteConsoleCommandSender extends PoreCommandSender implements RemoteConsoleCommandSender { 35 | 36 | public static PoreRemoteConsoleCommandSender of(RemoteSource handle) { 37 | return WrapperConverter.of(PoreRemoteConsoleCommandSender.class, handle); 38 | } 39 | 40 | protected PoreRemoteConsoleCommandSender(RemoteSource handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public RemoteSource getHandle() { 46 | return (RemoteSource) super.getHandle(); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/conversations/PoreConversationAbandonedListener.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.conversations; 28 | 29 | import org.bukkit.conversations.ConversationAbandonedEvent; 30 | import org.bukkit.conversations.ConversationAbandonedListener; 31 | 32 | // TODO: Bridge 33 | 34 | public class PoreConversationAbandonedListener implements ConversationAbandonedListener { 35 | 36 | @Override 37 | public void conversationAbandoned(ConversationAbandonedEvent abandonedEvent) { 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/conversations/PoreConversationCanceller.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.conversations; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.conversations.Conversation; 31 | import org.bukkit.conversations.ConversationCanceller; 32 | import org.bukkit.conversations.ConversationContext; 33 | 34 | public class PoreConversationCanceller implements ConversationCanceller { 35 | 36 | // TODO: Bridge 37 | 38 | @Override 39 | public void setConversation(Conversation conversation) { 40 | throw new NotImplementedException("TODO"); //TODO 41 | } 42 | 43 | @Override 44 | public boolean cancelBasedOnInput(ConversationContext context, String input) { 45 | throw new NotImplementedException("TODO"); //TODO 46 | } 47 | 48 | 49 | @Override 50 | public ConversationCanceller clone() { 51 | throw new NotImplementedException("TODO"); //TODO 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/conversations/PoreConversationPrefix.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.conversations; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.conversations.ConversationContext; 31 | import org.bukkit.conversations.ConversationPrefix; 32 | 33 | // TODO: Bridge 34 | 35 | // TODO: Bridge 36 | 37 | public class PoreConversationPrefix implements ConversationPrefix { 38 | 39 | @Override 40 | public String getPrefix(ConversationContext context) { 41 | throw new NotImplementedException("TODO"); //TODO 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/conversations/PorePrompt.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.conversations; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.conversations.ConversationContext; 31 | import org.bukkit.conversations.Prompt; 32 | 33 | // TODO: Bridge 34 | 35 | // TODO: Bridge 36 | 37 | public class PorePrompt implements Prompt { 38 | 39 | @Override 40 | public String getPromptText(ConversationContext context) { 41 | throw new NotImplementedException("TODO"); //TODO 42 | } 43 | 44 | @Override 45 | public boolean blocksForInput(ConversationContext context) { 46 | throw new NotImplementedException("TODO"); //TODO 47 | } 48 | 49 | @Override 50 | public Prompt acceptInput(ConversationContext context, String input) { 51 | throw new NotImplementedException("TODO"); //TODO 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreAmbient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.spongepowered.api.entity.living.Ambient; 32 | 33 | public class PoreAmbient extends PoreLivingEntity implements org.bukkit.entity.Ambient { 34 | 35 | public static PoreAmbient of(Ambient handle) { 36 | return WrapperConverter.of(PoreAmbient.class, handle); 37 | } 38 | 39 | protected PoreAmbient(Ambient handle) { 40 | super(handle); 41 | } 42 | 43 | @Override 44 | public Ambient getHandle() { 45 | return (Ambient) super.getHandle(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreAnimalTamer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | import blue.lapis.pore.util.PoreWrapper; 31 | 32 | import org.bukkit.entity.AnimalTamer; 33 | import org.spongepowered.api.entity.Tamer; 34 | 35 | import java.util.UUID; 36 | 37 | public class PoreAnimalTamer extends PoreWrapper implements AnimalTamer { 38 | 39 | public static PoreAnimalTamer of(Tamer handle) { 40 | return WrapperConverter.of(PoreAnimalTamer.class, handle); 41 | } 42 | 43 | protected PoreAnimalTamer(Tamer handle) { 44 | super(handle); 45 | } 46 | 47 | @Override 48 | public String getName() { 49 | return getHandle().getName(); 50 | } 51 | 52 | @Override 53 | public UUID getUniqueId() { 54 | return getHandle().getUniqueId(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreAnimals.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.Animals; 32 | import org.spongepowered.api.entity.living.animal.Animal; 33 | 34 | public class PoreAnimals extends PoreAgeable implements Animals { 35 | 36 | public static PoreAnimals of(Animal handle) { 37 | return WrapperConverter.of(PoreAnimals.class, handle); 38 | } 39 | 40 | protected PoreAnimals(Animal handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Animal getHandle() { 46 | return (Animal) super.getHandle(); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreBlaze.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.monster.Blaze; 33 | 34 | public class PoreBlaze extends PoreMonster implements org.bukkit.entity.Blaze { 35 | 36 | public static PoreBlaze of(Blaze handle) { 37 | return WrapperConverter.of(PoreBlaze.class, handle); 38 | } 39 | 40 | protected PoreBlaze(Blaze handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Blaze getHandle() { 46 | return (Blaze) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.BLAZE; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreCaveSpider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.monster.CaveSpider; 33 | 34 | public class PoreCaveSpider extends PoreSpider implements org.bukkit.entity.CaveSpider { 35 | 36 | public static PoreCaveSpider of(CaveSpider handle) { 37 | return WrapperConverter.of(PoreCaveSpider.class, handle); 38 | } 39 | 40 | protected PoreCaveSpider(CaveSpider handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public CaveSpider getHandle() { 46 | return (CaveSpider) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.CAVE_SPIDER; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreChestedHorse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.entity; 23 | 24 | import org.apache.commons.lang3.NotImplementedException; 25 | import org.bukkit.entity.ChestedHorse; 26 | import org.spongepowered.api.entity.living.animal.Horse; 27 | 28 | public class PoreChestedHorse extends PoreAbstractHorse implements ChestedHorse { 29 | 30 | protected PoreChestedHorse(Horse handle) { 31 | super(handle); 32 | } 33 | 34 | @Override 35 | public boolean isCarryingChest() { 36 | throw new NotImplementedException("TODO"); //TODO 37 | } 38 | 39 | @Override 40 | public void setCarryingChest(boolean chest) { 41 | throw new NotImplementedException("TODO"); //TODO 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreChicken.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.animal.Chicken; 33 | 34 | public class PoreChicken extends PoreAnimals implements org.bukkit.entity.Chicken { 35 | 36 | public static PoreChicken of(Chicken handle) { 37 | return WrapperConverter.of(PoreChicken.class, handle); 38 | } 39 | 40 | protected PoreChicken(Chicken handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Chicken getHandle() { 46 | return (Chicken) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.CHICKEN; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreCow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.animal.Cow; 33 | 34 | public class PoreCow extends PoreAnimals implements org.bukkit.entity.Cow { 35 | 36 | public static PoreCow of(Cow handle) { 37 | return WrapperConverter.of(PoreCow.class, handle); 38 | } 39 | 40 | protected PoreCow(Cow handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Cow getHandle() { 46 | return (Cow) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.COW; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreDonkey.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.entity; 23 | 24 | import org.spongepowered.api.entity.living.animal.Donkey; 25 | 26 | public class PoreDonkey extends PoreChestedHorse implements org.bukkit.entity.Donkey { 27 | 28 | protected PoreDonkey(Donkey handle) { 29 | super(handle); 30 | } 31 | 32 | @Override 33 | public Donkey getHandle() { 34 | return (Donkey) super.getHandle(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreDragonFireball.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.impl.entity; 2 | 3 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 4 | 5 | import org.spongepowered.api.entity.projectile.explosive.DragonFireball; 6 | 7 | public class PoreDragonFireball extends PoreFireball implements org.bukkit.entity.DragonFireball { 8 | 9 | public static PoreDragonFireball of(DragonFireball handle) { 10 | return WrapperConverter.of(PoreDragonFireball.class, handle); 11 | } 12 | 13 | protected PoreDragonFireball(DragonFireball handle) { 14 | super(handle); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreEgg.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.projectile.Egg; 33 | 34 | public class PoreEgg extends PoreProjectile implements org.bukkit.entity.Egg { 35 | 36 | public static PoreEgg of(Egg handle) { 37 | return WrapperConverter.of(PoreEgg.class, handle); 38 | } 39 | 40 | protected PoreEgg(Egg handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Egg getHandle() { 46 | return (Egg) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.EGG; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreEnderPearl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.projectile.EnderPearl; 33 | 34 | public class PoreEnderPearl extends PoreProjectile implements org.bukkit.entity.EnderPearl { 35 | 36 | public static PoreEnderPearl of(EnderPearl handle) { 37 | return WrapperConverter.of(PoreEnderPearl.class, handle); 38 | } 39 | 40 | protected PoreEnderPearl(EnderPearl handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public EnderPearl getHandle() { 46 | return (EnderPearl) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.ENDER_PEARL; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreEndermite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.monster.Endermite; 33 | 34 | public class PoreEndermite extends PoreMonster implements org.bukkit.entity.Endermite { 35 | 36 | public static PoreEndermite of(Endermite handle) { 37 | return WrapperConverter.of(PoreEndermite.class, handle); 38 | } 39 | 40 | protected PoreEndermite(Endermite handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Endermite getHandle() { 46 | return (Endermite) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.ENDERMITE; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreEvoker.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.impl.entity; 2 | 3 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 4 | 5 | import org.apache.commons.lang.NotImplementedException; 6 | import org.bukkit.entity.EntityType; 7 | import org.bukkit.entity.Spellcaster; 8 | import org.spongepowered.api.entity.living.monster.Evoker; 9 | 10 | public class PoreEvoker extends PoreMonster implements org.bukkit.entity.Evoker { 11 | 12 | public static PoreEvoker of(Evoker handle) { 13 | return WrapperConverter.of(PoreEvoker.class, handle); 14 | } 15 | 16 | protected PoreEvoker(Evoker handle) { 17 | super(handle); 18 | } 19 | 20 | @Override 21 | public Evoker getHandle() { 22 | return (Evoker) super.getHandle(); 23 | } 24 | 25 | @Override 26 | public EntityType getType() { 27 | return EntityType.EVOKER; 28 | } 29 | 30 | @Override 31 | public Spell getCurrentSpell() { 32 | throw new NotImplementedException("TODO"); //TODO 33 | } 34 | 35 | @Override 36 | public void setCurrentSpell(Spell spell) { 37 | throw new NotImplementedException("TODO"); //TODO 38 | } 39 | 40 | @Override 41 | public Spellcaster.Spell getSpell() { 42 | return null; 43 | } 44 | 45 | @Override 46 | public void setSpell(Spellcaster.Spell spell) { 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreFlying.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.Flying; 32 | import org.spongepowered.api.entity.living.Aerial; 33 | 34 | public class PoreFlying extends PoreLivingEntity implements Flying { 35 | 36 | public static PoreFlying of(Aerial handle) { 37 | return WrapperConverter.of(PoreFlying.class, handle); 38 | } 39 | 40 | protected PoreFlying(Aerial handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Aerial getHandle() { 46 | return (Aerial) super.getHandle(); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreGhast.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.monster.Ghast; 33 | 34 | public class PoreGhast extends PoreFlying implements org.bukkit.entity.Ghast { 35 | 36 | public static PoreGhast of(Ghast handle) { 37 | return WrapperConverter.of(PoreGhast.class, handle); 38 | } 39 | 40 | protected PoreGhast(Ghast handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Ghast getHandle() { 46 | return (Ghast) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.GHAST; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreGiant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.monster.Giant; 33 | 34 | public class PoreGiant extends PoreMonster implements org.bukkit.entity.Giant { 35 | 36 | public static PoreGiant of(Giant handle) { 37 | return WrapperConverter.of(PoreGiant.class, handle); 38 | } 39 | 40 | protected PoreGiant(Giant handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Giant getHandle() { 46 | return (Giant) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.GIANT; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreGolem.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.spongepowered.api.entity.living.golem.Golem; 32 | 33 | public class PoreGolem extends PoreCreature implements org.bukkit.entity.Golem { 34 | 35 | public static PoreGolem of(Golem handle) { 36 | return WrapperConverter.of(PoreGolem.class, handle); 37 | } 38 | 39 | protected PoreGolem(Golem handle) { 40 | super(handle); 41 | } 42 | 43 | @Override 44 | public Golem getHandle() { 45 | return (Golem) super.getHandle(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreHusk.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.entity; 23 | 24 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 25 | 26 | import org.spongepowered.api.entity.living.monster.Husk; 27 | 28 | public class PoreHusk extends PoreZombie implements org.bukkit.entity.Husk { 29 | 30 | public static PoreHusk of(Husk handle) { 31 | return WrapperConverter.of(PoreHusk.class, handle); 32 | } 33 | 34 | protected PoreHusk(Husk handle) { 35 | super(handle); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreLargeFireball.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.spongepowered.api.entity.projectile.explosive.fireball.LargeFireball; 32 | 33 | public class PoreLargeFireball extends PoreFireball implements org.bukkit.entity.LargeFireball { 34 | 35 | public static PoreLargeFireball of(LargeFireball handle) { 36 | return WrapperConverter.of(PoreLargeFireball.class, handle); 37 | } 38 | 39 | protected PoreLargeFireball(LargeFireball handle) { 40 | super(handle); 41 | } 42 | 43 | @Override 44 | public LargeFireball getHandle() { 45 | return (LargeFireball) super.getHandle(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreLeashHitch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.hanging.LeashHitch; 33 | 34 | public class PoreLeashHitch extends PoreHanging implements org.bukkit.entity.LeashHitch { 35 | 36 | public static PoreLeashHitch of(LeashHitch handle) { 37 | return WrapperConverter.of(PoreLeashHitch.class, handle); 38 | } 39 | 40 | protected PoreLeashHitch(LeashHitch handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public LeashHitch getHandle() { 46 | return (LeashHitch) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.LEASH_HITCH; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreLlamaSpit.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.entity; 23 | 24 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 25 | 26 | import org.spongepowered.api.entity.projectile.LlamaSpit; 27 | import org.spongepowered.api.entity.projectile.Projectile; 28 | 29 | /** 30 | * You have to be kidding me. 31 | */ 32 | public class PoreLlamaSpit extends PoreProjectile implements org.bukkit.entity.LlamaSpit { 33 | 34 | public static PoreLlamaSpit of(Projectile handle) { 35 | return WrapperConverter.of(PoreLlamaSpit.class, handle); 36 | } 37 | 38 | protected PoreLlamaSpit(LlamaSpit handle) { 39 | super(handle); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreMagmaCube.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.monster.MagmaCube; 33 | 34 | public class PoreMagmaCube extends PoreSlime implements org.bukkit.entity.MagmaCube { 35 | 36 | public static PoreMagmaCube of(MagmaCube handle) { 37 | return WrapperConverter.of(PoreMagmaCube.class, handle); 38 | } 39 | 40 | protected PoreMagmaCube(MagmaCube handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public MagmaCube getHandle() { 46 | return (MagmaCube) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.MAGMA_CUBE; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreMonster.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.spongepowered.api.entity.living.monster.Monster; 32 | 33 | public class PoreMonster extends PoreCreature implements org.bukkit.entity.Monster { 34 | 35 | public static PoreMonster of(Monster handle) { 36 | return WrapperConverter.of(PoreMonster.class, handle); 37 | } 38 | 39 | protected PoreMonster(Monster handle) { 40 | super(handle); 41 | } 42 | 43 | @Override 44 | public Monster getHandle() { 45 | return (Monster) super.getHandle(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreMule.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.entity; 23 | 24 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 25 | 26 | import org.spongepowered.api.entity.living.animal.Mule; 27 | 28 | public class PoreMule extends PoreChestedHorse implements org.bukkit.entity.Mule { 29 | 30 | public static PoreMule of(Mule handle) { 31 | return WrapperConverter.of(PoreMule.class, handle); 32 | } 33 | 34 | protected PoreMule(Mule handle) { 35 | super(handle); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreMushroomCow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.bukkit.entity.MushroomCow; 33 | import org.spongepowered.api.entity.living.animal.Mooshroom; 34 | 35 | public class PoreMushroomCow extends PoreCow implements MushroomCow { 36 | 37 | public static PoreMushroomCow of(Mooshroom handle) { 38 | return WrapperConverter.of(PoreMushroomCow.class, handle); 39 | } 40 | 41 | protected PoreMushroomCow(Mooshroom handle) { 42 | super(handle); 43 | } 44 | 45 | @Override 46 | public Mooshroom getHandle() { 47 | return (Mooshroom) super.getHandle(); 48 | } 49 | 50 | @Override 51 | public EntityType getType() { 52 | return EntityType.MUSHROOM_COW; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PorePolarBear.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.impl.entity; 2 | 3 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 4 | 5 | import org.bukkit.entity.EntityType; 6 | import org.spongepowered.api.entity.living.animal.PolarBear; 7 | 8 | public class PorePolarBear extends PoreAnimals implements org.bukkit.entity.PolarBear { 9 | 10 | public static PorePolarBear of(PolarBear handle) { 11 | return WrapperConverter.of(PorePolarBear.class, handle); 12 | } 13 | 14 | protected PorePolarBear(PolarBear handle) { 15 | super(handle); 16 | } 17 | 18 | @Override 19 | public PolarBear getHandle() { 20 | return (PolarBear) super.getHandle(); 21 | } 22 | 23 | @Override 24 | public EntityType getType() { 25 | return EntityType.POLAR_BEAR; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreShulker.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.impl.entity; 2 | 3 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 4 | 5 | import org.bukkit.DyeColor; 6 | import org.bukkit.entity.EntityType; 7 | import org.spongepowered.api.entity.living.golem.Shulker; 8 | 9 | public class PoreShulker extends PoreGolem implements org.bukkit.entity.Shulker { 10 | 11 | public static PoreShulker of(Shulker handle) { 12 | return WrapperConverter.of(PoreShulker.class, handle); 13 | } 14 | 15 | protected PoreShulker(Shulker handle) { 16 | super(handle); 17 | } 18 | 19 | @Override 20 | public Shulker getHandle() { 21 | return (Shulker) super.getHandle(); 22 | } 23 | 24 | @Override 25 | public EntityType getType() { 26 | return EntityType.SHULKER; 27 | } 28 | 29 | @Override 30 | public DyeColor getColor() { 31 | return null; 32 | } 33 | 34 | @Override 35 | public void setColor(DyeColor color) { 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreShulkerBullet.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.impl.entity; 2 | 3 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 4 | 5 | import org.apache.commons.lang.NotImplementedException; 6 | import org.bukkit.entity.Entity; 7 | import org.bukkit.entity.EntityType; 8 | import org.spongepowered.api.entity.ShulkerBullet; 9 | import org.spongepowered.api.entity.projectile.Projectile; 10 | 11 | public class PoreShulkerBullet extends PoreProjectile implements org.bukkit.entity.ShulkerBullet { 12 | 13 | public static PoreShulkerBullet of(ShulkerBullet handle) { 14 | return WrapperConverter.of(PoreShulkerBullet.class, handle); 15 | } 16 | 17 | protected PoreShulkerBullet(ShulkerBullet handle) { 18 | super((Projectile)handle); 19 | } 20 | 21 | /*@Override 22 | public ShulkerBullet getHandle() { 23 | return (ShulkerBullet) super.getHandle(); 24 | }*/ 25 | 26 | @Override 27 | public EntityType getType() { 28 | return EntityType.SHULKER_BULLET; 29 | } 30 | 31 | @Override 32 | public Entity getTarget() { 33 | throw new NotImplementedException("TODO"); //TODO 34 | } 35 | 36 | @Override 37 | public void setTarget(Entity target) { 38 | throw new NotImplementedException("TODO"); //TODO 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreSilverfish.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.monster.Silverfish; 33 | 34 | public class PoreSilverfish extends PoreMonster implements org.bukkit.entity.Silverfish { 35 | 36 | public static PoreSilverfish of(Silverfish handle) { 37 | return WrapperConverter.of(PoreSilverfish.class, handle); 38 | } 39 | 40 | protected PoreSilverfish(Silverfish handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Silverfish getHandle() { 46 | return (Silverfish) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.SILVERFISH; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreSkeletonHorse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.entity; 23 | 24 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 25 | 26 | import org.spongepowered.api.entity.living.animal.SkeletonHorse; 27 | 28 | public class PoreSkeletonHorse extends PoreAbstractHorse implements org.bukkit.entity.SkeletonHorse { 29 | 30 | public static PoreSkeletonHorse of(SkeletonHorse handle) { 31 | return WrapperConverter.of(PoreSkeletonHorse.class, handle); 32 | } 33 | 34 | protected PoreSkeletonHorse(SkeletonHorse handle) { 35 | super(handle); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreSmallFireball.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.projectile.explosive.fireball.SmallFireball; 33 | 34 | public class PoreSmallFireball extends PoreFireball implements org.bukkit.entity.SmallFireball { 35 | 36 | public static PoreSmallFireball of(SmallFireball handle) { 37 | return WrapperConverter.of(PoreSmallFireball.class, handle); 38 | } 39 | 40 | protected PoreSmallFireball(SmallFireball handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public SmallFireball getHandle() { 46 | return (SmallFireball) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.SMALL_FIREBALL; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreSnowball.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.projectile.Snowball; 33 | 34 | public class PoreSnowball extends PoreProjectile implements org.bukkit.entity.Snowball { 35 | 36 | public static PoreSnowball of(Snowball handle) { 37 | return WrapperConverter.of(PoreSnowball.class, handle); 38 | } 39 | 40 | protected PoreSnowball(Snowball handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Snowball getHandle() { 46 | return (Snowball) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.SNOWBALL; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreSpider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.monster.Spider; 33 | 34 | public class PoreSpider extends PoreMonster implements org.bukkit.entity.Spider { 35 | 36 | public static PoreSpider of(Spider handle) { 37 | return WrapperConverter.of(PoreSpider.class, handle); 38 | } 39 | 40 | protected PoreSpider(Spider handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Spider getHandle() { 46 | return (Spider) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.SPIDER; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreSquid.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.Squid; 33 | 34 | public class PoreSquid extends PoreWaterMob implements org.bukkit.entity.Squid { 35 | 36 | public static PoreSquid of(Squid handle) { 37 | return WrapperConverter.of(PoreSquid.class, handle); 38 | } 39 | 40 | protected PoreSquid(Squid handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Squid getHandle() { 46 | return (Squid) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.SQUID; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreStray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.entity; 23 | 24 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 25 | 26 | import org.spongepowered.api.entity.living.monster.Stray; 27 | 28 | public class PoreStray extends PoreSkeleton implements org.bukkit.entity.Stray { 29 | 30 | public static PoreStray of(Stray handle) { 31 | return WrapperConverter.of(PoreStray.class, handle); 32 | } 33 | 34 | protected PoreStray(Stray handle) { 35 | super(handle); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreThrownExpBottle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.projectile.ThrownExpBottle; 33 | 34 | public class PoreThrownExpBottle extends PoreProjectile implements org.bukkit.entity.ThrownExpBottle { 35 | 36 | public static PoreThrownExpBottle of(ThrownExpBottle handle) { 37 | return WrapperConverter.of(PoreThrownExpBottle.class, handle); 38 | } 39 | 40 | protected PoreThrownExpBottle(ThrownExpBottle handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public ThrownExpBottle getHandle() { 46 | return (ThrownExpBottle) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.THROWN_EXP_BOTTLE; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreVehicle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import org.bukkit.entity.Vehicle; 30 | import org.spongepowered.api.entity.Entity; 31 | 32 | public class PoreVehicle extends PoreEntity implements Vehicle { 33 | 34 | // TODO: Can we add an of() method here? 35 | 36 | protected PoreVehicle(Entity handle) { 37 | super(handle); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreVex.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.impl.entity; 2 | 3 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 4 | 5 | import org.bukkit.entity.EntityType; 6 | import org.spongepowered.api.entity.living.monster.Vex; 7 | 8 | public class PoreVex extends PoreMonster implements org.bukkit.entity.Vex { 9 | 10 | public static PoreVex of(Vex handle) { 11 | return WrapperConverter.of(PoreVex.class, handle); 12 | } 13 | 14 | protected PoreVex(Vex handle) { 15 | super(handle); 16 | } 17 | 18 | @Override 19 | public Vex getHandle() { 20 | return (Vex) super.getHandle(); 21 | } 22 | 23 | @Override 24 | public EntityType getType() { 25 | return EntityType.VEX; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreVindicator.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.impl.entity; 2 | 3 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 4 | 5 | import org.bukkit.entity.EntityType; 6 | import org.spongepowered.api.entity.living.monster.Vindicator; 7 | 8 | public class PoreVindicator extends PoreMonster implements org.bukkit.entity.Vindicator { 9 | 10 | public static PoreVindicator of(Vindicator handle) { 11 | return WrapperConverter.of(PoreVindicator.class, handle); 12 | } 13 | 14 | protected PoreVindicator(Vindicator handle) { 15 | super(handle); 16 | } 17 | 18 | @Override 19 | public Vindicator getHandle() { 20 | return (Vindicator) super.getHandle(); 21 | } 22 | 23 | @Override 24 | public EntityType getType() { 25 | return EntityType.VINDICATOR; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreWaterMob.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.WaterMob; 32 | import org.spongepowered.api.entity.living.Aquatic; 33 | 34 | public class PoreWaterMob extends PoreCreature implements WaterMob { 35 | 36 | public static PoreWaterMob of(Aquatic handle) { 37 | return WrapperConverter.of(PoreWaterMob.class, handle); 38 | } 39 | 40 | protected PoreWaterMob(Aquatic handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Aquatic getHandle() { 46 | return (Aquatic) super.getHandle(); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreWeather.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.bukkit.entity.Weather; 33 | import org.spongepowered.api.entity.weather.WeatherEffect; 34 | 35 | public class PoreWeather extends PoreEntity implements Weather { 36 | 37 | public static PoreWeather of(WeatherEffect handle) { 38 | return WrapperConverter.of(PoreWeather.class, handle); 39 | } 40 | 41 | protected PoreWeather(WeatherEffect handle) { 42 | super(handle); 43 | } 44 | 45 | @Override 46 | public WeatherEffect getHandle() { 47 | return (WeatherEffect) super.getHandle(); 48 | } 49 | 50 | @Override 51 | public EntityType getType() { 52 | return EntityType.WEATHER; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreWitch.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.monster.Witch; 33 | 34 | public class PoreWitch extends PoreMonster implements org.bukkit.entity.Witch { 35 | 36 | public static PoreWitch of(Witch handle) { 37 | return WrapperConverter.of(PoreWitch.class, handle); 38 | } 39 | 40 | protected PoreWitch(Witch handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Witch getHandle() { 46 | return (Witch) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.WITCH; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreWither.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.living.monster.Wither; 33 | 34 | public class PoreWither extends PoreMonster implements org.bukkit.entity.Wither { 35 | 36 | public static PoreWither of(Wither handle) { 37 | return WrapperConverter.of(PoreWither.class, handle); 38 | } 39 | 40 | protected PoreWither(Wither handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public Wither getHandle() { 46 | return (Wither) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.WITHER; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreWitherSkeleton.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.entity; 23 | 24 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 25 | 26 | import org.spongepowered.api.entity.living.monster.WitherSkeleton; 27 | 28 | public class PoreWitherSkeleton extends PoreSkeleton implements org.bukkit.entity.WitherSkeleton { 29 | 30 | public static PoreWitherSkeleton of(WitherSkeleton handle) { 31 | return WrapperConverter.of(PoreWitherSkeleton.class, handle); 32 | } 33 | 34 | protected PoreWitherSkeleton(WitherSkeleton handle) { 35 | super(handle); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreZombieHorse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.entity; 23 | 24 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 25 | 26 | import org.spongepowered.api.entity.living.animal.ZombieHorse; 27 | 28 | public class PoreZombieHorse extends PoreAbstractHorse implements org.bukkit.entity.ZombieHorse { 29 | 30 | public static PoreZombieHorse of(ZombieHorse handle) { 31 | return WrapperConverter.of(PoreZombieHorse.class, handle); 32 | } 33 | 34 | protected PoreZombieHorse(ZombieHorse handle) { 35 | super(handle); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/PoreZombieVillager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.impl.entity; 23 | 24 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 25 | 26 | import org.spongepowered.api.entity.living.monster.ZombieVillager; 27 | 28 | public class PoreZombieVillager extends PoreZombie implements org.bukkit.entity.ZombieVillager { 29 | 30 | public static PoreZombieVillager of(ZombieVillager handle) { 31 | return WrapperConverter.of(PoreZombieVillager.class, handle); 32 | } 33 | 34 | protected PoreZombieVillager(ZombieVillager handle) { 35 | super(handle); 36 | } 37 | 38 | @Override 39 | public ZombieVillager getHandle() { 40 | return (ZombieVillager) super.getHandle(); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/minecart/PoreExplosiveMinecart.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity.minecart; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.bukkit.entity.minecart.ExplosiveMinecart; 33 | import org.spongepowered.api.entity.vehicle.minecart.TNTMinecart; 34 | 35 | public class PoreExplosiveMinecart extends PoreMinecart implements ExplosiveMinecart { 36 | 37 | public static PoreExplosiveMinecart of(TNTMinecart handle) { 38 | return WrapperConverter.of(PoreExplosiveMinecart.class, handle); 39 | } 40 | 41 | protected PoreExplosiveMinecart(TNTMinecart handle) { 42 | super(handle); 43 | } 44 | 45 | @Override 46 | public TNTMinecart getHandle() { 47 | return (TNTMinecart) super.getHandle(); 48 | } 49 | 50 | @Override 51 | public EntityType getType() { 52 | return EntityType.MINECART_TNT; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/minecart/PorePoweredMinecart.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity.minecart; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.bukkit.entity.minecart.PoweredMinecart; 33 | import org.spongepowered.api.entity.vehicle.minecart.FurnaceMinecart; 34 | 35 | public class PorePoweredMinecart extends PoreMinecart implements PoweredMinecart { 36 | 37 | public static PorePoweredMinecart of(FurnaceMinecart handle) { 38 | return WrapperConverter.of(PorePoweredMinecart.class, handle); 39 | } 40 | 41 | protected PorePoweredMinecart(FurnaceMinecart handle) { 42 | super(handle); 43 | } 44 | 45 | @Override 46 | public FurnaceMinecart getHandle() { 47 | return (FurnaceMinecart) super.getHandle(); 48 | } 49 | 50 | @Override 51 | public EntityType getType() { 52 | return EntityType.MINECART_FURNACE; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/minecart/PoreRideableMinecart.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity.minecart; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.spongepowered.api.entity.vehicle.minecart.RideableMinecart; 33 | 34 | public class PoreRideableMinecart extends PoreMinecart implements org.bukkit.entity.minecart.RideableMinecart { 35 | 36 | public static PoreRideableMinecart of(RideableMinecart handle) { 37 | return WrapperConverter.of(PoreRideableMinecart.class, handle); 38 | } 39 | 40 | protected PoreRideableMinecart(RideableMinecart handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public RideableMinecart getHandle() { 46 | return (RideableMinecart) super.getHandle(); 47 | } 48 | 49 | @Override 50 | public EntityType getType() { 51 | return EntityType.MINECART; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/entity/minecart/PoreSpawnerMinecart.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.entity.minecart; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.entity.EntityType; 32 | import org.bukkit.entity.minecart.SpawnerMinecart; 33 | import org.spongepowered.api.entity.vehicle.minecart.MobSpawnerMinecart; 34 | 35 | public class PoreSpawnerMinecart extends PoreMinecart implements SpawnerMinecart { 36 | 37 | public static PoreSpawnerMinecart of(MobSpawnerMinecart handle) { 38 | return WrapperConverter.of(PoreSpawnerMinecart.class, handle); 39 | } 40 | 41 | protected PoreSpawnerMinecart(MobSpawnerMinecart handle) { 42 | super(handle); 43 | } 44 | 45 | @Override 46 | public MobSpawnerMinecart getHandle() { 47 | return (MobSpawnerMinecart) super.getHandle(); 48 | } 49 | 50 | @Override 51 | public EntityType getType() { 52 | return EntityType.MINECART_MOB_SPAWNER; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/event/player/PorePlayerRegisterChannelEvent.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.impl.event.player; 2 | 3 | import blue.lapis.pore.event.PoreEvent; 4 | import blue.lapis.pore.impl.entity.PorePlayer; 5 | import org.bukkit.entity.Player; 6 | import org.bukkit.event.player.PlayerRegisterChannelEvent; 7 | import org.spongepowered.api.event.network.ChannelRegistrationEvent; 8 | 9 | import static com.google.common.base.Preconditions.checkNotNull; 10 | 11 | public final class PorePlayerRegisterChannelEvent extends PlayerRegisterChannelEvent implements PoreEvent { 12 | 13 | private final ChannelRegistrationEvent.Register handle; 14 | 15 | public PorePlayerRegisterChannelEvent(ChannelRegistrationEvent.Register handle) { 16 | super(null, null); 17 | this.handle = checkNotNull(handle, "handle"); 18 | } 19 | 20 | @Override 21 | public ChannelRegistrationEvent.Register getHandle() { 22 | return handle; 23 | } 24 | 25 | @Override 26 | public String toString() { 27 | return toStringHelper().toString(); 28 | } 29 | 30 | @Override 31 | public String getChannel() { 32 | return handle.getChannel(); 33 | } 34 | 35 | @Override 36 | public Player getPlayer() { 37 | Object o = handle.getSource(); 38 | if (o instanceof org.spongepowered.api.entity.living.player.Player){ 39 | return PorePlayer.of((org.spongepowered.api.entity.living.player.Player) o); 40 | } 41 | return null; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/inventory/PoreAnvilInventory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.inventory; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.inventory.AnvilInventory; 32 | import org.spongepowered.api.item.inventory.Inventory; 33 | 34 | public class PoreAnvilInventory extends PoreInventory implements AnvilInventory { 35 | 36 | public static PoreAnvilInventory of(Inventory handle) { 37 | return WrapperConverter.of(PoreAnvilInventory.class, handle); 38 | } 39 | 40 | protected PoreAnvilInventory(Inventory handle) { 41 | super(handle); 42 | } 43 | 44 | @Override 45 | public String getRenameText() { 46 | return null; 47 | } 48 | 49 | @Override 50 | public int getRepairCost() { 51 | return 0; 52 | } 53 | 54 | @Override 55 | public void setRepairCost(int levels) { 56 | 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/inventory/PoreBeaconInventory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.inventory; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | 31 | import org.bukkit.inventory.BeaconInventory; 32 | import org.bukkit.inventory.ItemStack; 33 | import org.spongepowered.api.item.inventory.Inventory; 34 | 35 | public class PoreBeaconInventory extends PoreInventory implements BeaconInventory { 36 | 37 | public static PoreBeaconInventory of(Inventory handle) { 38 | return WrapperConverter.of(PoreBeaconInventory.class, handle); 39 | } 40 | 41 | protected PoreBeaconInventory(Inventory handle) { 42 | super(handle); 43 | } 44 | 45 | @Override 46 | public ItemStack getItem() { 47 | return super.getItem(0); 48 | } 49 | 50 | @Override 51 | public void setItem(ItemStack item) { 52 | super.setItem(0, item); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/inventory/PoreInventoryHolder.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.inventory; 28 | 29 | import blue.lapis.pore.converter.wrapper.WrapperConverter; 30 | import blue.lapis.pore.util.PoreWrapper; 31 | 32 | import org.bukkit.inventory.Inventory; 33 | import org.bukkit.inventory.InventoryHolder; 34 | import org.spongepowered.api.item.inventory.Carrier; 35 | 36 | public class PoreInventoryHolder extends PoreWrapper implements InventoryHolder { 37 | 38 | public static PoreInventoryHolder of(Carrier handle) { 39 | return WrapperConverter.of(PoreInventoryHolder.class, handle); 40 | } 41 | 42 | protected PoreInventoryHolder(Carrier handle) { 43 | super(handle); 44 | } 45 | 46 | @Override 47 | public Inventory getInventory() { 48 | return PoreInventory.of(this.getHandle().getInventory()); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/inventory/PoreRecipe.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.inventory; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.inventory.ItemStack; 31 | import org.bukkit.inventory.Recipe; 32 | 33 | // TODO: bridge 34 | 35 | public class PoreRecipe implements Recipe { 36 | 37 | @Override 38 | public ItemStack getResult() { 39 | throw new NotImplementedException("TODO"); //TODO 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/map/PoreMapRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.map; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.entity.Player; 31 | import org.bukkit.map.MapCanvas; 32 | import org.bukkit.map.MapRenderer; 33 | import org.bukkit.map.MapView; 34 | 35 | public class PoreMapRenderer extends MapRenderer { 36 | 37 | @Override 38 | public void render(MapView map, MapCanvas canvas, Player player) { 39 | throw new NotImplementedException("TODO"); //TODO 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/scheduler/PoreBukkitWorker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.scheduler; 28 | 29 | import org.apache.commons.lang3.NotImplementedException; 30 | import org.bukkit.plugin.Plugin; 31 | import org.bukkit.scheduler.BukkitWorker; 32 | 33 | // TODO: Bridge 34 | 35 | public class PoreBukkitWorker implements BukkitWorker { 36 | 37 | @Override 38 | public int getTaskId() { 39 | throw new NotImplementedException("TODO"); //TODO 40 | } 41 | 42 | @Override 43 | public Plugin getOwner() { 44 | throw new NotImplementedException("TODO"); //TODO 45 | } 46 | 47 | @Override 48 | public Thread getThread() { 49 | throw new NotImplementedException("TODO"); //TODO 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/impl/scheduler/PoreFuture.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.impl.scheduler; 28 | 29 | import com.google.common.util.concurrent.AbstractFuture; 30 | import org.spongepowered.api.scheduler.Task; 31 | 32 | import java.util.concurrent.Callable; 33 | 34 | class PoreFuture extends AbstractFuture implements Runnable { 35 | 36 | private final Callable callable; 37 | Task handle; 38 | 39 | PoreFuture(Callable callable) { 40 | this.callable = callable; 41 | } 42 | 43 | @Override 44 | public void run() { 45 | try { 46 | set(callable.call()); 47 | } catch (Exception e) { 48 | setException(e); 49 | } 50 | } 51 | 52 | @Override 53 | protected void interruptTask() { 54 | handle.cancel(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/launch/PoreEventManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) 2014-2016, Lapis MIT 6 | * Copyright (c) Contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 21 | */ 22 | 23 | package blue.lapis.pore.launch; 24 | 25 | import org.spongepowered.api.event.game.state.GameAboutToStartServerEvent; 26 | import org.spongepowered.api.event.game.state.GamePreInitializationEvent; 27 | import org.spongepowered.api.event.game.state.GameStartingServerEvent; 28 | import org.spongepowered.api.event.game.state.GameStoppingServerEvent; 29 | import org.spongepowered.api.event.message.MessageChannelEvent; 30 | 31 | public interface PoreEventManager { 32 | 33 | void onPreInit(GamePreInitializationEvent event) throws Exception; 34 | 35 | void onAboutToStart(GameAboutToStartServerEvent event) throws Exception; 36 | 37 | void onStarting(GameStartingServerEvent event) throws Exception; 38 | 39 | void onShutdown(GameStoppingServerEvent event) throws Exception; 40 | 41 | void onChatEvent(MessageChannelEvent.Chat event) throws Exception; 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/mixin/net/minecraft/block/MixinBlockButton.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.mixin.net.minecraft.block; 2 | 3 | import net.minecraft.block.BlockButton; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.injection.At; 6 | import org.spongepowered.asm.mixin.injection.Inject; 7 | 8 | @Mixin(BlockButton.class) 9 | public class MixinBlockButton { 10 | 11 | //@Inject(method = "onBlockActivated", at = @At(value = "INVOKE", target = "Ljava/lang/Boolean;valueOf(Z)Ljava/lang/Boolean;")) 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/mixin/net/minecraft/entity/player/MixinEntityPlayerMP.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.mixin.net.minecraft.entity.player; 23 | 24 | import blue.lapis.pore.impl.entity.PorePlayer; 25 | import net.minecraft.entity.player.EntityPlayerMP; 26 | import org.spongepowered.api.entity.living.player.Player; 27 | import org.spongepowered.asm.mixin.Mixin; 28 | 29 | @Mixin(EntityPlayerMP.class) 30 | public abstract class MixinEntityPlayerMP implements Player { 31 | 32 | public PorePlayer getBukkitEntity() { 33 | return PorePlayer.of(this); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/mixin/net/minecraft/item/MixinItemStack.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.mixin.net.minecraft.item; 23 | 24 | import net.minecraft.item.Item; 25 | import net.minecraft.item.ItemStack; 26 | import org.spongepowered.asm.mixin.Mixin; 27 | import org.spongepowered.asm.mixin.Shadow; 28 | 29 | @Mixin(ItemStack.class) 30 | public class MixinItemStack { 31 | 32 | @Shadow private Item item; 33 | 34 | public void setItem(Item item) { 35 | //Thread.dumpStack(); 36 | this.item = item; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/mixin/net/minecraft/network/MixinNetworkManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.mixin.net.minecraft.network; 23 | 24 | import net.minecraft.network.NetworkManager; 25 | import org.spongepowered.asm.mixin.Mixin; 26 | import org.spongepowered.asm.mixin.Shadow; 27 | 28 | import java.net.SocketAddress; 29 | 30 | @Mixin(NetworkManager.class) 31 | public abstract class MixinNetworkManager { 32 | 33 | @Shadow private SocketAddress socketAddress; 34 | 35 | public SocketAddress getRawAddress() { 36 | return this.socketAddress; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/mixin/org/apache/commons/lang3/MixinNotImplementedException.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.mixin.org.apache.commons.lang3; 2 | 3 | import blue.lapis.pore.Pore; 4 | import org.apache.commons.lang3.NotImplementedException; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 9 | 10 | @Mixin(value = NotImplementedException.class, remap = false) 11 | public class MixinNotImplementedException { 12 | 13 | @Inject(method = "", at = @At("RETURN")) 14 | private void onInit(String message, CallbackInfoReturnable callbackInfoReturnable){ 15 | if (message.equalsIgnoreCase("TODO")){ 16 | Pore.catchTodo(Thread.currentThread().getStackTrace()[2].getClassName()); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/mixin/org/bukkit/plugin/messaging/MixinStandardMessenger.java: -------------------------------------------------------------------------------- 1 | package blue.lapis.pore.mixin.org.bukkit.plugin.messaging; 2 | 3 | import blue.lapis.pore.Pore; 4 | import blue.lapis.pore.impl.entity.PorePlayer; 5 | import org.bukkit.plugin.Plugin; 6 | import org.bukkit.plugin.messaging.PluginMessageListener; 7 | import org.bukkit.plugin.messaging.PluginMessageListenerRegistration; 8 | import org.spongepowered.api.Platform; 9 | import org.spongepowered.api.Sponge; 10 | import org.spongepowered.api.network.ChannelBinding; 11 | import org.spongepowered.api.network.PlayerConnection; 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 16 | 17 | import static java.nio.charset.StandardCharsets.*; 18 | 19 | @Mixin(targets = "org/bukkit/plugin/messaging/StandardMessenger", remap = false) 20 | public abstract class MixinStandardMessenger { 21 | 22 | 23 | 24 | @Inject(method = "registerIncomingPluginChannel", at = @At("RETURN")) 25 | private void onRegisterIncomingPluginChannel(Plugin plugin, String channel, PluginMessageListener listener 26 | , CallbackInfoReturnable ci){ 27 | ChannelBinding.RawDataChannel rawDataChannel = Sponge.getChannelRegistrar().createRawChannel(Pore.getPlugin(plugin), 28 | channel); 29 | rawDataChannel.addListener(Platform.Type.SERVER, (data, connection, side) -> { 30 | System.out.println("Minix Channel are ready!!!"); 31 | if (connection instanceof PlayerConnection) { 32 | org.bukkit.entity.Player player = PorePlayer.of(((PlayerConnection) connection).getPlayer()); 33 | byte[] bytedata = data.readBytes(data.available()); 34 | String message = new String(bytedata, UTF_8); 35 | Pore.getLogger().debug(player.getDisplayName() + ": " + message); 36 | Pore.getServer().getMessenger().dispatchIncomingMessage(player, channel, bytedata); 37 | } 38 | }); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/util/PoreText.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.util; 28 | 29 | import org.spongepowered.api.text.Text; 30 | import org.spongepowered.api.text.serializer.TextSerializers; 31 | 32 | @SuppressWarnings("deprecation") //TODO fix this 33 | public final class PoreText { 34 | 35 | private PoreText() { 36 | } 37 | 38 | public static String convert(Text text) { 39 | return text != null ? TextSerializers.LEGACY_FORMATTING_CODE.serialize(text) : null; 40 | } 41 | 42 | public static Text convert(String text) { 43 | return text != null ? TextSerializers.LEGACY_FORMATTING_CODE.deserialize(text) : null; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/util/PoreWrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.util; 28 | 29 | import com.google.common.base.Preconditions; 30 | 31 | public abstract class PoreWrapper { 32 | 33 | private final T handle; 34 | 35 | protected PoreWrapper(T handle) { 36 | this.handle = Preconditions.checkNotNull(handle, "handle"); 37 | } 38 | 39 | public T getHandle() { 40 | return handle; 41 | } 42 | 43 | @Override // for storage of objects 44 | public int hashCode() { 45 | return getHandle().hashCode(); 46 | } 47 | 48 | @Override 49 | public boolean equals(Object object) { 50 | if (object instanceof PoreWrapper) { 51 | return ((PoreWrapper) object) 52 | .getHandle() 53 | .equals(this.getHandle()); 54 | } 55 | return super.equals(object); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/util/classloader/LocalClassLoader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.util.classloader; 28 | 29 | public interface LocalClassLoader { 30 | 31 | Class defineClass(String name, byte[] b); 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/util/classloader/LocalClassLoaders.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.util.classloader; 28 | 29 | public final class LocalClassLoaders { 30 | 31 | private LocalClassLoaders() { 32 | } 33 | 34 | public static LocalClassLoader of() { 35 | return of(Thread.currentThread().getContextClassLoader()); 36 | } 37 | 38 | public static LocalClassLoader of(Class type) { 39 | return of(type.getClassLoader()); 40 | } 41 | 42 | public static LocalClassLoader of(ClassLoader loader) { 43 | if (loader instanceof LocalClassLoader) { 44 | return (LocalClassLoader) loader; 45 | } else { 46 | return new LocalReflectClassLoader(loader); 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/util/constructor/BiClassConstructor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.util.constructor; 28 | 29 | import java.util.function.BiFunction; 30 | 31 | public interface BiClassConstructor extends ClassConstructor, BiFunction { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/util/constructor/ClassConstructor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.util.constructor; 28 | 29 | public interface ClassConstructor { 30 | 31 | Class getType(); 32 | 33 | interface Provider { 34 | 35 | SimpleClassConstructor create(Class type, Class

parameter) throws Exception; 36 | 37 | BiClassConstructor create(Class type, Class parameterA, Class parameterB) 38 | throws Exception; 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/util/constructor/SimpleClassConstructor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Pore(RT) 3 | * Copyright (c) 2014-2016, Lapis 4 | * Copyright (c) 2014-2016, Contributors 5 | * 6 | * The MIT License 7 | * 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy 9 | * of this software and associated documentation files (the "Software"), to deal 10 | * in the Software without restriction, including without limitation the rights 11 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | * copies of the Software, and to permit persons to whom the Software is 13 | * furnished to do so, subject to the following conditions: 14 | * 15 | * The above copyright notice and this permission notice shall be included in 16 | * all copies or substantial portions of the Software. 17 | * 18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | * THE SOFTWARE. 25 | */ 26 | 27 | package blue.lapis.pore.util.constructor; 28 | 29 | import java.util.function.Function; 30 | 31 | public interface SimpleClassConstructor extends ClassConstructor, Function { 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/blue/lapis/pore/vault/PoreVaultInjector.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Contributors 6 | * 7 | * This program is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU Affero General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU Affero General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Affero General Public License 18 | * along with this program. If not, see . 19 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 20 | */ 21 | 22 | package blue.lapis.pore.vault; 23 | 24 | import blue.lapis.pore.Pore; 25 | import blue.lapis.pore.util.classloader.LocalClassLoader; 26 | import blue.lapis.pore.util.classloader.LocalReflectClassLoader; 27 | 28 | import org.apache.commons.io.IOUtils; 29 | import org.bukkit.plugin.Plugin; 30 | 31 | import java.net.URL; 32 | 33 | public class PoreVaultInjector { 34 | 35 | public static final String START = "blue.lapis.pore.vault.PoreVault"; 36 | public static final String HOOK = START + "Hook"; 37 | 38 | public static void inject() throws Exception { 39 | Plugin vault = Pore.getServer().getPluginManager().getPlugin("Vault"); 40 | if (vault == null) return; 41 | 42 | ClassLoader loader = vault.getClass().getClassLoader(); 43 | LocalClassLoader injector = new LocalReflectClassLoader(loader); 44 | for (String addition : new String[]{"Hook", "Chat", "Economy", "Permissions"}) { 45 | String name = START + addition; 46 | URL url = Pore.class.getClassLoader().getResource(name.replace('.', '/') + ".class"); 47 | byte[] clazz = IOUtils.toByteArray(url); 48 | injector.defineClass(name, clazz); 49 | } 50 | Class.forName(HOOK, true, loader).getMethod("hook").invoke(null); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/org/spigotmc/LimitStream.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Spigot/Craftbukkit Project LGPLv3 6 | * Copyright (c) Contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 21 | */ 22 | 23 | package org.spigotmc; 24 | 25 | import net.minecraft.nbt.NBTSizeTracker; 26 | 27 | import java.io.FilterInputStream; 28 | import java.io.IOException; 29 | import java.io.InputStream; 30 | 31 | public class LimitStream extends FilterInputStream { 32 | 33 | private final NBTSizeTracker limit; 34 | 35 | public LimitStream(InputStream is, NBTSizeTracker limit) { 36 | super( is ); 37 | this.limit = limit; 38 | } 39 | 40 | @Override 41 | public int read() throws IOException { 42 | limit.read( 8 ); 43 | return super.read(); 44 | } 45 | 46 | @Override 47 | public int read(byte[] b) throws IOException { 48 | limit.read( b.length * 8 ); 49 | return super.read( b ); 50 | } 51 | 52 | @Override 53 | public int read(byte[] b, int off, int len) throws IOException { 54 | limit.read( len * 8 ); 55 | return super.read( b, off, len ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/org/spigotmc/SneakyThrow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PoreRT - A Bukkit to Sponge Bridge 3 | * 4 | * Copyright (c) 2016, Maxqia AGPLv3 5 | * Copyright (c) Spigot/Craftbukkit Project LGPLv3 6 | * Copyright (c) Contributors 7 | * 8 | * This program is free software: you can redistribute it and/or modify 9 | * it under the terms of the GNU Affero General Public License as published by 10 | * the Free Software Foundation, either version 3 of the License, or 11 | * (at your option) any later version. 12 | * 13 | * This program is distributed in the hope that it will be useful, 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | * GNU Affero General Public License for more details. 17 | * 18 | * You should have received a copy of the GNU Affero General Public License 19 | * along with this program. If not, see . 20 | * An exception applies to this license, see the LICENSE file in the main directory for more information. 21 | */ 22 | 23 | package org.spigotmc; 24 | 25 | public class SneakyThrow { 26 | 27 | public static void sneaky(Throwable t) { 28 | throw SneakyThrow.superSneaky( t ); 29 | } 30 | 31 | @SuppressWarnings("unchecked") 32 | private static T superSneaky(Throwable t) throws T { 33 | throw (T) t; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/resources/configurations/bukkit.yml: -------------------------------------------------------------------------------- 1 | # This is the main configuration file for Bukkit. 2 | # As you can see, there's actually not that much to configure without any plugins. 3 | # For a reference for any variable inside this file, check out the Bukkit Wiki at 4 | # http://wiki.bukkit.org/Bukkit.yml 5 | # 6 | # If you need help on this file, feel free to join us on irc or leave a message 7 | # on the forums asking for advice. 8 | # 9 | # IRC: #spigot @ irc.spi.gt 10 | # (If this means nothing to you, just go to http://www.spigotmc.org/pages/irc/ ) 11 | # Forums: http://www.spigotmc.org/ 12 | # Bug tracker: http://www.spigotmc.org/go/bugs 13 | 14 | 15 | settings: 16 | allow-end: true 17 | warn-on-overload: true 18 | permissions-file: permissions.yml 19 | update-folder: update 20 | plugin-profiling: false 21 | connection-throttle: 4000 22 | query-plugins: true 23 | deprecated-verbose: default 24 | shutdown-message: Server closed 25 | spawn-limits: 26 | monsters: 70 27 | animals: 15 28 | water-animals: 5 29 | ambient: 15 30 | chunk-gc: 31 | period-in-ticks: 600 32 | load-threshold: 0 33 | ticks-per: 34 | animal-spawns: 400 35 | monster-spawns: 1 36 | autosave: 6000 37 | aliases: now-in-commands.yml 38 | -------------------------------------------------------------------------------- /src/main/resources/configurations/commands.yml: -------------------------------------------------------------------------------- 1 | # This is the commands configuration file for Bukkit. 2 | # For documentation on how to make use of this file, check out the Bukkit Wiki at 3 | # http://wiki.bukkit.org/Commands.yml 4 | # 5 | # If you need help on this file, feel free to join us on irc or leave a message 6 | # on the forums asking for advice. 7 | # 8 | # IRC: #spigot @ irc.spi.gt 9 | # (If this means nothing to you, just go to http://www.spigotmc.org/pages/irc/ ) 10 | # Forums: http://www.spigotmc.org/ 11 | # Bug tracker: http://www.spigotmc.org/go/bugs 12 | 13 | command-block-overrides: [] 14 | unrestricted-advancements: false 15 | aliases: 16 | icanhasbukkit: 17 | - "version $1-" 18 | -------------------------------------------------------------------------------- /src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/resources/mixins.pore.bukkit.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": "blue.lapis.pore.mixin", 3 | "refmap": "mixins.pore.refmap.json", 4 | "target": "@env(DEFAULT)", 5 | "compatibilityLevel": "JAVA_8", 6 | "mixins": [ 7 | ], 8 | "injectors": { 9 | "defaultRequire": 1 10 | }, 11 | "minVersion" : "0.6.1" 12 | } -------------------------------------------------------------------------------- /src/main/resources/mixins.pore.core.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": "blue.lapis.pore.mixin", 3 | "refmap": "mixins.pore.refmap.json", 4 | "target": "@env(DEFAULT)", 5 | "compatibilityLevel": "JAVA_8", 6 | "mixins": [ 7 | "net.minecraft.entity.player.MixinEntityPlayerMP", 8 | "net.minecraft.network.MixinNetworkManager", 9 | "net.minecraft.network.MixinNetHandlerPlayServer", 10 | "net.minecraft.item.MixinItemStack" 11 | ], 12 | "injectors": { 13 | "defaultRequire": 1 14 | }, 15 | "minVersion" : "0.6.1" 16 | } -------------------------------------------------------------------------------- /src/main/resources/mixins.pore.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "package": "blue.lapis.pore.mixin", 3 | "refmap": "mixins.pore.refmap.json", 4 | "target": "@env(DEFAULT)", 5 | "compatibilityLevel": "JAVA_8", 6 | "mixins": [ 7 | "org.apache.commons.lang3.MixinNotImplementedException" 8 | ], 9 | "injectors": { 10 | "defaultRequire": 1 11 | }, 12 | "minVersion" : "0.6.1" 13 | } -------------------------------------------------------------------------------- /src/main/resources/remap.txt: -------------------------------------------------------------------------------- 1 | org/bukkit/entity/Damageable _INVALID_damage(I)V damage 2 | org/bukkit/entity/Damageable _INVALID_damage(ILorg/bukkit/entity/Entity;)V damage 3 | org/bukkit/entity/Damageable _INVALID_getHealth()I getHealth 4 | org/bukkit/entity/Damageable _INVALID_setHealth(I)V setHealth 5 | org/bukkit/entity/Damageable _INVALID_getMaxHealth()I getMaxHealth 6 | org/bukkit/entity/Damageable _INVALID_setMaxHealth(I)V setMaxHealth 7 | org/bukkit/entity/LivingEntity _INVALID_getLastDamage()I getLastDamage 8 | org/bukkit/entity/LivingEntity _INVALID_setLastDamage(I)V setLastDamage 9 | org/bukkit/event/entity/EntityDamageEvent _INVALID_getDamage()I getDamage 10 | org/bukkit/event/entity/EntityDamageEvent _INVALID_setDamage(I)V setDamage 11 | org/bukkit/event/vehicle/VehicleDamageEvent _INVALID_getDamage()I getDamage 12 | org/bukkit/event/vehicle/VehicleDamageEvent _INVALID_setDamage(I)V setDamage 13 | org/bukkit/event/entity/EntityRegainHealthEvent _INVALID_getAmount()I getAmount 14 | org/bukkit/event/entity/EntityRegainHealthEvent _INVALID_setAmount(I)V setAmount 15 | org/bukkit/entity/Minecart _INVALID_getDamage()I getDamage 16 | org/bukkit/entity/Minecart _INVALID_setDamage(I)V setDamage 17 | org/bukkit/entity/Projectile _INVALID_getShooter()Lorg/bukkit/entity/LivingEntity; getShooter 18 | org/bukkit/entity/Projectile _INVALID_setShooter(Lorg/bukkit/entity/LivingEntity;)V setShooter 19 | org/bukkit/Bukkit _INVALID_getOnlinePlayers()[Lorg/bukkit/entity/Player; getOnlinePlayers 20 | org/bukkit/Server _INVALID_getOnlinePlayers()[Lorg/bukkit/entity/Player; getOnlinePlayers 21 | --------------------------------------------------------------------------------