readd beacon effect cause
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
GameProfileCache.GameProfileInfo gameProfileInfo = new GameProfileCache.GameProfileInfo(gameProfile, time);
|
||||
this.safeAdd(gameProfileInfo);
|
||||
- this.save();
|
||||
+ if(!org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) this.save(true); // Spigot - skip saving if disabled // Paper - Perf: Async GameProfileCache saving
|
||||
+ if (!org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) this.save(true); // Spigot - skip saving if disabled // Paper - Perf: Async GameProfileCache saving
|
||||
}
|
||||
|
||||
private long getNextOperation() {
|
||||
@@ -130,11 +130,11 @@
|
||||
|
||||
return (List<GameProfileCache.GameProfileInfo>)var9;
|
||||
} catch (FileNotFoundException var7) {
|
||||
+ // Spigot Start
|
||||
+ // Spigot start
|
||||
+ } catch (com.google.gson.JsonSyntaxException | NullPointerException ex) {
|
||||
+ GameProfileCache.LOGGER.warn( "Usercache.json is corrupted or has bad formatting. Deleting it to prevent further issues." );
|
||||
+ LOGGER.warn( "Usercache.json is corrupted or has bad formatting. Deleting it to prevent further issues." );
|
||||
+ this.file.delete();
|
||||
+ // Spigot End
|
||||
+ // Spigot end
|
||||
} catch (JsonParseException | IOException var8) {
|
||||
LOGGER.warn("Failed to load profile cache {}", this.file, var8);
|
||||
}
|
||||
|
||||
@@ -671,11 +671,11 @@
|
||||
+ } else {
|
||||
+ teleportTransition = new TeleportTransition(((org.bukkit.craftbukkit.CraftWorld) location.getWorld()).getHandle(), org.bukkit.craftbukkit.util.CraftLocation.toVec3D(location), Vec3.ZERO, location.getYaw(), location.getPitch(), TeleportTransition.DO_NOTHING);
|
||||
+ }
|
||||
+ // Spigot Start
|
||||
+ // Spigot start
|
||||
+ if (teleportTransition == null) { // Paper - Add PlayerPostRespawnEvent - diff on change - spigot early returns if respawn pos is null, that is how they handle disconnected player in respawn event
|
||||
+ return player;
|
||||
+ }
|
||||
+ // Spigot End
|
||||
+ // Spigot end
|
||||
+ ServerLevel level = teleportTransition.newLevel();
|
||||
+ serverPlayer.spawnIn(level);
|
||||
+ serverPlayer.unsetRemoved();
|
||||
|
||||
@@ -68,14 +68,14 @@
|
||||
this.map.put(this.getKeyForUser(storedUserEntry.getUser()), (V)storedUserEntry);
|
||||
}
|
||||
}
|
||||
+ // Spigot Start
|
||||
+ // Spigot start
|
||||
+ } catch (com.google.gson.JsonParseException | NullPointerException ex) {
|
||||
+ org.bukkit.Bukkit.getLogger().log(java.util.logging.Level.WARNING, "Unable to read file " + this.file + ", backing it up to {0}.backup and creating new copy.", ex);
|
||||
+ LOGGER.warn("Unable to read file {}, backing it up to {0}.backup and creating new copy.", this.file, ex);
|
||||
+ File backup = new File(this.file + ".backup");
|
||||
+ this.file.renameTo(backup);
|
||||
+ this.file.delete();
|
||||
}
|
||||
+ // Spigot End
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/players/UserBanListEntry.java
|
||||
+++ b/net/minecraft/server/players/UserBanListEntry.java
|
||||
@@ -37,19 +_,29 @@
|
||||
@@ -37,19 +_,27 @@
|
||||
|
||||
@Nullable
|
||||
private static GameProfile createGameProfile(JsonObject json) {
|
||||
@@ -21,16 +21,14 @@
|
||||
|
||||
- return new GameProfile(uuid, json.get("name").getAsString());
|
||||
+ }
|
||||
+ if ( json.has("name"))
|
||||
+ {
|
||||
+ if (json.has("name")) {
|
||||
+ name = json.get("name").getAsString();
|
||||
+ }
|
||||
+ if ( uuid != null || name != null )
|
||||
+ {
|
||||
+ return new GameProfile( uuid, name );
|
||||
+ if (uuid != null || name != null) {
|
||||
+ return new GameProfile(uuid, name);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
+ // Spigot End
|
||||
+ // Spigot end
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user