API/Admittance

Code snapshots of those parts of the JavaPlugin (asofold.admittance.Admittance) in interface style:

None of the methods is thread-safe yet! Be sure to call them from the main thread.

Getter and setter for the interfaces:

        public CanTriggerInterface getCanTriggerInterface() ;

	/**
	 * 
	 * @param canTriggerInterface if null will default to DefaultCantriggerInterface
	 */
	public void setCanTriggerInterface(CanTriggerInterface canTriggerInterface);

	public PartyInterface getPartyInterface();

	/**
	 * if null will default to DefaultPartyInterface
	 * @param partyInterface
	 */
	public void setPartyInterface(PartyInterface partyInterface);

	public EconomyInterface getEconomyInterface();

	/**
	 * 
	 * @param economyInterface null possible (no economy)
	 */
	public void setEconomyInterface(EconomyInterface economyInterface) ;

Set enabled/disabled (just flag for blocking access):

        public boolean isAdmittanceEnabled();

	public void setAdmittanceEnabled(boolean admittanceEnabled);

The following methods are not thread safe and even though only seem to check something might still change internals (lazy cleanup).
Access if a block is currently (or at a certain point of time) known to be "blocked", i.e. triggered by admittance (does include signs):

/**
	 * return true if location existed already (and might have been updated).
	 * @param loc
	 * @param timeStampRelease
	 * @return
	 */
	public boolean lockLocation(Location loc, long timeStampRelease);
	
	public boolean isLocationLocked(long timeStampNow, Location loc);

	public boolean isLocationLocked( Location loc);

Comments

Posts Quoted:
Reply
Clear All Quotes