mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
fix repackage
This commit is contained in:
@@ -31,7 +31,7 @@ index 6e8111ef16439d2b3025ebe2a0418b245420bd88..c20c7c9a6eb299e1a8d3d3e9bdf986ea
|
||||
return this.worldPosition;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/commands/GameModeCommand.java b/src/main/java/net/minecraft/server/commands/GameModeCommand.java
|
||||
index 79f6089b934124c3309c6bee2e48b36b937252e0..dff8ef0a1a2e52792070d93685c290023d31ce95 100644
|
||||
index 79f6089b934124c3309c6bee2e48b36b937252e0..d1e6ac2dcff3f058dc147c8ed4d16d273b7c40a9 100644
|
||||
--- a/src/main/java/net/minecraft/server/commands/GameModeCommand.java
|
||||
+++ b/src/main/java/net/minecraft/server/commands/GameModeCommand.java
|
||||
@@ -49,6 +49,18 @@ public class GameModeCommand {
|
||||
@@ -39,7 +39,7 @@ index 79f6089b934124c3309c6bee2e48b36b937252e0..dff8ef0a1a2e52792070d93685c29002
|
||||
|
||||
private static int setMode(CommandContext<CommandSourceStack> context, Collection<ServerPlayer> targets, GameType gameMode) {
|
||||
+ // Purpur start
|
||||
+ if (net.pl3x.purpur.PurpurConfig.commandGamemodeRequiresPermission) {
|
||||
+ if (org.purpurmc.purpur.PurpurConfig.commandGamemodeRequiresPermission) {
|
||||
+ String gamemode = gameMode.getName();
|
||||
+ CommandSourceStack sender = context.getSource();
|
||||
+ if (!sender.testPermission(2, "minecraft.command.gamemode." + gamemode)) {
|
||||
@@ -53,26 +53,6 @@ index 79f6089b934124c3309c6bee2e48b36b937252e0..dff8ef0a1a2e52792070d93685c29002
|
||||
int i = 0;
|
||||
|
||||
for(ServerPlayer serverPlayer : targets) {
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 8d207a228855b2a6c0af2e54d815bf17b9217950..3ad1bb745def01b18c14ce8c7d399cf20a8a1a08 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -221,6 +221,7 @@ public class PurpurConfig {
|
||||
public static String commandTPSBarTextColorMedium = "<gradient:#ffff55:#ffaa00><text></gradient>";
|
||||
public static String commandTPSBarTextColorLow = "<gradient:#ff5555:#aa0000><text></gradient>";
|
||||
public static int commandTPSBarTickInterval = 20;
|
||||
+ public static boolean commandGamemodeRequiresPermission = false;
|
||||
private static void commandSettings() {
|
||||
commandTPSBarTitle = getString("settings.command.tpsbar.title", commandTPSBarTitle);
|
||||
commandTPSBarProgressOverlay = BossBar.Overlay.valueOf(getString("settings.command.tpsbar.overlay", commandTPSBarProgressOverlay.name()));
|
||||
@@ -232,6 +233,7 @@ public class PurpurConfig {
|
||||
commandTPSBarTextColorMedium = getString("settings.command.tpsbar.text-color.medium", commandTPSBarTextColorMedium);
|
||||
commandTPSBarTextColorLow = getString("settings.command.tpsbar.text-color.low", commandTPSBarTextColorLow);
|
||||
commandTPSBarTickInterval = getInt("settings.command.tpsbar.tick-interval", commandTPSBarTickInterval);
|
||||
+ commandGamemodeRequiresPermission = getBoolean("settings.command.gamemode.requires-specific-permission", commandGamemodeRequiresPermission);
|
||||
}
|
||||
|
||||
public static int barrelRows = 3;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java b/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
|
||||
index 6cc517b394bafefce50d877761e5b2eee8e14c78..46ca899a7abddea108f6ff1b4ca14ca5cd3112ab 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
|
||||
@@ -94,3 +74,23 @@ index 6cc517b394bafefce50d877761e5b2eee8e14c78..46ca899a7abddea108f6ff1b4ca14ca5
|
||||
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "xp", "Allows the user to give themselves or others arbitrary values of experience", PermissionDefault.OP, commands);
|
||||
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "toggledownfall", "Allows the user to toggle rain on/off for a given world", PermissionDefault.OP, commands);
|
||||
DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "defaultgamemode", "Allows the user to change the default gamemode of the server", PermissionDefault.OP, commands);
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
index 9dce5a66f8b89dbf1456263ce5366337955ee5e7..a09151e1c7383cf286e66a4499341cd85ca25709 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java
|
||||
@@ -221,6 +221,7 @@ public class PurpurConfig {
|
||||
public static String commandTPSBarTextColorMedium = "<gradient:#ffff55:#ffaa00><text></gradient>";
|
||||
public static String commandTPSBarTextColorLow = "<gradient:#ff5555:#aa0000><text></gradient>";
|
||||
public static int commandTPSBarTickInterval = 20;
|
||||
+ public static boolean commandGamemodeRequiresPermission = false;
|
||||
private static void commandSettings() {
|
||||
commandTPSBarTitle = getString("settings.command.tpsbar.title", commandTPSBarTitle);
|
||||
commandTPSBarProgressOverlay = BossBar.Overlay.valueOf(getString("settings.command.tpsbar.overlay", commandTPSBarProgressOverlay.name()));
|
||||
@@ -232,6 +233,7 @@ public class PurpurConfig {
|
||||
commandTPSBarTextColorMedium = getString("settings.command.tpsbar.text-color.medium", commandTPSBarTextColorMedium);
|
||||
commandTPSBarTextColorLow = getString("settings.command.tpsbar.text-color.low", commandTPSBarTextColorLow);
|
||||
commandTPSBarTickInterval = getInt("settings.command.tpsbar.tick-interval", commandTPSBarTickInterval);
|
||||
+ commandGamemodeRequiresPermission = getBoolean("settings.command.gamemode.requires-specific-permission", commandGamemodeRequiresPermission);
|
||||
}
|
||||
|
||||
public static int barrelRows = 3;
|
||||
|
||||
Reference in New Issue
Block a user