For now always check if sit is occupied otherwise it can glitch like hell
This commit is contained in:
parent
3177a63ba2
commit
4d9ae43d0c
@ -30,7 +30,7 @@ public class Chairs extends JavaPlugin {
|
|||||||
public List<ChairBlock> allowedBlocks;
|
public List<ChairBlock> allowedBlocks;
|
||||||
public List<Material> validSigns;
|
public List<Material> validSigns;
|
||||||
public boolean autoRotate, signCheck, permissions, notifyplayer, opsOverridePerms;
|
public boolean autoRotate, signCheck, permissions, notifyplayer, opsOverridePerms;
|
||||||
public boolean invertedStairCheck, seatOccupiedCheck, invertedStepCheck, perItemPerms, ignoreIfBlockInHand;
|
public boolean invertedStairCheck, invertedStepCheck, perItemPerms, ignoreIfBlockInHand;
|
||||||
public boolean sitEffectsEnabled;
|
public boolean sitEffectsEnabled;
|
||||||
public boolean authmelogincorrection;
|
public boolean authmelogincorrection;
|
||||||
public double sittingHeight, sittingHeightAdj, distance;
|
public double sittingHeight, sittingHeightAdj, distance;
|
||||||
@ -177,7 +177,6 @@ public class Chairs extends JavaPlugin {
|
|||||||
permissions = getConfig().getBoolean("permissions");
|
permissions = getConfig().getBoolean("permissions");
|
||||||
notifyplayer = getConfig().getBoolean("notify-player");
|
notifyplayer = getConfig().getBoolean("notify-player");
|
||||||
invertedStairCheck = getConfig().getBoolean("upside-down-check");
|
invertedStairCheck = getConfig().getBoolean("upside-down-check");
|
||||||
seatOccupiedCheck = getConfig().getBoolean("seat-occupied-check");
|
|
||||||
invertedStepCheck = getConfig().getBoolean("upper-step-check");
|
invertedStepCheck = getConfig().getBoolean("upper-step-check");
|
||||||
perItemPerms = getConfig().getBoolean("per-item-perms");
|
perItemPerms = getConfig().getBoolean("per-item-perms");
|
||||||
opsOverridePerms = getConfig().getBoolean("ops-override-perms");
|
opsOverridePerms = getConfig().getBoolean("ops-override-perms");
|
||||||
|
@ -244,9 +244,7 @@ public class EventListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sit-down process.
|
//Sit occupied check
|
||||||
if (plugin.seatOccupiedCheck) {
|
|
||||||
if (!plugin.sit.isEmpty()) {
|
|
||||||
if (plugin.sitblock.containsKey(block))
|
if (plugin.sitblock.containsKey(block))
|
||||||
{
|
{
|
||||||
if (!plugin.msgOccupied.isEmpty()) {
|
if (!plugin.msgOccupied.isEmpty()) {
|
||||||
@ -254,10 +252,9 @@ public class EventListener implements Listener {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Location getSitLocation(Block block, Float playerYaw)
|
private Location getSitLocation(Block block, Float playerYaw)
|
||||||
|
@ -41,7 +41,6 @@ sitting-height-adj: 1.0
|
|||||||
permissions: true
|
permissions: true
|
||||||
notify-player: true
|
notify-player: true
|
||||||
upside-down-check: true
|
upside-down-check: true
|
||||||
seat-occupied-check: true
|
|
||||||
upper-step-check: true
|
upper-step-check: true
|
||||||
per-item-perms: true
|
per-item-perms: true
|
||||||
ops-override-perms: false
|
ops-override-perms: false
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user