1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-01-30 19:40:37 +01:00

Rebuild patches for scoreboard API pull to Bukkit.

This commit is contained in:
md_5 2015-05-29 19:35:21 +10:00
parent c22f803441
commit b528389cd0
58 changed files with 7 additions and 239 deletions
Bukkit-Patches
CraftBukkit-Patches
0003-Skeleton-API-Implementations.patch0108-Add-Score.isScoreSet-Z-API.patch0108-Expand-team-API-to-allow-arbitrary-strings.patch0109-Log-null-TileEntity-Owner.patch0110-Don-t-special-case-invalid-usernames-for-UUIDs.patch0111-Convert-player-skulls-async.patch0112-Prevent-NoClassDefError-crash-and-notify-on-crash.patch0113-Check-Skull-canPlace.patch0114-Fix-race-condition-that-could-kill-connections-befor.patch0115-Configurable-UserCache-cap.patch0116-Implement-PlayerSpawnLocationEvent.patch0117-Cap-Objective-Score-Length.patch0118-Process-conversation-input-on-the-main-thread.-Fixes.patch0119-Configurable-save-on-stop-only-for-UserCache.patch0120-Prevent-Unbounded-IntCache-Growth.patch0121-Add-damager-to-the-unhandled-error.patch0122-Cross-World-Entity-Teleportation.patch0123-Limit-block-placement-interaction-packets.patch0124-Better-item-validation.patch0125-Further-Seed-Customisation.patch0126-Disable-ResourceLeakDetector.patch0127-Add-More-Information-to-session.lock-Errors.patch0128-Safer-JSON-Loading.patch0129-Fix-Slow-Loading-Libraries.patch0130-Add-CommandLine-EULA-Flag.patch0131-Fix-for-enchanting-table-wiping-meta-when-placing-st.patch0132-Don-t-spawn-bonus-ocelots-when-plugins-spawn-ocelots.patch0133-Prevent-a-crash-involving-attributes.patch0134-Make-moved-wrongly-limit-configurable.patch0135-Fix-Null-Tile-Entity-Worlds.patch0136-Make-moved-too-quickly-limit-configurable.patch0137-Apply-NBTReadLimiter-to-more-things.patch0138-Allow-Attribute-Capping.patch0139-Only-fetch-an-online-UUID-in-online-mode.patch0140-Filter-attribute-modifiers-which-cause-the-attribute.patch0141-Plug-WorldMap-Memory-Leak.patch0142-Fix-Corrupted-Trapped-Chest.patch0143-Remove-uneeded-validation.patch0144-Add-Hunger-Config-Values.patch0145-Make-debug-logging-togglable.patch0146-Skip-invalid-enchants-in-CraftMetaItem.patch0147-Limit-TNT-Detonations-per-tick.patch0148-Added-isUnbreakable-and-setUnbreakable-to-ItemMeta.patch0149-Configurable-Hanging-Tick.patch0150-Refactor-ItemDoor-Place.patch0151-BungeeCord-Chat-API.patch0152-Use-Standard-List-for-EntitySlices.patch0153-Allow-Capping-Tile-Entity-Tick-Time.patch0154-Use-FastMatches-for-ItemStack-Dirty-Check.patch0155-Use-CLQ-for-main-thread-tasks.patch

View file

@ -1,73 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Thu, 17 Apr 2014 19:22:26 +1000
Subject: [PATCH] Expand team API to allow arbitrary strings.
diff --git a/src/main/java/org/bukkit/scoreboard/Team.java b/src/main/java/org/bukkit/scoreboard/Team.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/scoreboard/Team.java
+++ b/src/main/java/org/bukkit/scoreboard/Team.java
@@ -0,0 +0,0 @@ public interface Team {
*/
Set<OfflinePlayer> getPlayers() throws IllegalStateException;
+ // Spigot start
+ /**
+ * Same as the player method, but with an arbitrary string.
+ *
+ * @see #getPlayers()
+ */
+ Set<String> getEntries() throws IllegalStateException;
+ // Spigot End
+
/**
* Gets the size of the team
*
@@ -0,0 +0,0 @@ public interface Team {
*/
void addPlayer(OfflinePlayer player) throws IllegalStateException, IllegalArgumentException;
+ // Spigot start
+ /**
+ * Same as the player method, but with an arbitrary string.
+ *
+ * @see #addPlayer(org.bukkit.OfflinePlayer)
+ */
+ void addEntry(String entry) throws IllegalStateException, IllegalArgumentException;
+ // Spigot end
+
/**
* Removes the player from this team.
*
@@ -0,0 +0,0 @@ public interface Team {
*/
boolean removePlayer(OfflinePlayer player) throws IllegalStateException, IllegalArgumentException;
+ // Spigot start
+ /**
+ * Same as the player method, but with an arbitrary string.
+ *
+ * @see #removePlayer(org.bukkit.OfflinePlayer)
+ */
+ boolean removeEntry(String entry) throws IllegalStateException, IllegalArgumentException;
+ // Spigot end
+
/**
* Unregisters this team from the Scoreboard
*
@@ -0,0 +0,0 @@ public interface Team {
* @throws IllegalStateException if this team has been unregistered
*/
boolean hasPlayer(OfflinePlayer player) throws IllegalArgumentException, IllegalStateException;
+
+ // Spigot start
+ /**
+ * Same as the player method, but with an arbitrary string.
+ *
+ * @see #hasPlayer(org.bukkit.OfflinePlayer)
+ */
+ boolean hasEntry(String entry) throws IllegalArgumentException,IllegalStateException;
+ // Spigot end
}
--

View file

@ -159,36 +159,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
@@ -0,0 +0,0 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
return !(this.team != other.team && (this.team == null || !this.team.equals(other.team)));
}
+ // Spigot start
+ @Override
+ public Set<String> getEntries() throws IllegalStateException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public void addEntry(String entry) throws IllegalStateException, IllegalArgumentException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean removeEntry(String entry) throws IllegalStateException, IllegalArgumentException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
+ @Override
+ public boolean hasEntry(String entry) throws IllegalArgumentException, IllegalStateException {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+ // Spigot end
}
--

View file

@ -1,114 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: md_5 <git@md-5.net>
Date: Thu, 17 Apr 2014 19:22:22 +1000
Subject: [PATCH] Expand team API to allow arbitrary strings.
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
@@ -0,0 +0,0 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
return players.build();
}
+ // Spigot start
+ @Override
+ public Set<String> getEntries() throws IllegalStateException {
+ CraftScoreboard scoreboard = checkState();
+
+ ImmutableSet.Builder<String> entries = ImmutableSet.builder();
+ for (Object o : team.getPlayerNameSet()){
+ entries.add(o.toString());
+ }
+ return entries.build();
+ }
+ // Spigot end
+
public int getSize() throws IllegalStateException {
CraftScoreboard scoreboard = checkState();
@@ -0,0 +0,0 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
public void addPlayer(OfflinePlayer player) throws IllegalStateException, IllegalArgumentException {
Validate.notNull(player, "OfflinePlayer cannot be null");
+ // Spigot Start
+ addEntry(player.getName());
+ }
+
+ public void addEntry(String entry) throws IllegalStateException, IllegalArgumentException {
+ Validate.notNull(entry, "Entry cannot be null");
CraftScoreboard scoreboard = checkState();
- scoreboard.board.addPlayerToTeam(player.getName(), team.getName());
+ scoreboard.board.addPlayerToTeam(entry, team.getName());
+ // Spigot end
}
public boolean removePlayer(OfflinePlayer player) throws IllegalStateException, IllegalArgumentException {
Validate.notNull(player, "OfflinePlayer cannot be null");
+ // Spigot start
+ return removeEntry(player.getName());
+ }
+
+ public boolean removeEntry(String entry) throws IllegalStateException, IllegalArgumentException {
+ Validate.notNull(entry, "Entry cannot be null");
CraftScoreboard scoreboard = checkState();
- if (!team.getPlayerNameSet().contains(player.getName())) {
+ if (!team.getPlayerNameSet().contains(entry)) {
return false;
}
- scoreboard.board.removePlayerFromTeam(player.getName(), team);
+ scoreboard.board.removePlayerFromTeam(entry, team);
+ // Spigot end
return true;
}
public boolean hasPlayer(OfflinePlayer player) throws IllegalArgumentException, IllegalStateException {
Validate.notNull(player, "OfflinePlayer cannot be null");
+ // Spigot start
+ return hasEntry(player.getName());
+ }
+
+ public boolean hasEntry(String entry) throws IllegalArgumentException, IllegalStateException {
+ Validate.notNull("Entry cannot be null");
+
CraftScoreboard scoreboard = checkState();
- return team.getPlayerNameSet().contains(player.getName());
+ return team.getPlayerNameSet().contains(entry);
+ // Spigot end
}
@Override
@@ -0,0 +0,0 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
final CraftTeam other = (CraftTeam) obj;
return !(this.team != other.team && (this.team == null || !this.team.equals(other.team)));
}
-
- // Spigot start
- @Override
- public Set<String> getEntries() throws IllegalStateException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public void addEntry(String entry) throws IllegalStateException, IllegalArgumentException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public boolean removeEntry(String entry) throws IllegalStateException, IllegalArgumentException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
-
- @Override
- public boolean hasEntry(String entry) throws IllegalArgumentException, IllegalStateException {
- throw new UnsupportedOperationException("Not supported yet.");
- }
// Spigot end
}
--

View file

@ -32,6 +32,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ userCacheCap = getInt( "settings.user-cache-size", 1000 );
+ }
}
--
1.9.0.msysgit.0
--

View file

@ -51,6 +51,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ saveUserCacheOnStopOnly = getBoolean( "settings.save-user-cache-on-stop-only", false );
+ }
}
--
1.9.0.msysgit.0
--

View file

@ -57,6 +57,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ intCacheLimit = getInt( "settings.int-cache-limit", 1024 );
+ }
}
--
1.9.0.msysgit.0
--

View file

@ -33,6 +33,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ movedWronglyThreshold = getDouble( "settings.moved-wrongly-threshold", 0.0625D );
+ }
}
--
1.9.0.msysgit.0
--

View file

@ -33,6 +33,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ movedTooQuicklyThreshold = getDouble( "settings.moved-too-quickly-threshold", 100.0D );
+ }
}
--
1.9.0.msysgit.0
--

View file

@ -70,6 +70,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ ( (AttributeRanged) GenericAttributes.ATTACK_DAMAGE ).b = attackDamage;
+ }
}
--
1.9.0.msysgit.0
--

View file

@ -62,6 +62,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
</Root>
</Loggers>
</Configuration>
--
1.9.0.msysgit.0
--