mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fix armorstands, boats etc being placeable on players plots with "use 0" flag
This commit is contained in:
parent
477e698f7e
commit
130e1b6300
@ -1876,23 +1876,16 @@ import java.util.regex.Pattern;
|
|||||||
eventType = PlayerBlockEventType.TELEPORT_OBJECT;
|
eventType = PlayerBlockEventType.TELEPORT_OBJECT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LegacyPlotBlock legacyPlotBlock =
|
if (blockType.isInteractable()) {
|
||||||
(LegacyPlotBlock) PlotSquared.get().IMP.getLegacyMappings()
|
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
||||||
.fromStringToLegacy(blockType.name());
|
|
||||||
if (legacyPlotBlock != null) {
|
|
||||||
int blockId = legacyPlotBlock.id;
|
|
||||||
if (blockId > 197) {
|
|
||||||
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
lb = new BukkitLazyBlock(PlotBlock.get(block.getType().toString()));
|
lb = new BukkitLazyBlock(PlotBlock.get(block.getType().toString()));
|
||||||
ItemStack hand = player.getInventory().getItemInMainHand();
|
|
||||||
if (eventType != null && (eventType != PlayerBlockEventType.INTERACT_BLOCK
|
if (eventType != null && (eventType != PlayerBlockEventType.INTERACT_BLOCK
|
||||||
|| !player.isSneaking())) {
|
|| !player.isSneaking())) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
ItemStack hand = player.getInventory().getItemInMainHand();
|
||||||
Material type = (hand == null) ? null : hand.getType();
|
Material type = (hand == null) ? null : hand.getType();
|
||||||
if (type == Material.AIR) {
|
if (type == Material.AIR) {
|
||||||
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
eventType = PlayerBlockEventType.INTERACT_BLOCK;
|
||||||
|
@ -675,7 +675,7 @@ public final class BukkitLegacyMappings extends LegacyMappings {
|
|||||||
final List<LegacyBlock> missing = new ArrayList<>();
|
final List<LegacyBlock> missing = new ArrayList<>();
|
||||||
for (final Material material : Material.values()) {
|
for (final Material material : Material.values()) {
|
||||||
final String materialName = material.name().toLowerCase(Locale.ENGLISH);
|
final String materialName = material.name().toLowerCase(Locale.ENGLISH);
|
||||||
if (OLD_STRING_TO_STRING_PLOT_BLOCK.get(materialName) == null) {
|
if (NEW_STRING_TO_LEGACY_PLOT_BLOCK.get(materialName) == null) {
|
||||||
final LegacyBlock missingBlock =
|
final LegacyBlock missingBlock =
|
||||||
new LegacyBlock(material.getId(), materialName, materialName);
|
new LegacyBlock(material.getId(), materialName, materialName);
|
||||||
missing.add(missingBlock);
|
missing.add(missingBlock);
|
||||||
|
Loading…
Reference in New Issue
Block a user