mirror of
https://github.com/lukasabbe/VoiceChatGroupMsg.git
synced 2026-04-30 10:50:53 +00:00
Compare commits
9 Commits
1.21-1.0.0
..
1.21.4
| Author | SHA1 | Date | |
|---|---|---|---|
| 7075963597 | |||
| 1c487409a1 | |||
| da64223e29 | |||
| e3141bef06 | |||
| 2b650b5e89 | |||
| 7633b6918d | |||
| 434e07e62e | |||
| c3116f0f6f | |||
| 0e084d7e7c |
+1
-1
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.6-SNAPSHOT'
|
||||
id 'fabric-loom' version '1.8-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -3,19 +3,19 @@ org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=1.21
|
||||
yarn_mappings=1.21+build.9
|
||||
loader_version=0.15.11
|
||||
minecraft_version=1.21.4-rc3
|
||||
yarn_mappings=1.21.4-rc3+build.3
|
||||
loader_version=0.16.9
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.0
|
||||
mod_version = 1.0.1+1.21.4
|
||||
maven_group = me.lukasabbe
|
||||
archives_base_name = VoiceChatGroupMsg
|
||||
|
||||
#mod dev
|
||||
voicechat_version=1.21-2.5.17
|
||||
voicechat_version=1.21.4-rc3-2.5.26
|
||||
|
||||
# Dependencies
|
||||
# check this on https://modmuss50.me/fabric.html
|
||||
fabric_version=0.100.7+1.21
|
||||
fabric_version=0.110.2+1.21.4
|
||||
voicechat_api_version=2.5.0
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -17,11 +17,9 @@ import java.util.List;
|
||||
|
||||
public class Commands {
|
||||
public static void CreateGroupMsgCommand(CommandDispatcher<ServerCommandSource> dispatcher, CommandRegistryAccess commandRegistryAccess, CommandManager.RegistrationEnvironment registrationEnvironment) {
|
||||
dispatcher.register(
|
||||
CommandManager
|
||||
dispatcher.register(CommandManager
|
||||
.literal("msgvc")
|
||||
.then(
|
||||
CommandManager
|
||||
.then(CommandManager
|
||||
.argument("message", MessageArgumentType.message())
|
||||
.executes(Commands::runCommand)));
|
||||
}
|
||||
@@ -40,10 +38,16 @@ public class Commands {
|
||||
Group group = VoiceChatGroupMsg.getPlayerGroup(player);
|
||||
List<ServerPlayerEntity> players = VoiceChatGroupMsg.GroupPlayers(group.getId(), source.getWorld());
|
||||
MessageArgumentType.getSignedMessage(ctx, "message", signedMessage -> {
|
||||
player.sendChatMessage(SentMessage.of(signedMessage),true, MessageType.params(MessageType.TEAM_MSG_COMMAND_OUTGOING,source).withTargetName(Text.of(group.getName())));
|
||||
player.sendChatMessage(
|
||||
SentMessage.of(signedMessage),
|
||||
true,
|
||||
MessageType.params(MessageType.TEAM_MSG_COMMAND_OUTGOING,source).withTargetName(Text.of(group.getName())));
|
||||
players.forEach(player1 -> {
|
||||
if(!player1.getUuid().equals(source.getPlayer().getUuid())){
|
||||
player1.sendChatMessage(SentMessage.of(signedMessage),true, MessageType.params(MessageType.TEAM_MSG_COMMAND_INCOMING,source).withTargetName(Text.of(group.getName())));
|
||||
if(!player1.getUuid().equals(player.getUuid())){
|
||||
player1.sendChatMessage(
|
||||
SentMessage.of(signedMessage),
|
||||
true,
|
||||
MessageType.params(MessageType.TEAM_MSG_COMMAND_INCOMING,source).withTargetName(Text.of(group.getName())));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -44,7 +44,7 @@ public class VoiceChatGroupMsg implements DedicatedServerModInitializer, Voicech
|
||||
}
|
||||
public static boolean isPlayerInGroup(ServerPlayerEntity player, UUID groupID){
|
||||
try{
|
||||
if(!API.getConnectionOf(player.getUuid()).isInGroup())return false;
|
||||
if(!API.getConnectionOf(player.getUuid()).isInGroup()) return false;
|
||||
return API.getConnectionOf(player.getUuid()).getGroup().getId().equals(groupID);
|
||||
|
||||
}catch (NullPointerException ignore){
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
"schemaVersion": 1,
|
||||
"id": "voicechatgroupmsg",
|
||||
"version": "${version}",
|
||||
"name": "VoiceChatGroupMsg",
|
||||
"description": "",
|
||||
"authors": [],
|
||||
"name": "Voice Chat Group Msg",
|
||||
"description": "Adds a way to message a whole group if you don't have a microphone. When you are in a group you can now use /msgvc <message>",
|
||||
"authors": ["Lukasabbe"],
|
||||
"contact": {
|
||||
"repo": "https://github.com/lukas/VoiceChatGroupMsg"
|
||||
"repo": "https://github.com/lukasabbe/VoiceChatGroupMsg"
|
||||
},
|
||||
"license": "MIT",
|
||||
"icon": "assets/voicechatgroupmsg/icon.png",
|
||||
@@ -22,7 +22,7 @@
|
||||
"depends": {
|
||||
"fabricloader": ">=${loader_version}",
|
||||
"fabric": "*",
|
||||
"minecraft": "${minecraft_version}",
|
||||
"minecraft": ">=${minecraft_version}",
|
||||
"voicechat": ">=${minecraft_version}-${voicechat_api_version}"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user