mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-31 17:43:44 +01:00 
			
		
		
		
	let untrusted-visit override deny-teleport
This commit is contained in:
		| @@ -697,7 +697,11 @@ import java.util.regex.Pattern; | |||||||
|                 Plot plot = area.getPlot(location); |                 Plot plot = area.getPlot(location); | ||||||
|                 if (plot != null) { |                 if (plot != null) { | ||||||
|                     final boolean result = Flags.DENY_TELEPORT.allowsTeleport(plotPlayer, plot); |                     final boolean result = Flags.DENY_TELEPORT.allowsTeleport(plotPlayer, plot); | ||||||
|                     if (!result) { |                     // there is one possibility to still allow teleportation: | ||||||
|  |                     // to is identical to the plot's home location, and untrusted-visit is true | ||||||
|  |                     // i.e. untrusted-visit can override deny-teleport | ||||||
|  |                     // this is acceptable, because otherwise it wouldn't make sense to have both flags set | ||||||
|  |                     if (!result && !(Flags.UNTRUSTED_VISIT.isTrue(plot) && plot.getHome().equals(location))) { | ||||||
|                         MainUtil.sendMessage(plotPlayer, Captions.NO_PERMISSION_EVENT, |                         MainUtil.sendMessage(plotPlayer, Captions.NO_PERMISSION_EVENT, | ||||||
|                             Captions.PERMISSION_ADMIN_ENTRY_DENIED); |                             Captions.PERMISSION_ADMIN_ENTRY_DENIED); | ||||||
|                         event.setCancelled(true); |                         event.setCancelled(true); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 mindw0rm
					mindw0rm