Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
SPIGOT-189: Remove ListenerWrapper in favour of just doing it in EntityPlayer
Dieser Commit ist enthalten in:
Ursprung
54888dfafb
Commit
64157d1de5
@ -1,5 +1,5 @@
|
||||
--- ../work/decompile-8eb82bde//net/minecraft/server/BiomeDecorator.java Tue Dec 2 23:22:43 2014
|
||||
+++ src/main/java/net/minecraft/server/BiomeDecorator.java Tue Dec 2 23:22:34 2014
|
||||
--- ../work/decompile-8eb82bde/net/minecraft/server/BiomeDecorator.java 2014-12-12 19:26:13.625913570 +0000
|
||||
+++ src/main/java/net/minecraft/server/BiomeDecorator.java 2014-12-12 19:15:22.000000000 +0000
|
||||
@@ -132,7 +132,7 @@
|
||||
WorldGenTreeAbstract worldgentreeabstract = biomebase.a(this.b);
|
||||
|
||||
@ -120,11 +120,10 @@
|
||||
this.x.generate(this.a, this.b, this.c.a(k, i1, l));
|
||||
}
|
||||
|
||||
@@ -273,6 +273,16 @@
|
||||
}
|
||||
@@ -274,6 +274,16 @@
|
||||
|
||||
}
|
||||
+
|
||||
|
||||
+ // CraftBukkit start - The heightMap can be wrong calculated and return Y = 0 which will crash the Server
|
||||
+ private BlockPosition getHighestBlockYAt( BlockPosition blockPosition ) {
|
||||
+ BlockPosition returnBlockPosition = this.a.getHighestBlockYAt( blockPosition );
|
||||
@ -134,6 +133,7 @@
|
||||
+ return returnBlockPosition;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
+
|
||||
protected void a(int i, WorldGenerator worldgenerator, int j, int k) {
|
||||
int l;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
--- ../work/decompile-8eb82bde/net/minecraft/server/EntityPlayer.java 2014-12-10 17:04:38.336551163 +0000
|
||||
+++ src/main/java/net/minecraft/server/EntityPlayer.java 2014-12-10 17:04:12.096551448 +0000
|
||||
--- ../work/decompile-8eb82bde/net/minecraft/server/EntityPlayer.java 2014-12-12 19:26:14.249913563 +0000
|
||||
+++ src/main/java/net/minecraft/server/EntityPlayer.java 2014-12-12 19:25:07.997914283 +0000
|
||||
@@ -13,6 +13,17 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@ -446,7 +446,25 @@
|
||||
|
||||
public void b(IChatBaseComponent ichatbasecomponent) {
|
||||
this.playerConnection.sendPacket(new PacketPlayOutChat(ichatbasecomponent));
|
||||
@@ -867,6 +1035,129 @@
|
||||
@@ -768,6 +936,7 @@
|
||||
}
|
||||
|
||||
public boolean a(int i, String s) {
|
||||
+ /* CraftBukkit start
|
||||
if ("seed".equals(s) && !this.server.ad()) {
|
||||
return true;
|
||||
} else if (!"tell".equals(s) && !"help".equals(s) && !"me".equals(s) && !"trigger".equals(s)) {
|
||||
@@ -781,6 +950,9 @@
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
+ */
|
||||
+ return true;
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public String w() {
|
||||
@@ -867,6 +1039,129 @@
|
||||
}
|
||||
|
||||
public IChatBaseComponent getPlayerListName() {
|
||||
|
@ -1,69 +0,0 @@
|
||||
package org.bukkit.craftbukkit.command;
|
||||
|
||||
import net.minecraft.server.BlockPosition;
|
||||
import net.minecraft.server.Entity;
|
||||
import net.minecraft.server.EnumCommandResult;
|
||||
import net.minecraft.server.IChatBaseComponent;
|
||||
import net.minecraft.server.ICommandListener;
|
||||
import net.minecraft.server.Vec3D;
|
||||
import net.minecraft.server.World;
|
||||
|
||||
public class ListenerWrapper implements ICommandListener {
|
||||
|
||||
private final ICommandListener listener;
|
||||
|
||||
public ListenerWrapper(ICommandListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return listener.getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatBaseComponent getScoreboardDisplayName() {
|
||||
return listener.getScoreboardDisplayName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(IChatBaseComponent icbc) {
|
||||
listener.sendMessage(icbc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean a(int i, String string) {
|
||||
return true; // Give access to all commands as we do our own perm check
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockPosition getChunkCoordinates() {
|
||||
return listener.getChunkCoordinates();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vec3D d() {
|
||||
return listener.d();
|
||||
}
|
||||
|
||||
@Override
|
||||
public World getWorld() {
|
||||
return listener.getWorld();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Entity f() {
|
||||
return listener.f();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getSendCommandFeedback() {
|
||||
return listener.getSendCommandFeedback();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(EnumCommandResult ecr, int i) {
|
||||
listener.a(ecr, i);
|
||||
}
|
||||
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package org.bukkit.craftbukkit.command;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
@ -127,7 +126,7 @@ public final class VanillaCommandWrapper extends VanillaCommand {
|
||||
|
||||
private ICommandListener getListener(CommandSender sender) {
|
||||
if (sender instanceof Player) {
|
||||
return new ListenerWrapper(((CraftPlayer) sender).getHandle());
|
||||
return ((CraftPlayer) sender).getHandle();
|
||||
}
|
||||
if (sender instanceof BlockCommandSender) {
|
||||
return ((CraftBlockCommandSender) sender).getTileEntity();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren