Package net.sf.l2j.gameserver

Examples of net.sf.l2j.gameserver.Announcements


          {
            CastleManager.getInstance().removeCirclet(_formerOwner,getCastleId());
          }
        }
        oldOwner.setHasCastle(0);                        // Unset has castle flag for old owner
            new Announcements().announceToAll(oldOwner.getName() + " has lost " + getName() + " castle!");
      }
      }

      updateOwnerInDB(clan);                              // Update in database
View Full Code Here


      if (Config.REMOVE_CASTLE_CIRCLETS)
      {
        CastleManager.getInstance().removeCirclet(_formerOwner,getCastleId());
      }
      clan.setHasCastle(0);
      new Announcements().announceToAll(clan.getName() + " has lost " +getName() + " castle");
      clan.broadcastToOnlineMembers(new PledgeShowInfoUpdate(clan));
    }

    updateOwnerInDB(null);
    if (getSiege().getIsInProgress())
View Full Code Here

            // Announce to clan memebers
            if (clan != null)
            {
            clan.setHasCastle(getCastleId()); // Set has castle flag for new owner
            new Announcements().announceToAll(clan.getName() + " has taken " + getName() + " castle!");
            clan.broadcastToOnlineMembers(new PledgeShowInfoUpdate(clan));

            ThreadPoolManager.getInstance().scheduleGeneral(new CastleUpdater(clan, 1), 3600000)// Schedule owner tasks to start running
            }
        }
View Full Code Here

      Announcements.getInstance().loadAnnouncements();
      Announcements.getInstance().listAnnouncements(activeChar);
    }
    else if (command.startsWith("admin_announce_menu"))
    {
      Announcements sys = new Announcements();
      sys.handleAnnounce(command, 20);
      Announcements.getInstance().listAnnouncements(activeChar);
    }
    else if (command.equals("admin_announce_announcements"))
    {
      for (L2PcInstance player : L2World.getInstance().getAllPlayers())
      {
        Announcements.getInstance().showAnnouncements(player);
      }
      Announcements.getInstance().listAnnouncements(activeChar);
    }
    else if (command.startsWith("admin_add_announcement"))
    {
      //FIXME the player can send only 16 chars (if you try to send more it sends null), remove this function or not?
      if (!command.equals("admin_add_announcement"))
      {
       try{
        String val = command.substring(23);
        Announcements.getInstance().addAnnouncement(val);
        Announcements.getInstance().listAnnouncements(activeChar);
       } catch(StringIndexOutOfBoundsException e){}//ignore errors
      }
    }
    else if (command.startsWith("admin_del_announcement"))
    {
            try
            {
          int val = new Integer(command.substring(23)).intValue();
          Announcements.getInstance().delAnnouncement(val);
          Announcements.getInstance().listAnnouncements(activeChar);
            }
            catch (StringIndexOutOfBoundsException e)
            { }
    }

    // Command is admin announce
    else if (command.startsWith("admin_announce"))
    {
      // Call method from another class
      Announcements sys = new Announcements();
      sys.handleAnnounce(command, 15);
    }

    return true;
  }
View Full Code Here

TOP

Related Classes of net.sf.l2j.gameserver.Announcements

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.