mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 03:48:01 +01:00
Small fixups
This commit is contained in:
parent
171fb2ec07
commit
4c723932f6
@ -1,14 +1,17 @@
|
|||||||
--- a/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
--- a/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
||||||
+++ b/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
+++ b/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
||||||
@@ -122,7 +_,7 @@
|
@@ -122,6 +_,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <S> boolean allowSelectors(S suggestionProvider) {
|
public static <S> boolean allowSelectors(S suggestionProvider) {
|
||||||
- return suggestionProvider instanceof SharedSuggestionProvider sharedSuggestionProvider && sharedSuggestionProvider.hasPermission(2);
|
+ // Paper start - Fix EntityArgument permissions
|
||||||
+ return suggestionProvider instanceof net.minecraft.commands.CommandSourceStack stack ? stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector") : suggestionProvider instanceof net.minecraft.commands.SharedSuggestionProvider sharedSuggestionProvider && sharedSuggestionProvider.hasPermission(2); // Paper - Fix EntityArgument permissions
|
+ if (suggestionProvider instanceof net.minecraft.commands.CommandSourceStack stack) {
|
||||||
|
+ return stack.bypassSelectorPermissions || stack.hasPermission(2, "minecraft.command.selector");
|
||||||
|
+ }
|
||||||
|
+ // Paper end - Fix EntityArgument permissions
|
||||||
|
return suggestionProvider instanceof SharedSuggestionProvider sharedSuggestionProvider && sharedSuggestionProvider.hasPermission(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntitySelector getSelector() {
|
|
||||||
@@ -198,8 +_,10 @@
|
@@ -198,8 +_,10 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -22,16 +22,15 @@
|
|||||||
static final Component OUT_OF_ORDER_CHAT = Component.translatable("chat.disabled.out_of_order_chat");
|
static final Component OUT_OF_ORDER_CHAT = Component.translatable("chat.disabled.out_of_order_chat");
|
||||||
|
|
||||||
- public DecodeException(Component component) {
|
- public DecodeException(Component component) {
|
||||||
- super(component);
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public final org.bukkit.event.player.PlayerKickEvent.Cause kickCause;
|
+ public final org.bukkit.event.player.PlayerKickEvent.Cause kickCause;
|
||||||
+ public DecodeException(Component message, org.bukkit.event.player.PlayerKickEvent.Cause event) {
|
+ public DecodeException(Component component, org.bukkit.event.player.PlayerKickEvent.Cause event) {
|
||||||
+ super(message);
|
super(component);
|
||||||
+ this.kickCause = event;
|
+ this.kickCause = event;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+ public DecodeException(Component message) {
|
+ public DecodeException(Component component) {
|
||||||
+ this(message, org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN); // Paper
|
+ this(component, org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN); // Paper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,25 +13,20 @@
|
|||||||
@Nullable
|
@Nullable
|
||||||
private RconThread rconThread;
|
private RconThread rconThread;
|
||||||
public DedicatedServerSettings settings;
|
public DedicatedServerSettings settings;
|
||||||
@@ -80,19 +_,12 @@
|
@@ -81,6 +_,7 @@
|
||||||
private DebugSampleSubscriptionTracker debugSampleSubscriptionTracker;
|
|
||||||
public ServerLinks serverLinks;
|
public ServerLinks serverLinks;
|
||||||
|
|
||||||
- public DedicatedServer(
|
public DedicatedServer(
|
||||||
- Thread serverThread,
|
+ joptsimple.OptionSet options, net.minecraft.server.WorldLoader.DataLoadContext worldLoader, // CraftBukkit - Signature changed
|
||||||
- LevelStorageSource.LevelStorageAccess storageSource,
|
Thread serverThread,
|
||||||
- PackRepository packRepository,
|
LevelStorageSource.LevelStorageAccess storageSource,
|
||||||
- WorldStem worldStem,
|
PackRepository packRepository,
|
||||||
- DedicatedServerSettings settings,
|
@@ -90,9 +_,9 @@
|
||||||
- DataFixer fixerUpper,
|
Services services,
|
||||||
- Services services,
|
ChunkProgressListenerFactory progressListenerFactory
|
||||||
- ChunkProgressListenerFactory progressListenerFactory
|
) {
|
||||||
- ) {
|
|
||||||
- super(serverThread, storageSource, packRepository, worldStem, Proxy.NO_PROXY, fixerUpper, services, progressListenerFactory);
|
- super(serverThread, storageSource, packRepository, worldStem, Proxy.NO_PROXY, fixerUpper, services, progressListenerFactory);
|
||||||
+ // CraftBukkit start - Signature changed
|
+ super(options, worldLoader, serverThread, storageSource, packRepository, worldStem, Proxy.NO_PROXY, fixerUpper, services, progressListenerFactory); // CraftBukkit - Signature changed
|
||||||
+ public DedicatedServer(joptsimple.OptionSet options, net.minecraft.server.WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, DedicatedServerSettings settings, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
|
||||||
+ super(options, worldLoader, thread, convertable_conversionsession, resourcepackrepository, worldstem, Proxy.NO_PROXY, datafixer, services, worldloadlistenerfactory);
|
|
||||||
+ // CraftBukkit end
|
|
||||||
this.settings = settings;
|
this.settings = settings;
|
||||||
- this.rconConsoleSource = new RconConsoleSource(this);
|
- this.rconConsoleSource = new RconConsoleSource(this);
|
||||||
+ //this.rconConsoleSource = new RconConsoleSource(this); // CraftBukkit - remove field
|
+ //this.rconConsoleSource = new RconConsoleSource(this); // CraftBukkit - remove field
|
||||||
|
Loading…
Reference in New Issue
Block a user