|
1 | 1 | package com.mairwunnx.projectessentials.chat |
2 | 2 |
|
| 3 | +import com.mairwunnx.projectessentials.chat.models.ChatModelBase |
3 | 4 | import com.mairwunnx.projectessentialscore.EssBase |
4 | 5 | import com.mairwunnx.projectessentialscore.extensions.sendMsg |
5 | 6 | import com.mairwunnx.projectessentialspermissions.permissions.PermissionsAPI |
@@ -100,12 +101,12 @@ class EntryPoint : EssBase() { |
100 | 101 | if (!ChatUtils.isGlobalChat(event)) { |
101 | 102 | val players = event.player.serverWorld.getEntitiesWithinAABB( |
102 | 103 | event.player.entity.javaClass, AxisAlignedBB( |
103 | | - event.player.posX - 50, |
104 | | - event.player.posY - 50, |
105 | | - event.player.posZ - 50, |
106 | | - event.player.posX + 50, |
107 | | - event.player.posY + 50, |
108 | | - event.player.posZ + 50 |
| 104 | + event.player.posX - ChatModelBase.chatModel.messaging.localChatRange / 2, |
| 105 | + event.player.posY - ChatModelBase.chatModel.messaging.localChatRange / 2, |
| 106 | + event.player.posZ - ChatModelBase.chatModel.messaging.localChatRange / 2, |
| 107 | + event.player.posX + ChatModelBase.chatModel.messaging.localChatRange / 2, |
| 108 | + event.player.posY + ChatModelBase.chatModel.messaging.localChatRange / 2, |
| 109 | + event.player.posZ + ChatModelBase.chatModel.messaging.localChatRange / 2 |
109 | 110 | ) |
110 | 111 | ) |
111 | 112 | players.forEach { |
|
0 commit comments