Package com.massivecraft.factions.event

Examples of com.massivecraft.factions.event.FactionsEventChunkChange


        }
      }
    }
   
    // Event
    FactionsEventChunkChange event = new FactionsEventChunkChange(sender, chunk, newFaction);
    event.run();
    if (event.isCancelled()) return false;

    // Apply
    BoardColls.get().setFactionAt(chunk, newFaction);
   
    // Inform
    Set<UPlayer> informees = new HashSet<UPlayer>();
    informees.add(this);
    if (newFaction.isNormal())
    {
      informees.addAll(newFaction.getUPlayers());
    }
    if (oldFaction.isNormal())
    {
      informees.addAll(oldFaction.getUPlayers());
    }
    if (MConf.get().logLandClaims)
    {
      informees.add(UPlayer.get(SenderUtil.getConsole()));
    }
   
    String chunkString = chunk.toString(PSFormatHumanSpace.get());
    String typeString = event.getType().toString().toLowerCase();
    for (UPlayer informee : informees)
    {
      informee.msg("<h>%s<i> did %s %s <i>for <h>%s<i> from <h>%s<i>.", this.describeTo(informee, true), typeString, chunkString, newFaction.describeTo(informee), oldFaction.describeTo(informee));
    }
View Full Code Here


    int countTotal = chunks.size();
    int countSuccess = 0;
    int countFail = 0;
    for (PS chunk : chunks)
    {
      FactionsEventChunkChange event = new FactionsEventChunkChange(sender, chunk, newFaction);
      event.run();
      if (event.isCancelled())
      {
        countFail++;
      }
      else
      {
View Full Code Here

TOP

Related Classes of com.massivecraft.factions.event.FactionsEventChunkChange

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.