mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
Update from upstream SpigotMC
Upstream merge (we must go deeper) SpigotMC/Spigot@1e7bc383c3
This commit is contained in:
parent
706fab83cd
commit
b742f7a892
122 changed files with 7 additions and 125 deletions
2
Bukkit
2
Bukkit
|
@ -1 +1 @@
|
|||
Subproject commit 8d5b4c1e9acc499377da0d807e7ca2245d5c3bdf
|
||||
Subproject commit f210234e59275330f83b994e199c76f6abd41ee7
|
|
@ -5,19 +5,6 @@ Subject: [PATCH] Fix slow tab complete for some commands.
|
|||
|
||||
Use online players instead of offline players, which is very slow.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/DeopCommand.java b/src/main/java/org/bukkit/command/defaults/DeopCommand.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/DeopCommand.java
|
||||
+++ b/src/main/java/org/bukkit/command/defaults/DeopCommand.java
|
||||
@@ -0,0 +0,0 @@ public class DeopCommand extends VanillaCommand {
|
||||
|
||||
if (args.length == 1) {
|
||||
List<String> completions = new ArrayList<String>();
|
||||
- for (OfflinePlayer player : Bukkit.getOfflinePlayers()) {
|
||||
+ for (OfflinePlayer player : Bukkit.getOnlinePlayers()) { // Spigot - offline players is slow
|
||||
String playerName = player.getName();
|
||||
if (player.isOp() && StringUtil.startsWithIgnoreCase(playerName, args[0])) {
|
||||
completions.add(playerName);
|
||||
diff --git a/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java b/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/command/defaults/WhitelistCommand.java
|
||||
|
@ -27,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
if (args[0].equalsIgnoreCase("add")) {
|
||||
List<String> completions = new ArrayList<String>();
|
||||
- for (OfflinePlayer player : Bukkit.getOfflinePlayers()) {
|
||||
+ for (OfflinePlayer player : Bukkit.getOnlinePlayers()) { // Spigot - offline players is slow
|
||||
+ for (OfflinePlayer player : Bukkit.getOnlinePlayers()) { // Spigot - well maybe sometimes you haven't turned the whitelist on just yet.
|
||||
String name = player.getName();
|
||||
if (StringUtil.startsWithIgnoreCase(name, args[1]) && !player.isWhitelisted()) {
|
||||
completions.add(name);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0b2ed13a5d24fd9620f8b03c1bf888e3eccd715e
|
||||
Subproject commit 07d4558b48d0717cb7f9e07015c76599b9fe9697
|
|
@ -1,38 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: ItsHarry <info@itsjerryandharry.com>
|
||||
Date: Thu, 5 Dec 2013 21:58:11 +0100
|
||||
Subject: [PATCH] Allow Teleportation of Vehicles and Passengers
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (entity.vehicle != null || entity.passenger != null) {
|
||||
- return false;
|
||||
- }
|
||||
+ // Spigot Start
|
||||
+ // if (entity.vehicle != null || entity.passenger != null) {
|
||||
+ // return false;
|
||||
+ // }
|
||||
+ // Spigot End
|
||||
|
||||
// From = Players current Location
|
||||
Location from = this.getLocation();
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
if (event.isCancelled()) {
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+ // Spigot Start
|
||||
+ eject();
|
||||
+ leaveVehicle();
|
||||
+ // Spigot End
|
||||
|
||||
// Update the From Location
|
||||
from = event.getFrom();
|
||||
--
|
|
@ -1,57 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: myiume <cursed_kidd@yahoo.com>
|
||||
Date: Wed, 19 Feb 2014 15:40:37 +0200
|
||||
Subject: [PATCH] Fix PlayerFishEvent not properly cancelling. Fixes
|
||||
BUKKIT-5245,BUKKIT-5396
|
||||
|
||||
PlayerFishEvent event states are not properly being cancelled,
|
||||
the FishingHookEntity being deleted when the event is cancelled,
|
||||
thus making the event happen. The event states of CAUGHT_ENTITY,
|
||||
CAUGHT_FISH, FAILED_ATTEMPT, IN_GROUND must keep the
|
||||
EntityFishingHook alive in order to cancel the event.
|
||||
Removed the entity despawn lines when event is cancelled
|
||||
and added a cancelled action for FAILED_ATTEMPT state.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
|
||||
this.world.getServer().getPluginManager().callEvent(playerFishEvent);
|
||||
|
||||
if (playerFishEvent.isCancelled()) {
|
||||
- this.die();
|
||||
- this.owner.hookedFish = null;
|
||||
return 0;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
|
||||
this.world.getServer().getPluginManager().callEvent(playerFishEvent);
|
||||
|
||||
if (playerFishEvent.isCancelled()) {
|
||||
- this.die();
|
||||
- this.owner.hookedFish = null;
|
||||
return 0;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
|
||||
this.world.getServer().getPluginManager().callEvent(playerFishEvent);
|
||||
|
||||
if (playerFishEvent.isCancelled()) {
|
||||
- this.die();
|
||||
- this.owner.hookedFish = null;
|
||||
return 0;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -0,0 +0,0 @@ public class EntityFishingHook extends Entity {
|
||||
if (b0 == 0) {
|
||||
PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), null, (Fish) this.getBukkitEntity(), PlayerFishEvent.State.FAILED_ATTEMPT);
|
||||
this.world.getServer().getPluginManager().callEvent(playerFishEvent);
|
||||
+
|
||||
+ if (playerFishEvent.isCancelled()) {
|
||||
+ return 0;
|
||||
+ }
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
--
|
|
@ -10,8 +10,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return false;
|
||||
}
|
||||
// If this entity is riding another entity, we must dismount before teleporting.
|
||||
entity.mount(null);
|
||||
|
||||
- entity.world = ((CraftWorld) location.getWorld()).getHandle();
|
||||
+ // Spigot start
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue