This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.*; | |
| public class FileUtils { | |
| public static void newFolder(File folder) throws Exception { | |
| if (!folder.exists() && !folder.mkdirs()) throw new Exception("Unable to create folder : " + folder.getPath()); | |
| } | |
| public static void newFile(File file) throws Exception { | |
| if (!file.exists()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish | |
| on: | |
| push: | |
| branches: ["*", "!master", "!*-*"] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-java@v4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PlayerOffHandEvents implements Listener { | |
| @EventHandler | |
| public void onInventoryClick(InventoryClickEvent e) { | |
| if (e.getClick() == ClickType.SWAP_OFFHAND || e.getSlot() == 40) e.setCancelled(true); | |
| } | |
| @EventHandler | |
| public void onInventoryDrag(InventoryDragEvent e) { | |
| if (e.getRawSlots().contains(45)) e.setCancelled(true); |