# Actions performable for Proxy

```java
public static void proxyActions() {

    /*
    * Get wrapped proxy server
    * */
    WrappedProxiedServer proxy = BungeeSync.getWrappedProxiedServer();

    /*
    * Example for sending broadcasts
    * */
    proxy.broadcast("Your message");
    proxy.broadcast(TextComponent.fromLegacyText("Message can be also a BaseComponent[]"));

    /*
    * Getting players on all connected proxies
    * */
    Collection<SyncedPlayer> players = proxy.getPlayers();

    /*
    * Getting all player names for tab completer to your commands
    * */
    List<String> names = proxy.getPlayerNames();

    /*
    * Getting all players (Number)
    * */
    int totalPlayers = proxy.getPlayersCount();
   
    /*
     * Example for creating shared cache
     *
     * (If you want to cache your advanced
     * objects, create for them reader & writer
     * to compile objects to string...)
     *
     * NOTE: If you use 2 same ids, plugin will override data...
     *
     * */
    Set<String> mySharedSet = proxy.getOrCreateSetCache("test-set");
    List<String> mySharedList = proxy.getOrCreateListCache("test-list");
    Map<String, String> mySharedMap = proxy.getOrCreateMapCache("test-map");
   
    /*
    * Use your objects normally...
    * */
    boolean isThereSomeValue = mySharedSet.contains("some value");
    boolean isListEmpty = mySharedList.isEmpty();
    boolean isMapBiggerThanOne = mySharedMap.size() > 1;
   
    /*
    * After editing objects, you need to sync it...
    * Use this methods!
    * */
    proxy.updateSetCache("test-set");
    proxy.updateListCache("test-list");
    proxy.updateMapCache("test-map");
   
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://m3ii0.gitbook.io/bungeesync/api-usage-for-developers/actions-performable-for-proxy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
