├── .gitignore
├── README.md
├── pom.xml
└── src
├── main
├── java
│ └── net
│ │ └── canarymod
│ │ ├── BlockIterator.java
│ │ ├── Canary.java
│ │ ├── CanaryClassLoader.java
│ │ ├── CanaryClassWatcher.java
│ │ ├── CanaryDeserializeException.java
│ │ ├── LineTracer.java
│ │ ├── MathHelp.java
│ │ ├── NativeTranslateBridge.java
│ │ ├── ToolBox.java
│ │ ├── Translator.java
│ │ ├── api
│ │ ├── BoundingBox.java
│ │ ├── CommandBlockLogic.java
│ │ ├── ConfigurationManager.java
│ │ ├── DamageSource.java
│ │ ├── DamageType.java
│ │ ├── DataWatcher.java
│ │ ├── DyeColor.java
│ │ ├── EntityTracker.java
│ │ ├── EntityTrackerEntry.java
│ │ ├── GameMode.java
│ │ ├── MobSpawnerEntry.java
│ │ ├── MobSpawnerLogic.java
│ │ ├── NetServerHandler.java
│ │ ├── OfflinePlayer.java
│ │ ├── PathFinder.java
│ │ ├── PlayerListAction.java
│ │ ├── PlayerListData.java
│ │ ├── PlayerManager.java
│ │ ├── PlayerReference.java
│ │ ├── Server.java
│ │ ├── VillagerTrade.java
│ │ ├── ai
│ │ │ ├── AIArrowAttack.java
│ │ │ ├── AIAttackOnCollide.java
│ │ │ ├── AIAvoidEntity.java
│ │ │ ├── AIBase.java
│ │ │ ├── AIBeg.java
│ │ │ ├── AIBreakDoor.java
│ │ │ ├── AIControlledByPlayer.java
│ │ │ ├── AICreeperSwell.java
│ │ │ ├── AIDefendVillage.java
│ │ │ ├── AIDoorInteract.java
│ │ │ ├── AIEatGrass.java
│ │ │ ├── AIFindEntityNearest.java
│ │ │ ├── AIFindEntityNearestPlayer.java
│ │ │ ├── AIFleeSun.java
│ │ │ ├── AIFollowGolem.java
│ │ │ ├── AIFollowOwner.java
│ │ │ ├── AIFollowParent.java
│ │ │ ├── AIHarvestFarmland.java
│ │ │ ├── AIHurtByTarget.java
│ │ │ ├── AILeapAtTarget.java
│ │ │ ├── AILookAtTradePlayer.java
│ │ │ ├── AILookAtVillager.java
│ │ │ ├── AILookIdle.java
│ │ │ ├── AIManager.java
│ │ │ ├── AIMate.java
│ │ │ ├── AIMoveIndoors.java
│ │ │ ├── AIMoveThroughVillage.java
│ │ │ ├── AIMoveToBlock.java
│ │ │ ├── AIMoveTowardsRestriction.java
│ │ │ ├── AIMoveTowardsTarget.java
│ │ │ ├── AINearestAttackableTarget.java
│ │ │ ├── AIOcelotAttack.java
│ │ │ ├── AIOcelotSit.java
│ │ │ ├── AIOpenDoor.java
│ │ │ ├── AIOwnerHurtByTarget.java
│ │ │ ├── AIOwnerHurtTarget.java
│ │ │ ├── AIPanic.java
│ │ │ ├── AIPlay.java
│ │ │ ├── AIRestrictOpenDoor.java
│ │ │ ├── AIRestrictSun.java
│ │ │ ├── AIRunAroundLikeCrazy.java
│ │ │ ├── AISit.java
│ │ │ ├── AISwimming.java
│ │ │ ├── AITarget.java
│ │ │ ├── AITargetNonTamed.java
│ │ │ ├── AITempt.java
│ │ │ ├── AITradePlayer.java
│ │ │ ├── AIVillagerInteract.java
│ │ │ ├── AIVillagerMate.java
│ │ │ ├── AIWander.java
│ │ │ ├── AIWatchClosest.java
│ │ │ └── AIWatchClosest2.java
│ │ ├── attributes
│ │ │ ├── Attribute.java
│ │ │ ├── AttributeMap.java
│ │ │ ├── AttributeModifier.java
│ │ │ ├── GenericAttribute.java
│ │ │ ├── HorseAttribute.java
│ │ │ ├── ModifiableAttribute.java
│ │ │ ├── ModifiedAttribute.java
│ │ │ ├── Operations.java
│ │ │ ├── RangedAttribute.java
│ │ │ └── ZombieAttribute.java
│ │ ├── chat
│ │ │ ├── ChatComponent.java
│ │ │ ├── ChatFormatting.java
│ │ │ ├── ChatStyle.java
│ │ │ ├── ClickEvent.java
│ │ │ ├── ClickEventAction.java
│ │ │ ├── HoverEvent.java
│ │ │ └── HoverEventAction.java
│ │ ├── entity
│ │ │ ├── ArmorStand.java
│ │ │ ├── Arrow.java
│ │ │ ├── EnderCrystal.java
│ │ │ ├── EnderEye.java
│ │ │ ├── Entity.java
│ │ │ ├── EntityItem.java
│ │ │ ├── EntityType.java
│ │ │ ├── Explosive.java
│ │ │ ├── FallingBlock.java
│ │ │ ├── Fireball.java
│ │ │ ├── FireworkRocket.java
│ │ │ ├── FishHook.java
│ │ │ ├── LargeFireball.java
│ │ │ ├── Projectile.java
│ │ │ ├── SmallFireball.java
│ │ │ ├── TNTPrimed.java
│ │ │ ├── WitherSkull.java
│ │ │ ├── XPOrb.java
│ │ │ ├── effect
│ │ │ │ ├── LightningBolt.java
│ │ │ │ └── WeatherEffect.java
│ │ │ ├── hanging
│ │ │ │ ├── HangingEntity.java
│ │ │ │ ├── ItemFrame.java
│ │ │ │ ├── LeashKnot.java
│ │ │ │ └── Painting.java
│ │ │ ├── living
│ │ │ │ ├── Ageable.java
│ │ │ │ ├── AmbientCreature.java
│ │ │ │ ├── EntityLiving.java
│ │ │ │ ├── Golem.java
│ │ │ │ ├── IronGolem.java
│ │ │ │ ├── LivingBase.java
│ │ │ │ ├── Snowman.java
│ │ │ │ ├── animal
│ │ │ │ │ ├── Bat.java
│ │ │ │ │ ├── Chicken.java
│ │ │ │ │ ├── Cow.java
│ │ │ │ │ ├── EntityAnimal.java
│ │ │ │ │ ├── Horse.java
│ │ │ │ │ ├── Mooshroom.java
│ │ │ │ │ ├── Ocelot.java
│ │ │ │ │ ├── Pig.java
│ │ │ │ │ ├── Rabbit.java
│ │ │ │ │ ├── Sheep.java
│ │ │ │ │ ├── Squid.java
│ │ │ │ │ ├── Tameable.java
│ │ │ │ │ └── Wolf.java
│ │ │ │ ├── humanoid
│ │ │ │ │ ├── Human.java
│ │ │ │ │ ├── HumanCapabilities.java
│ │ │ │ │ ├── NonPlayableCharacter.java
│ │ │ │ │ ├── Player.java
│ │ │ │ │ ├── Villager.java
│ │ │ │ │ └── npc
│ │ │ │ │ │ ├── NPCAIExcutionException.java
│ │ │ │ │ │ ├── NPCBehavior.java
│ │ │ │ │ │ ├── NPCBehaviorListener.java
│ │ │ │ │ │ ├── NPCBehaviorRegisteredListener.java
│ │ │ │ │ │ ├── NPCBehaviorRegistry.java
│ │ │ │ │ │ ├── NpcAiListenerMethodConsistancyException.java
│ │ │ │ │ │ └── ai
│ │ │ │ │ │ ├── Attacked.java
│ │ │ │ │ │ ├── Clicked.java
│ │ │ │ │ │ ├── Destroyed.java
│ │ │ │ │ │ ├── NPCAI.java
│ │ │ │ │ │ ├── PickupItem.java
│ │ │ │ │ │ └── Update.java
│ │ │ │ └── monster
│ │ │ │ │ ├── Blaze.java
│ │ │ │ │ ├── CaveSpider.java
│ │ │ │ │ ├── Creeper.java
│ │ │ │ │ ├── EnderDragon.java
│ │ │ │ │ ├── Enderman.java
│ │ │ │ │ ├── Endermite.java
│ │ │ │ │ ├── EntityMob.java
│ │ │ │ │ ├── Ghast.java
│ │ │ │ │ ├── GiantZombie.java
│ │ │ │ │ ├── Guardian.java
│ │ │ │ │ ├── MagmaCube.java
│ │ │ │ │ ├── PigZombie.java
│ │ │ │ │ ├── RangedAttackMob.java
│ │ │ │ │ ├── Silverfish.java
│ │ │ │ │ ├── Skeleton.java
│ │ │ │ │ ├── Slime.java
│ │ │ │ │ ├── Spider.java
│ │ │ │ │ ├── Witch.java
│ │ │ │ │ ├── Wither.java
│ │ │ │ │ └── Zombie.java
│ │ │ ├── throwable
│ │ │ │ ├── ChickenEgg.java
│ │ │ │ ├── EnderPearl.java
│ │ │ │ ├── EntityPotion.java
│ │ │ │ ├── EntityThrowable.java
│ │ │ │ ├── Snowball.java
│ │ │ │ └── XPBottle.java
│ │ │ └── vehicle
│ │ │ │ ├── AnimalVehicle.java
│ │ │ │ ├── Boat.java
│ │ │ │ ├── ChestMinecart.java
│ │ │ │ ├── CommandBlockMinecart.java
│ │ │ │ ├── ContainerMinecart.java
│ │ │ │ ├── EmptyMinecart.java
│ │ │ │ ├── FurnaceMinecart.java
│ │ │ │ ├── HopperMinecart.java
│ │ │ │ ├── Minecart.java
│ │ │ │ ├── MobSpawnerMinecart.java
│ │ │ │ ├── TNTMinecart.java
│ │ │ │ └── Vehicle.java
│ │ ├── factory
│ │ │ ├── AIFactory.java
│ │ │ ├── AttributeFactory.java
│ │ │ ├── ChatComponentFactory.java
│ │ │ ├── EntityFactory.java
│ │ │ ├── Factory.java
│ │ │ ├── ItemFactory.java
│ │ │ ├── NBTFactory.java
│ │ │ ├── ObjectFactory.java
│ │ │ ├── PacketFactory.java
│ │ │ ├── PotionFactory.java
│ │ │ └── StatisticsFactory.java
│ │ ├── gui
│ │ │ └── GUIControl.java
│ │ ├── inventory
│ │ │ ├── AnimalInventory.java
│ │ │ ├── BaseItem.java
│ │ │ ├── CraftingMatrix.java
│ │ │ ├── CustomStorageInventory.java
│ │ │ ├── Enchantment.java
│ │ │ ├── EnderChestInventory.java
│ │ │ ├── Hopper.java
│ │ │ ├── Inventory.java
│ │ │ ├── InventoryType.java
│ │ │ ├── Item.java
│ │ │ ├── ItemType.java
│ │ │ ├── ItemTypeException.java
│ │ │ ├── MapData.java
│ │ │ ├── PlayerCraftingMatrix.java
│ │ │ ├── PlayerInventory.java
│ │ │ ├── VillagerInventory.java
│ │ │ ├── helper
│ │ │ │ ├── BannerPattern.java
│ │ │ │ ├── BannerPatterns.java
│ │ │ │ ├── BookHelper.java
│ │ │ │ ├── ColoredItemHelper.java
│ │ │ │ ├── FireworkHelper.java
│ │ │ │ ├── ItemHelper.java
│ │ │ │ ├── LeatherArmorHelper.java
│ │ │ │ ├── PotionItemHelper.java
│ │ │ │ └── SkullHelper.java
│ │ │ ├── recipes
│ │ │ │ ├── CraftingRecipe.java
│ │ │ │ ├── Recipe.java
│ │ │ │ ├── RecipeRow.java
│ │ │ │ ├── ShapedRecipe.java
│ │ │ │ ├── ShapelessRecipe.java
│ │ │ │ └── SmeltRecipe.java
│ │ │ └── slot
│ │ │ │ ├── ButtonPress.java
│ │ │ │ ├── GrabMode.java
│ │ │ │ ├── SecondarySlotType.java
│ │ │ │ └── SlotType.java
│ │ ├── nbt
│ │ │ ├── BaseTag.java
│ │ │ ├── ByteArrayTag.java
│ │ │ ├── ByteTag.java
│ │ │ ├── CompoundTag.java
│ │ │ ├── DoubleTag.java
│ │ │ ├── FloatTag.java
│ │ │ ├── IntArrayTag.java
│ │ │ ├── IntTag.java
│ │ │ ├── ListTag.java
│ │ │ ├── LongTag.java
│ │ │ ├── NBTTagType.java
│ │ │ ├── PrimitiveTag.java
│ │ │ ├── ShortTag.java
│ │ │ └── StringTag.java
│ │ ├── packet
│ │ │ ├── BlockChangePacket.java
│ │ │ ├── InvalidPacketConstructionException.java
│ │ │ └── Packet.java
│ │ ├── potion
│ │ │ ├── Potion.java
│ │ │ ├── PotionEffect.java
│ │ │ ├── PotionEffectType.java
│ │ │ └── PotionType.java
│ │ ├── scoreboard
│ │ │ ├── CriteriaType.java
│ │ │ ├── Score.java
│ │ │ ├── ScoreDummyCriteria.java
│ │ │ ├── ScoreHealthCriteria.java
│ │ │ ├── ScoreObjective.java
│ │ │ ├── ScoreObjectiveCriteria.java
│ │ │ ├── ScorePosition.java
│ │ │ ├── Scoreboard.java
│ │ │ ├── ScoreboardManager.java
│ │ │ └── Team.java
│ │ ├── statistics
│ │ │ ├── Achievement.java
│ │ │ ├── Achievements.java
│ │ │ ├── Stat.java
│ │ │ └── Statistics.java
│ │ └── world
│ │ │ ├── Biome.java
│ │ │ ├── BiomeType.java
│ │ │ ├── Chunk.java
│ │ │ ├── ChunkProvider.java
│ │ │ ├── ChunkProviderCustom.java
│ │ │ ├── DimensionType.java
│ │ │ ├── TreeType.java
│ │ │ ├── UnknownWorldException.java
│ │ │ ├── Village.java
│ │ │ ├── World.java
│ │ │ ├── WorldManager.java
│ │ │ ├── WorldType.java
│ │ │ ├── blocks
│ │ │ ├── Anvil.java
│ │ │ ├── Banner.java
│ │ │ ├── Beacon.java
│ │ │ ├── Block.java
│ │ │ ├── BlockBase.java
│ │ │ ├── BlockFace.java
│ │ │ ├── BlockMaterial.java
│ │ │ ├── BlockType.java
│ │ │ ├── BrewingStand.java
│ │ │ ├── Chest.java
│ │ │ ├── CommandBlock.java
│ │ │ ├── Comparator.java
│ │ │ ├── CustomBlockTypeException.java
│ │ │ ├── DaylightDetector.java
│ │ │ ├── Dispenser.java
│ │ │ ├── DoubleChest.java
│ │ │ ├── Dropper.java
│ │ │ ├── EnchantmentTable.java
│ │ │ ├── EnderChest.java
│ │ │ ├── Furnace.java
│ │ │ ├── HopperBlock.java
│ │ │ ├── Jukebox.java
│ │ │ ├── LockableTileEntity.java
│ │ │ ├── MapColor.java
│ │ │ ├── MapColorList.java
│ │ │ ├── MobSpawner.java
│ │ │ ├── NoteBlock.java
│ │ │ ├── Sign.java
│ │ │ ├── Skull.java
│ │ │ ├── TileEntity.java
│ │ │ ├── VanillaBlock.java
│ │ │ ├── Workbench.java
│ │ │ └── properties
│ │ │ │ ├── BlockBooleanProperty.java
│ │ │ │ ├── BlockDirectionProperty.java
│ │ │ │ ├── BlockEnumProperty.java
│ │ │ │ ├── BlockIntegerProperty.java
│ │ │ │ ├── BlockProperty.java
│ │ │ │ └── helpers
│ │ │ │ ├── AnvilProperties.java
│ │ │ │ ├── BannerProperties.java
│ │ │ │ ├── BedProperties.java
│ │ │ │ ├── BlockProperties.java
│ │ │ │ ├── BrewingStandProperties.java
│ │ │ │ ├── ButtonProperties.java
│ │ │ │ ├── CactusProperties.java
│ │ │ │ ├── CakeProperties.java
│ │ │ │ ├── CarpetProperties.java
│ │ │ │ ├── CauldronProperties.java
│ │ │ │ ├── ChestProperties.java
│ │ │ │ ├── CocoaPlantProperties.java
│ │ │ │ ├── ColoredBlockProperties.java
│ │ │ │ ├── CommandBlockProperties.java
│ │ │ │ ├── CropsProperties.java
│ │ │ │ ├── DaylightDetectorProperties.java
│ │ │ │ ├── DirectionalBlockProperties.java
│ │ │ │ ├── DirtProperties.java
│ │ │ │ ├── DispenserProperties.java
│ │ │ │ ├── DoorProperties.java
│ │ │ │ ├── DoublePlantProperties.java
│ │ │ │ ├── DoubleStoneSlabNewProperties.java
│ │ │ │ ├── DoubleStoneSlabProperties.java
│ │ │ │ ├── EndPortalFrameProperties.java
│ │ │ │ ├── EnderChestProperties.java
│ │ │ │ ├── FarmlandProperties.java
│ │ │ │ ├── FenceGateProperties.java
│ │ │ │ ├── FenceProperties.java
│ │ │ │ ├── FireProperties.java
│ │ │ │ ├── FlowerPotProperties.java
│ │ │ │ ├── FlowerProperties.java
│ │ │ │ ├── FurnaceProperties.java
│ │ │ │ ├── GrassProperties.java
│ │ │ │ ├── HopperProperties.java
│ │ │ │ ├── HugeMushroomProperties.java
│ │ │ │ ├── JukeboxProperties.java
│ │ │ │ ├── LadderProperties.java
│ │ │ │ ├── LeavesProperties.java
│ │ │ │ ├── LeverProperties.java
│ │ │ │ ├── LiquidProperties.java
│ │ │ │ ├── LogProperties.java
│ │ │ │ ├── MyceliumProperties.java
│ │ │ │ ├── NetherWartProperties.java
│ │ │ │ ├── PistonHeadProperties.java
│ │ │ │ ├── PistonProperties.java
│ │ │ │ ├── PlanksProperties.java
│ │ │ │ ├── PortalProperties.java
│ │ │ │ ├── PressurePlateProperties.java
│ │ │ │ ├── PrismarineProperties.java
│ │ │ │ ├── QuartzProperties.java
│ │ │ │ ├── RailPoweredProperties.java
│ │ │ │ ├── RailProperties.java
│ │ │ │ ├── RedSandstoneProperties.java
│ │ │ │ ├── RedstoneComparatorProperties.java
│ │ │ │ ├── RedstoneRepeaterProperties.java
│ │ │ │ ├── RedstoneWireProperties.java
│ │ │ │ ├── ReedProperties.java
│ │ │ │ ├── RotatedPillarProperties.java
│ │ │ │ ├── SandProperties.java
│ │ │ │ ├── SandstoneProperties.java
│ │ │ │ ├── SaplingProperties.java
│ │ │ │ ├── SilverfishProperties.java
│ │ │ │ ├── SkullProperties.java
│ │ │ │ ├── SlabProperties.java
│ │ │ │ ├── SnowProperties.java
│ │ │ │ ├── SpongeProperties.java
│ │ │ │ ├── StainedGlassPaneProperties.java
│ │ │ │ ├── StainedGlassProperties.java
│ │ │ │ ├── StairsProperties.java
│ │ │ │ ├── StandingSignProperties.java
│ │ │ │ ├── StemProperties.java
│ │ │ │ ├── StoneBrickProperties.java
│ │ │ │ ├── StoneProperties.java
│ │ │ │ ├── StoneSlabNewProperties.java
│ │ │ │ ├── StoneSlabProperties.java
│ │ │ │ ├── TNTProperties.java
│ │ │ │ ├── TallGrassProperties.java
│ │ │ │ ├── TorchProperties.java
│ │ │ │ ├── TrapDoorProperties.java
│ │ │ │ ├── TripwireHookProperties.java
│ │ │ │ ├── TripwireProperties.java
│ │ │ │ ├── VineProperties.java
│ │ │ │ ├── WallProperties.java
│ │ │ │ ├── WallSignProperties.java
│ │ │ │ ├── WeightedPressurePlateProperties.java
│ │ │ │ ├── WoodProperties.java
│ │ │ │ └── WoodSlabProperties.java
│ │ │ ├── effects
│ │ │ ├── AuxiliarySoundEffect.java
│ │ │ ├── Particle.java
│ │ │ └── SoundEffect.java
│ │ │ └── position
│ │ │ ├── Direction.java
│ │ │ ├── Location.java
│ │ │ ├── Position.java
│ │ │ ├── Rotations.java
│ │ │ └── Vector3D.java
│ │ ├── backbone
│ │ ├── Backbone.java
│ │ ├── BackboneBans.java
│ │ ├── BackboneGroups.java
│ │ ├── BackboneKits.java
│ │ ├── BackboneOperators.java
│ │ ├── BackbonePermissions.java
│ │ ├── BackboneReservelist.java
│ │ ├── BackboneUsers.java
│ │ ├── BackboneWarps.java
│ │ ├── BackboneWhitelist.java
│ │ ├── BanDataAccess.java
│ │ ├── GroupDataAccess.java
│ │ ├── KitDataAccess.java
│ │ ├── OperatorsDataAccess.java
│ │ ├── PermissionDataAccess.java
│ │ ├── PlayerDataAccess.java
│ │ ├── ReservelistDataAccess.java
│ │ ├── WarpDataAccess.java
│ │ └── WhitelistDataAccess.java
│ │ ├── bansystem
│ │ ├── Ban.java
│ │ ├── BanManager.java
│ │ └── BanType.java
│ │ ├── channels
│ │ ├── ChannelListener.java
│ │ ├── ChannelManager.java
│ │ ├── ChannelManagerInterface.java
│ │ ├── CustomPayloadChannelException.java
│ │ └── RegisteredChannelListener.java
│ │ ├── chat
│ │ ├── ChatFormat.java
│ │ ├── Colors.java
│ │ ├── MessageReceiver.java
│ │ ├── ReceiverType.java
│ │ └── TextFormat.java
│ │ ├── commandsys
│ │ ├── CanaryCommand.java
│ │ ├── CanaryCommandPermissions.java
│ │ ├── Command.java
│ │ ├── CommandDependencyException.java
│ │ ├── CommandException.java
│ │ ├── CommandList.java
│ │ ├── CommandListener.java
│ │ ├── CommandManager.java
│ │ ├── CommandOwner.java
│ │ ├── DuplicateCommandException.java
│ │ ├── DynamicCommandAnnotation.java
│ │ ├── DynamicTabCompleteAnnotation.java
│ │ ├── NativeCommand.java
│ │ ├── PlayerSelector.java
│ │ ├── TabComplete.java
│ │ ├── TabCompleteDispatch.java
│ │ ├── TabCompleteException.java
│ │ ├── TabCompleteHelper.java
│ │ └── commands
│ │ │ ├── groupmod
│ │ │ ├── GroupBase.java
│ │ │ ├── GroupCheck.java
│ │ │ ├── GroupCreate.java
│ │ │ ├── GroupList.java
│ │ │ ├── GroupParent.java
│ │ │ ├── GroupPermissionAdd.java
│ │ │ ├── GroupPermissionCheck.java
│ │ │ ├── GroupPermissionFlush.java
│ │ │ ├── GroupPermissionList.java
│ │ │ ├── GroupPermissionRemove.java
│ │ │ ├── GroupPrefix.java
│ │ │ ├── GroupRemove.java
│ │ │ └── GroupRename.java
│ │ │ ├── player
│ │ │ ├── Compass.java
│ │ │ ├── GetPosition.java
│ │ │ └── GodCommand.java
│ │ │ ├── playermod
│ │ │ ├── PlayerCreate.java
│ │ │ ├── PlayerGroupAdd.java
│ │ │ ├── PlayerGroupCheck.java
│ │ │ ├── PlayerGroupList.java
│ │ │ ├── PlayerGroupRemove.java
│ │ │ ├── PlayerGroupSet.java
│ │ │ ├── PlayerPermissionAdd.java
│ │ │ ├── PlayerPermissionCheck.java
│ │ │ ├── PlayerPermissionList.java
│ │ │ ├── PlayerPermissionRemove.java
│ │ │ ├── PlayerPrefix.java
│ │ │ ├── PlayerRemove.java
│ │ │ └── PlayermodBase.java
│ │ │ ├── system
│ │ │ ├── CreateVanilla.java
│ │ │ ├── HelpCommand.java
│ │ │ ├── Kick.java
│ │ │ ├── ListPlugins.java
│ │ │ ├── Motd.java
│ │ │ ├── Mute.java
│ │ │ ├── PlayerInfoAddition.java
│ │ │ ├── PlayerInformation.java
│ │ │ ├── PlayerList.java
│ │ │ ├── PluginCommand.java
│ │ │ ├── ReloadCommand.java
│ │ │ ├── RestartServer.java
│ │ │ ├── StopServer.java
│ │ │ ├── bans
│ │ │ │ ├── BanCommand.java
│ │ │ │ ├── IpBanCommand.java
│ │ │ │ └── UnbanCommand.java
│ │ │ ├── informational
│ │ │ │ ├── CanaryModCommand.java
│ │ │ │ ├── SystemInformation.java
│ │ │ │ └── Uptime.java
│ │ │ ├── kits
│ │ │ │ ├── KitCreate.java
│ │ │ │ ├── KitDelete.java
│ │ │ │ ├── KitGive.java
│ │ │ │ └── KitList.java
│ │ │ ├── operator
│ │ │ │ ├── DeOp.java
│ │ │ │ ├── Op.java
│ │ │ │ └── OpList.java
│ │ │ ├── reservelist
│ │ │ │ ├── ReservelistAdd.java
│ │ │ │ ├── ReservelistRemove.java
│ │ │ │ └── ReservelistShow.java
│ │ │ └── whitelist
│ │ │ │ ├── WhitelistAdd.java
│ │ │ │ ├── WhitelistDisable.java
│ │ │ │ ├── WhitelistEnable.java
│ │ │ │ ├── WhitelistReload.java
│ │ │ │ ├── WhitelistRemove.java
│ │ │ │ └── WhitelistShow.java
│ │ │ ├── vanilla
│ │ │ ├── Achievement.java
│ │ │ ├── BlockData.java
│ │ │ ├── Broadcast.java
│ │ │ ├── Clear.java
│ │ │ ├── Clone.java
│ │ │ ├── Debug.java
│ │ │ ├── DefaultGameMode.java
│ │ │ ├── DefaultSpawnpoint.java
│ │ │ ├── Difficulty.java
│ │ │ ├── Effect.java
│ │ │ ├── Emote.java
│ │ │ ├── Enchant.java
│ │ │ ├── EntityData.java
│ │ │ ├── Execute.java
│ │ │ ├── Fill.java
│ │ │ ├── GameMode.java
│ │ │ ├── GameRule.java
│ │ │ ├── Give.java
│ │ │ ├── Kill.java
│ │ │ ├── Message.java
│ │ │ ├── MessageRaw.java
│ │ │ ├── Particle.java
│ │ │ ├── PlaySound.java
│ │ │ ├── ReplaceItem.java
│ │ │ ├── SaveAll.java
│ │ │ ├── SaveOff.java
│ │ │ ├── SaveOn.java
│ │ │ ├── Scoreboard.java
│ │ │ ├── SetBlock.java
│ │ │ ├── SpawnPoint.java
│ │ │ ├── SpreadPlayers.java
│ │ │ ├── Stats.java
│ │ │ ├── Summon.java
│ │ │ ├── Teleport.java
│ │ │ ├── TestFor.java
│ │ │ ├── TestForBlock.java
│ │ │ ├── TestForBlocks.java
│ │ │ ├── Time.java
│ │ │ ├── Title.java
│ │ │ ├── ToggleDownfall.java
│ │ │ ├── Trigger.java
│ │ │ ├── VanillaCommandWrapper.java
│ │ │ ├── Weather.java
│ │ │ ├── WorldBorder.java
│ │ │ └── XP.java
│ │ │ ├── warp
│ │ │ ├── Home.java
│ │ │ ├── SetHome.java
│ │ │ ├── SpawnCommand.java
│ │ │ ├── WarpList.java
│ │ │ ├── WarpRemove.java
│ │ │ ├── WarpSet.java
│ │ │ └── WarpUse.java
│ │ │ └── world
│ │ │ ├── CreateWorldCommand.java
│ │ │ ├── DeleteWorldCommand.java
│ │ │ ├── ListWorldsCommand.java
│ │ │ ├── LoadWorldCommand.java
│ │ │ ├── MobClear.java
│ │ │ ├── MobCommand.java
│ │ │ ├── MobCount.java
│ │ │ ├── MobSpawnerCheck.java
│ │ │ ├── MobSpawnerCommand.java
│ │ │ ├── MobSpawnerSet.java
│ │ │ ├── UnloadWorldCommand.java
│ │ │ └── WorldInfoCommand.java
│ │ ├── config
│ │ ├── Configuration.java
│ │ ├── ConfigurationContainer.java
│ │ ├── DatabaseConfiguration.java
│ │ ├── ServerConfiguration.java
│ │ └── WorldConfiguration.java
│ │ ├── converter
│ │ └── CanaryToVanilla.java
│ │ ├── database
│ │ ├── Column.java
│ │ ├── DataAccess.java
│ │ ├── Database.java
│ │ ├── DatabaseLoader.java
│ │ ├── JdbcConnectionManager.java
│ │ ├── LocationDataAccess.java
│ │ ├── PositionDataAccess.java
│ │ ├── SQLType.java
│ │ ├── exceptions
│ │ │ ├── DatabaseAccessException.java
│ │ │ ├── DatabaseException.java
│ │ │ ├── DatabaseReadException.java
│ │ │ ├── DatabaseTableInconsistencyException.java
│ │ │ └── DatabaseWriteException.java
│ │ ├── mysql
│ │ │ └── MySQLDatabase.java
│ │ ├── sqlite
│ │ │ └── SQLiteDatabase.java
│ │ └── xml
│ │ │ └── XmlDatabase.java
│ │ ├── exceptions
│ │ ├── InvalidInstanceException.java
│ │ ├── InvalidPluginException.java
│ │ ├── PluginDependencyException.java
│ │ └── PluginLoadFailedException.java
│ │ ├── help
│ │ ├── HelpManager.java
│ │ └── HelpNode.java
│ │ ├── hook
│ │ ├── CancelableHook.java
│ │ ├── Dispatcher.java
│ │ ├── Hook.java
│ │ ├── HookConsistencyException.java
│ │ ├── HookExecutionException.java
│ │ ├── HookExecutor.java
│ │ ├── HookExecutorInterface.java
│ │ ├── HookHandler.java
│ │ ├── command
│ │ │ ├── CommandBlockCommandHook.java
│ │ │ ├── ConsoleCommandHook.java
│ │ │ └── PlayerCommandHook.java
│ │ ├── entity
│ │ │ ├── ChickenLayEggHook.java
│ │ │ ├── DamageHook.java
│ │ │ ├── DimensionSwitchHook.java
│ │ │ ├── EndermanDropBlockHook.java
│ │ │ ├── EndermanPickupBlockHook.java
│ │ │ ├── EntityDeathHook.java
│ │ │ ├── EntityDespawnHook.java
│ │ │ ├── EntityLightningStruckHook.java
│ │ │ ├── EntityMountHook.java
│ │ │ ├── EntityMoveHook.java
│ │ │ ├── EntitySpawnHook.java
│ │ │ ├── EntityTameHook.java
│ │ │ ├── HangingEntityDestroyHook.java
│ │ │ ├── ItemTouchGroundHook.java
│ │ │ ├── MinecartActivateHook.java
│ │ │ ├── MobTargetHook.java
│ │ │ ├── PotionEffectAppliedHook.java
│ │ │ ├── PotionEffectFinishHook.java
│ │ │ ├── ProjectileHitHook.java
│ │ │ ├── SlimeSplitHook.java
│ │ │ ├── VehicleCollisionHook.java
│ │ │ ├── VehicleDamageHook.java
│ │ │ ├── VehicleDestroyHook.java
│ │ │ ├── VehicleEnterHook.java
│ │ │ ├── VehicleExitHook.java
│ │ │ ├── VehicleMoveHook.java
│ │ │ └── VillagerTradeUnlockHook.java
│ │ ├── player
│ │ │ ├── AnvilUseHook.java
│ │ │ ├── ArmorBrokenHook.java
│ │ │ ├── ArmorStandModifyHook.java
│ │ │ ├── BanHook.java
│ │ │ ├── BedEnterHook.java
│ │ │ ├── BedExitHook.java
│ │ │ ├── BlockDestroyHook.java
│ │ │ ├── BlockLeftClickHook.java
│ │ │ ├── BlockPlaceHook.java
│ │ │ ├── BlockRightClickHook.java
│ │ │ ├── BookEditHook.java
│ │ │ ├── ChatHook.java
│ │ │ ├── ConnectionHook.java
│ │ │ ├── CraftHook.java
│ │ │ ├── DisconnectionHook.java
│ │ │ ├── EatHook.java
│ │ │ ├── EnchantHook.java
│ │ │ ├── EntityRightClickHook.java
│ │ │ ├── ExperienceHook.java
│ │ │ ├── FoodExhaustionHook.java
│ │ │ ├── FoodLevelHook.java
│ │ │ ├── FoodSaturationHook.java
│ │ │ ├── GameModeChangeHook.java
│ │ │ ├── HealthChangeHook.java
│ │ │ ├── HeldItemChangeHook.java
│ │ │ ├── InventoryHook.java
│ │ │ ├── ItemDropHook.java
│ │ │ ├── ItemFrameRotateHook.java
│ │ │ ├── ItemFrameSetItemHook.java
│ │ │ ├── ItemPickupHook.java
│ │ │ ├── ItemUseHook.java
│ │ │ ├── KickHook.java
│ │ │ ├── LevelUpHook.java
│ │ │ ├── PlayerArmSwingHook.java
│ │ │ ├── PlayerDeathHook.java
│ │ │ ├── PlayerIdleHook.java
│ │ │ ├── PlayerListHook.java
│ │ │ ├── PlayerMoveHook.java
│ │ │ ├── PlayerRespawnedHook.java
│ │ │ ├── PlayerRespawningHook.java
│ │ │ ├── PortalUseHook.java
│ │ │ ├── PreConnectionHook.java
│ │ │ ├── ReturnFromIdleHook.java
│ │ │ ├── SignChangeHook.java
│ │ │ ├── SignShowHook.java
│ │ │ ├── SlotClickHook.java
│ │ │ ├── StatGainedHook.java
│ │ │ ├── TeleportHook.java
│ │ │ ├── ToolBrokenHook.java
│ │ │ └── VillagerTradeHook.java
│ │ ├── system
│ │ │ ├── LoadWorldHook.java
│ │ │ ├── PermissionCheckHook.java
│ │ │ ├── PluginDisableHook.java
│ │ │ ├── PluginEnableHook.java
│ │ │ ├── ServerGuiStartHook.java
│ │ │ ├── ServerListPingHook.java
│ │ │ ├── ServerShutdownHook.java
│ │ │ ├── ServerTickHook.java
│ │ │ └── UnloadWorldHook.java
│ │ └── world
│ │ │ ├── BlockDropXpHook.java
│ │ │ ├── BlockGrowHook.java
│ │ │ ├── BlockPhysicsHook.java
│ │ │ ├── BlockUpdateHook.java
│ │ │ ├── ChunkCreatedHook.java
│ │ │ ├── ChunkCreationHook.java
│ │ │ ├── ChunkLoadedHook.java
│ │ │ ├── ChunkUnloadHook.java
│ │ │ ├── DecorateHook.java
│ │ │ ├── DispenseHook.java
│ │ │ ├── ExplosionHook.java
│ │ │ ├── FireworkExplodeHook.java
│ │ │ ├── FlowHook.java
│ │ │ ├── HopperTransferHook.java
│ │ │ ├── IgnitionHook.java
│ │ │ ├── LeafDecayHook.java
│ │ │ ├── LightningStrikeHook.java
│ │ │ ├── LiquidDestroyHook.java
│ │ │ ├── NoteBlockPlayHook.java
│ │ │ ├── PistonExtendHook.java
│ │ │ ├── PistonRetractHook.java
│ │ │ ├── PortalCreateHook.java
│ │ │ ├── PortalDestroyHook.java
│ │ │ ├── RedstoneChangeHook.java
│ │ │ ├── SmeltBeginHook.java
│ │ │ ├── SmeltHook.java
│ │ │ ├── TNTActivateHook.java
│ │ │ ├── TimeChangeHook.java
│ │ │ ├── TreeGrowHook.java
│ │ │ └── WeatherChangeHook.java
│ │ ├── kit
│ │ ├── Kit.java
│ │ └── KitProvider.java
│ │ ├── logger
│ │ └── Logman.java
│ │ ├── metrics
│ │ └── CanaryMetrics.java
│ │ ├── motd
│ │ ├── CanaryMessageOfTheDayListener.java
│ │ ├── MOTDKey.java
│ │ ├── MOTDOwner.java
│ │ ├── MOTDParser.java
│ │ ├── MessageOfTheDay.java
│ │ └── MessageOfTheDayListener.java
│ │ ├── permissionsystem
│ │ ├── MultiworldPermissionProvider.java
│ │ ├── PermissionManager.java
│ │ ├── PermissionNode.java
│ │ └── PermissionProvider.java
│ │ ├── plugin
│ │ ├── DefaultPluginManager.java
│ │ ├── Plugin.java
│ │ ├── PluginDescriptor.java
│ │ ├── PluginException.java
│ │ ├── PluginLangLoader.java
│ │ ├── PluginLifecycle.java
│ │ ├── PluginListener.java
│ │ ├── PluginManager.java
│ │ ├── PluginState.java
│ │ ├── Priority.java
│ │ ├── RegisteredPluginListener.java
│ │ ├── dependencies
│ │ │ └── DependencyGraph.java
│ │ └── lifecycle
│ │ │ ├── InvalidPluginLifecycleException.java
│ │ │ ├── JavaPluginLifecycle.java
│ │ │ ├── PluginLifecycleBase.java
│ │ │ └── PluginLifecycleFactory.java
│ │ ├── serialize
│ │ └── Serializer.java
│ │ ├── tasks
│ │ ├── ServerTask.java
│ │ ├── ServerTaskManager.java
│ │ └── TaskOwner.java
│ │ ├── user
│ │ ├── Group.java
│ │ ├── OperatorsProvider.java
│ │ ├── ReservelistProvider.java
│ │ ├── UserAndGroupsProvider.java
│ │ └── WhitelistProvider.java
│ │ ├── util
│ │ ├── JsonNBTUtility.java
│ │ ├── NullPlayer.java
│ │ └── NullPlayerInventory.java
│ │ └── warp
│ │ ├── Warp.java
│ │ └── WarpProvider.java
└── resources
│ ├── LICENSE
│ └── resources
│ └── lang
│ ├── cs_CZ.lang
│ ├── da_DK.lang
│ ├── de_DE.lang
│ ├── el_GR.lang
│ ├── en_GB.lang
│ ├── en_PT.lang
│ ├── en_US.lang
│ ├── es_ES.lang
│ ├── fi_FI.lang
│ ├── fr_FR.lang
│ ├── hu_HU.lang
│ ├── it_IT.lang
│ ├── ja_JP.lang
│ ├── ko_KR.lang
│ ├── languages.txt
│ ├── nl_NL.lang
│ ├── no_NO.lang
│ ├── pl_PL.lang
│ ├── pt_PT.lang
│ ├── ro_RO.lang
│ ├── ru_RU.lang
│ ├── sv_SE.lang
│ ├── tr_TR.lang
│ └── uk_UA.lang
└── test
└── java
└── net
└── canarymod
├── api
└── world
│ └── blocks
│ ├── BlockTypeTest.java
│ └── VanillaBlockTest.java
└── permissionsystem
└── MultiworldPermissionProviderTest.java
/src/main/java/net/canarymod/CanaryDeserializeException.java:
--------------------------------------------------------------------------------
1 | package net.canarymod;
2 |
3 | /**
4 | * Exception that will be thrown if the serialized String
5 | * of a CanarySerializable object does not have the expected length
6 | *
7 | * @author Chris (damagefilter)
8 | */
9 | public class CanaryDeserializeException extends RuntimeException {
10 |
11 | private static final long serialVersionUID = 4068917113777742144L;
12 | String vendor;
13 |
14 | /**
15 | * Constructs a new {@code CanaryDeserializeException}
16 | *
17 | * @param message
18 | * the message of the exception that occurred
19 | * @param vendor
20 | * the vendor
21 | */
22 | public CanaryDeserializeException(String message, String vendor) {
23 | super(message);
24 | this.vendor = vendor;
25 | }
26 |
27 | /**
28 | * Return the vendor of the serializer that threw this exception.
29 | *
30 | * @return the vendor
31 | */
32 | public String getVendor() {
33 | return vendor;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/EntityTrackerEntry.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api;
2 |
3 | import net.canarymod.api.entity.Entity;
4 |
5 | /**
6 | * EntityTrackerEntry to handle entries in entity trackers
7 | * Perhaps we need some more at some point, then we can have it here
8 | *
9 | * @author Chris (damagefilter)
10 | */
11 | public interface EntityTrackerEntry {
12 |
13 | /**
14 | * Gets the {@link Entity}
15 | *
16 | * @return the {@link Entity}
17 | */
18 | Entity getEntity();
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/GameMode.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api;
2 |
3 | /**
4 | * An enum of player game modes
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public enum GameMode {
9 | /* DO NOT REORDER */
10 | SURVIVAL,
11 | //
12 | CREATIVE,
13 | //
14 | ADVENTURE,
15 | //
16 | SPECTATOR,
17 | //
18 | ;
19 |
20 | public final int getId() {
21 | return this.ordinal();
22 | }
23 |
24 | public final static GameMode fromId(int id) {
25 | switch (id) {
26 | case 1:
27 | return CREATIVE;
28 | case 2:
29 | return ADVENTURE;
30 | case 3:
31 | return SPECTATOR;
32 | default:
33 | return SURVIVAL;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/OfflinePlayer.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api;
2 |
3 | import net.canarymod.api.nbt.CompoundTag;
4 |
5 | /**
6 | * An offline player. This is an offline version of a registered player.
7 | * OfflinePlayer contains information about groups, permissions, world and
8 | * location where the player has logged out, according to data on disk.
9 | *
10 | * @author Chris (damagefilter)
11 | * @author Jason (darkdiplomat)
12 | */
13 | public interface OfflinePlayer extends PlayerReference {
14 |
15 | /**
16 | * Get the NBT tag for this offline player
17 | *
18 | * @return {@link CompoundTag}
19 | */
20 | CompoundTag getNBT();
21 |
22 | /**
23 | * Save changes made to this offline player.
24 | * Important: This will only apply if the player is not online!
25 | */
26 | void save();
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/PlayerListAction.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api;
2 |
3 | /**
4 | * PlayerList action enum
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public enum PlayerListAction {
9 |
10 | ADD_PLAYER,
11 | UPDATE_GAME_MODE,
12 | UPDATE_LATENCY,
13 | UPDATE_DISPLAY_NAME,
14 | REMOVE_PLAYER;
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIArrowAttack.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIArrowAttack extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIAttackOnCollide.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIAttackOnCollide extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIAvoidEntity.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIAvoidEntity extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIBeg.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIBeg extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIBreakDoor.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIBreakDoor extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIControlledByPlayer.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIControlledByPlayer extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AICreeperSwell.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AICreeperSwell extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIDefendVillage.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIDefendVillage extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIDoorInteract.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIDoorInteract extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIEatGrass.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIEatGrass extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIFindEntityNearest.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIFindEntityNearest extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIFindEntityNearestPlayer.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIFindEntityNearestPlayer extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIFleeSun.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIFleeSun extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIFollowGolem.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIFollowGolem extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIFollowOwner.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIFollowOwner extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIFollowParent.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIFollowParent extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIHarvestFarmland.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIHarvestFarmland extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIHurtByTarget.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIHurtByTarget extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AILeapAtTarget.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AILeapAtTarget extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AILookAtTradePlayer.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AILookAtTradePlayer extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AILookAtVillager.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AILookAtVillager extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AILookIdle.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AILookIdle extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIMate.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIMate extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIMoveIndoors.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIMoveIndoors extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIMoveThroughVillage.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIMoveThroughVillage extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIMoveToBlock.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIMoveToBlock extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIMoveTowardsRestriction.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIMoveTowardsRestriction extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIMoveTowardsTarget.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIMoveTowardsTarget extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AINearestAttackableTarget.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AINearestAttackableTarget extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIOcelotAttack.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIOcelotAttack extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIOcelotSit.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIOcelotSit extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIOpenDoor.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIOpenDoor extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIOwnerHurtByTarget.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIOwnerHurtByTarget extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIOwnerHurtTarget.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIOwnerHurtTarget extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIPanic.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIPanic extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIPlay.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIPlay extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIRestrictOpenDoor.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIRestrictOpenDoor extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIRestrictSun.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIRestrictSun extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIRunAroundLikeCrazy.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIRunAroundLikeCrazy extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AISit.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AISit extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AISwimming.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AISwimming extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AITarget.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AITarget extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AITargetNonTamed.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AITargetNonTamed extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AITempt.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AITempt extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AITradePlayer.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AITradePlayer extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIVillagerInteract.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIVillagerInteract extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIVillagerMate.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIVillagerMate extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIWander.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIWander extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIWatchClosest.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIWatchClosest extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/ai/AIWatchClosest2.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.ai;
2 |
3 | /**
4 | * @author Aaron
5 | */
6 | public interface AIWatchClosest2 extends AIBase {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/attributes/Attribute.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.attributes;
2 |
3 | /**
4 | * @author Jason (darkdiplomat)
5 | */
6 | public interface Attribute {
7 |
8 | /**
9 | * Gets the unlocalized internal name
10 | *
11 | * @return internal name
12 | */
13 | String getInternalName();
14 |
15 | /**
16 | * Gets the default value of the Attribute
17 | *
18 | * @return default value
19 | */
20 | double getDefaultValue();
21 |
22 | /**
23 | * Gets whether this Attribute should be watched
24 | *
25 | * @return {@code true} if watched
26 | */
27 | boolean shouldWatch();
28 |
29 | /**
30 | * Sets whether this attribute should be watched
31 | *
32 | * @param watch
33 | * {@code true} for watched
34 | *
35 | * @return {@code this} instance
36 | */
37 | Attribute setShouldWatch(boolean watch);
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/attributes/GenericAttribute.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.attributes;
2 |
3 | import com.google.common.annotations.Beta;
4 | import net.canarymod.Canary;
5 |
6 | /**
7 | * @author Jason (darkdiplomat)
8 | */
9 | @Beta
10 | public enum GenericAttribute {
11 |
12 | MAXHEALTH("generic.maxHealth"),
13 | FOLLOWRANGE("generic.followRange"),
14 | MOVEMENTSPEED("generic.movementSpeed"),
15 | ATTACKDAMAGE("generic.attackDamage"),
16 | KNOCKBACKRESIST("generic.knockbackResistance"),
17 | ;
18 |
19 | private final String nmsName;
20 |
21 | GenericAttribute(String nmsName) {
22 | this.nmsName = nmsName;
23 | }
24 |
25 | public Attribute getAttribute() {
26 | return Canary.factory().getAttributeFactory().getGenericAttribute(this.nmsName);
27 | }
28 |
29 | public String getNativeName() {
30 | return this.nmsName;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/attributes/HorseAttribute.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.attributes;
2 |
3 | import com.google.common.annotations.Beta;
4 | import net.canarymod.Canary;
5 |
6 | /**
7 | * @author Jamie Mansfield (jamierocks)
8 | */
9 | @Beta
10 | public enum HorseAttribute {
11 |
12 | JUMPSTRENGTH("horse.jumpStrength"),
13 | ;
14 |
15 | private final String nmsName;
16 |
17 | HorseAttribute(String nmsName) {
18 | this.nmsName = nmsName;
19 | }
20 |
21 | public Attribute getAttribute() {
22 | return Canary.factory().getAttributeFactory().getGenericAttribute(this.nmsName);
23 | }
24 |
25 | public String getNativeName() {
26 | return this.nmsName;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/attributes/ModifiableAttribute.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.attributes;
2 |
3 | import com.google.common.annotations.Beta;
4 |
5 | import java.util.UUID;
6 |
7 | /**
8 | * An instance of an {@link Attribute} that can be modified.
9 | *
10 | * @author Jason (darkdiplomat)
11 | * @author Jamie Mansfield (jamierocks)
12 | */
13 | @Beta
14 | public interface ModifiableAttribute {
15 |
16 | Attribute getAttribute();
17 |
18 | double getBaseValue();
19 |
20 | void setBaseValue(double value);
21 |
22 | AttributeModifier getModifier(UUID uuid);
23 |
24 | void apply(AttributeModifier attributeModifier);
25 |
26 | void remove(AttributeModifier attributeModifier);
27 |
28 | double getValue();
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/attributes/ModifiedAttribute.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.attributes;
2 |
3 | /**
4 | * An instance of an {@link Attribute} that can be modified.
5 | *
6 | * @author Jason (darkdiplomat)
7 | * @author Jamie Mansfield (jamierocks)
8 | * @deprecated Replaced by {@link ModifiableAttribute}
9 | */
10 | @Deprecated
11 | public interface ModifiedAttribute extends ModifiableAttribute {
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/attributes/Operations.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.attributes;
2 |
3 | /**
4 | * A psuedo-enum of operations within Minecraft.
5 | *
6 | * @author Jamie Mansfield (jamierocks)
7 | */
8 | public final class Operations {
9 |
10 | public static final int ADD_AMOUNT = 0;
11 | public static final int MULTIPLY_BASE = 1;
12 | public static final int MULTIPLY = 2;
13 |
14 | private Operations() {
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/attributes/RangedAttribute.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.attributes;
2 |
3 | import com.google.common.annotations.Beta;
4 |
5 | /**
6 | * @author Jason (darkdiplomat)
7 | */
8 | @Beta
9 | public interface RangedAttribute extends Attribute {
10 |
11 | RangedAttribute setDescription(String description);
12 |
13 | String getDescription();
14 |
15 | double setValue(double value);
16 |
17 | double getMaxValue();
18 |
19 | double getMinValue();
20 | }
21 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/attributes/ZombieAttribute.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.attributes;
2 |
3 | import com.google.common.annotations.Beta;
4 | import net.canarymod.Canary;
5 |
6 | /**
7 | * @author Jamie Mansfield (jamierocks)
8 | */
9 | @Beta
10 | public enum ZombieAttribute {
11 |
12 | SPAWNREINFORCEMENTS("zombie.spawnReinforcements"),
13 | ;
14 |
15 | private final String nmsName;
16 |
17 | ZombieAttribute(String nmsName) {
18 | this.nmsName = nmsName;
19 | }
20 |
21 | public Attribute getAttribute() {
22 | return Canary.factory().getAttributeFactory().getGenericAttribute(this.nmsName);
23 | }
24 |
25 | public String getNativeName() {
26 | return this.nmsName;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/chat/ChatFormatting.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.chat;
2 |
3 | /**
4 | * Wrapper interface for EnumChatFormatting
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface ChatFormatting {
9 |
10 | /**
11 | * Gets the {@code character} code
12 | *
13 | * @return {@code character}
14 | */
15 | char getFormattingCode();
16 |
17 | /**
18 | * Checks if this is a formatting code (ie: Bold, Italic, Strikethrough, Obfuscated, Underline)
19 | *
20 | * @return {@code true} if formatting code; {@code false} if not
21 | */
22 | boolean isFormat();
23 |
24 | /**
25 | * Checks if this is a color code (ie: DARK_GREEN)
26 | *
27 | * @return {@code true} if color code; {@code false} if not
28 | */
29 | boolean isColor();
30 |
31 | /**
32 | * Gets the name of this {@code ChatFormatting} (ie: DARK_GREEN)
33 | *
34 | * @return name
35 | */
36 | String getName();
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/chat/ClickEvent.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.chat;
2 |
3 | /**
4 | * Wrapper interface for Minecraft's native ClickEvent
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface ClickEvent {
9 |
10 | /**
11 | * Gets the {@link ClickEventAction} of this {@link ClickEvent}
12 | *
13 | * @return {@link ClickEventAction}
14 | */
15 | ClickEventAction getAction();
16 |
17 | /**
18 | * Gets the value of this {@code ClickEvent}
19 | *
20 | * @return the value
21 | */
22 | String getValue();
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/chat/ClickEventAction.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.chat;
2 |
3 | /**
4 | * Wrapper interface for Minecraft's native ClickEvent.Action
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface ClickEventAction {
9 |
10 | /**
11 | * Checks if the action is allowed in chat
12 | *
13 | * @return {@code true} if allowed; {@code false} if not
14 | */
15 | boolean allowedInChat();
16 |
17 | /**
18 | * Gets the name of the action
19 | *
20 | * @return the name
21 | */
22 | String getName();
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/chat/HoverEvent.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.chat;
2 |
3 | /**
4 | * Wrapper interface for Minecraft's native HoverEvent
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface HoverEvent {
9 |
10 | /**
11 | * Gets the {@link HoverEventAction} of this {@code HoverEvent}
12 | *
13 | * @return the {@link HoverEventAction}
14 | */
15 | HoverEventAction getAction();
16 |
17 | /**
18 | * Gets the {@link ChatComponent} value
19 | *
20 | * @return {@link ChatComponent}
21 | */
22 | ChatComponent getValue();
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/chat/HoverEventAction.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.chat;
2 |
3 | /**
4 | * Wrapper interface for Minecraft's native HoverEvent.Action
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface HoverEventAction {
9 |
10 | /**
11 | * Checks if the action is allowed in chat
12 | *
13 | * @return {@code true} if allowed; {@code false} if not
14 | */
15 | boolean allowedInChat();
16 |
17 | /**
18 | * Gets the name of this action
19 | *
20 | * @return the name
21 | */
22 | String getName();
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/FishHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity;
2 |
3 | /**
4 | * Fish Hook wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface FishHook extends Entity {
9 | // I got nothing for this right now
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/LargeFireball.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity;
2 |
3 | /**
4 | * Large Fireball Wrapper (Ghast Fireball)
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface LargeFireball extends Fireball, Explosive {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/Projectile.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity;
2 |
3 | /**
4 | * Projectile wrapper
5 | *
6 | * @author Larry (Larry1123)
7 | */
8 | public interface Projectile extends Entity {
9 |
10 | /**
11 | * Sets the Motion of a Projectile and Rotation
12 | *
13 | * @param motionX
14 | * the X-wise motion
15 | * @param motionY
16 | * the Y-wise motion
17 | * @param motionZ
18 | * the Z-wise motion
19 | * @param rotationYaw
20 | * the Y-rotation
21 | * @param rotationPitch
22 | * the X-rotation
23 | */
24 | void setProjectileHeading(double motionX, double motionY, double motionZ, float rotationYaw, float rotationPitch);
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/SmallFireball.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity;
2 |
3 | /**
4 | * Small Fireball Wrapper (FireCharge)
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface SmallFireball extends Fireball {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/TNTPrimed.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity;
2 |
3 | import net.canarymod.api.entity.living.LivingBase;
4 |
5 | /**
6 | * TNTPrimed wrapper interface
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface TNTPrimed extends Entity, Explosive {
11 |
12 | /**
13 | * Gets the {@link LivingBase} that activated the TNT
14 | *
15 | * @return {@link LivingBase} if activated by an entity; {@code null} if not activated by an entity
16 | */
17 | LivingBase getActivatedBy();
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/WitherSkull.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity;
2 |
3 | /**
4 | * WitherSkull wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface WitherSkull extends Fireball, Explosive {
9 |
10 | /**
11 | * Gets if the WitherSkull comes from an invulnerable WitherBoss
12 | *
13 | * @return {@code true} if invulnerable; {@code false} if not
14 | */
15 | boolean isInvulnerable();
16 |
17 | /**
18 | * Sets if the WitherSkull comes from an invulnerable WitherBoss
19 | *
20 | * @param invulenerable
21 | * {@code true} for invulnerable; {@code false} if not
22 | */
23 | void setInvulnerable(boolean invulenerable);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/effect/WeatherEffect.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.effect;
2 |
3 | import net.canarymod.api.entity.Entity;
4 |
5 | /**
6 | * Weather Effect Wrapper Interface
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface WeatherEffect extends Entity {
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/hanging/LeashKnot.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.hanging;
2 |
3 | /**
4 | * LeashKnot wrapper interface
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface LeashKnot extends HangingEntity {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/Ageable.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living;
2 |
3 | /**
4 | * Ageable wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Ageable {
9 |
10 | /**
11 | * Set this animals age.
12 | * Set negative to turn it into a baby animal.
13 | * (Breeding related)
14 | *
15 | * @param age
16 | * Age to set. Negative values are child ages.
17 | */
18 | void setGrowingAge(int age);
19 |
20 | /**
21 | * Get the growing age for this entity.
22 | * (Breeding related)
23 | *
24 | * @return The integer age of the Entity. Negative values are child ages.
25 | */
26 | int getGrowingAge();
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/AmbientCreature.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living;
2 |
3 | /**
4 | * Interface for ambient creatures.
5 | *
6 | * @author Larry1123
7 | */
8 | public interface AmbientCreature {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/Golem.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living;
2 |
3 | /**
4 | * Golem wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Golem extends EntityLiving {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/Snowman.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living;
2 |
3 | import net.canarymod.api.entity.living.monster.RangedAttackMob;
4 |
5 | /**
6 | * Snowman wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface Snowman extends Golem, RangedAttackMob {
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/animal/Bat.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.animal;
2 |
3 | /**
4 | * Bat wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Bat extends EntityAnimal {
9 |
10 | /**
11 | * Tells if this Bat is hanging or not
12 | *
13 | * @return {@code true} if hanging; {@code false} if not
14 | */
15 | boolean isHanging();
16 |
17 | /**
18 | * Sets wheter or not this Bat is hanging
19 | *
20 | * @param hanging
21 | * {@code true} for hanging; {@code false} for not
22 | */
23 | void setHanging(boolean hanging);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/animal/Chicken.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.animal;
2 |
3 | import net.canarymod.api.entity.living.Ageable;
4 |
5 | /**
6 | * Chicken Wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface Chicken extends EntityAnimal, Ageable {
11 |
12 | /**
13 | * Gets the ticks until laying the next Egg
14 | *
15 | * @return tick until next egg
16 | */
17 | int getTimeUntilNextEgg();
18 |
19 | /**
20 | * Time in ticks (~20/Second) until the chicken lays the next egg.
21 | * Set 0 to make it lay an egg more or less instantly
22 | *
23 | * @param timeTicks
24 | * the ticks until the next egg
25 | */
26 | void setTimeUntilNextEgg(int timeTicks);
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/animal/Cow.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.animal;
2 |
3 | import net.canarymod.api.entity.living.Ageable;
4 |
5 | /**
6 | * Cow Wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface Cow extends EntityAnimal, Ageable {
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/animal/EntityAnimal.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.animal;
2 |
3 | import net.canarymod.api.entity.living.EntityLiving;
4 | import net.canarymod.api.inventory.Item;
5 |
6 | /**
7 | * EntityAnimal wrapper
8 | *
9 | * @author Jason (darkdiplomat)
10 | */
11 | public interface EntityAnimal extends EntityLiving {
12 |
13 | /**
14 | * Checks if the {@link Item} is the item the initiates breeding
15 | *
16 | * @param item
17 | * the {@link Item} to check
18 | *
19 | * @return {@code true} if breeding item; {@code false} if not
20 | */
21 | public boolean isBreedingItem(Item item);
22 | }
23 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/animal/Mooshroom.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.animal;
2 |
3 | /**
4 | * Mooshroom wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Mooshroom extends Cow {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/animal/Ocelot.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.animal;
2 |
3 | import net.canarymod.api.entity.living.Ageable;
4 |
5 | /**
6 | * Ocelot wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface Ocelot extends EntityAnimal, Tameable, Ageable {
11 |
12 | /**
13 | * SkinType enum
14 | *
15 | * @author Jason (darkdiplomat)
16 | */
17 | enum SkinType {
18 | UNTAME,
19 | //
20 | TUXEDO,
21 | //
22 | GINGER,
23 | //
24 | SIAMESE; //
25 | }
26 |
27 | /**
28 | * Gets the SkinType of the Ocelot
29 | *
30 | * @return skintype
31 | */
32 | SkinType getSkinType();
33 |
34 | /**
35 | * Sets the SkinType of the Ocelot
36 | *
37 | * @param type
38 | * the SkinType to set
39 | */
40 | void setSkinType(SkinType type);
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/animal/Pig.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.animal;
2 |
3 | import net.canarymod.api.entity.living.Ageable;
4 | import net.canarymod.api.entity.vehicle.AnimalVehicle;
5 |
6 | /**
7 | * Pig wrapper
8 | *
9 | * @author Jason (darkdiplomat)
10 | */
11 | public interface Pig extends AnimalVehicle, Ageable {
12 |
13 | /**
14 | * Gets whether the Pig has a saddle or not
15 | *
16 | * @return {@code true} if saddled; {@code false} if not
17 | */
18 | boolean isSaddled();
19 |
20 | /**
21 | * Sets whether the Pig has a saddle or not
22 | *
23 | * @param saddle
24 | * {@code true} for saddled; {@code false} for not saddled
25 | */
26 | void setSaddled(boolean saddle);
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/animal/Rabbit.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.animal;
2 |
3 | /**
4 | * Rabbit wrapper
5 | *
6 | * @author Jason Jones (darkdiplomat)
7 | */
8 | public interface Rabbit extends EntityAnimal {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/animal/Squid.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.animal;
2 |
3 | /**
4 | * Squid wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Squid extends EntityAnimal {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/animal/Wolf.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.animal;
2 |
3 | import net.canarymod.api.DyeColor;
4 | import net.canarymod.api.entity.living.Ageable;
5 |
6 | /**
7 | * Wolf wrapper
8 | *
9 | * @author Jason (darkdiplomat)
10 | */
11 | public interface Wolf extends Tameable, Ageable {
12 |
13 | /**
14 | * Sets the Collar color
15 | *
16 | * @param color
17 | * the {@link DyeColor} to make the colar
18 | */
19 | void setCollarColor(DyeColor color);
20 |
21 | /**
22 | * Gets the Collar color
23 | *
24 | * @return collar color
25 | */
26 | DyeColor getCollarColor();
27 |
28 | /**
29 | * Gets whether the Wolf is angry or not
30 | *
31 | * @return {@code true} if angry; {@code false} if not
32 | */
33 | boolean isAngry();
34 |
35 | /**
36 | * Sets whether the Wolf is angry or not
37 | *
38 | * @param angry
39 | * {@code true} for angry; {@code false} for not angry
40 | */
41 | void setAngry(boolean angry);
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/humanoid/npc/NPCAIExcutionException.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.humanoid.npc;
2 |
3 | /**
4 | * NPC AI Excution Exception
5 | * Thrown if an exception occurs while executing a NPC AI Event
6 | *
7 | * @author Jason (darkdiplomat)
8 | */
9 | public class NPCAIExcutionException extends RuntimeException {
10 |
11 | private static final long serialVersionUID = 201408281814L;
12 |
13 | /**
14 | * {@inheritDoc}
15 | */
16 | public NPCAIExcutionException(String message) {
17 | super(message);
18 | }
19 |
20 | /**
21 | * {@inheritDoc}
22 | */
23 | public NPCAIExcutionException(String msg, Throwable t) {
24 | super(msg, t);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/humanoid/npc/NPCBehavior.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.humanoid.npc;
2 |
3 | import java.lang.annotation.Retention;
4 | import java.lang.annotation.Target;
5 |
6 | import static java.lang.annotation.ElementType.METHOD;
7 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
8 |
9 | /**
10 | * NPC Behavior method annotation for the NPCBehavior Listener
11 | *
12 | * @author Jason (darkdiplomat)
13 | */
14 | @Retention(RUNTIME)
15 | @Target(METHOD)
16 | public @interface NPCBehavior {
17 | }
18 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/humanoid/npc/NPCBehaviorListener.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.humanoid.npc;
2 |
3 | /**
4 | * A newer and updated NPC Behavior listening
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface NPCBehaviorListener {
9 | /*
10 | Example code:
11 |
12 | @NPCBehavior
13 | private final void someNameforanUpdateMethod(Update update){
14 | // do stuff
15 | }
16 |
17 | */
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/humanoid/npc/NpcAiListenerMethodConsistancyException.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.humanoid.npc;
2 |
3 | /**
4 | * @author Jason (darkdiplomat)
5 | */
6 | public final class NpcAiListenerMethodConsistancyException extends RuntimeException {
7 |
8 | private static final long serialVersionUID = 201408281759L;
9 |
10 | /**
11 | * {@inheritDoc}
12 | */
13 | public NpcAiListenerMethodConsistancyException(String message) {
14 | super(message);
15 | }
16 |
17 | /**
18 | * {@inheritDoc}
19 | */
20 | public NpcAiListenerMethodConsistancyException(String msg, Throwable t) {
21 | super(msg, t);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/humanoid/npc/ai/Attacked.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.humanoid.npc.ai;
2 |
3 | import net.canarymod.api.entity.Entity;
4 |
5 | /**
6 | * AI Container for Attacked NPC
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public final class Attacked extends NPCAI {
11 | public final Entity attacker;
12 |
13 | /**
14 | * Constructs a new Attacked AI Container
15 | *
16 | * @param attacker
17 | * the {@link net.canarymod.api.entity.Entity} attacking the NPC
18 | */
19 | public Attacked(Entity attacker) {
20 | this.attacker = attacker;
21 | }
22 |
23 | /**
24 | * Gets the {@link net.canarymod.api.entity.Entity} attacker
25 | *
26 | * @return attacker
27 | */
28 | public final Entity getAttacker() {
29 | return attacker;
30 | }
31 |
32 | /**
33 | * {@inheritDoc}
34 | */
35 | public final String toString() {
36 | return String.format("NPCAI.Attacked[Attacker=%s]", attacker);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/humanoid/npc/ai/Clicked.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.humanoid.npc.ai;
2 |
3 | import net.canarymod.api.entity.living.humanoid.Player;
4 |
5 | /**
6 | * AI container for Clicked NPC
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public final class Clicked extends NPCAI {
11 | private final Player clicker;
12 |
13 | /**
14 | * Constructs a new Clicked AI Container
15 | *
16 | * @param clicker
17 | */
18 | public Clicked(Player clicker) {
19 | this.clicker = clicker;
20 | }
21 |
22 | /**
23 | * Gets the {@link net.canarymod.api.entity.living.humanoid.Player} that has clicked the NPC
24 | *
25 | * @return clicker
26 | */
27 | public final Player getClicker() {
28 | return this.clicker;
29 | }
30 |
31 | /**
32 | * {@inheritDoc}
33 | */
34 | public final String toString() {
35 | return String.format("NPCAI.Clicked[Clicker=%s]", clicker);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/humanoid/npc/ai/Destroyed.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.humanoid.npc.ai;
2 |
3 | /**
4 | * AI Container for Destroyed NPC
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public final class Destroyed extends NPCAI {
9 |
10 | /**
11 | * {@inheritDoc}
12 | */
13 | public final String toString() {
14 | return "NPCAI.Destroyed[]";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/humanoid/npc/ai/NPCAI.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.humanoid.npc.ai;
2 |
3 | import net.canarymod.api.entity.living.humanoid.NonPlayableCharacter;
4 | import net.canarymod.api.entity.living.humanoid.npc.NPCBehaviorRegistry;
5 |
6 | /**
7 | * Abstract container for the NPC AI system
8 | *
9 | * @author Jason (darkdiplomat)
10 | */
11 | public abstract class NPCAI {
12 |
13 | /**
14 | * Gets the name of the NPC AI class
15 | *
16 | * @return NPCAI subclass name
17 | */
18 | public final String getName() {
19 | return "NPCAI." + this.getClass().getSimpleName();
20 | }
21 |
22 | /**
23 | * Short cut to calling this AI event
24 | *
25 | * @param npc
26 | * the NPC the event is taking place for
27 | */
28 | public final void call(NonPlayableCharacter npc) {
29 | NPCBehaviorRegistry.execute(npc, this);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/humanoid/npc/ai/PickupItem.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.humanoid.npc.ai;
2 |
3 | import net.canarymod.api.inventory.Item;
4 |
5 | /**
6 | * AI Container for NPC item pickup
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public final class PickupItem extends NPCAI {
11 | private final Item pickedUp;
12 |
13 | /**
14 | * Constructs a new PickupItem AI Container
15 | *
16 | * @param pickedUp
17 | * the {@link net.canarymod.api.inventory.Item} being picked up
18 | */
19 | public PickupItem(Item pickedUp) {
20 | this.pickedUp = pickedUp;
21 | }
22 |
23 | /**
24 | * Gets the {@link net.canarymod.api.inventory.Item} being picked up
25 | *
26 | * @return picked up item
27 | */
28 | public final Item getItemPickedUp() {
29 | return pickedUp;
30 | }
31 |
32 | /**
33 | * {@inheritDoc}
34 | */
35 | public final String toString() {
36 | return String.format("NPCAI.PickupItem[Item=%s]", pickedUp);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/humanoid/npc/ai/Update.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.humanoid.npc.ai;
2 |
3 | /**
4 | * AI Container for NPC Updates
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public final class Update extends NPCAI {
9 |
10 | /**
11 | * {@inheritDoc}
12 | */
13 | public final String toString() {
14 | return "NPCAI.Update[]";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/Blaze.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * Blaze wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Blaze extends EntityMob {
9 |
10 | /**
11 | * Tells if this Blaze is on fire or not
12 | *
13 | * @return {@code true} if burning; {@code false} if not
14 | */
15 | boolean isBurning();
16 |
17 | /**
18 | * Sets if this Blaze is on fire or not
19 | *
20 | * @param isBurning
21 | * {@code true} for burning; {@code false} for not
22 | */
23 | void setBurning(boolean isBurning);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/CaveSpider.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * CaveSpider Wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface CaveSpider extends Spider {// Nothing more required
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/EnderDragon.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | import net.canarymod.api.entity.EnderCrystal;
4 |
5 | /**
6 | * EnderDragon wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface EnderDragon extends EntityMob {
11 |
12 | /**
13 | * Checks if the EnderDragon is being slowed down (ie: flying through blocks)
14 | *
15 | * @return {@code true} if slowed; {@code false} if not
16 | */
17 | boolean isSlowed();
18 |
19 | /**
20 | * Gets the EnderCrystal healing the EnderDragon if present
21 | *
22 | * @return EnderCrystal if one is healing the dragon; {@code null} if none present
23 | */
24 | EnderCrystal getHealingCrystal();
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/Endermite.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * Endermite wrapper
5 | *
6 | * @author Jason Jones (darkdiplomat)
7 | */
8 | public interface Endermite extends EntityMob {
9 |
10 | /**
11 | * Gets whether a {@link net.canarymod.api.entity.living.humanoid.Player} has spawned the {@link Endermite}
12 | *
13 | * @return {@code true} if player spawned; {@code false} if not
14 | */
15 | boolean isPlayerSpanwed();
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/EntityMob.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | import net.canarymod.api.entity.living.EntityLiving;
4 |
5 | /**
6 | * A Mob base-entity that all mobs inherit from.
7 | * Declares some methods useful for mobs
8 | *
9 | * @author Chris Ksoll
10 | */
11 | public interface EntityMob extends EntityLiving {
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/GiantZombie.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * Giant Zombie wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface GiantZombie extends EntityMob {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/Guardian.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * Guardian wrapper
5 | *
6 | * @author Jason Jones (darkdiplomat)
7 | */
8 | public interface Guardian extends EntityMob {
9 |
10 | /**
11 | * Gets whether this {@code Guardian} is an elder
12 | *
13 | * @return {@code true} if elder; {@code false} if not
14 | */
15 | boolean isElder();
16 | }
17 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/MagmaCube.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * LavaSlime wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface MagmaCube extends Slime {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/RangedAttackMob.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * Interface for distinguishing which mobs have ranged attack abilities.
5 | *
6 | * @author Aaron
7 | */
8 | public interface RangedAttackMob {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/Silverfish.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * Silverfish wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Silverfish extends EntityMob {
9 |
10 | /**
11 | * Gets the ticks before calling allies
12 | *
13 | * @return the ticks before calling allies
14 | */
15 | int getAllySummonCooldown();
16 |
17 | /**
18 | * Sets the ticks before calling allies
19 | *
20 | * @param cooldown
21 | * the ticks before calling allies
22 | */
23 | void setAllySummonCooldown(int cooldown);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/Skeleton.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * Skeleton wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Skeleton extends EntityMob, RangedAttackMob {
9 |
10 | /**
11 | * Gets whether this Skeleton is a WitherSkeleton
12 | *
13 | * @return {@code true} if WitherSkeleton; {@code false} if not
14 | */
15 | boolean isWitherSkeleton();
16 |
17 | /**
18 | * Sets whether this Skeleton is a WitherSkeleton
19 | *
20 | * @param wither
21 | * {@code true} if WitherSkeleton; {@code false} if not
22 | */
23 | void setIsWitherSkeleton(boolean wither);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/Spider.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * Spider wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Spider extends EntityMob {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/Witch.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * Witch wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Witch extends EntityMob, RangedAttackMob {
9 |
10 | boolean isAgressive();
11 |
12 | void setAggressive(boolean aggressive);
13 | }
14 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/living/monster/Wither.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.living.monster;
2 |
3 | /**
4 | * Wither wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Wither extends EntityMob, RangedAttackMob {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/throwable/ChickenEgg.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.throwable;
2 |
3 | /**
4 | * Chicken Egg wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface ChickenEgg extends EntityThrowable {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/throwable/EnderPearl.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.throwable;
2 |
3 | /**
4 | * EnderPerl wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface EnderPearl extends EntityThrowable {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/throwable/EntityPotion.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.throwable;
2 |
3 | import net.canarymod.api.potion.PotionType;
4 |
5 | /**
6 | * EntityPotion wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface EntityPotion extends EntityThrowable {
11 |
12 | /**
13 | * Gets the Potion Type ID as a short
14 | * This id may not match any of the id's in PotionType
15 | *
16 | * @return the Potion Type ID
17 | */
18 | short getPotionTypeId();
19 |
20 | /**
21 | * Gets the Potion Type as a PotionType
22 | *
23 | * @return the Potion Type
24 | */
25 | PotionType getPotionType();
26 |
27 | /**
28 | * Sets the Potion Type ID
29 | *
30 | * @param typeId
31 | * the Type ID to set
32 | */
33 | void setPotionTypeId(short typeId);
34 |
35 | /**
36 | * Sets the Potion Type
37 | *
38 | * @param type
39 | * the PotionType to set
40 | */
41 | void setPotionType(PotionType type);
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/throwable/EntityThrowable.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.throwable;
2 |
3 | import net.canarymod.api.entity.Entity;
4 | import net.canarymod.api.entity.Projectile;
5 | import net.canarymod.api.entity.living.LivingBase;
6 |
7 | /**
8 | * Throwable interface
9 | *
10 | * @author Jason (darkdiplomat)
11 | */
12 | public interface EntityThrowable extends Entity, Projectile {
13 |
14 | /**
15 | * Gets the LivingBase that threw the Throwable
16 | *
17 | * @return the LivingBase that threw the Throwable
18 | */
19 | LivingBase getThrower();
20 |
21 | /**
22 | * Gets the amount of gravity to apply to the thrown entity with each tick.
23 | *
24 | * @return gravity
25 | * the amount of gravity applied
26 | */
27 | float getGravity();
28 |
29 | /**
30 | * Sets the amount of gravity to apply to the thrown entity with each tick.
31 | *
32 | * @param velocity
33 | * the amount of gravity to apply
34 | */
35 | void setGravity(float velocity);
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/throwable/Snowball.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.throwable;
2 |
3 | /**
4 | * Snowball wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Snowball extends EntityThrowable {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/throwable/XPBottle.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.throwable;
2 |
3 | /**
4 | * XPBottle wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface XPBottle extends EntityThrowable {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/AnimalVehicle.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | import net.canarymod.api.entity.living.animal.EntityAnimal;
4 |
5 | /**
6 | * Animal vehicle wrapper interface
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface AnimalVehicle extends EntityAnimal, Vehicle {
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/Boat.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | /**
4 | * Boat Wrapper
5 | *
6 | * @author Chris (damagefilter)
7 | */
8 | public interface Boat extends Vehicle {
9 |
10 | /**
11 | * Gets the direction that the vehicle is moving
12 | *
13 | * @return forward direction
14 | */
15 | int getForwardDirection();
16 |
17 | /**
18 | * Sets the direction that the vehicle is moving
19 | *
20 | * @param direction
21 | * the forward direction (0,1,2,3)
22 | */
23 | void setForwardDirection(int direction);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/ChestMinecart.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | /**
4 | * ChestMinecraft wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface ChestMinecart extends ContainerMinecart {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/CommandBlockMinecart.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | import net.canarymod.api.CommandBlockLogic;
4 |
5 | /**
6 | * Command Block Minecart wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface CommandBlockMinecart extends Minecart, CommandBlockLogic {
11 | //nothing right now
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/ContainerMinecart.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | import net.canarymod.api.inventory.Inventory;
4 |
5 | /**
6 | * ContainerMinecart wrapper
7 | *
8 | * @author Somners
9 | */
10 | public interface ContainerMinecart extends Minecart, Inventory {
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/EmptyMinecart.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | /**
4 | * EmptyMinecart (Ridable) wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface EmptyMinecart extends Minecart {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/FurnaceMinecart.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | /**
4 | * FurnaceMinecart wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface FurnaceMinecart extends Minecart {
9 |
10 | /**
11 | * Gets the fuel level of the FurnaceMinecart
12 | *
13 | * @return fuel level
14 | */
15 | int getFuelLevel();
16 |
17 | /**
18 | * Sets the fuel level of the FurnaceMinecart
19 | * NOTE: The level increases by 3600 per Coal
20 | *
21 | * @param level
22 | * the level to be set
23 | */
24 | void setFuelLevel(int level);
25 |
26 | /**
27 | * Increases the fuel level of the FurnaceMinecart
28 | *
29 | * @param increase
30 | * the amount to increase the fuel level
31 | */
32 | void increaseFuelLevel(int increase);
33 |
34 | /**
35 | * Decreases the fuel level of the FurnaceMinecart
36 | *
37 | * @param decrease
38 | * the amount to decrease the fuel level
39 | */
40 | void decreaseFuelLevel(int decrease);
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/HopperMinecart.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | import net.canarymod.api.inventory.Hopper;
4 |
5 | /**
6 | * HopperMinecart wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface HopperMinecart extends ContainerMinecart, Hopper {
11 |
12 | /**
13 | * Gets if the Minecart is blocked by an activator rail
14 | *
15 | * @return {@code true} if blocked; {@code false} if not
16 | */
17 | boolean isBlocked();
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/MobSpawnerMinecart.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | import net.canarymod.api.MobSpawnerLogic;
4 |
5 | /**
6 | * MobSpawnerMinecart wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface MobSpawnerMinecart extends Minecart {
11 |
12 | /**
13 | * Gets the MobSpawnerLogic for this MobSpawnerMinecart
14 | *
15 | * @return mobspawnerlogic
16 | */
17 | MobSpawnerLogic getMobSpawnerLogic();
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/TNTMinecart.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | import net.canarymod.api.entity.Explosive;
4 |
5 | /**
6 | * TrinitrotolueneMinecart wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface TNTMinecart extends Minecart, Explosive {
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/entity/vehicle/Vehicle.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.entity.vehicle;
2 |
3 | import net.canarymod.api.entity.Entity;
4 |
5 | /**
6 | * Vehicle wrapper
7 | *
8 | * @author Chris (damagefilter)
9 | */
10 | public interface Vehicle extends Entity {
11 |
12 | /**
13 | * Gets the entity inside this vehicle
14 | *
15 | * @return entity
16 | */
17 | Entity getPassenger();
18 |
19 | /**
20 | * Says whether or not this vehicle is a boat
21 | *
22 | * @return {@code true} if boat; {@code false} if not
23 | */
24 | boolean isBoat();
25 |
26 | /**
27 | * Says whether or not this vehicle is a minecart
28 | *
29 | * @return {@code true} if minecart; {@code false} if not
30 | */
31 | boolean isMinecart();
32 |
33 | /**
34 | * Check if this vehicle is empty.
35 | *
36 | * @return {@code true} if empty; {@code false} if not
37 | */
38 | boolean isEmpty();
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/factory/StatisticsFactory.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.factory;
2 |
3 | import net.canarymod.api.statistics.Achievement;
4 | import net.canarymod.api.statistics.Stat;
5 |
6 | /**
7 | * Statitics Factory
8 | *
9 | * @author Jason (darkdiplomat)
10 | */
11 | public interface StatisticsFactory {
12 |
13 | /**
14 | * Gets the instance for a given {@link Stat} name
15 | *
16 | * @param nmsName
17 | * the name of the stat
18 | *
19 | * @return {@link Stat} instance
20 | */
21 | Stat getStat(String nmsName);
22 |
23 | Achievement getAchievement(String nmsName);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/gui/GUIControl.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.gui;
2 |
3 | /**
4 | * GUI Control intereface
5 | *
6 | * @author Larry (Larry1123)
7 | */
8 | public interface GUIControl {
9 |
10 | /**
11 | * Used when the GUI is to be replaced.
12 | * Should be used to Close your GUI with out stopping the server
13 | */
14 | void closeWindow();
15 |
16 | /**
17 | * Called to start the GUI
18 | */
19 | void start();
20 |
21 | /**
22 | * The name of the GUI
23 | *
24 | * @return GUI name
25 | */
26 | String getName();
27 | }
28 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/inventory/AnimalInventory.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.inventory;
2 |
3 | import net.canarymod.api.entity.living.animal.EntityAnimal;
4 |
5 | /**
6 | * Animal Inventory wrapper interface
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface AnimalInventory extends Inventory {
11 |
12 | /**
13 | * Gets the {@link EntityAnimal} that the inventory is for
14 | *
15 | * @return the {@link EntityAnimal} owner
16 | */
17 | EntityAnimal getOwner();
18 | }
19 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/inventory/BaseItem.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.inventory;
2 |
3 | /**
4 | * Base Item to retrieve Item statistics
5 | *
6 | * @author Chris (damagefilter)
7 | */
8 | public interface BaseItem {
9 |
10 | /**
11 | * Get the maximum Stack size for this item
12 | *
13 | * @return max stack size
14 | */
15 | int getMaxStackSize();
16 |
17 | /**
18 | * Return the amount of damage this item can take before it breaks
19 | *
20 | * @return max damage
21 | */
22 | int getMaxDamage();
23 |
24 | /**
25 | * Set the max amount of damage this item can take before it breaks
26 | *
27 | * @param damage
28 | * the damage max to set
29 | */
30 | void setMaxDamage(int damage);
31 |
32 | /**
33 | * Check if this item is damageable
34 | *
35 | * @return {@code true} if damageable; {@code false} if not
36 | */
37 | boolean isDamageable();
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/inventory/CraftingMatrix.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.inventory;
2 |
3 | /**
4 | * Crafting Matrix sharer interface
5 | * This interface is so Workbench and PlayerCraftingMatrix can be sent the same
6 | *
7 | * @author Jason (darkdiplomat)
8 | */
9 | public interface CraftingMatrix extends Inventory {
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/inventory/CustomStorageInventory.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.inventory;
2 |
3 | import net.canarymod.api.nbt.CompoundTag;
4 | import net.canarymod.api.nbt.ListTag;
5 |
6 | /**
7 | * Custom Inventory wrapper interface
8 | *
9 | * @author Jason (darkdiplomat)
10 | */
11 | public interface CustomStorageInventory extends Inventory {
12 |
13 | ListTag
28 | * Index are left to right, top to bottom and do not specify actual shape of the recipe
29 | *
30 | * @return an array of {@link Item}
31 | */
32 | Item[] getRecipeItems();
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/inventory/recipes/ShapelessRecipe.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.inventory.recipes;
2 |
3 | import net.canarymod.api.inventory.Item;
4 |
5 | import java.util.List;
6 |
7 | /**
8 | * ShapelessRecipes wrapper interface
9 | *
10 | * @author Jason (darkdiplomat)
11 | */
12 | public interface ShapelessRecipe extends Recipe {
13 |
14 | /**
15 | * Gets a list of {@link Item} that make up this recipe
16 | *
17 | * @return a list of {@link Item}
18 | */
19 | List
21 | * For example the Id of packet3Chat is 3
22 | *
23 | * @return the packet's id
24 | */
25 | int getPacketId();
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/scoreboard/ScoreDummyCriteria.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.scoreboard;
2 |
3 | /**
4 | * @author Somners
5 | */
6 | public interface ScoreDummyCriteria extends ScoreObjectiveCriteria {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/scoreboard/ScoreHealthCriteria.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.scoreboard;
2 |
3 | /**
4 | * Wrapper Interface for Health Score Criteria
5 | *
6 | * @author Somners
7 | */
8 | public interface ScoreHealthCriteria extends ScoreDummyCriteria {
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/scoreboard/ScoreObjectiveCriteria.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.scoreboard;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * ScoreObjectiveCriteria wrapper
7 | *
8 | * @author Somners
9 | */
10 | public interface ScoreObjectiveCriteria {
11 |
12 | /**
13 | * Gets the protocol name assigned to this {@link ScoreObjectiveCriteria}.
14 | *
15 | * @return The internal protocol name.
16 | */
17 | String getProtocolName();
18 |
19 | /**
20 | * Used to get a score based on this criteria
21 | * This method is used primarily for readOnly
22 | *
23 | * @param list
24 | * List of parameters.
25 | *
26 | * @return The score.
27 | */
28 | int getScore(List> list);
29 |
30 | /**
31 | * Is read only? If this is true you cannot add or remove to the score.
32 | * The score can only be set by {@link Score#setReadOnlyScore}
33 | *
34 | * @return true if read only, false otherwise.
35 | */
36 | boolean isReadOnly();
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/statistics/Achievement.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.statistics;
2 |
3 | /**
4 | * Achievement
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Achievement extends Stat {
9 |
10 | /**
11 | * Gets the description of the achievement
12 | *
13 | * @return achievement description
14 | */
15 | String getDescription();
16 |
17 | /**
18 | * Gets the achievement required to get this achievement
19 | *
20 | * @return parent achievement
21 | */
22 | Achievement getParent();
23 |
24 | /**
25 | * Gets whether the achievement is special
26 | *
27 | * Special achievements have a 'spiked' (on normal texture pack) frame, special achievements are the hardest ones to
28 | * achieve.
29 | *
30 | * @return {@code true} if special; {@code false} if not
31 | */
32 | boolean isSpecial();
33 | }
34 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/statistics/Stat.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.statistics;
2 |
3 | /**
4 | * Stat wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Stat {
9 |
10 | /**
11 | * Get the id of this stat.
12 | *
13 | * @return the Stat ID
14 | */
15 | String getId();
16 |
17 | /**
18 | * Gets the name of the stat.
19 | * NOTE: This has gone through Minecraft's string translate to get a readable form
20 | *
21 | * @return the name of the Stat
22 | */
23 | String getName();
24 |
25 | /**
26 | * Return is this stat is independent (i.e., lacking prerequisites for being updated)
27 | *
28 | * @return {@code true} if independent; {@code false} if not
29 | */
30 | boolean isIndependent();
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/TreeType.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world;
2 |
3 | /**
4 | * Tree Types
5 | *
6 | * @author Jason Jones (darkdiplomat)
7 | */
8 | public enum TreeType {
9 |
10 | BIGOAK,
11 | SWAMPOAK,
12 | DARKOAK,
13 | BIRCH,
14 | TALLBIRCH,
15 | SPRUCE,
16 | TALLSPRUCE,
17 | MEGASPRUCE,
18 | JUNGLE,
19 | TALLJUNGLE,
20 | JUNGLEBUSH,
21 | MEGAJUNGLE,
22 | ACACIA,
23 |
24 | /* I know, these technically aren't trees, but the Bukkit API has them and people will complain if these are here... */
25 | REDMUSHROOM,
26 | BROWNMUSHROOM,
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/UnknownWorldException.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world;
2 |
3 | /**
4 | * Thrown when a needed world is non-existent or not loaded
5 | *
6 | * @author Chris (damagefilter)
7 | */
8 | public class UnknownWorldException extends IllegalArgumentException {
9 | private static final long serialVersionUID = -6910387258523508711L;
10 |
11 | public UnknownWorldException(String str) {
12 | super(str);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/BrewingStand.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | /**
4 | * BrewingStand interface
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface BrewingStand extends LockableTileEntity {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/Chest.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | import net.canarymod.api.inventory.Inventory;
4 |
5 | /**
6 | * Chest interface
7 | *
8 | * @author Chris (damagefilter)
9 | */
10 | public interface Chest extends LockableTileEntity, Inventory {
11 |
12 | /**
13 | * Check if this chest has an attached chest (is a double chest)
14 | *
15 | * @return {@code true} if attached chest; {@code false} if not
16 | */
17 | boolean hasAttachedChest();
18 |
19 | /**
20 | * Gets the DoubleChest that results from this chest and its attached chest.
21 | * Returns null if there is no attached chest
22 | *
23 | * @return {@link DoubleChest} if found; {@code null} if not
24 | */
25 | DoubleChest getDoubleChest();
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/CommandBlock.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | import net.canarymod.api.CommandBlockLogic;
4 |
5 | /**
6 | * CommandBlock wrapper
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface CommandBlock extends TileEntity, CommandBlockLogic {
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/Comparator.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | /**
4 | * Comparator wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Comparator extends TileEntity {
9 |
10 | /**
11 | * Gets the output signal of the Comparator
12 | *
13 | * @return output signal
14 | */
15 | int getOutputSignal();
16 |
17 | /**
18 | * Sets the output signal of the Comparator
19 | *
20 | * @param signal
21 | * the output signal
22 | */
23 | void setOutputSignal(int signal);
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/CustomBlockTypeException.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | /**
4 | * Thrown when dealing with custom BlockTypes that don't exist or already exist
5 | *
6 | * @author Chris (damagefilter)
7 | */
8 | public class CustomBlockTypeException extends RuntimeException {
9 |
10 | private static final long serialVersionUID = -1135339551333207850L;
11 |
12 | public CustomBlockTypeException(String str) {
13 | super(str);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/DaylightDetector.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | /**
4 | * DaylightDetector wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface DaylightDetector extends TileEntity {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/Dispenser.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | import net.canarymod.api.entity.Entity;
4 |
5 | /**
6 | * Dispenser interface
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface Dispenser extends LockableTileEntity {
11 |
12 | /**
13 | * Activate the dispenser: spawns an item from a random slot.
14 | *
15 | * @return the entity spawned
16 | */
17 | Entity activate();
18 |
19 | /**
20 | * Dispense the item from the given slot.
21 | *
22 | * @param slot
23 | * the slot to dispend from
24 | *
25 | * @return the entity spawned
26 | */
27 | Entity dispenseFromSlot(int slot);
28 | }
29 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/DoubleChest.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | /**
4 | * DoubleChest interface
5 | *
6 | * @author Chris (damagefilter)
7 | */
8 | public interface DoubleChest extends Chest {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/Dropper.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | /**
4 | * Dropper wrapper
5 | *
6 | * @author Jason (darkdiplomat)
7 | */
8 | public interface Dropper extends Dispenser {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/EnderChest.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | import net.canarymod.api.entity.living.humanoid.Player;
4 | import net.canarymod.api.inventory.Inventory;
5 |
6 | /**
7 | * An EnderChest is not treated as a regular chest by extending Container
32 | * Wood based blocks = 4 (Bass Guitar)
33 | * Sand/Gravel blocks = 2 (Snare Drum)
34 | * Glass blocks = 3 (Clicks / Rimshots))
35 | * Stone/rocks based blocks = 1 (Bassdrum)
36 | * all other blocks = 0 (Piano)
37 | *
38 | * @return instrument byte
39 | */
40 | byte getInstrument();
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/Workbench.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks;
2 |
3 | import net.canarymod.api.inventory.CraftingMatrix;
4 |
5 | /**
6 | * Workbench interface
7 | *
8 | * @author Jason (darkdiplomat)
9 | */
10 | public interface Workbench extends TileEntity, CraftingMatrix {
11 | }
12 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/properties/BlockBooleanProperty.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks.properties;
2 |
3 | /**
4 | * PropertyBool wrapper
5 | *
6 | * @author Jason Jones (darkdiplomat)
7 | */
8 | public interface BlockBooleanProperty extends BlockProperty {
9 |
10 | /**
11 | * Tests if a given value can be applied to the Property
12 | *
13 | * @param value
14 | * the value to test
15 | *
16 | * @return {@code true} if can apply; {@code false} if not
17 | */
18 | boolean canApply(Boolean value);
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/properties/BlockDirectionProperty.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks.properties;
2 |
3 | /**
4 | * PropertyDirection wrapper
5 | *
6 | * @author Jason Jones (darkdiplomat)
7 | */
8 | public interface BlockDirectionProperty extends BlockEnumProperty {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/properties/BlockEnumProperty.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks.properties;
2 |
3 | /**
4 | * PropertyEnum wrapper
5 | *
6 | * @author Jason Jones (darkdiplomat)
7 | */
8 | public interface BlockEnumProperty extends BlockProperty {
9 | }
10 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/properties/BlockIntegerProperty.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks.properties;
2 |
3 | /**
4 | * PropertyInteger wrapper
5 | *
6 | * @author Jason Jones (darkdiplomat)
7 | */
8 | public interface BlockIntegerProperty extends BlockProperty {
9 |
10 | /**
11 | * Tests if a given value can be applied to the Property
12 | *
13 | * @param value
14 | * the value to test
15 | *
16 | * @return {@code true} if can apply; {@code false} if not
17 | */
18 | boolean canApply(Integer value);
19 | }
20 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/api/world/blocks/properties/BlockProperty.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.api.world.blocks.properties;
2 |
3 | import java.util.Collection;
4 |
5 | /**
6 | * Block IProperty/PropertyHelper wrapper
7 | *
8 | * @author Jason Jones (darkdiplomat)
9 | */
10 | public interface BlockProperty {
11 |
12 | /**
13 | * Gets the Property's name
14 | *
15 | * @return property name
16 | */
17 | String getName();
18 |
19 | /**
20 | * Gets the collection of allowed values
21 | *
22 | * @return allowed values
23 | */
24 | Collection
8 | * Called when an {@link EntityItem} hits the ground
9 | *
10 | * @author Jason (darkdiplomat)
11 | */
12 | public class ItemTouchGroundHook extends CancelableHook {
13 | private EntityItem item;
14 |
15 | /**
16 | * Constructs a new ItemTouchGroundHook
17 | *
18 | * @param item
19 | * the {@link EntityItem} hitting the ground
20 | */
21 | public ItemTouchGroundHook(EntityItem item) {
22 | this.item = item;
23 | }
24 |
25 | /**
26 | * Gets the {@link EntityItem} hitting the ground
27 | *
28 | * @return the {@link EntityItem}
29 | */
30 | public EntityItem getEntityItem() {
31 | return item;
32 | }
33 |
34 | @Override
35 | public final String toString() {
36 | return String.format("%s[EntityItem=%s]", getHookName(), item);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/entity/VehicleDestroyHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.entity;
2 |
3 | import net.canarymod.api.entity.vehicle.Vehicle;
4 | import net.canarymod.hook.Hook;
5 |
6 | /**
7 | * VehicleDestoryHook
8 | * Called when a Minecart or Boat is destroyed
9 | *
10 | * @author Jason (darkdiplomat)
11 | */
12 | public class VehicleDestroyHook extends Hook {
13 | private Vehicle vehicle;
14 |
15 | public VehicleDestroyHook(Vehicle vehicle) {
16 | this.vehicle = vehicle;
17 | }
18 |
19 | /**
20 | * The {@link Vehicle} being destoryed
21 | *
22 | * @return the {@link Vehicle}
23 | */
24 | public Vehicle getVehicle() {
25 | return vehicle;
26 | }
27 |
28 | @Override
29 | public final String toString() {
30 | return String.format("%s[Vehicle=%s]", getHookName(), vehicle);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/entity/VehicleEnterHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.entity;
2 |
3 | import net.canarymod.api.entity.living.LivingBase;
4 | import net.canarymod.api.entity.vehicle.Vehicle;
5 | import net.canarymod.hook.CancelableHook;
6 |
7 | /**
8 | * Is called when a LivingEntity enters a vehicle
9 | *
10 | * @author Chris (damagefilter)
11 | */
12 | public final class VehicleEnterHook extends CancelableHook {
13 | private Vehicle vehicle;
14 | private LivingBase enteringEntity;
15 |
16 | public VehicleEnterHook(Vehicle vehicle, LivingBase entity) {
17 | this.vehicle = vehicle;
18 | this.enteringEntity = entity;
19 | }
20 |
21 | /**
22 | * @return the vehicle
23 | */
24 | public Vehicle getVehicle() {
25 | return vehicle;
26 | }
27 |
28 | /**
29 | * @return the enteringEntity
30 | */
31 | public LivingBase getEntity() {
32 | return enteringEntity;
33 | }
34 |
35 | @Override
36 | public final String toString() {
37 | return String.format("%s[Vehicle=%s, Entity=%s]", getHookName(), vehicle, enteringEntity);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/entity/VehicleExitHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.entity;
2 |
3 | import net.canarymod.api.entity.living.LivingBase;
4 | import net.canarymod.api.entity.vehicle.Vehicle;
5 | import net.canarymod.hook.CancelableHook;
6 |
7 | /**
8 | * Is called when a LivingEntity exits a vehicle
9 | *
10 | * @author Chris (damagefilter)
11 | */
12 | public final class VehicleExitHook extends CancelableHook {
13 | private Vehicle vehicle;
14 | private LivingBase enteringEntity;
15 |
16 | public VehicleExitHook(Vehicle vehicle, LivingBase entity) {
17 | this.vehicle = vehicle;
18 | this.enteringEntity = entity;
19 | }
20 |
21 | /**
22 | * @return the vehicle
23 | */
24 | public Vehicle getVehicle() {
25 | return vehicle;
26 | }
27 |
28 | /**
29 | * @return the enteringEntity
30 | */
31 | public LivingBase getEntity() {
32 | return enteringEntity;
33 | }
34 |
35 | @Override
36 | public final String toString() {
37 | return String.format("%s[Vehicle=%s, Entity=%s]", getHookName(), vehicle, enteringEntity);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/player/LevelUpHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.player;
2 |
3 | import net.canarymod.api.entity.living.humanoid.Player;
4 | import net.canarymod.hook.Hook;
5 |
6 | /**
7 | * LevelUp hook. Called when a {@link Player} levels up
8 | *
9 | * @author Chris (damagefilter)
10 | */
11 | public final class LevelUpHook extends Hook {
12 | private Player player;
13 |
14 | public LevelUpHook(Player player) {
15 | this.player = player;
16 | }
17 |
18 | /**
19 | * Get the {@link Player} instance
20 | *
21 | * @return the {@link Player} leveling up
22 | */
23 | public Player getPlayer() {
24 | return player;
25 | }
26 |
27 | @Override
28 | public final String toString() {
29 | return String.format("%s[Player=%s]", getHookName(), player);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/player/PlayerArmSwingHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.player;
2 |
3 | import net.canarymod.api.entity.living.humanoid.Player;
4 | import net.canarymod.hook.Hook;
5 |
6 | /**
7 | * Player Left Click Hook
8 | * Called when a {@link Player} swings their arm with a Left Click
9 | *
10 | * @author Jason (darkdiplomat)
11 | */
12 | public class PlayerArmSwingHook extends Hook {
13 | private Player player;
14 |
15 | public PlayerArmSwingHook(Player player) {
16 | this.player = player;
17 | }
18 |
19 | /**
20 | * Gets the {@link Player} clicking
21 | *
22 | * @return the {@link Player}
23 | */
24 | public Player getPlayer() {
25 | return player;
26 | }
27 |
28 | @Override
29 | public final String toString() {
30 | return String.format("%s[Player=%s]", getHookName(), player);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/system/LoadWorldHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.system;
2 |
3 | import net.canarymod.api.world.World;
4 | import net.canarymod.hook.Hook;
5 |
6 | /**
7 | * Load World Hook
8 | *
9 | * Called when a {@link World} is loaded and initialized
10 | *
11 | * @author Jason (darkdiplomat)
12 | */
13 | public final class LoadWorldHook extends Hook {
14 | private final World world;
15 |
16 | public LoadWorldHook(World world) {
17 | this.world = world;
18 | }
19 |
20 | /**
21 | * Gets the {@link World} that has loaded
22 | *
23 | * @return the {@link World} that loaded
24 | */
25 | public World getWorld() {
26 | return world;
27 | }
28 |
29 | /**
30 | * {@inheritDoc}
31 | */
32 | @Override
33 | public String toString() {
34 | return String.format("%s[World=%s]", getHookName(), world);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/system/PluginDisableHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.system;
2 |
3 | import net.canarymod.hook.Hook;
4 | import net.canarymod.plugin.Plugin;
5 |
6 | /**
7 | * Called when a plugin is disabled
8 | *
9 | * @author greatman
10 | */
11 | public final class PluginDisableHook extends Hook {
12 |
13 | private Plugin plugin;
14 |
15 | public PluginDisableHook(Plugin plugin) {
16 | this.plugin = plugin;
17 | }
18 |
19 | /**
20 | * Retrieve the plugin that is disabled
21 | *
22 | * @return The plugin that is disabled
23 | */
24 | public Plugin getPlugin() {
25 | return plugin;
26 | }
27 |
28 | public final String toString() {
29 | return String.format("%s[Plugin=%s]", getHookName(), plugin);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/system/PluginEnableHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.system;
2 |
3 | import net.canarymod.hook.Hook;
4 | import net.canarymod.plugin.Plugin;
5 |
6 | /**
7 | * Called when a plugin is enabled.
8 | *
9 | * @author greatman
10 | */
11 | public class PluginEnableHook extends Hook {
12 |
13 | private Plugin plugin;
14 |
15 | public PluginEnableHook(Plugin plugin) {
16 | this.plugin = plugin;
17 | }
18 |
19 | /**
20 | * Retrieve the plugin that is enabled
21 | *
22 | * @return The plugin that is enabled
23 | */
24 | public Plugin getPlugin() {
25 | return plugin;
26 | }
27 |
28 | public final String toString() {
29 | return String.format("%s[Plugin=%s]", getHookName(), plugin);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/system/ServerGuiStartHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.system;
2 |
3 | import net.canarymod.api.gui.GUIControl;
4 | import net.canarymod.hook.Hook;
5 |
6 | /**
7 | * Called when a GUI is started
8 | *
9 | * @author Larry (Larry1123)
10 | */
11 | public class ServerGuiStartHook extends Hook {
12 |
13 | private GUIControl gui;
14 |
15 | public ServerGuiStartHook(GUIControl gui) {
16 | this.setGui(gui);
17 | }
18 |
19 | public GUIControl getGui() {
20 | return gui;
21 | }
22 |
23 | public void setGui(GUIControl gui) {
24 | this.gui = gui;
25 | }
26 |
27 | public final String toString() {
28 | return String.format("%s[GUI=%s]", getHookName(), gui);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/system/ServerShutdownHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.system;
2 |
3 | import net.canarymod.hook.Hook;
4 |
5 | /**
6 | * Server shutdown hook. Contains information about the reason the server is
7 | * shutting down
8 | *
9 | * @author Jason (darkdiplomat)
10 | */
11 | public final class ServerShutdownHook extends Hook {
12 |
13 | private String reason;
14 |
15 | public ServerShutdownHook(String reason) {
16 | this.reason = reason;
17 | }
18 |
19 | /**
20 | * Get the reason for disconnect (if applicable)
21 | *
22 | * @return reason if disconnecting, null otherwise
23 | */
24 | public String getReason() {
25 | return reason;
26 | }
27 |
28 | /**
29 | * Set the reason for disconnection that will be displayed
30 | *
31 | * @param reason
32 | */
33 | public void setReason(String reason) {
34 | this.reason = reason;
35 | }
36 |
37 | @Override
38 | public final String toString() {
39 | return String.format("%s[Reason=%s]", getHookName(), reason);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/system/ServerTickHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.system;
2 |
3 | import net.canarymod.hook.Hook;
4 |
5 | /**
6 | * Called in the servers tick loop, before world processing.
7 | * For informational use
8 | *
9 | * @author Chris (damagefilter)
10 | */
11 | public final class ServerTickHook extends Hook {
12 | private long deltaTime;
13 |
14 | public ServerTickHook(long deltaTime) {
15 | this.deltaTime = deltaTime;
16 | }
17 |
18 | /**
19 | * @return the deltaTime
20 | */
21 | public long getDeltaTime() {
22 | return deltaTime;
23 | }
24 |
25 | /**
26 | * @param deltaTime
27 | * the deltaTime to set
28 | */
29 | public void setDeltaTime(long deltaTime) {
30 | this.deltaTime = deltaTime;
31 | }
32 |
33 | @Override
34 | public final String toString() {
35 | return String.format("%s[DeltaTime=%d]", getHookName(), deltaTime);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/system/UnloadWorldHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.system;
2 |
3 | import net.canarymod.api.world.World;
4 | import net.canarymod.hook.Hook;
5 |
6 | /**
7 | * Called before a world is unloaded.
8 | * Before a world is unloaded, it will be saved!
9 | * After a world is unloaded it will not be processed in the tick loop anymore.
10 | * A world can not be unloaded if it still has players on it.
11 | * For informational use - to give plugins a chance to null their references to that world, if they have any.
12 | *
13 | * @author Chris (damagefilter)
14 | */
15 | public final class UnloadWorldHook extends Hook {
16 |
17 | private World world;
18 |
19 | public UnloadWorldHook(World world) {
20 | this.world = world;
21 | }
22 |
23 | /**
24 | * Returns the world that is about to be unloaded
25 | *
26 | * @return the world
27 | */
28 | public World getWorld() {
29 | return world;
30 | }
31 |
32 | @Override
33 | public final String toString() {
34 | return "UnloadWorldHook[World=" + world.getFqName() + "]";
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/world/BlockGrowHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.world;
2 |
3 | import net.canarymod.api.world.blocks.Block;
4 | import net.canarymod.hook.CancelableHook;
5 |
6 | /**
7 | * Called when a block "grows"
8 | *
9 | * @author Jason Jones (darkdiplomat)
10 | */
11 | public class BlockGrowHook extends CancelableHook {
12 | private final Block original, growth;
13 |
14 | public BlockGrowHook(Block original, Block growth) {
15 | this.original = original;
16 | this.growth = growth;
17 | }
18 |
19 | public Block getOriginal() {
20 | return original;
21 | }
22 |
23 | public Block getGrowth() {
24 | return growth;
25 | }
26 |
27 | public String toString() {
28 | return String.format("%s[Original: %s, Growth: %s]", getHookName(), original, growth);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/world/ChunkCreatedHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.world;
2 |
3 | import net.canarymod.api.world.Chunk;
4 | import net.canarymod.api.world.World;
5 | import net.canarymod.hook.Hook;
6 |
7 | /**
8 | * Chunk created hook
9 | *
10 | * @author Chris (damagefilter)
11 | */
12 | public final class ChunkCreatedHook extends Hook {
13 |
14 | private World world;
15 | private Chunk chunk;
16 |
17 | public ChunkCreatedHook(Chunk chunk, World world) {
18 | this.world = world;
19 | this.chunk = chunk;
20 | }
21 |
22 | /**
23 | * Gets the {@link Chunk}
24 | *
25 | * @return {@link Chunk} created.
26 | */
27 | public Chunk getChunk() {
28 | return chunk;
29 | }
30 |
31 | /**
32 | * Gets the world that this chunk is a part of.
33 | *
34 | * @return the {@link World}
35 | */
36 | public World getWorld() {
37 | return world;
38 | }
39 |
40 | @Override
41 | public final String toString() {
42 | return String.format("%s[Chunk=%s, World=%s]", getHookName(), chunk, world);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/world/ChunkUnloadHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.world;
2 |
3 | import net.canarymod.api.world.Chunk;
4 | import net.canarymod.api.world.World;
5 | import net.canarymod.hook.CancelableHook;
6 |
7 | /**
8 | * Chunk unload hook
9 | *
10 | * @author Chris (damagefilter)
11 | */
12 | public final class ChunkUnloadHook extends CancelableHook {
13 |
14 | private World world;
15 | private Chunk chunk;
16 |
17 | public ChunkUnloadHook(Chunk chunk, World world) {
18 | this.world = world;
19 | this.chunk = chunk;
20 | }
21 |
22 | /**
23 | * Gets the {@link Chunk}
24 | *
25 | * @return The {@link Chunk}.
26 | */
27 | public Chunk getChunk() {
28 | return chunk;
29 | }
30 |
31 | /**
32 | * Gets the world this chunk is a part of.
33 | *
34 | * @return the world
35 | */
36 | public World getWorld() {
37 | return world;
38 | }
39 |
40 | @Override
41 | public final String toString() {
42 | return String.format("%s[World=%s, Chunk=%s]", getHookName(), world, chunk);
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/world/FireworkExplodeHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.world;
2 |
3 | import net.canarymod.api.entity.FireworkRocket;
4 | import net.canarymod.hook.CancelableHook;
5 |
6 | /**
7 | * FireworkExplodeHook
8 | *
9 | * Called when a Firework Rocket is to explode
10 | *
11 | * @author Jason (darkdiplomat)
12 | */
13 | public final class FireworkExplodeHook extends CancelableHook {
14 | private FireworkRocket rocket;
15 |
16 | /**
17 | * Constructs a new FireworkExplodeHook
18 | *
19 | * @param rocket
20 | * the {@link FireworkRocket} to explode
21 | */
22 | public FireworkExplodeHook(FireworkRocket rocket) {
23 | this.rocket = rocket;
24 | }
25 |
26 | /**
27 | * Gets the {@link FireworkRocket} set to explode
28 | *
29 | * @return the {@link FireworkRocket}
30 | */
31 | public FireworkRocket getFireworkRocket() {
32 | return rocket;
33 | }
34 |
35 | @Override
36 | public final String toString() {
37 | return String.format("%s[FireworkRocket=%s]", getHookName(), rocket);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/world/FlowHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.world;
2 |
3 | import net.canarymod.api.world.blocks.Block;
4 | import net.canarymod.hook.CancelableHook;
5 |
6 | /**
7 | * Flow hook. Contains information about a liquid flowing from one block to another
8 | *
9 | * @author Jason (darkdiplomat)
10 | */
11 | public final class FlowHook extends CancelableHook {
12 |
13 | private Block from, to;
14 |
15 | public FlowHook(Block from, Block to) {
16 | this.from = from;
17 | this.to = to;
18 | }
19 |
20 | /**
21 | * Gets the {@link Block} flowing from
22 | *
23 | * @return the {@link Block}
24 | */
25 | public Block getBlockFrom() {
26 | return from;
27 | }
28 |
29 | /**
30 | * Gets the {@link Block} flowing to
31 | *
32 | * @return the {@link Block}
33 | */
34 | public Block getBlockTo() {
35 | return to;
36 | }
37 |
38 | @Override
39 | public final String toString() {
40 | return String.format("%s[Block To=%s, Block From=%s]", getHookName(), to, from);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/world/LeafDecayHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.world;
2 |
3 | import net.canarymod.api.world.blocks.Block;
4 | import net.canarymod.hook.CancelableHook;
5 |
6 | /**
7 | * Block update hook. Contains information about a block updating.
8 | *
9 | * @author Jason (darkdiplomat)
10 | */
11 | public final class LeafDecayHook extends CancelableHook {
12 |
13 | private Block block;
14 |
15 | public LeafDecayHook(Block block) {
16 | this.block = block;
17 | }
18 |
19 | /**
20 | * Get the leaf block that is about to decay
21 | *
22 | * @return the {@link Block} of leaves
23 | */
24 | public Block getBlock() {
25 | return block;
26 | }
27 |
28 | @Override
29 | public final String toString() {
30 | return String.format("%s[Block=%s]", getHookName(), block);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/world/PistonExtendHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.world;
2 |
3 | import net.canarymod.api.world.blocks.Block;
4 | import net.canarymod.hook.CancelableHook;
5 |
6 | /**
7 | * Piston Extend Hook
8 | * Called when a Piston extends
9 | *
10 | * @author Jason (darkdiplomat)
11 | */
12 | public final class PistonExtendHook extends CancelableHook {
13 |
14 | private Block piston, moving;
15 |
16 | public PistonExtendHook(Block piston, Block moving) {
17 | this.piston = piston;
18 | this.moving = moving;
19 | }
20 |
21 | /**
22 | * Gets the piston {@link Block}
23 | *
24 | * @return piston
25 | */
26 | public Block getPiston() {
27 | return piston;
28 | }
29 |
30 | /**
31 | * Gets the {@link Block} the piston is pushing/pulling
32 | *
33 | * @return {@link Block}
34 | */
35 | public Block getMoving() {
36 | return moving;
37 | }
38 |
39 | @Override
40 | public final String toString() {
41 | return String.format("%s[Piston=%s, Block=%s]", getHookName(), piston, moving);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/world/PistonRetractHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.world;
2 |
3 | import net.canarymod.api.world.blocks.Block;
4 | import net.canarymod.hook.CancelableHook;
5 |
6 | /**
7 | * Piston Retract hook
8 | * Called when a piston retracts
9 | *
10 | * @author Jason (darkdiplomat)
11 | */
12 | public final class PistonRetractHook extends CancelableHook {
13 |
14 | private Block piston, moving;
15 |
16 | public PistonRetractHook(Block piston, Block moving) {
17 | this.piston = piston;
18 | this.moving = moving;
19 | }
20 |
21 | /**
22 | * Gets the piston {@link Block}
23 | *
24 | * @return piston
25 | */
26 | public Block getPiston() {
27 | return piston;
28 | }
29 |
30 | /**
31 | * Gets the {@link Block} the piston is pushing/pulling
32 | *
33 | * @return the {@link Block}
34 | */
35 | public Block getMoving() {
36 | return moving;
37 | }
38 |
39 | @Override
40 | public final String toString() {
41 | return String.format("%s[Piston=%s, Moving=%s]", getHookName(), piston, moving);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/hook/world/TreeGrowHook.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.hook.world;
2 |
3 | import net.canarymod.api.world.blocks.Block;
4 | import net.canarymod.hook.CancelableHook;
5 |
6 | /**
7 | * Tree Grow Hook
8 | *
9 | * Called with a sapling attempts to become a Tree
10 | * This does not signal that a tree can grow or how it would grow.
11 | *
12 | * @author Jason (darkdiplomat)
13 | */
14 | public final class TreeGrowHook extends CancelableHook {
15 | private Block sapling;
16 |
17 | /**
18 | * Constructs a new TreeGrowHook
19 | *
20 | * @param sapling
21 | * the sapling trying to grow
22 | */
23 | public TreeGrowHook(Block sapling) {
24 | this.sapling = sapling;
25 | }
26 |
27 | /**
28 | * Gets the sapling trying to grow
29 | *
30 | * @return the sapling
31 | */
32 | public Block getSapling() {
33 | return sapling;
34 | }
35 |
36 | /**
37 | * {@inheritDoc}
38 | */
39 | public final String toString() {
40 | return String.format("%s[Sapling=%s]", getHookName(), sapling);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/metrics/CanaryMetrics.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.metrics;
2 |
3 | import net.canarymod.Canary;
4 | import org.mcstats.Metrics;
5 |
6 | import java.io.File;
7 | import java.io.IOException;
8 |
9 | /**
10 | * Canary implementation of Metrics
11 | *
12 | * @author Jason Jones (darkdiplomat)
13 | */
14 | public final class CanaryMetrics extends Metrics {
15 | private static final File CONFIG_FILE = new File("config/metrics.cfg");
16 |
17 | private final String fsv = String.format("%s %s (MC: %s)", Canary.getSpecificationTitle(), Canary.getSpecificationVersion(), Canary.getServer().getServerVersion());
18 |
19 | public CanaryMetrics(String pluginName, String pluginVersion) throws IOException {
20 | super(pluginName, pluginVersion);
21 | }
22 |
23 | @Override
24 | public final String getFullServerVersion() {
25 | return fsv;
26 | }
27 |
28 | @Override
29 | public final int getPlayersOnline() {
30 | return Canary.getServer().getNumPlayersOnline();
31 | }
32 |
33 | @Override
34 | public File getConfigFile() {
35 | return CONFIG_FILE;
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/motd/MOTDKey.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.motd;
2 |
3 | import net.canarymod.plugin.Plugin;
4 |
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.Target;
7 |
8 | import static java.lang.annotation.ElementType.METHOD;
9 | import static java.lang.annotation.RetentionPolicy.RUNTIME;
10 |
11 | /**
12 | * The {@link Plugin} {@link net.canarymod.motd.MessageOfTheDay} key/value replacement @interface.
13 | *
14 | * @author Jason (darkdiplomat)
15 | */
16 | @Retention(RUNTIME)
17 | @Target(METHOD)
18 | public @interface MOTDKey {
19 |
20 | /**
21 | * The key to be replaced in the MessageOfTheDay (ie: {name} )
22 | *
23 | * @return the key to be replaced
24 | */
25 | String key();
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/motd/MOTDOwner.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.motd;
2 |
3 | /**
4 | * Message Of The Day Owner interface
5 | * Used to associate either the Server or a Plugin as the owner of a MOTDListener
6 | *
7 | * @author Jason (darkdiplomat)
8 | */
9 | public interface MOTDOwner {
10 |
11 | String getName();
12 | }
13 |
--------------------------------------------------------------------------------
/src/main/java/net/canarymod/motd/MOTDParser.java:
--------------------------------------------------------------------------------
1 | package net.canarymod.motd;
2 |
3 | import net.canarymod.chat.MessageReceiver;
4 |
5 | /**
6 | * Message Of The Day parser
7 | * Calls the logic of the key to be replaced