Skip to content

Commit 7fedef7

Browse files
committed
stuff
1 parent c2e1fff commit 7fedef7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1169
-629
lines changed

.vscode/launch.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "java",
6+
"name": "Minecraft Client",
7+
"request": "launch",
8+
"cwd": "${workspaceFolder}/run",
9+
"console": "internalConsole",
10+
"stopOnEntry": false,
11+
"mainClass": "net.fabricmc.devlaunchinjector.Main",
12+
"vmArgs": "\"-Dfabric.dli.config\u003dC:\\Users\\griff\\Desktop\\Plugin@@0020Dev\\Github\\Hysentials-java\\.gradle\\loom-cache\\launch.cfg\" \"-Dfabric.dli.env\u003dclient\" \"-Dfabric.dli.main\u003dnet.minecraft.launchwrapper.Launch\"",
13+
"args": "",
14+
"env": {},
15+
"projectName": ""
16+
},
17+
{
18+
"type": "java",
19+
"name": "Minecraft Server",
20+
"request": "launch",
21+
"cwd": "${workspaceFolder}/run",
22+
"console": "internalConsole",
23+
"stopOnEntry": false,
24+
"mainClass": "net.fabricmc.devlaunchinjector.Main",
25+
"vmArgs": "\"-Dfabric.dli.config\u003dC:\\Users\\griff\\Desktop\\Plugin@@0020Dev\\Github\\Hysentials-java\\.gradle\\loom-cache\\launch.cfg\" \"-Dfabric.dli.env\u003dserver\" \"-Dfabric.dli.main\u003dnet.minecraft.launchwrapper.Launch\"",
26+
"args": "\"nogui\"",
27+
"env": {},
28+
"projectName": ""
29+
}
30+
]
31+
}

build.gradle

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44

55
plugins {
6-
id "dev.architectury.architectury-pack200" version "0.1.3"
7-
id 'org.jetbrains.kotlin.jvm' version '1.6.10'
6+
// id "dev.architectury.architectury-pack200" version "0.1.3"
7+
id 'org.jetbrains.kotlin.jvm' version '1.8.21'
8+
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.21'
89
id "cc.polyfrost.loom" version "0.10.0.5"
9-
id "net.kyori.blossom" version "1.3.0"
10+
id "net.kyori.blossom" version "1.3.1"
1011
id "java"
11-
id 'org.jetbrains.kotlin.plugin.serialization' version '1.6.10'
1212
id 'maven-publish'
1313
}
1414

@@ -23,6 +23,8 @@ blossom {
2323
replaceToken("@VER@", project.version, className)
2424
replaceToken("@NAME@", mod_name, className)
2525
replaceToken("@ID@", mod_id, className)
26+
27+
System.out.println("Replaced tokens: " + getTokenReplacementsByFile())
2628
}
2729

2830
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8
@@ -68,7 +70,7 @@ dependencies {
6870
mappings("de.oceanlabs.mcp:mcp_stable:22-1.8.9")
6971
forge("net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9")
7072

71-
compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.2.0-alpha+')
73+
compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.2.1-alpha184')
7274
include('cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+')
7375
include("org.java-websocket:Java-WebSocket:1.5.3")
7476
include('org.reflections:reflections:0.10.2')
@@ -112,6 +114,13 @@ sourceSets {
112114
}
113115
}
114116

117+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
118+
kotlinOptions {
119+
jvmTarget = "1.8"
120+
// other options...
121+
}
122+
}
123+
115124
jar {
116125
dependsOn configurations.include
117126
from(configurations.include.collect { it.isDirectory() ? it : zipTree(it) }) {
@@ -139,13 +148,6 @@ remapJar {
139148
destinationDirectory = file("C:\\Users\\griff\\Desktop\\games\\MultiMC\\instances\\1.8.9\\.minecraft\\mods")
140149
}
141150

142-
compileKotlin {
143-
kotlinOptions {
144-
jvmTarget = "1.8"
145-
freeCompilerArgs = ['-Xjvm-default=compatibility']
146-
}
147-
}
148-
149151
publishing {
150152
repositories {
151153
if (dev) {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

src/dummy/java/org/polyfrost/chatting/chat/ChatTab.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ public void initialize() {
2828
throw new RuntimeException();
2929
}
3030

31-
public void setMessages(List<String> message) {
31+
public void setMessages(List<Object> message) {
3232
throw new RuntimeException();
3333
}
3434

35-
public List<String> getMessages() {
35+
public List<Object> getMessages() {
3636
throw new RuntimeException();
3737
}
3838

src/main/java/llc/redstone/hysentials/Hysentials.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import llc.redstone.hysentials.guis.club.ClubDashboardHandler;
2424
import llc.redstone.hysentials.guis.container.ContainerHandler;
2525
import llc.redstone.hysentials.handlers.chat.modules.misc.Limit256;
26+
import llc.redstone.hysentials.handlers.groupchats.GlobalChat;
2627
import llc.redstone.hysentials.handlers.groupchats.GroupChat;
2728
import llc.redstone.hysentials.handlers.guis.GuiScreenPost;
2829
import llc.redstone.hysentials.handlers.htsl.*;
@@ -187,7 +188,6 @@ public void init(FMLInitializationEvent event) {
187188
Socket.init();
188189
Socket.createSocket();
189190

190-
CommandManager.INSTANCE.registerCommand(new GroupChatCommand());
191191
commands = new ArrayList<>();
192192
commands.add(new HysentialsCommand());
193193
commands.add(new GlobalChatCommand());
@@ -206,6 +206,8 @@ public void init(FMLInitializationEvent event) {
206206
commands.add(new SetTextureCommand());
207207
commands.add(new HymojiCommand());
208208
commands.add(new ClaimCommand());
209+
commands.add(new GroupChatCommand());
210+
209211
for (ICommand command : commands) {
210212
ClientCommandHandler.instance.registerCommand(command);
211213
}
@@ -304,6 +306,7 @@ private void registerImages() {
304306
new ImageIcon("from", new ResourceLocation("textures/icons/from.png"));
305307
new ImageIcon("team", new ResourceLocation("textures/icons/team.png"));
306308
new ImageIcon("friend", new ResourceLocation("textures/icons/friend.png"));
309+
new ImageIcon("sys_error", new ResourceLocation("textures/icons/sys_error.png"));
307310

308311
new ImageIcon("common", new ResourceLocation("textures/icons/common.png"));
309312
new ImageIcon("rare", new ResourceLocation("textures/icons/rare.png"));
@@ -402,6 +405,7 @@ private void registerHandlers() {
402405
try {
403406
if (isChatting) {
404407
eventBus.register(new GroupChat());
408+
eventBus.register(new GlobalChat());
405409
}
406410
} catch (Exception e) {
407411
e.printStackTrace();
@@ -456,7 +460,7 @@ private void registerHandlers() {
456460

457461
EventManager.INSTANCE.register(new BwRanks());
458462

459-
HysentialsUtilsKt.init();
463+
HysentialsUtilsKt.init(VERSION);
460464

461465
// Runtime.getRuntime().addShutdownHook(new Thread(() -> {
462466
// JSONArray array = new JSONArray();

src/main/java/llc/redstone/hysentials/command/ClubCommand.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import llc.redstone.hysentials.HysentialsUtilsKt;
77
import llc.redstone.hysentials.schema.HysentialsSchema;
88
import llc.redstone.hysentials.util.BlockWAPIUtils;
9+
import llc.redstone.hysentials.util.DuoVariable;
910
import llc.redstone.hysentials.util.MUtils;
1011
import cc.polyfrost.oneconfig.utils.Multithreading;
1112
import cc.polyfrost.oneconfig.utils.NetworkUtils;
@@ -55,10 +56,10 @@
5556
"&e/club list &7- &bList all players in your club.",
5657
"&e/club house <index> help &7- &bManage your club houses.",
5758
"§9&m "
58-
})
59+
}, aliases = {"clubs"})
5960
public class ClubCommand {
6061
@SubCommand(aliases = {"create"}, description = "Create a club")
61-
public void create(String name) {
62+
public void create(@Greedy String name) {
6263
if (!Socket.linked) {
6364
UChat.chat("&cYou must be linked to a discord account to use this feature.");
6465
return;
@@ -99,6 +100,16 @@ public void join(String name) {
99100
"uuid", Minecraft.getMinecraft().getSession().getProfile().getId(),
100101
"serverId", Socket.serverId
101102
).toString());
103+
Socket.awaiting.add(
104+
new DuoVariable<>("clubAccept", (json) -> {
105+
if (json.getBoolean("success")) {
106+
MUtils.chat(HysentialsConfig.chatPrefix + " &aSuccessfully joined " + name + "!");
107+
} else {
108+
MUtils.chat(HysentialsConfig.chatPrefix + " &cFailed to join " + name + "!");
109+
MUtils.chat(" - &c" + json.getString("message"));
110+
}
111+
})
112+
);
102113
}
103114

104115
@SubCommand(aliases = {"house"})

0 commit comments

Comments
 (0)