17
17
use pmmp \encoding \Byte ;
18
18
use pmmp \encoding \ByteBufferReader ;
19
19
use pmmp \encoding \ByteBufferWriter ;
20
+ use pmmp \encoding \DataDecodeException ;
20
21
use pmmp \encoding \LE ;
21
22
use pmmp \encoding \VarInt ;
22
23
use pocketmine \network \mcpe \protocol \serializer \CommonTypes ;
28
29
use pocketmine \network \mcpe \protocol \types \command \CommandOverload ;
29
30
use pocketmine \network \mcpe \protocol \types \command \CommandParameter ;
30
31
use pocketmine \network \mcpe \protocol \types \command \CommandParameterTypes as ArgTypes ;
31
- use pocketmine \utils \BinaryDataException ;
32
32
use function array_search ;
33
33
use function count ;
34
34
use function dechex ;
@@ -217,7 +217,7 @@ protected function initSoftEnumsInCommandData() : void{
217
217
* @param string[] $enumValueList
218
218
*
219
219
* @throws PacketDecodeException
220
- * @throws BinaryDataException
220
+ * @throws DataDecodeException
221
221
*/
222
222
protected function getEnum (array $ enumValueList , ByteBufferReader $ in ) : CommandEnum {
223
223
$ enumName = CommonTypes::getString ($ in );
@@ -238,7 +238,7 @@ protected function getEnum(array $enumValueList, ByteBufferReader $in) : Command
238
238
}
239
239
240
240
/**
241
- * @throws BinaryDataException
241
+ * @throws DataDecodeException
242
242
*/
243
243
protected function getSoftEnum (ByteBufferReader $ in ) : CommandEnum {
244
244
$ enumName = CommonTypes::getString ($ in );
@@ -280,7 +280,7 @@ protected function putSoftEnum(CommandEnum $enum, ByteBufferWriter $out) : void{
280
280
}
281
281
282
282
/**
283
- * @throws BinaryDataException
283
+ * @throws DataDecodeException
284
284
*/
285
285
protected function getEnumValueIndex (int $ valueCount , ByteBufferReader $ in ) : int {
286
286
if ($ valueCount < 256 ){
@@ -307,7 +307,7 @@ protected function putEnumValueIndex(int $index, int $valueCount, ByteBufferWrit
307
307
* @param string[] $enumValues
308
308
*
309
309
* @throws PacketDecodeException
310
- * @throws BinaryDataException
310
+ * @throws DataDecodeException
311
311
*/
312
312
protected function getEnumConstraint (array $ enums , array $ enumValues , ByteBufferReader $ in ) : CommandEnumConstraint {
313
313
//wtf, what was wrong with an offset inside the enum? :(
@@ -352,7 +352,7 @@ protected function putEnumConstraint(CommandEnumConstraint $constraint, array $e
352
352
* @param ChainedSubCommandData[] $allChainedSubCommandData
353
353
*
354
354
* @throws PacketDecodeException
355
- * @throws BinaryDataException
355
+ * @throws DataDecodeException
356
356
*/
357
357
protected function getCommandData (array $ enums , array $ postfixes , array $ allChainedSubCommandData , ByteBufferReader $ in ) : CommandData {
358
358
$ name = CommonTypes::getString ($ in );
0 commit comments