10 Commits

Author SHA1 Message Date
361c698323 Check why StaticMessageChannel does not work?
All checks were successful
SteamWarCI Build successful
2026-01-09 10:07:26 +01:00
db4ea2d69d Check why StaticMessageChannel does not work?
All checks were successful
SteamWarCI Build successful
2026-01-09 10:05:17 +01:00
3cecc58bce Check why StaticMessageChannel does not work?
All checks were successful
SteamWarCI Build successful
2026-01-09 10:03:14 +01:00
ce3d50fcb7 Check why StaticMessageChannel does not work?
All checks were successful
SteamWarCI Build successful
2026-01-09 10:01:36 +01:00
61bd28150b Check why StaticMessageChannel does not work?
All checks were successful
SteamWarCI Build successful
2026-01-09 09:59:22 +01:00
bb9caa28a3 Check why StaticMessageChannel does not work?
All checks were successful
SteamWarCI Build successful
2026-01-09 09:57:18 +01:00
4b2970d243 Check why StaticMessageChannel does not work?
All checks were successful
SteamWarCI Build successful
2026-01-09 09:53:34 +01:00
834767edbe Fix API
All checks were successful
SteamWarCI Build successful
Signed-off-by: Chaoscaot <max@maxsp.de>
2026-01-04 12:35:11 +01:00
4bea077d36 Fix Kits
All checks were successful
SteamWarCI Build successful
Signed-off-by: Chaoscaot <max@maxsp.de>
2026-01-03 02:25:52 +01:00
74d6ccc24f Fix Kits
Signed-off-by: Chaoscaot <max@maxsp.de>
2026-01-03 02:22:55 +01:00
3 changed files with 15 additions and 9 deletions

View File

@@ -116,7 +116,7 @@ class SchematicNode(id: EntityID<Int>) : IntEntity(id) {
@JvmStatic
fun schematicAccessibleForUser(user: SteamwarUser, schematicId: Int?) = fromSql(
"WITH RECURSIVE Nodes AS (SELECT NodeId, ParentId as ParentNode FROM NodeMember WHERE UserId = ? UNION SELECT NodeId, ParentNode FROM SchematicNode WHERE NodeOwner = ?), RSN AS ( SELECT NodeId, ParentNode FROM Nodes UNION SELECT SN.NodeId, SN.ParentNode FROM SchematicNode SN, RSN WHERE SN.ParentNode = RSN.NodeId ) SELECT SN.*, ? AS EffectiveOwner FROM RSN INNER JOIN SchematicNode SN ON RSN.NodeId = SN.NodeId WHERE NodeId = ?",
"WITH RECURSIVE Nodes AS (SELECT NodeId, ParentId as ParentNode FROM NodeMember WHERE UserId = ? UNION SELECT NodeId, ParentNode FROM SchematicNode WHERE NodeOwner = ?), RSN AS ( SELECT NodeId, ParentNode FROM Nodes UNION SELECT SN.NodeId, SN.ParentNode FROM SchematicNode SN, RSN WHERE SN.ParentNode = RSN.NodeId ) SELECT SN.*, ? AS EffectiveOwner FROM RSN INNER JOIN SchematicNode SN ON RSN.NodeId = SN.NodeId WHERE SN.NodeId = ?",
listOf(
IntegerColumnType() to user.getId(),
IntegerColumnType() to user.getId(),

View File

@@ -47,9 +47,7 @@ public class ReflectionWrapper21 implements ReflectionWrapper {
@Override
public boolean hasItems(ItemStack stack) {
return stack.getDataTypes().stream().filter(FORBIDDEN_TYPES::contains).allMatch(dataComponentType -> {
System.out.println(dataComponentType);
return true;
});
FORBIDDEN_TYPES.forEach(stack::resetData);
return false;
}
}

View File

@@ -27,6 +27,7 @@ import net.dv8tion.jda.api.events.interaction.component.GenericComponentInteract
import net.dv8tion.jda.api.utils.messages.MessageCreateBuilder;
import net.dv8tion.jda.api.utils.messages.MessageEditData;
import java.util.Collections;
import java.util.concurrent.TimeoutException;
import java.util.function.Consumer;
import java.util.function.Supplier;
@@ -62,10 +63,17 @@ public class StaticMessageChannel extends DiscordChannel {
}
private void init() {
if(getChannel().getLatestMessageIdLong() != 0)
message = getChannel().getIterableHistory().complete().stream().filter(m -> m.getAuthor().isBot()).findFirst().orElse(null);
VelocityCore.schedule(this::update);
if (getChannel().getLatestMessageIdLong() != 0) {
message = getChannel().getIterableHistory()
.onErrorMap(throwable -> Collections.emptyList())
.deadline(System.currentTimeMillis() + 5000)
.complete()
.stream()
.filter(m -> m.getAuthor().isBot())
.findFirst()
.orElse(null);
}
VelocityCore.schedule(this::update).schedule();
}
public void update() {