Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
GenisysPro
GenisysPro
Commits
ec5185e0
Commit
ec5185e0
authored
Sep 02, 2017
by
Realm
Committed by
GitHub
Sep 02, 2017
Browse files
Fix #813 and set false to kick by admin flag.
parent
1c500159
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/pocketmine/Player.php
src/pocketmine/Player.php
+2
-2
No files found.
src/pocketmine/Player.php
View file @
ec5185e0
...
...
@@ -2045,7 +2045,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
}
else
{
if
(
$this
->
getInventory
()
->
getItem
(
$this
->
getInventory
()
->
getSize
()
+
1
)
->
getId
()
==
"444"
){
#enable use of elytra. todo: check if it is open
return
;
$this
->
inAirTicks
=
0
;
}
if
(
!
$this
->
allowFlight
and
$this
->
inAirTicks
>
10
and
!
$this
->
isSleeping
()
and
!
$this
->
isImmobile
()){
$expectedVelocity
=
(
-
$this
->
gravity
)
/
$this
->
drag
-
((
-
$this
->
gravity
)
/
$this
->
drag
)
*
exp
(
-
$this
->
drag
*
(
$this
->
inAirTicks
-
$this
->
startAirTicks
));
...
...
@@ -2054,7 +2054,7 @@ class Player extends Human implements CommandSender, InventoryHolder, ChunkLoade
if
(
!
$this
->
hasEffect
(
Effect
::
JUMP
)
and
$diff
>
0.6
and
$expectedVelocity
<
$this
->
speed
->
y
and
!
$this
->
server
->
getAllowFlight
()){
if
(
$this
->
inAirTicks
<
1000
){
$this
->
setMotion
(
new
Vector3
(
0
,
$expectedVelocity
,
0
));
}
elseif
(
$this
->
kick
(
"Flying is not enabled on this server"
)){
}
elseif
(
$this
->
kick
(
"Flying is not enabled on this server"
,
false
)){
$this
->
timings
->
stopTiming
();
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment