Skip to content

Commit

Permalink
Initial support for Minecraft 1.20. Fixes #161
Browse files Browse the repository at this point in the history
Editing the backside of standing signs is not functioning properly yet
  • Loading branch information
rutgerkok committed Jun 11, 2023
1 parent 0ca8b44 commit bfba62e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.18-R0.1-SNAPSHOT</version>
<version>1.20-R0.1-SNAPSHOT</version>
<scope>provided</scope>
<exclusions>
<exclusion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ final class SchedulerSupport {
.getMethod("runAtFixedRate", Plugin.class, Consumer.class, long.class, long.class, TimeUnit.class);
folia = true;
} catch (NoSuchMethodException e) {
e.printStackTrace(System.err);
folia = false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ private void handleAllowed(PlayerInteractEvent event, Protection protection, boo

// Select signs
if (clickedSign) {
if ((isOwner || player.hasPermission(Permissions.CAN_ADMIN)) && !usedOffHand && !player.isSneaking()) {
Sign sign = (Sign) clickedBlock.getState();
player.openSign(sign);
if ((!isOwner && !player.hasPermission(Permissions.CAN_ADMIN)) || usedOffHand || player.isSneaking()) {
// Don't open sign editor in these cases
event.setCancelled(true);
}
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "${project.version}"
main: nl.rutgerkok.blocklocker.impl.BlockLockerPluginImpl
author: Rutger Kok
load: startup
api-version: 1.18
api-version: "1.20"
softdepend: [Guilds, Factions, mcMMO, Towny]
folia-supported: true
permissions:
Expand Down

0 comments on commit bfba62e

Please sign in to comment.