Start using lang asset for commands

This commit is contained in:
William Blake Galbreath
2020-03-26 14:29:04 -05:00
parent c0a4d03625
commit faf5e485c4
4 changed files with 71 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
From 0284d0fe32a0599358e6401836955b780eacad7c Mon Sep 17 00:00:00 2001
From beb5ae19e6d8056090d8fec450566a2df1392c77 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Thu, 26 Mar 2020 12:48:02 -0500
Subject: [PATCH] Disable mojang profiler
@@ -13,14 +13,14 @@ Subject: [PATCH] Disable mojang profiler
create mode 100644 src/main/java/net/pl3x/purpur/GameProfilerNoop.java
diff --git a/src/main/java/net/minecraft/server/CommandDebug.java b/src/main/java/net/minecraft/server/CommandDebug.java
index f0d72ea39d..415f6cb323 100644
index f0d72ea39d..e38a684060 100644
--- a/src/main/java/net/minecraft/server/CommandDebug.java
+++ b/src/main/java/net/minecraft/server/CommandDebug.java
@@ -22,6 +22,7 @@ public class CommandDebug {
private static final Logger LOGGER = LogManager.getLogger();
private static final SimpleCommandExceptionType b = new SimpleCommandExceptionType(new ChatMessage("commands.debug.notRunning", new Object[0]));
private static final SimpleCommandExceptionType c = new SimpleCommandExceptionType(new ChatMessage("commands.debug.alreadyRunning", new Object[0]));
+ private static final SimpleCommandExceptionType disabled = new SimpleCommandExceptionType(new ChatMessage("commands.debug.disabled")); // Purpur
+ private static final SimpleCommandExceptionType disabled = new SimpleCommandExceptionType(new ChatMessage("commands.purpur.debug.disabled")); // Purpur
@Nullable
private static final FileSystemProvider d = (FileSystemProvider) FileSystemProvider.installedProviders().stream().filter((filesystemprovider) -> {
return filesystemprovider.getScheme().equalsIgnoreCase("jar");
@@ -160,17 +160,17 @@ index d1af8e9a92..9da9f54d18 100644
// Paper start
diff --git a/src/main/resources/assets/minecraft/lang/en_us.json b/src/main/resources/assets/minecraft/lang/en_us.json
index ae0b45fe41..c4dcaaf2d4 100644
index 2d7d38d2fb..c5d6a73d01 100644
--- a/src/main/resources/assets/minecraft/lang/en_us.json
+++ b/src/main/resources/assets/minecraft/lang/en_us.json
@@ -4127,6 +4127,7 @@
"commands.clone.failed": "No blocks were cloned",
"commands.debug.notRunning": "The debug profiler hasn't started",
"commands.debug.alreadyRunning": "The debug profiler is already started",
+ "commands.debug.disabled": "The debug profiler is disabled",
"commands.deop.failed": "Nothing changed. The player is not an operator",
"commands.effect.give.failed": "Unable to apply this effect (target is either immune to effects, or has something stronger)",
"commands.effect.clear.everything.failed": "Target has no effects to remove",
@@ -4071,6 +4071,7 @@
"commands.spectate.success.started": "Now spectating %s",
"commands.spectate.not_spectator": "%s is not in spectator mode",
"commands.spectate.self": "Cannot spectate yourself",
+ "commands.purpur.debug.disabled": "The debug profiler is disabled",
"commands.purpur.ping": "§a%s's ping is %sms",
"argument.range.empty": "Expected value or range of values",
"argument.range.ints": "Only whole numbers allowed, not decimals",
--
2.24.0