mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
Add a sane limit for name length
By: Thinkofdeath <thinkofdeath@spigotmc.org>
This commit is contained in:
parent
e909dd95d8
commit
c0e326b62a
1 changed files with 13 additions and 1 deletions
|
@ -574,7 +574,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dead = true;
|
this.dead = true;
|
||||||
@@ -1721,7 +2081,26 @@
|
@@ -1670,6 +2030,11 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCustomName(String s) {
|
||||||
|
+ // CraftBukkit start - Add a sane limit for name length
|
||||||
|
+ if (s.length() > 256) {
|
||||||
|
+ s = s.substring(0, 256);
|
||||||
|
+ }
|
||||||
|
+ // CraftBukkit end
|
||||||
|
this.datawatcher.watch(2, s);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1721,7 +2086,26 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(AxisAlignedBB axisalignedbb) {
|
public void a(AxisAlignedBB axisalignedbb) {
|
||||||
|
|
Loading…
Reference in a new issue