add char descs
This commit is contained in:
parent
c130bb1272
commit
1219616a44
3 changed files with 20 additions and 5 deletions
|
@ -1958,7 +1958,7 @@ public class Player extends NetHandler implements ICrafting, Executor
|
|||
}
|
||||
|
||||
CPacketMessage.Type type = packetIn.getType();
|
||||
if(this.charEditor != (type == CPacketMessage.Type.DISPLAY))
|
||||
if(this.charEditor != (type == CPacketMessage.Type.DISPLAY || type == CPacketMessage.Type.INFO))
|
||||
return;
|
||||
|
||||
switch(type) {
|
||||
|
@ -1978,6 +1978,12 @@ public class Player extends NetHandler implements ICrafting, Executor
|
|||
this.entity.setCustomNameTag(msg);
|
||||
break;
|
||||
|
||||
case INFO:
|
||||
if(msg.length() > MAX_INFO_LENGTH)
|
||||
throw new IllegalArgumentException("Ungültige Beschreibung");
|
||||
this.entity.setDescription(msg.isEmpty() ? null : msg);
|
||||
break;
|
||||
|
||||
// case ITEM:
|
||||
// if(this.entity.openContainer instanceof ContainerRepair)
|
||||
// ((ContainerRepair)this.entity.openContainer).updateItemName(msg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue