WorldGuard

Discussion in 'Plugin Development' started by BloodBacker, Mar 17, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    BloodBacker

    Code:java
    1. @EventHandler
    2. public void onHit(final EntityDamageByEntityEvent e) {
    3. WorldGuardPlugin guard = getWorldGuard();
    4. RegionManager manager = guard.getRegionManager(e.getEntity().getWorld());
    5. ApplicableRegionSet set = manager.getApplicableRegions(e.getEntity().getLocation());
    6. if (!set.allows(DefaultFlag.PVP)) {
    7. return;
    8. }
    9. if ((!(e.getEntity() instanceof Player)) || (!(e.getDamager() instanceof Player))) {
    10. return;
    11. }



    ApplicableRegionSet set = manager.getApplicableRegions(e.getEntity().getLocation()); is the error.
     
  2. Offline

    Forseth11

    BloodBacker Do you have worldGuard and worldEdit as an external jar and do you have your plugin depending on both?
     
Thread Status:
Not open for further replies.

Share This Page