Package com.github.theholywaffle.teamspeak3.commands.parameter

Examples of com.github.theholywaffle.teamspeak3.commands.parameter.KeyValueParam


    map.put("notifyclientleftview", new ClientLeaveEvent());
    map.put("notifyserveredited", new ServerEditedEvent());
    map.put("notifychanneledited", new ChannelEditedEvent());
    map.put("notifychanneldescriptionchanged",
        new ChannelDescriptionEditedEvent());
    map.put("notifyclientmoved", new ClientMovedEvent());
  }
View Full Code Here


  public EventManager() {
    map.put("notifytextmessage", new TextMessageEvent());
    map.put("notifycliententerview", new ClientJoinEvent());
    map.put("notifyclientleftview", new ClientLeaveEvent());
    map.put("notifyserveredited", new ServerEditedEvent());
    map.put("notifychanneledited", new ChannelEditedEvent());
    map.put("notifychanneldescriptionchanged",
        new ChannelDescriptionEditedEvent());
    map.put("notifyclientmoved", new ClientMovedEvent());
  }
View Full Code Here

      this.listeners.remove(l);
    }
  }

  public void fireEvent(String notifyName, String notifyBody) {
    TS3EventEmitter emitter = map.get(notifyName);
    if (emitter != null) {
      for (TS3Listener l : listeners) {
        emitter.fire(l, new DefaultArrayResponse(notifyBody).getArray()
            .get(0));
      }
    } else {
      throw new TS3UnknownEventException(notifyName + " " + notifyBody);
    }
View Full Code Here

  private Map<String, TS3EventEmitter> map = new HashMap<>();

  private List<TS3Listener> listeners = new ArrayList<>();

  public EventManager() {
    map.put("notifytextmessage", new TextMessageEvent());
    map.put("notifycliententerview", new ClientJoinEvent());
    map.put("notifyclientleftview", new ClientLeaveEvent());
    map.put("notifyserveredited", new ServerEditedEvent());
    map.put("notifychanneledited", new ChannelEditedEvent());
    map.put("notifychanneldescriptionchanged",
View Full Code Here

      for (TS3Listener l : listeners) {
        emitter.fire(l, new DefaultArrayResponse(notifyBody).getArray()
            .get(0));
      }
    } else {
      throw new TS3UnknownEventException(notifyName + " " + notifyBody);
    }

  }
View Full Code Here

        serverCon.getChannels().forEach( ( c ) -> {
            System.out.println( c.getName() );
        } );
        System.out.println( ApiUtils.getChannelByName( serverCon.getChannels(), "Games" ) );

        Channel c = ApiUtils.getSubChannel( serverCon.getChannels(), new String[]{ "League of Legends", "#1", } );
        System.out.println( c );
        System.out.println( c.getTotalClients() );
        serverCon.setChannel( c );
        serverCon.setName( "Seplunker" );

        System.out.println( "finish" );
    }
View Full Code Here

     * @param channelId
     * @throws org.tsbs.manager.exceptions.UnknownChannelException if there's no channel with the id ChannelId
     */
    public void activateChannel( int channelId ) throws UnknownChannelException
    {
        Channel c = ApiUtils.getChannelById( getAllServerChannels(), channelId );
        if( c == null )
            throw new UnknownChannelException( "Channel with the id( " + channelId + " ) not found!" );

        activateChannel( c );
    }
View Full Code Here

    }
  }

  public void run() {
    while (ts3.getSocket()!= null &&ts3.getSocket().isConnected() && ts3.getOut() != null && !stop) {
      Command c = ts3.getCommandList().peek();
      if (c != null && !c.isSent()) {
        String msg = c.toString();
        TS3Query.log.info("> " + msg);
        ts3.getOut().println(msg);
        lastCommand = System.currentTimeMillis();
        c.setSent();
      }
      try {
        Thread.sleep(floodRate);
      } catch (InterruptedException e) {
        e.printStackTrace();
View Full Code Here

public class CChannelDelete extends Command {

  public CChannelDelete(int channelId, boolean forced) {
    super("channeldelete");
    add(new KeyValueParam("cid", channelId));
    add(new KeyValueParam("force", forced ? "1" : "0"));
  }
View Full Code Here

public class CServerEdit extends Command{

  public CServerEdit(HashMap<VirtualServerProperty, String> map) {
    super("serveredit");
    for (VirtualServerProperty p : map.keySet()) {
      add(new KeyValueParam(p.getName(), map.get(p)));
    }
  }
View Full Code Here

TOP

Related Classes of com.github.theholywaffle.teamspeak3.commands.parameter.KeyValueParam

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.