mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-03 01:10:37 +01:00
684bd2adbc
--- work/Bukkit Submodule work/Bukkit 9a793cce8..0c1d258bb: > Make PigZapEvent extend EntityTransformEvent --- work/CraftBukkit Submodule work/CraftBukkit ee6684bba..6a398ac44: > SPIGOT-4511: Trident doesn't lose durability > Tweak outdated windows
49 lines
2.3 KiB
Diff
49 lines
2.3 KiB
Diff
From 7f38ad2f18a7a6661c4aeed9103a0c84a445e051 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Sun, 18 Nov 2018 19:49:56 +0000
|
|
Subject: [PATCH] Make the default permission message configurable
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
index beec4e33c..579726bb5 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
@@ -21,6 +21,7 @@ import java.util.regex.Pattern;
|
|
import com.google.common.collect.Lists;
|
|
import net.minecraft.server.MinecraftServer;
|
|
import org.bukkit.Bukkit;
|
|
+import org.bukkit.ChatColor;
|
|
import org.bukkit.command.Command;
|
|
import org.bukkit.configuration.ConfigurationSection;
|
|
import org.bukkit.configuration.InvalidConfigurationException;
|
|
@@ -311,6 +312,11 @@ public class PaperConfig {
|
|
connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage);
|
|
}
|
|
|
|
+ public static String noPermissionMessage = "&cI'm sorry, but you do not have permission to perform this command. Please contact the server administrators if you believe that this is in error.";
|
|
+ private static void noPermissionMessage() {
|
|
+ noPermissionMessage = ChatColor.translateAlternateColorCodes('&', getString("messages.no-permission", noPermissionMessage));
|
|
+ }
|
|
+
|
|
public static boolean savePlayerData = true;
|
|
private static void savePlayerData() {
|
|
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index 648ac4d18..645953a31 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -2146,6 +2146,10 @@ public final class CraftServer implements Server {
|
|
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
|
|
}
|
|
|
|
+ public String getPermissionMessage() {
|
|
+ return com.destroystokyo.paper.PaperConfig.noPermissionMessage;
|
|
+ }
|
|
+
|
|
public com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nonnull UUID uuid) {
|
|
return createProfile(uuid, null);
|
|
}
|
|
--
|
|
2.19.1
|
|
|