Skip to content

Commit

Permalink
Merge branch 'dev/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Luccboy committed May 24, 2024
2 parents 56894d7 + 71bb024 commit 3d6215e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -469,11 +469,11 @@ public boolean reloadConfiguration() throws IOException {
boolean queryPortChanged = newConfiguration.getQueryPort() != configuration.getQueryPort();
boolean queryAlreadyEnabled = configuration.isQueryEnabled();
boolean queryEnabled = newConfiguration.isQueryEnabled();
if ((!queryEnabled && queryAlreadyEnabled) || queryPortChanged) {
if (queryAlreadyEnabled && (!queryEnabled || queryPortChanged)) {
this.cm.close(new InetSocketAddress(
configuration.getBind().getHostString(), configuration.getQueryPort()));
}
if (queryEnabled && queryPortChanged) {
if (queryEnabled && (!queryAlreadyEnabled || queryPortChanged)) {
this.cm.queryBind(newConfiguration.getBind().getHostString(),
newConfiguration.getQueryPort());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public final class VelocityCommand {
@SuppressWarnings("checkstyle:MissingJavadocMethod")
public static BrigadierCommand create(final VelocityServer server) {
final LiteralCommandNode<CommandSource> dump = BrigadierCommand.literalArgumentBuilder("dump")
.requires(source -> source.getPermissionValue("velocity.command.plugins") == Tristate.TRUE)
.requires(source -> source.getPermissionValue("velocity.command.dump") == Tristate.TRUE)
.executes(new Dump(server))
.build();
final LiteralCommandNode<CommandSource> heap = BrigadierCommand.literalArgumentBuilder("heap")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,17 +131,20 @@ public boolean handle(final PluginMessagePacket packet) {
public boolean handle(PingIdentifyPacket packet) {
if (player.getConnectionInFlight() != null) {
player.getConnectionInFlight().ensureConnected().write(packet);
return true;
}
return true;

return false;
}

@Override
public boolean handle(KnownPacksPacket packet) {
if (player.getConnectionInFlight() != null) {
player.getConnectionInFlight().ensureConnected().write(packet);
return true;
}

return true;
return false;
}

@Override
Expand Down

0 comments on commit 3d6215e

Please sign in to comment.