LevelSounds::LargeBlast()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Copyright (c) 2018 VectorNetworkProject. All rights reserved. MIT license.
4
 *
5
 * GitHub: https://github.com/VectorNetworkProject/TheMix
6
 * Website: https://www.vector-network.tk
7
 */
8
9
namespace VectorNetworkProject\TheMix\lib\sound;
10
11
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
12
use pocketmine\Player;
13
14
class LevelSounds
0 ignored issues
show
Coding Style introduced by
LevelSounds does not seem to conform to the naming convention (Utils?$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
15
{
16
    /**
17
     * @param Player $player
18
     *
19
     * @return void
20
     */
21 View Code Duplication
    public static function LevelUp(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function LevelUp() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
22
    {
23
        $packet = new LevelSoundEventPacket();
24
        $packet->position = $player->asVector3();
25
        $packet->sound = LevelSoundEventPacket::SOUND_LEVELUP;
26
        $packet->extraData = 0x10000000;
27
        $player->sendDataPacket($packet);
28
    }
29
30
    /**
31
     * @param Player $player
32
     *
33
     * @return void
34
     */
35 View Code Duplication
    public static function Anvil(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function Anvil() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
36
    {
37
        $packet = new LevelSoundEventPacket();
38
        $packet->position = $player->asVector3();
39
        $packet->sound = LevelSoundEventPacket::SOUND_RANDOM_ANVIL_USE;
40
        $player->sendDataPacket($packet);
41
    }
42
43
    /**
44
     * @param Player $player
45
     *
46
     * @return void
47
     */
48 View Code Duplication
    public static function Travle(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function Travle() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
49
    {
50
        $packet = new LevelSoundEventPacket();
51
        $packet->position = $player->asVector3();
52
        $packet->sound = LevelSoundEventPacket::SOUND_PORTAL_TRAVEL;
53
        $player->sendDataPacket($packet);
54
    }
55
56
    /**
57
     * @param Player $player
58
     *
59
     * @return void
60
     */
61 View Code Duplication
    public static function EndPortalSpawn(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function EndPortalSpawn() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
62
    {
63
        $packet = new LevelSoundEventPacket();
64
        $packet->position = $player->asVector3();
65
        $packet->sound = LevelSoundEventPacket::SOUND_BLOCK_END_PORTAL_SPAWN;
66
        $player->sendDataPacket($packet);
67
    }
68
69
    /**
70
     * @param Player $player
71
     *
72
     * @return void
73
     */
74 View Code Duplication
    public static function Portal(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function Portal() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
75
    {
76
        $packet = new LevelSoundEventPacket();
77
        $packet->position = $player->asVector3();
78
        $packet->sound = LevelSoundEventPacket::SOUND_BLOCK_END_PORTAL_SPAWN;
79
        $player->sendDataPacket($packet);
80
    }
81
82
    /**
83
     * @param Player $player
84
     *
85
     * @return void
86
     */
87 View Code Duplication
    public static function Thunder(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function Thunder() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
88
    {
89
        $packet = new LevelSoundEventPacket();
90
        $packet->position = $player->asVector3();
91
        $packet->sound = LevelSoundEventPacket::SOUND_ITEM_TRIDENT_THUNDER;
92
        $player->sendDataPacket($packet);
93
    }
94
95
    /**
96
     * @param Player $player
97
     *
98
     * @return void
99
     */
100 View Code Duplication
    public static function Remedy(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function Remedy() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
101
    {
102
        $packet = new LevelSoundEventPacket();
103
        $packet->position = $player->asVector3();
104
        $packet->sound = LevelSoundEventPacket::SOUND_REMEDY;
105
        $player->sendDataPacket($packet);
106
    }
107
108
    /**
109
     * @param Player $player
110
     *
111
     * @return void
112
     */
113 View Code Duplication
    public static function Launch(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function Launch() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
114
    {
115
        $packet = new LevelSoundEventPacket();
116
        $packet->position = $player->asVector3();
117
        $packet->sound = LevelSoundEventPacket::SOUND_LAUNCH;
118
        $player->sendDataPacket($packet);
119
    }
120
121
    /**
122
     * @param Player $player
123
     *
124
     * @return void
125
     */
126 View Code Duplication
    public static function Blast(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function Blast() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
127
    {
128
        $packet = new LevelSoundEventPacket();
129
        $packet->position = $player->asVector3();
130
        $packet->sound = LevelSoundEventPacket::SOUND_BLAST;
131
        $player->sendDataPacket($packet);
132
    }
133
134
    /**
135
     * @param Player $player
136
     *
137
     * @return void
138
     */
139 View Code Duplication
    public static function LargeBlast(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function LargeBlast() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
140
    {
141
        $packet = new LevelSoundEventPacket();
142
        $packet->position = $player->asVector3();
143
        $packet->sound = LevelSoundEventPacket::SOUND_LARGE_BLAST;
144
        $player->sendDataPacket($packet);
145
    }
146
147
    /**
148
     * @param Player $player
149
     *
150
     * @return void
151
     */
152 View Code Duplication
    public static function Twinklt(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function Twinklt() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
153
    {
154
        $packet = new LevelSoundEventPacket();
155
        $packet->position = $player->asVector3();
156
        $packet->sound = LevelSoundEventPacket::SOUND_TWINKLE;
157
        $player->sendDataPacket($packet);
158
    }
159
160
    /**
161
     * @param Player $player
162
     */
163 View Code Duplication
    public static function NotePiano(Player $player): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
Coding Style introduced by
function NotePiano() does not seem to conform to the naming convention (^(?:[a-z]|__)[a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
164
    {
165
        $packet = new LevelSoundEventPacket();
166
        $packet->position = $player->asVector3();
167
        $packet->sound = LevelSoundEventPacket::SOUND_NOTE;
168
        $player->sendDataPacket($packet);
169
    }
170
}
171