Skip to content

Beta-Release-0.1 (DELAY) #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 93 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# User-specific stuff
.idea/

*.iml
*.ipr
*.iws

# IntelliJ
out/

# Compiled class file
*.class

Expand All @@ -7,9 +17,6 @@
# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
Expand All @@ -21,4 +28,86 @@

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_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/
72 changes: 72 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?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>github.dave1610</groupId>
<artifactId>NomosCore</artifactId>
<version>0.0.1-testversion</version>
<packaging>jar</packaging>

<name>NomosCore</name>

<properties>
<java.version>21</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<defaultGoal>clean package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

<repositories>
<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>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.21.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
18 changes: 18 additions & 0 deletions src/main/java/github/dave1610/nomosCore/NomosCore.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package github.dave1610.nomosCore;

import github.dave1610.nomosCore.commands.AdminPanel;
import org.bukkit.plugin.java.JavaPlugin;

public final class NomosCore extends JavaPlugin {

@Override
public void onEnable() {
getCommand("adminpanel").setExecutor(new AdminPanel());

}

@Override
public void onDisable() {
// Plugin shutdown logic
}
}
33 changes: 33 additions & 0 deletions src/main/java/github/dave1610/nomosCore/commands/AdminPanel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
//Team-Only Command
//permission: nomoscore.adminpanel
package github.dave1610.nomosCore.commands;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.jetbrains.annotations.NotNull;

public class AdminPanel implements CommandExecutor {

@Override
public boolean onCommand(@NotNull CommandSender sender, @NotNull Command cmd, @NotNull String label, @NotNull String @NotNull [] args) {
if (!(sender instanceof Player)){
sender.sendMessage(ChatColor.RED + "Only players can use this command!");
return true;
}

if(!sender.hasPermission("nomoscore.adminpanel")) {
sender.sendMessage(ChatColor.RED + "You don't have permission to use this command!");
return true;
}

sender.sendMessage(ChatColor.GOLD + "" + ChatColor.BOLD + "NomosCore " + ChatColor.RESET + ChatColor.GRAY + "››" + ChatColor.RESET + ChatColor.RED + " The adminpanel is in development..");
//wenn fertig mit testen und plugin noch nicht fertig dann return true; wieder einfügen
return true;

//AdminPanel richtigen code ab hier hinzufügen und wenn fertig Zeile 26 und 27 löschen

}
}
15 changes: 15 additions & 0 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: NomosCore
version: '0.0.1-testversion'
main: github.dave1610.nomosCore.NomosCore
api-version: '1.21'
authors: [ Dave1610 ]
description: Ein Wirtschftssystem für einen Minecraft 1.21.4 Server
commands:
adminpanel:
aliases: ap
description: opens the adminpanel
permission: nomoscore.adminpanel

permissions:
nomoscore.adminpanel:
default: op