BeaconPlus API

May 15, 2019
BeaconPlus API
  • BeaconPlus API
    Add more effects to your beacon
    1.0 API Introduction
    BeaconPlus allows server/plugin developer to modify BeaconPlus deeper. You can add more Beacon Effect Type and more Block Power Calculator.

    2.0 Events API

    • BeaconEffectActivateEffect (Triggered when an effect added to BeaconData, with/without player)
    • BeaconEffectDeactivateEffect (Triggered when an effect removed from BeaconData, with/without player)
    • BeaconGiveEffectEvent (Triggered when a Beacon give special effect to an entity, Asynchronous!)
    • BeaconLogModiferEvent (Triggered when player logged to BeaconData modifer)
    • BeaconOpenEvent (Triggered when player opened Special Beacon GUI)
    • BeaconOpenVanillaEvent (Triggered when player opened Vanilla Beacon GUI)
    • BeaconRemoveEffectEvent (Triggered when a Beacon remove special effect from an entity, Asynchronous!)
    • BeaconPlusEvent (Root of all events, if you listen this, you will listen to all events)
    3.0 BeaconPlusAPI class
    • config() - Returns plugin configuration [FileConfiguration]
    • getBeaconRange(int power) - Returns beacon range for that power [double]
    • getEffectByName(String name) - Returns effect with that name [BeaconEffect]
    • getEffects() - Returns all available effects [List<BeaconEffect>]
    • getEffectsCount() - Count all effects including invalid effects [int]
    • getMaxEffects() - Get configured max effects [int]
    • getMaxModiferLog() - Get configured max modifer log [int]
    • getNearbyBeacons(Location loc) - Get all nearby beacons, beacon added when location was inside beacon range. [Set<BeaconData>]
    • getPower(Block b) - Get power value for that block [int]
    • getPowerSources() - Get all configured power sources [List<BeaconPowerSource>]
    • openBeacon(Player p,BeaconData d,Inventory vanilla) - Open beacon GUI
      • Player p - The player
      • BeaconData d - The beacon, you can use ChunkStreams.getBeacon(Location loc);
      • Inventory vanilla - The vanilla inventory
    • registerFactory(BeaconEffectFactory f) - Register your own Beacon Effect Factory
    • reloadEffects() - Reload all effects (trigger reload() method on all registered BeaconEffectFactory)
    • resetAll(LivingEntity entity) - Reset all effects for that LivingEntity
    • shouldDisableVanillaBeacon() - Self explanatory. [boolean]
    • unregisterFactory(BeaconEffectFactory f) - Unregister a beacon effect factory
    4.0 ChunkStreams class
    • drop() - Clear all cached beacon datas
    • forceUpdateAll() - Force update all beacons (synchronized)
    • getBeacon(Location loc) - Returns BeaconData of a beacon [BeaconData]
    • getData(Chunk c) - Returns ChunkData of a chunk [ChunkData]
    • getLoadedChunks() - Returns a list of loaded chunks [List<ChunkData>]
    • getLoadedChunks(World w) - Returns a list of world loaded chunks [List<ChunkData>]
    • getLoadedChunksCount(World w) - Total of loaded chunks on a world [int]
    • getWorldFolder(World w) - Returns folder of a world
    • getWorldInfo(World w) - Returns info of a world
    • load(Chunk c) - Cache loaded chunk
    • merge(String name,ChunkData c) - Cache chunk to a world
      • String name - World Name
      • ChunkData c - The chunk data
    • removeAllInvalidEffects() - Remove all invalid effects from all beacons in every worlds
    • save(ChunkData c) - Save chunk data to file
    • unload(Chunk c) - Unload chunk from cache
    5.0 CalculateurService class
    • calculate(BeaconData data) - Calculate beacon power for a beacon data [BeaconPower]
    • registerCalculator(BeaconPowerCalculator calc) - Register your own beacon power calculator
    • unregisterCalculator(BeaconPowerCalculator calc) - Unregister a calculator
  • Loading...
  • Loading...