readd beacon effect cause

This commit is contained in:
Lulu13022002
2024-12-18 19:09:46 +01:00
parent dedc6b3394
commit 6126012369
102 changed files with 443 additions and 488 deletions

View File

@@ -904,13 +904,13 @@ public final class CraftServer implements Server {
@Override
public long getConnectionThrottle() {
// Spigot Start - Automatically set connection throttle for bungee configurations
// Spigot start - Automatically set connection throttle for bungee configurations
if (org.spigotmc.SpigotConfig.bungee || io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) { // Paper - Add Velocity IP Forwarding Support
return -1;
} else {
return this.configuration.getInt("settings.connection-throttle");
}
// Spigot End
// Spigot end
}
@Override
@@ -2131,7 +2131,7 @@ public final class CraftServer implements Server {
if (result == null) {
GameProfile profile = null;
// Only fetch an online UUID in online mode
if (this.getOnlineMode() || io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()) { // Paper - Add setting for proxy online mode status
if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.isProxyOnlineMode()) { // Paper - Add setting for proxy online mode status
// This is potentially blocking :(
profile = this.console.getProfileCache().get(name).orElse(null);
}
@@ -2585,12 +2585,11 @@ public final class CraftServer implements Server {
}
public List<String> tabCompleteCommand(Player player, String message, ServerLevel world, Vec3 pos) {
// Spigot Start
if ( (org.spigotmc.SpigotConfig.tabComplete < 0 || message.length() <= org.spigotmc.SpigotConfig.tabComplete) && !message.contains( " " ) )
{
// Spigot start
if ((org.spigotmc.SpigotConfig.tabComplete < 0 || message.length() <= org.spigotmc.SpigotConfig.tabComplete) && !message.contains(" ")) {
return ImmutableList.of();
}
// Spigot End
// Spigot end
List<String> completions = null;
try {

View File

@@ -149,13 +149,13 @@ public class Main {
this.acceptsAll(Main.asList("initSettings"), "Only create configuration files and then exit"); // SPIGOT-5761: Add initSettings option
// Spigot Start
// Spigot start
this.acceptsAll(Main.asList("S", "spigot-settings"), "File for spigot settings")
.withRequiredArg()
.ofType(File.class)
.defaultsTo(new File("spigot.yml"))
.describedAs("Yml file");
// Spigot End
// Spigot end
// Paper start
acceptsAll(asList("paper-dir", "paper-settings-directory"), "Directory for Paper settings")

View File

@@ -23,7 +23,7 @@ public class CraftEnderDragon extends CraftMob implements EnderDragon, CraftEnem
public Set<ComplexEntityPart> getParts() {
Builder<ComplexEntityPart> builder = ImmutableSet.builder();
for (EnderDragonPart part : this.getHandle().subEntities) {
for (EnderDragonPart part : this.getHandle().getSubEntities()) {
builder.add((ComplexEntityPart) part.getBukkitEntity());
}

View File

@@ -32,17 +32,17 @@ public class CraftPhantom extends CraftFlying implements Phantom, CraftEnemy {
// Paper start
@Override
public java.util.UUID getSpawningEntity() {
return getHandle().getSpawningEntity();
return this.getHandle().spawningEntity;
}
@Override
public boolean shouldBurnInDay() {
return getHandle().shouldBurnInDay();
return this.getHandle().shouldBurnInDay;
}
@Override
public void setShouldBurnInDay(boolean shouldBurnInDay) {
getHandle().setShouldBurnInDay(shouldBurnInDay);
this.getHandle().shouldBurnInDay = shouldBurnInDay;
}
@Override

View File

@@ -543,7 +543,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public String getDisplayName() {
if(true) return io.papermc.paper.adventure.DisplayNames.getLegacy(this); // Paper
if (true) return io.papermc.paper.adventure.DisplayNames.getLegacy(this); // Paper
return this.getHandle().displayName;
}

View File

@@ -2361,7 +2361,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
for (Object object : addFrom) {
// Paper start - support components
if(object instanceof net.md_5.bungee.api.chat.BaseComponent[] baseComponentArr) {
if (object instanceof net.md_5.bungee.api.chat.BaseComponent[] baseComponentArr) {
addTo.add(CraftChatMessage.fromJSON(net.md_5.bungee.chat.ComponentSerializer.toString(baseComponentArr)));
} else
// Paper end