WorldGuard

WorldGuard

8M Downloads

In 6.1.3 version broken teleport flag setup.

LadyCailinBot opened this issue ยท 1 comments

commented

WORLDGUARD-3716 - Reported by komiss77

/rg flag [name] teleport none - work
/rg flag [name] teleport here or /rg flag [name] teleport - dont work

how to fix:

  1. in config file can not addet boundedLocationFlags (line regions.location-flags-only-inside-regions not exist)

  2. replace this in com.sk89q.worldguard.protection.flags.LocationFlag

76 if (!rg.contains(loc.getPosition()) && new RegionPermissionModel(WorldGuardPlugin.inst(), player).mayOverrideLocationFlagBounds(rg)) {
77 player.sendMessage(ChatColor.GRAY + "WARNING: Flag location is outside of region.");
78 } else {
79 // no permission
80 throw new InvalidFlagFormat("You can't set that flag outside of the region boundaries.");
81 }

to this:

76 if ( new RegionPermissionModel(WorldGuardPlugin.inst(), player).mayOverrideLocationFlagBounds(rg)) {
77 if (!rg.contains(loc.getPosition()) )
78 throw new InvalidFlagFormat ( "You can't set that flag outside of the region boundaries.");
79 } else {
80 throw new InvalidFlagFormat("You can't set that flag - don`t have permissions.");
81 }

commented

Comment by wizjany

  1. it defaults to false, so I'm not sure how you even arrived at 2.
  2. this is a bad fix for an unrelated issue. the correct fix is
    89 + return loc;
    However i've also gone ahead and correctly fixed the other issue.