geforkt von Mirrors/Paper
170382fe35
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: e7b0f8d6 #642: Add Crafting methods to API 9e58831e SPIGOT-6641: Use varargs in sendMessage e409fe49 SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled 6997c726 SPIGOT-6661: Fix missing radius from GenericGameEvent 02d03f35 SPIGOT-6369: Add ItemStack to HangingPlaceEvent CraftBukkit Changes: 0abf420c SPIGOT-6665: Shearing a Snowman does not drop a carved pumpkin e8e3cbcc #893: Add Crafting methods to API 879acfee Fix missing varargs from previous commit 6572b9c3 SPIGOT-6641: Use varargs in sendMessage 9e06bb2a SPIGOT-6663: Chicken Jockeys chickens don't despawn 699f2d36 SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled 8ffa54ba SPIGOT-6369: Add ItemStack to HangingPlaceEvent c851639c SPIGOT-6645: Call EntityChangeBlockEvent before PlayerHarvestBlockEvent 8d244b0b SPIGOT-3725, SPIGOT-6638, MC-136917: Properly clear tile entities before replacing Spigot Changes: 18c71bf4 Rebuild patches
48 Zeilen
2.4 KiB
Diff
48 Zeilen
2.4 KiB
Diff
From 0000000000000000000000000000000000000000 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
|
|
|
|
TODO: Change the message in PaperCommand
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
index 9768c591e72ce2ef5fdb43e2fc63378c57773216..11d628869a9a6eda8bf21a4f213ff23ad753b18e 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
|
@@ -20,6 +20,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;
|
|
@@ -288,6 +289,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));
|
|
+ }
|
|
+
|
|
private static void savePlayerData() {
|
|
Object val = config.get("settings.save-player-data");
|
|
if (val instanceof Boolean) {
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
index e388a319a311e81dcddf83d3984af35b55f0c6ab..bdaf6f35df2066b1626c6c52683c5468d9948aec 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -2423,6 +2423,11 @@ public final class CraftServer implements Server {
|
|
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
|
|
}
|
|
|
|
+ @Override
|
|
+ public String getPermissionMessage() {
|
|
+ return com.destroystokyo.paper.PaperConfig.noPermissionMessage;
|
|
+ }
|
|
+
|
|
@Override
|
|
public com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nonnull UUID uuid) {
|
|
return createProfile(uuid, null);
|