Skip to content

Commit 3070ef0

Browse files
committed
Initial library commit.
0 parents  commit 3070ef0

File tree

5 files changed

+925
-0
lines changed

5 files changed

+925
-0
lines changed

.gitignore

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
### Others ###
2+
*.cmd
3+
*.sh
4+
*.prefs
5+
6+
### Maven ###
7+
/mvn
8+
/target/lib
9+
/target/maven-archiver
10+
/target/classes
11+
/target/maven-status
12+
pom.xml.tag
13+
pom.xml.releaseBackup
14+
pom.xml.versionsBackup
15+
pom.xml.next
16+
release.properties
17+
dependency-reduced-pom.xml
18+
buildNumber.properties
19+
.mvn/timing.properties
20+
out/
21+
22+
23+
### Java ###
24+
*.class
25+
26+
# Mobile Tools for Java (J2ME)
27+
.mtj.tmp/
28+
29+
# Package Files #
30+
*.war
31+
*.ear
32+
33+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
34+
hs_err_pid*
35+
36+
37+
### Intellij ###
38+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
39+
40+
*.iml
41+
42+
## Directory-based project format:
43+
.idea/
44+
# if you remove the above rule, at least ignore the following:
45+
46+
# User-specific stuff:
47+
.idea/workspace.xml
48+
.idea/tasks.xml
49+
.idea/dictionaries
50+
.idea/shelf
51+
52+
# Sensitive or high-churn files:
53+
.idea/dataSources.ids
54+
.idea/dataSources.xml
55+
.idea/sqlDataSources.xml
56+
.idea/dynamic.xml
57+
.idea/uiDesigner.xml
58+
59+
# Gradle:
60+
.idea/gradle.xml
61+
.idea/libraries
62+
.gradle
63+
64+
# Mongo Explorer plugin:
65+
# .idea/mongoSettings.xml
66+
67+
## File-based project format:
68+
*.ipr
69+
*.iws
70+
71+
## Plugin-specific files:
72+
73+
# IntelliJ
74+
/out/
75+
76+
# mpeltonen/sbt-idea plugin
77+
.idea_modules/
78+
79+
# JIRA plugin
80+
atlassian-ide-plugin.xml
81+
82+
# Crashlytics plugin (for Android Studio and IntelliJ)
83+
com_crashlytics_export_strings.xml
84+
crashlytics.properties
85+
crashlytics-build.properties
86+
fabric.properties
87+
88+
89+
### Eclipse ###
90+
*.pydevproject
91+
.metadata
92+
bin/
93+
tmp/
94+
*.tmp
95+
*.bak
96+
*.swp
97+
*~.nib
98+
local.properties
99+
.settings/
100+
.loadpath
101+
102+
# Eclipse Core
103+
.project
104+
105+
# External tool builders
106+
.externalToolBuilders/
107+
108+
# Locally stored "Eclipse launch configurations"
109+
*.launch
110+
111+
# CDT-specific
112+
.cproject
113+
114+
# JDT-specific (Eclipse Java Development Tools)
115+
.classpath
116+
117+
# Java annotation processor (APT)
118+
.factorypath
119+
120+
# PDT-specific
121+
.buildpath
122+
123+
# sbteclipse plugin
124+
.target
125+
126+
# TeXlipse plugin
127+
.texlipse
128+
129+
# STS (Spring Tool Suite)
130+
.springBeans
131+
/target/
132+
checkstyle.xml
133+
classes/
134+
/.DS_Store
135+
136+
# each moddule gitignore
137+
/*/target/*

README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Panel Utils
2+
This repository contains a frequently used methods in BentoBox addons that I create.
3+
4+
### Main PanelUtils class contains methods:
5+
6+
```
7+
/**
8+
* This method sets blocks with given Material around Panel with given row count.
9+
* @param panelBuilder object that builds Panel.
10+
* @param rowCount in Panel.
11+
* @param material that will be around Panel.
12+
*/
13+
PanelUtils#fillBorder(PanelBuilder panelBuilder, int rowCount, Material material)
14+
15+
/**
16+
* This method transforms entity into player head with skin that corresponds given
17+
* entity. If entity head is not found, then it is replaced by barrier block.
18+
* @param entity which head must be returned.
19+
* @param amount of ItemStack elements.
20+
* @return ItemStack that may be head for given entity.
21+
*/
22+
PanelUtils#getEntityHead(EntityType entity, int amount)
23+
24+
/**
25+
* This method transforms entity into egg or block that corresponds given entity.
26+
* If entity egg is not found, then it is replaced by block that represents entity or
27+
* barrier block.
28+
* @param entity which egg must be returned.
29+
* @param amount of ItemStack elements.
30+
* @return ItemStack that may be egg for given entity.
31+
*/
32+
PanelUtils#getEntityEgg(EntityType entity, int amount)
33+
34+
/**
35+
* This method transforms material into item stack that can be displayed in users
36+
* inventory, as not all materials can be displayed.
37+
* @param material which item stack must be returned.
38+
* @param amount of ItemStack elements.
39+
* @return ItemStack that represents given material.
40+
*/
41+
PanelUtils#getMaterialItem(Material material, int amount)
42+
```
43+
44+
### Main MobHeadContainer method:
45+
46+
```
47+
/**
48+
* Returns an ItemStack of the custom head.
49+
*
50+
* @param amount of items in the stack
51+
* @param displayName the name to display. Supports "&" color codes
52+
* @param loreLines optional lore lines. Supports "&" color codes
53+
* @return an ItemStack of the custom head.
54+
*/
55+
MobHeadContainer#toItemStack(int amount, String displayName, String... loreLines)
56+
```

pom.xml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>lv.id.bonne</groupId>
8+
<version>1.0.0</version>
9+
<artifactId>panelutils</artifactId>
10+
11+
<repositories>
12+
<!-- Spigot Repo -->
13+
<repository>
14+
<id>spigot-repo</id>
15+
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots</url>
16+
</repository>
17+
<!-- CodeMC Repo for BentoBox -->
18+
<repository>
19+
<id>codemc-repo</id>
20+
<url>https://repo.codemc.io/repository/maven-public</url>
21+
</repository>
22+
<!-- Minecraft Lib Repo -->
23+
<repository>
24+
<id>minecraft-repo</id>
25+
<url>https://libraries.minecraft.net/</url>
26+
</repository>
27+
<!-- GitHub Lib Repo -->
28+
<repository>
29+
<id>github</id>
30+
<name>GitHub BONNe Apache Maven Packages</name>
31+
<url>https://maven.pkg.github.com/BONNePlayground/PanelUtils</url>
32+
</repository>
33+
</repositories>
34+
35+
<distributionManagement>
36+
<repository>
37+
<id>github</id>
38+
<url>https://maven.pkg.github.com/BONNePlayground/PanelUtils</url>
39+
</repository>
40+
</distributionManagement>
41+
42+
<properties>
43+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
44+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
45+
<java.version>16</java.version>
46+
<spigot.version>1.17-R0.1-SNAPSHOT</spigot.version>
47+
<bentobox.version>1.17.0</bentobox.version>
48+
<auth.version>1.5.21</auth.version>
49+
<annotations.version>22.0.0</annotations.version>
50+
</properties>
51+
52+
<dependencies>
53+
<!-- Spigot API -->
54+
<dependency>
55+
<groupId>org.spigotmc</groupId>
56+
<artifactId>spigot-api</artifactId>
57+
<version>${spigot.version}</version>
58+
<scope>provided</scope>
59+
</dependency>
60+
<!-- BentoBox dependencies. -->
61+
<dependency>
62+
<groupId>world.bentobox</groupId>
63+
<artifactId>bentobox</artifactId>
64+
<version>${bentobox.version}</version>
65+
<scope>provided</scope>
66+
</dependency>
67+
<!-- Mojang Auth -->
68+
<dependency>
69+
<groupId>com.mojang</groupId>
70+
<artifactId>authlib</artifactId>
71+
<version>${auth.version}</version>
72+
<scope>provided</scope>
73+
</dependency>
74+
<!-- Annotations -->
75+
<dependency>
76+
<groupId>org.jetbrains</groupId>
77+
<artifactId>annotations</artifactId>
78+
<version>${annotations.version}</version>
79+
<scope>provided</scope>
80+
</dependency>
81+
</dependencies>
82+
83+
<build>
84+
<finalName>${project.artifactId}</finalName>
85+
<plugins>
86+
<plugin>
87+
<groupId>org.apache.maven.plugins</groupId>
88+
<artifactId>maven-compiler-plugin</artifactId>
89+
<version>3.7.0</version>
90+
<configuration>
91+
<source>${java.version}</source>
92+
<target>${java.version}</target>
93+
</configuration>
94+
</plugin>
95+
<plugin>
96+
<groupId>org.apache.maven.plugins</groupId>
97+
<artifactId>maven-deploy-plugin</artifactId>
98+
<version>2.8.2</version>
99+
</plugin>
100+
<plugin>
101+
<groupId>org.apache.maven.plugins</groupId>
102+
<artifactId>maven-clean-plugin</artifactId>
103+
<version>3.1.0</version>
104+
</plugin>
105+
</plugins>
106+
</build>
107+
</project>

0 commit comments

Comments
 (0)