Jump to content

Recommended Posts

Posted

Hallo kann mir Bitte jemand die state also LObby INGAME oder VIP in ein Bedwars plugin einprogramieren. Da ich Cloudnet benzutze müsste man es mit der CLOUDNET API machen. Dazu gibt es im neusten Cloudnet download im dev Ordner eine BeispielGameAPI. Darin ist der Code. 

Bedwars SOURCE CODE: http://www.mediafire.com/file/9f5c1ls5wwed8to/BedWars.zip

Cloudnet GameAPIexample:

/*
 * Copyright (c) Tarek Hosni El Alaoui 2017
 */

package de.dytanic.cloudnet;

import de.dytanic.cloudnet.bridge.CloudServer;
import de.dytanic.cloudnet.lib.server.ServerState;
import org.bukkit.event.Listener;

/**
 * Created by Tareko on 15.10.2017.
 */
public class GameAPIExample implements Listener {

    public void updateGameMode()
    {
        CloudServer.getInstance().setMotd("My Map"); //Motd will updated
        CloudServer.getInstance().setAllowAutoStart(false); //Set the allow to autostart for a new server disabling
        CloudServer.getInstance().setServerState(ServerState.INGAME); //The ServerState can changed to ingame without a new server auto startup
        CloudServer.getInstance().changeToIngame(); //The Ingame Change method sets the game ingame and hide from the signs and mobs
        CloudServer.getInstance().setMaxPlayers(166); //Sets the MaxPlayer count
        CloudServer.getInstance().update(); //Update the ServerInfo of CloudNet. Alternative is the setXXXXandUpdate(); method for the auto invokation
    }


}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
B
B