How to get region from event location in 7.0?

Discussion in 'Programming Help' started by uncovery, Nov 2, 2018.

  1. uncovery

    uncovery New Member

    Hey guys, I am working on a plugin that should determine the region from an event location.

    so I have this code here:

    public void onCreatureSpawnEvent(CreatureSpawnEvent event) {

    and I am then trying to get the region from that event.getLocation.

    I went through the docs here:
    and I read this here:

    So I want to retrieve the ApplicableRegionSet via ApplicableRegionSet set = query.getApplicableRegions(location);

    but I do not know how to get a WorldGuard location instead of a BukkitLocation.

    Any suggestions?