SPIGOT-6508: Rename conflicted getServer

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2021-06-11 21:33:49 +10:00
parent dd358f1352
commit 536256d6ff
95 changed files with 211 additions and 211 deletions

View File

@@ -97,7 +97,7 @@
+ Item drop = (Item) entityitem.getBukkitEntity();
+
+ PlayerDropItemEvent event = new PlayerDropItemEvent(player, drop);
+ this.level.getServer().getPluginManager().callEvent(event);
+ this.level.getCraftServer().getPluginManager().callEvent(event);
+
+ if (event.isCancelled()) {
+ org.bukkit.inventory.ItemStack cur = player.getInventory().getItemInHand();
@@ -171,8 +171,8 @@
+ }
+ } else {
+ // This should never be called, but is implemented anyway
+ org.bukkit.OfflinePlayer thisPlayer = entityhuman.level.getServer().getOfflinePlayer(entityhuman.getName());
+ team = entityhuman.level.getServer().getScoreboardManager().getMainScoreboard().getPlayerTeam(thisPlayer);
+ org.bukkit.OfflinePlayer thisPlayer = entityhuman.level.getCraftServer().getOfflinePlayer(entityhuman.getName());
+ team = entityhuman.level.getCraftServer().getScoreboardManager().getMainScoreboard().getPlayerTeam(thisPlayer);
+ if (team == null || team.allowFriendlyFire()) {
+ return true;
+ }
@@ -182,7 +182,7 @@
+ if (this instanceof EntityPlayer) {
+ return !team.hasPlayer(((EntityPlayer) this).getBukkitEntity());
+ }
+ return !team.hasPlayer(this.level.getServer().getOfflinePlayer(this.getName()));
+ return !team.hasPlayer(this.level.getCraftServer().getOfflinePlayer(this.getName()));
+ // CraftBukkit end
}
@@ -269,7 +269,7 @@
+ org.bukkit.util.Vector velocity = CraftVector.toBukkit(vec3d);
+
+ PlayerVelocityEvent event = new PlayerVelocityEvent(player, velocity.clone());
+ level.getServer().getPluginManager().callEvent(event);
+ level.getCraftServer().getPluginManager().callEvent(event);
+
+ if (event.isCancelled()) {
+ cancelled = true;