Coder Social home page Coder Social logo

Fehler beim joinen about cloudnet-v3 HOT 8 CLOSED

paaulhier avatar paaulhier commented on August 23, 2024
Fehler beim joinen

from cloudnet-v3.

Comments (8)

0utplay avatar 0utplay commented on August 23, 2024

Please add your code that causes this issue.

from cloudnet-v3.

paaulhier avatar paaulhier commented on August 23, 2024
    @Subscribe(order = PostOrder.LAST)
    public EventTask onPlayerJoin(PlayerChooseInitialServerEvent event) {
        Player player = event.getPlayer();
        return EventTask.async(() -> {
            if (!player.hasPermission(configuration.requiredPermission())) {
                return;
            }

            player.getVirtualHost().filter(
                    inetSocketAddress -> inetSocketAddress.getHostName().equalsIgnoreCase(configuration.forcedHost())
            ).flatMap(inetSocketAddress -> proxyServer.getServer(
                    configuration.serverName()
            )).ifPresent(event::setInitialServer);
        });
    }

from cloudnet-v3.

0utplay avatar 0utplay commented on August 23, 2024

Why would u do that async? And why not just use the config options the bridge has?

from cloudnet-v3.

paaulhier avatar paaulhier commented on August 23, 2024

I could remove the async stuff, yes
But i don't want to make my plugins too much depending on cloudnet, so i dont want use the bridge options.

from cloudnet-v3.

0utplay avatar 0utplay commented on August 23, 2024

I dont get how that makes your plugin dependent on the bridge. You just have to configure the bridge in the config file, nothing inside your plugin.

Nevertheless I will take a look at the problem using the event

from cloudnet-v3.

0utplay avatar 0utplay commented on August 23, 2024

image
image

I've just tested using this snippet and got it working without any problems.

from cloudnet-v3.

paaulhier avatar paaulhier commented on August 23, 2024

Maybe its because the server i want to redirect the player to isn't a CloudService?

from cloudnet-v3.

0utplay avatar 0utplay commented on August 23, 2024

Might be. Thats not offically supported. But I think you could solve that by just removing the @NonNull annotation from the constructor. As the setter itself allows null values, so it should be fine

from cloudnet-v3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.