Comments (8)
Please add your code that causes this issue.
from cloudnet-v3.
@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.
Why would u do that async? And why not just use the config options the bridge has?
from cloudnet-v3.
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.
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.
I've just tested using this snippet and got it working without any problems.
from cloudnet-v3.
Maybe its because the server i want to redirect the player to isn't a CloudService?
from cloudnet-v3.
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)
- Java Instrumentation API not working HOT 1
- CloudNetV4 NoClassDefFoundError in some modules HOT 3
- Tablist placeholder for the amount of online players doesn't work HOT 1
- FixedItems PerGroup definierbar CloudNPCs
- Full support MiniMessage
- SyncProxy | option for displaying supported minecraft versions
- ProtocolLib Download Link has changed HOT 1
- cannot start cloudnet and services HOT 11
- CloudnetNPC Entities in RC10 not despawning HOT 3
- Folia Support HOT 1
- Template Prototypes
- CloudNet v4 RC9 HOT 1
- MiniMessages in SyncProxy HOT 1
- Exclude tasks from the SyncProxy tablist HOT 5
- Server doesn't start automatically, even tho minServiceCount is 1 HOT 3
- MaxServiceCount HOT 1
- NPE in CloudNet-Signs module HOT 1
- Netty5: OutOfMemeory and discontinued HOT 3
- Localization HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudnet-v3.