diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4788b4b45423e8a125fd058d5d99982570c54517..0000000000000000000000000000000000000000 --- a/.gitignore +++ /dev/null @@ -1,113 +0,0 @@ -# User-specific stuff -.idea/ - -*.iml -*.ipr -*.iws - -# IntelliJ -out/ - -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# Windows thumbnail cache files -Thumbs.db -Thumbs.db:encryptable -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - -target/ - -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next - -release.properties -dependency-reduced-pom.xml -buildNumber.properties -.mvn/timing.properties -.mvn/wrapper/maven-wrapper.jar -.flattened-pom.xml - -# Common working directory -run/ diff --git a/README.md b/README.md deleted file mode 100644 index d0f2e6b5dc176a8334eacbf73bba2a457fba1069..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,92 +0,0 @@ -# PixelcampusEssentials - - - -## Getting started - -To make it easy for you to get started with GitLab, here's a list of recommended next steps. - -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! - -## Add your files - -- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: - -``` -cd existing_repo -git remote add origin https://gitlab.reutlingen-university.de/hustoles/pixelcampusessentials.git -git branch -M main -git push -uf origin main -``` - -## Integrate with your tools - -- [ ] [Set up project integrations](https://gitlab.reutlingen-university.de/hustoles/pixelcampusessentials/-/settings/integrations) - -## Collaborate with your team - -- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) - -## Test and Deploy - -Use the built-in continuous integration in GitLab. - -- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) - -*** - -# Editing this README - -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. - -## Suggestions for a good README -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. - -## Name -Choose a self-explaining name for your project. - -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. - -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. - -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. - -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. - -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. - -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. - -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. - -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. - -## License -For open source projects, say how it is licensed. - -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 75e87127b313a5684d2392f2e0e06fc8ac867b3b..0000000000000000000000000000000000000000 --- a/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>FSI</groupId> - <artifactId>PixelcampusEssentials</artifactId> - <version>1.0</version> - <packaging>jar</packaging> - - <name>PixelcampusEssentials</name> - - <properties> - <java.version>1.8</java.version> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>3.8.1</version> - <configuration> - <source>16</source> - <target>16</target> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>3.2.4</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <createDependencyReducedPom>false</createDependencyReducedPom> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - <resources> - <resource> - <directory>src/main/resources</directory> - <filtering>true</filtering> - </resource> - </resources> - </build> - - <repositories> - <repository> - <id>sk89q-repo</id> - <url>https://maven.enginehub.org/repo/</url> - </repository> - <repository> - <id>papermc-repo</id> - <url>https://repo.papermc.io/repository/maven-public/</url> - </repository> - <repository> - <id>sonatype</id> - <url>https://oss.sonatype.org/content/groups/public/</url> - </repository> - </repositories> - - <dependencies> - <dependency> - <groupId>com.sk89q.worldguard</groupId> - <artifactId>worldguard-bukkit</artifactId> - <version>7.0.9</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>io.papermc.paper</groupId> - <artifactId>paper-api</artifactId> - <version>1.20.1-R0.1-SNAPSHOT</version> - <scope>provided</scope> - </dependency> - </dependencies> -</project> diff --git a/src/main/java/Plots/PlayerSelection.java b/src/main/java/Plots/PlayerSelection.java deleted file mode 100644 index 6e1689ae93ff656c0ac42b0506c5d1a7219fc780..0000000000000000000000000000000000000000 --- a/src/main/java/Plots/PlayerSelection.java +++ /dev/null @@ -1,80 +0,0 @@ -package Plots; - -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerQuitEvent; -import org.bukkit.util.BlockVector; -import org.jetbrains.annotations.NotNull; - -public class PlayerSelection implements Listener { - - @EventHandler - public void playerLeaveEvent(@NotNull PlayerQuitEvent e){ - removeFromQeue(e.getPlayer()); - } - - private boolean removeFromQeue(Player p){ - - String uuidToRemove = p.getUniqueId().toString(); - - for (PlayerSelection i : Plots.getSelectionsQeue()) { - if (i.getUUID().equals(uuidToRemove)) { - Plots.getSelectionsQeue().remove(i); - return true; - } - } - - return false; - } - - public static PlayerSelection getfromQeue(Player p){ - - String uuid = p.getUniqueId().toString(); - - for (PlayerSelection i : Plots.getSelectionsQeue()) { - if (i.getUUID().equals(uuid)) { - return i; - } - } - - return null; - } - - public PlayerSelection(){ - } - public PlayerSelection(String UUID, BlockVector pos1, BlockVector pos2) { - this.UUID = UUID; - this.pos1 = pos1; - this.pos2 = pos2; - } - - public void setUUID(String UUID) { - this.UUID = UUID; - } - - public void setPos1(BlockVector pos1) { - this.pos1 = pos1; - } - - public void setPos2(BlockVector pos2) { - this.pos2 = pos2; - } - - public String getUUID() { - return UUID; - } - - public BlockVector getPos1() { - return pos1; - } - - public BlockVector getPos2() { - return pos2; - } - - private String UUID = null; - private BlockVector pos1 = null; - private BlockVector pos2 = null; - -} \ No newline at end of file diff --git a/src/main/java/Plots/Plots.java b/src/main/java/Plots/Plots.java deleted file mode 100644 index 3f444503ecdcc07dcb3eee0097ad2de8b6191919..0000000000000000000000000000000000000000 --- a/src/main/java/Plots/Plots.java +++ /dev/null @@ -1,330 +0,0 @@ -package Plots; - -import com.google.common.collect.Lists; -import com.sk89q.worldedit.bukkit.BukkitAdapter; -import com.sk89q.worldedit.math.BlockVector3; -import com.sk89q.worldguard.WorldGuard; -import com.sk89q.worldguard.domains.DefaultDomain; -import com.sk89q.worldguard.protection.ApplicableRegionSet; -import com.sk89q.worldguard.protection.managers.RegionManager; -import com.sk89q.worldguard.protection.regions.ProtectedCuboidRegion; -import com.sk89q.worldguard.protection.regions.ProtectedRegion; -import com.sk89q.worldguard.protection.regions.RegionContainer; -import fsi.pixelcampusessentials.PixelcampusEssentials; -import org.bukkit.Bukkit; -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.command.Command; -import org.bukkit.command.CommandExecutor; -import org.bukkit.command.CommandSender; -import org.bukkit.command.TabCompleter; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; -import org.bukkit.event.player.PlayerQuitEvent; -import org.bukkit.util.BlockVector; -import org.bukkit.util.Vector; -import org.checkerframework.checker.units.qual.A; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.*; - -public class Plots implements CommandExecutor, Listener { - - private static final ArrayList<PlayerSelection> selectionsQeue = new ArrayList<>(); - private static Integer MAX_PLOT_SIZE; - private static final String[] cmds = {"pos1","pos2","claim","unclaim","info","addmember","removemember"}; - - public Plots(){ - - try { - MAX_PLOT_SIZE = Integer.parseInt(String.valueOf(PixelcampusEssentials.getPlugin().getConfig().getList("maxPlotSize").get(0))); - }catch (Exception e){ - - //if the value from the config fails to load, set default MAX_PLOT_SIZE to 62500; - e.printStackTrace(); - MAX_PLOT_SIZE = 62500; - } - } - - @Override - public boolean onCommand(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { - - if(!(sender instanceof Player)){ - sender.sendMessage("§cYou must be a Player to do this!"); - return true; - } - - Player p = (Player)sender; - int cmd; - - try{ - cmd = chosenCommand(args[0]); - }catch (Exception e){ - return false; - } - - if(cmd == -1){ - return false; - } - - if(!sender.hasPermission("suwupremeEssentials.plot")){ - sender.sendMessage("§cYou dont have the nessecary Permissions to use Plots"); - return true; - } - - //fetching Player that will be added to the region - Player p2 = null; - if(cmd == 6 || cmd == 7){ - - try { - p2 = Bukkit.getPlayer(args[1]); - if(p2 == null)throw new Exception("§cPlayer " + args[1] + " not found! Player has to be online"); - - }catch (Exception e){ - p.sendMessage(e.getMessage()); - return true; - } - } - - - try { - switch (cmd) { - case 1 -> setPosition(p, 1); - case 2 -> setPosition(p, 2); - case 3 -> claimPlot(p); - case 4 -> unclaimPLot(p); - case 5 -> info(p, p.getWorld(), p.getLocation()); - case 6 -> addMember(p, p2); - case 7 -> removeMember(p, p2); - default -> { - return false; - } - } - - }catch (Exception e){ - e.printStackTrace(); - return true; - } - - return true; - } - - private void setPosition(Player p, Integer posNumber){ - - BlockVector playerPos = p.getLocation().toVector().toBlockVector(); - PlayerSelection sel = PlayerSelection.getfromQeue(p); - - //if player hasnt already started a selection - if(sel == null){ - - sel = new PlayerSelection( - p.getUniqueId().toString(), - posNumber == 1 ? playerPos : null, - posNumber == 2 ? playerPos : null - ); - }else{ - - if (posNumber == 1) { - sel.setPos1(playerPos); - } else { - sel.setPos2(playerPos); - } - } - - - selectionsQeue.add(sel); - - p.sendMessage("§aPos " + posNumber + " set."); - } - - private void claimPlot(Player p){ - - PlayerSelection sel = PlayerSelection.getfromQeue(p); - - if(sel == null){ - p.sendMessage("§cMake a Selection first using /plot [pos1,pos2]"); - return; - }else{ - - if(sel.getPos1() == null){ - p.sendMessage("§cPosition 1 is missing. Use /plot pos1"); - return; - }else if(sel.getPos2() == null){ - p.sendMessage("§cPosition 2 is missing. Use /plot pos2"); - return; - } - } - - RegionManager regionManager = getRegionManager(p.getWorld()); - - //Region Bounds - Expands Vertically to Build limits. (make configurable?) - BlockVector3 corner1 = BlockVector3.at( - sel.getPos1().getBlockX(), - p.getWorld().getMaxHeight(), - sel.getPos1().getBlockZ() - ); - BlockVector3 corner2 = BlockVector3.at( - sel.getPos2().getBlockX(), - p.getWorld().getMinHeight(), - sel.getPos2().getBlockZ() - ); - - //creates Plot - ProtectedRegion newRegion = new ProtectedCuboidRegion(p.getName() + "'s_Plot", corner1, corner2); - - //convert Regions Map to List of ProtectedRegions - List<ProtectedRegion> otherRegions = new ArrayList<>(regionManager.getRegions().values()); - - //Checks for any intersecting regions - List<String> overlappingRegions = new LinkedList<>(); - newRegion.getIntersectingRegions(otherRegions).forEach(i -> { - overlappingRegions.add(i.getId()); - }); - - if(overlappingRegions.size() > 0){ - p.sendMessage("§cYour Plot is overlapping with " + overlappingRegions); - return; - } - - if(getRegionSize(newRegion) > MAX_PLOT_SIZE){ - p.sendMessage("§cYour Plot cannot exeed " + MAX_PLOT_SIZE + " Blocks in Size"); - return; - } - - - //adds Player to its newly created Plot as owner - DefaultDomain plotOwner = newRegion.getOwners(); - plotOwner.addPlayer(p.getUniqueId()); - newRegion.setOwners(plotOwner); - - regionManager.addRegion(newRegion); - - p.sendMessage("§aYour Plot from " + corner1 + " to " + corner2 + " is now protected!"); - - } - - private void unclaimPLot(Player p){ - - ProtectedRegion regionFromOwner = getRegionFromOwner(p, p.getLocation()); - - if(regionFromOwner != null){ - getRegionManager(p.getWorld()).removeRegion(regionFromOwner.getId()); - p.sendMessage("§aSuccessfully removed " + regionFromOwner.getId()); - return; - } - - p.sendMessage("§cCouldn't find a Plot that belongs to you here"); - } - - private void addMember(Player owner, Player newMember){ - - ProtectedRegion regionFromOwner = getRegionFromOwner(owner, owner.getLocation()); - - if(regionFromOwner != null){ - regionFromOwner.getMembers().addPlayer(newMember.getUniqueId()); - owner.sendMessage("§aAdded " + newMember.getName() + " to " + regionFromOwner.getId()); - return; - } - - owner.sendMessage("§cYou have to be standing in your Plot as Owner"); - } - - private void removeMember(Player owner, Player oldMember){ - - ProtectedRegion regionFromOwner = getRegionFromOwner(owner, owner.getLocation()); - - if(regionFromOwner != null){ - - if(regionFromOwner.getMembers().contains(oldMember.getUniqueId())){ - - regionFromOwner.getMembers().removePlayer(oldMember.getUniqueId()); - owner.sendMessage("§aSuccessfully removed Member " + oldMember.getName() + " from " + regionFromOwner.getId()); - return; - }else{ - owner.sendMessage("§c" + oldMember.getName() + " isn't Member of your PLot"); - } - - return; - } - - owner.sendMessage("§cYou have to be standing in your Plot as Owner"); - } - - private void info(Player p, World w, Location location){ - - ApplicableRegionSet regionAt = getRegionAt(w, location); - for (ProtectedRegion region : regionAt) { - p.sendMessage("§aYou are in " + region.getId() + ". It goes from " + region.getMinimumPoint() + " to " + region.getMaximumPoint()); - return; - } - - p.sendMessage("§cThere is currently no Plot at your Location"); - } - - //get all regions the player is Standing in - private ApplicableRegionSet getRegionAt(World w, Location location){ - - - BlockVector3 playerPos = BlockVector3.at( - location.getX(), - location.getY(), - location.getZ() - ); - - RegionManager regionManager = getRegionManager(w); - ApplicableRegionSet applicableRegions = regionManager.getApplicableRegions(playerPos); - - return applicableRegions; - } - - //returns the Region the player is standing in, if he is the owner. Otherwise null - private ProtectedRegion getRegionFromOwner(Player owner, Location location){ - ApplicableRegionSet region = getRegionAt(owner.getWorld(), location); - - for (ProtectedRegion protectedRegion : region) { - if (protectedRegion.getOwners().contains(owner.getUniqueId())) { - return protectedRegion; - } - } - - return null; - } - - private int chosenCommand(String arg){ - - for (int i = 0; i < cmds.length; i++) { - if(arg.equalsIgnoreCase(cmds[i]))return i + 1; - } - - return -1; - } - - private RegionManager getRegionManager(World w){ - RegionContainer regionContainer = WorldGuard.getInstance().getPlatform().getRegionContainer(); - return regionContainer.get(BukkitAdapter.adapt(w)); - } - - private int getRegionSize(ProtectedRegion region){ - BlockVector3 maximumPoint = region.getMaximumPoint(); - BlockVector3 minimumPoint = region.getMinimumPoint(); - - // Calculate the width and height of the rectangle - int width = Math.abs(minimumPoint.getBlockX() - maximumPoint.getBlockX()) + 1; - int height = Math.abs(minimumPoint.getBlockZ() - maximumPoint.getBlockZ()) + 1; - - // Calculate the area of the rectangle - int area = width * height; - - return area; - } - - public static ArrayList<PlayerSelection> getSelectionsQeue(){ - return selectionsQeue; - } - public static String[] getCmds(){ - return cmds; - } - -} diff --git a/src/main/java/Plots/PlotsTabComplete.java b/src/main/java/Plots/PlotsTabComplete.java deleted file mode 100644 index 559a3233291fe5db6dd0843721c54288ddb94626..0000000000000000000000000000000000000000 --- a/src/main/java/Plots/PlotsTabComplete.java +++ /dev/null @@ -1,52 +0,0 @@ -package Plots; - -import org.bukkit.Bukkit; -import org.bukkit.command.Command; -import org.bukkit.command.CommandSender; -import org.bukkit.command.TabCompleter; -import org.bukkit.entity.Player; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.LinkedList; -import java.util.List; - -public class PlotsTabComplete implements TabCompleter { - - @Nullable - @Override - public List<String> onTabComplete(@NotNull CommandSender sender, @NotNull Command command, @NotNull String label, @NotNull String[] args) { - - if(!(sender instanceof Player)){ - return null; - } - - String[] cmds = Plots.getCmds(); - - Player p = (Player)sender; - List<String> tabCompletePhrases = new LinkedList<>(); - - switch (args.length){ - case 0: - break; - case 1: - return Arrays.stream(cmds).toList(); - case 2: - - //players should be only listed when trying to add or remove member - if(!(args[1].equalsIgnoreCase(cmds[5]) || args[1].equalsIgnoreCase(cmds[6])))break; - - //adds all players to tab complete - Bukkit.getServer().getOnlinePlayers().forEach(player -> { - tabCompletePhrases.add(player.getName()); - }); - - break; - default: - } - - return tabCompletePhrases; - } -} diff --git a/src/main/java/fsi/pixelcampusessentials/PixelcampusEssentials.java b/src/main/java/fsi/pixelcampusessentials/PixelcampusEssentials.java deleted file mode 100644 index c5fc3690784a028d5f2ef5f2d8220895c6482cea..0000000000000000000000000000000000000000 --- a/src/main/java/fsi/pixelcampusessentials/PixelcampusEssentials.java +++ /dev/null @@ -1,36 +0,0 @@ -package fsi.pixelcampusessentials; - -import Plots.PlayerSelection; -import Plots.Plots; -import Plots.PlotsTabComplete; -import org.bukkit.plugin.java.JavaPlugin; - -public final class PixelcampusEssentials extends JavaPlugin { - - static private PixelcampusEssentials thisPlugin; - @Override - public void onEnable() { - - thisPlugin = this; - saveDefaultConfig(); - getConfig(); - - getServer().getPluginManager().registerEvents(new PlayerSelection(),this); - - try { - getCommand("plot").setExecutor(new Plots()); - getCommand("plot").setTabCompleter(new PlotsTabComplete()); - }catch (Exception e){ - e.printStackTrace(); - } - } - - @Override - public void onDisable() { - // Plugin shutdown logic - } - - public static PixelcampusEssentials getPlugin(){ - return thisPlugin; - } -} diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml deleted file mode 100644 index 4285431d35f4f4b51bccd69e89469b4d90a9c6d9..0000000000000000000000000000000000000000 --- a/src/main/resources/config.yml +++ /dev/null @@ -1,2 +0,0 @@ -maxPlotSize: - - 62500 \ No newline at end of file diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml deleted file mode 100644 index 794c5074f11cbaa8921a6e5361b59f1df62d7658..0000000000000000000000000000000000000000 --- a/src/main/resources/plugin.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: PixelcampusEssentials -version: '${project.version}' -main: fsi.pixelcampusessentials.PixelcampusEssentials -api-version: 1.20 -depend: [WorldGuard] -commands: - plot: - usage: '§c/plot [pos1,pos2,claim,unclaim,addmember,removemember,info]' - permission: pixelcampusEssentials.plot - permission-message: '§cYou dont have Permissions to use Plots' \ No newline at end of file