mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-26 19:07:40 +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
|
||||
+++ b/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
||||
@@ -122,7 +_,7 @@
|
||||
@@ -122,6 +_,11 @@
|
||||
}
|
||||
|
||||
public static <S> boolean allowSelectors(S suggestionProvider) {
|
||||
- return suggestionProvider instanceof SharedSuggestionProvider sharedSuggestionProvider && sharedSuggestionProvider.hasPermission(2);
|
||||
+ 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
|
||||
+ // Paper start - 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 @@
|
||||
};
|
||||
}
|
||||
|
@ -22,16 +22,15 @@
|
||||
static final Component OUT_OF_ORDER_CHAT = Component.translatable("chat.disabled.out_of_order_chat");
|
||||
|
||||
- public DecodeException(Component component) {
|
||||
- super(component);
|
||||
+ // Paper start
|
||||
+ public final org.bukkit.event.player.PlayerKickEvent.Cause kickCause;
|
||||
+ public DecodeException(Component message, org.bukkit.event.player.PlayerKickEvent.Cause event) {
|
||||
+ super(message);
|
||||
+ public DecodeException(Component component, org.bukkit.event.player.PlayerKickEvent.Cause event) {
|
||||
super(component);
|
||||
+ this.kickCause = event;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ public DecodeException(Component message) {
|
||||
+ this(message, org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN); // Paper
|
||||
+ public DecodeException(Component component) {
|
||||
+ this(component, org.bukkit.event.player.PlayerKickEvent.Cause.UNKNOWN); // Paper
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,25 +13,20 @@
|
||||
@Nullable
|
||||
private RconThread rconThread;
|
||||
public DedicatedServerSettings settings;
|
||||
@@ -80,19 +_,12 @@
|
||||
private DebugSampleSubscriptionTracker debugSampleSubscriptionTracker;
|
||||
@@ -81,6 +_,7 @@
|
||||
public ServerLinks serverLinks;
|
||||
|
||||
- public DedicatedServer(
|
||||
- Thread serverThread,
|
||||
- LevelStorageSource.LevelStorageAccess storageSource,
|
||||
- PackRepository packRepository,
|
||||
- WorldStem worldStem,
|
||||
- DedicatedServerSettings settings,
|
||||
- DataFixer fixerUpper,
|
||||
- Services services,
|
||||
- ChunkProgressListenerFactory progressListenerFactory
|
||||
- ) {
|
||||
public DedicatedServer(
|
||||
+ joptsimple.OptionSet options, net.minecraft.server.WorldLoader.DataLoadContext worldLoader, // CraftBukkit - Signature changed
|
||||
Thread serverThread,
|
||||
LevelStorageSource.LevelStorageAccess storageSource,
|
||||
PackRepository packRepository,
|
||||
@@ -90,9 +_,9 @@
|
||||
Services services,
|
||||
ChunkProgressListenerFactory progressListenerFactory
|
||||
) {
|
||||
- super(serverThread, storageSource, packRepository, worldStem, Proxy.NO_PROXY, fixerUpper, services, progressListenerFactory);
|
||||
+ // CraftBukkit start - 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
|
||||
+ super(options, worldLoader, serverThread, storageSource, packRepository, worldStem, Proxy.NO_PROXY, fixerUpper, services, progressListenerFactory); // CraftBukkit - Signature changed
|
||||
this.settings = settings;
|
||||
- this.rconConsoleSource = new RconConsoleSource(this);
|
||||
+ //this.rconConsoleSource = new RconConsoleSource(this); // CraftBukkit - remove field
|
||||
|
Loading…
Reference in New Issue
Block a user