Speedgot
BetterChair
-----
Sit on almost everything
Download Now
40.4 KB .jar
Overview
Documentation
Updates (
--
)
Reviews (
---
)
Version History
Discussion
Create Chair API:
Code (Java):
IChair chair
=
BetterChair.
createChair
(
player, block
)
;
if
(
chair
instanceof
BedChair
)
{
BedChair bed
=
(
BedChair
)
chair
;
// YOUR STAFF
}
else
if
(
chair
instanceof
BlockChair
)
{
BlockChair block
=
(
BlockChair
)
chair
;
// YOUR STAFF
}
else
if
(
chair
instanceof
CarpetChair
)
{
CarpetChair carpet
=
(
CarpetChair
)
chair
;
// YOUR STAFF
}
else
if
(
chair
instanceof
SlapChair
)
{
SlapChair slap
=
(
SlapChair
)
chair
;
// YOUR STAFF
}
else
if
(
chair
instanceof
SnowChair
)
{
SnowChair snow
=
(
SnowChair
)
chair
;
// YOUR STAFF
}
else
if
(
chair
instanceof
StairChair
)
{
StairChair stair
=
(
StairChair
)
chair
;
// YOUR STAFF
}
Custom PlayerChairSwitchEvent:
Code (Java):
@EventHandler
public
void
onPlayerChairSwitch
(
PlayerChairSwitchEvent event
)
{
Player player
=
event.
getPlayer
(
)
;
IChair chair
=
event.
getChair
(
)
;
boolean
enable
=
event.
isEnable
(
)
;
if
(
chair
instanceof
BedChair
)
{
BedChair bed
=
(
BedChair
)
chair
;
// YOUR STAFF
}
else
if
(
chair
instanceof
BlockChair
)
{
BlockChair block
=
(
BlockChair
)
chair
;
// YOUR STAFF
}
else
if
(
chair
instanceof
CarpetChair
)
{
CarpetChair carpet
=
(
CarpetChair
)
chair
;
// YOUR STAFF
}
else
if
(
chair
instanceof
SlapChair
)
{
SlapChair slap
=
(
SlapChair
)
chair
;
// YOUR STAFF
}
else
if
(
chair
instanceof
SnowChair
)
{
SnowChair snow
=
(
SnowChair
)
chair
;
// YOUR STAFF
}
else
if
(
chair
instanceof
StairChair
)
{
StairChair stair
=
(
StairChair
)
chair
;
// YOUR STAFF
}
}
Custom PlayerChairCreateEvent:
Code (Java):
@EventHandler
public
void
onPlayerChairCreate
(
PlayerChairCreateEvent event
)
{
IChair chair
=
event.
getChair
(
)
;
if
(
chair.
getType
(
)
==
ChairType.
SLAP
)
return
;
event.
setCancelled
(
true
)
;
// YOUR STAFF
}
Custom EntityPassengerRotateEvent:
Code (Java):
@EventHandler
public
void
onEntityPassengerRotate
(
EntityPassengerRotateEvent event
)
{
Entity
entity
=
event.
getEntity
(
)
;
EntityType entityType
=
event.
getEntityType
(
)
;
Location from
=
event.
getOldLocation
(
)
;
Location to
=
event.
getNewLocation
(
)
;
// YOUR STAFF
}
View on SpigotMC
Resource Information
Author:
----------
Total Downloads:
33,432
First Release:
Oct 1, 2019
Last Update:
Jun 21, 2022
Category:
---------------
All-Time Rating:
11 ratings
Version
-----
Released:
--------------------
Downloads:
------
Version Rating:
----------------------
--
ratings