Merge branch 'master' into 1.16
# Conflicts: # src/main/java/carpet/utils/Messenger.java
This commit is contained in:
commit
571a77ce64
3 files changed
+5
-4
No files matched your search
@@ -13,7 +13,8 @@ public class ClientPlayerEntity_clientCommandMixin
|
|||||||
@Inject(method = "sendChatMessage", at = @At("HEAD"))
|
@Inject(method = "sendChatMessage", at = @At("HEAD"))
|
||||||
private void inspectMessage(String string, CallbackInfo ci)
|
private void inspectMessage(String string, CallbackInfo ci)
|
||||||
{
|
{
|
||||||
|
ClientPlayerEntity playerSource = (ClientPlayerEntity)(Object) this;
|
||||||
if (CarpetServer.minecraft_server == null)
|
if (CarpetServer.minecraft_server == null)
|
||||||
CarpetServer.settingsManager.inspectClientsideCommand(string);
|
CarpetServer.settingsManager.inspectClientsideCommand(playerSource.getCommandSource(), string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -571,7 +571,7 @@ public class SettingsManager
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void inspectClientsideCommand(String string)
|
public void inspectClientsideCommand(ServerCommandSource source, String string)
|
||||||
{
|
{
|
||||||
if (string.startsWith("/carpet "))
|
if (string.startsWith("/carpet "))
|
||||||
{
|
{
|
||||||
@@ -582,7 +582,7 @@ public class SettingsManager
|
|||||||
String strOption = res[2];
|
String strOption = res[2];
|
||||||
if (rules.containsKey(setting) && rules.get(setting).isClient)
|
if (rules.containsKey(setting) && rules.get(setting).isClient)
|
||||||
{
|
{
|
||||||
rules.get(setting).set(null, strOption);
|
rules.get(setting).set(source, strOption);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ public class Messenger
|
|||||||
//message source
|
//message source
|
||||||
public static void m(ServerCommandSource source, Object ... fields)
|
public static void m(ServerCommandSource source, Object ... fields)
|
||||||
{
|
{
|
||||||
source.sendFeedback(Messenger.c(fields),source.getMinecraftServer().getWorld(DimensionType.OVERWORLD_REGISTRY_KEY) != null); //OW
|
source.sendFeedback(Messenger.c(fields),source.getMinecraftServer() != null && source.getMinecraftServer().getWorld(DimensionType.OVERWORLD_REGISTRY_KEY) != null); //OW
|
||||||
}
|
}
|
||||||
public static void m(PlayerEntity player, Object ... fields)
|
public static void m(PlayerEntity player, Object ... fields)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user