Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyUltra committed May 1, 2023
1 parent 0a63f52 commit ccb06f2
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 10 deletions.
22 changes: 22 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) [2023] [Jiří Apjár]
Copyright (c) [2023] [Filip Zeman]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
110 changes: 110 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# ForestMOTD
![badge](https://img.shields.io/github/downloads/ForestTechMC/ForestMOTD/total)
![badge](https://img.shields.io/github/last-commit/ForestTechMC/ForestMOTD)
![badge](https://img.shields.io/badge/platform-spigot|bungee-lightgrey)
[![badge](https://img.shields.io/discord/896466173166747650?label=discord)](https://discord.gg/2PpdrfxhD4)
[![badge](https://img.shields.io/github/license/ForestTechMC/ForestMOTD)](https://github.com/ForestTechMC/ForestMOTD/blob/master/LICENSE.txt)

Plugin with config and API for your MOTD!

## Table of contents

* [Getting started](#getting-started)
* [Config](#config)
* [API Usage](#api-usage)
* [License](#license)

## Getting started

1. Turn off server
2. Add ForestSit into /plugins
3. Turn on server
4. And have fun!

### Config

Here you can see the configuration interface

<details>
<summary>Config</summary>

```yml
#
# ForestMOTD v1.0
#
# | If you find bug or you have an idea for an adjustment, please contact us on
# https://discord.com/invite/2PpdrfxhD4
#
# | %online% - Return number of players on server
# | %defaultMax% - Default server max server player size
# | %version% - Server version
# | %configPlayersMax% - Config player max number
#
# | Permission = forestMOTD.admin
#

#
# MOTD
#
# | Use ":n:" to do second line
# "maxPlayers: -1" - This will set default server number
#
motd:
maxPlayers: 69
# | 64x64 size icon
iconName: "server-icon.png"
text: "{#30FF5A>}&lForest{#7DFFC2<}&f&lMOTD:n:&rBest server in the Universe!"
#
# | If you want to use hover box on spigot, download ProtocolLib! (5.0.0+)
#
hoverBox:
- "&c❤ &a&lForest&7&lTech &c❤"
- " "
- " &aPlugins with &c❤"
- " "

#
# | Messages
#
message:
noPerm: "{#malachite>}&lForest{#bluestone<}&f&lMOTD &7You don't have sufficient permissions..."
reload: "{#malachite>}&lForest{#bluestone<}&f&lMOTD &7Config & Data reloaded..."
```
</details>
### API Usage
```java

// Only think you have to know if you want to change it on Spigot or Bungee
// BungeeForestMOTDAPI | SpigotForestMOTDAPI

public static void reloadData() {
Bungee.getInstance().getBungeeMOTDManager().loadData();
}

public static void changeMOTD(String motdText) {
Bungee.getInstance().getBungeeMOTDManager().setMotdText(motdText);
}

public static void changeIcon(String iconName) {
Bungee.getInstance().getBungeeMOTDManager().changeIconName(iconName);
}

public static void changeMaxPlayers(int maxPlayers) {
Bungee.getInstance().getBungeeMOTDManager().setMaxPlayers(maxPlayers);
}

public static void changeHoverBox(List<String> list) {
Bungee.getInstance().getBungeeMOTDManager().setHoverBox(list);
}


```





## License
ForestSit is licensed under the permissive MIT license. Please see [`LICENSE.txt`](https://github.com/ForestTechMC/ForestMOTD/blob/master/LICENSE.txt) for more information.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.example</groupId>
<artifactId>ForestMOTD</artifactId>
<version>1.0.1</version>
<version>1.0</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/me/flyultra/forestMotd/bungee/Bungee.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ public void onEnable() {
faviconLoader();

getLogger().info(" ");
getLogger().info(" ForestMOTD v1.0.1 | Enabled");
getLogger().info(" ForestMOTD v1.0 | Enabled");
getLogger().info(" ");
getLogger().info(" Author: Fly_Ultra");
getLogger().info(" Version: 1.0.1");
getLogger().info(" Version: 1.0");
getLogger().info(" Bungee");
getLogger().info(" ");
}
Expand All @@ -58,10 +58,10 @@ public void faviconLoader() {
@Override
public void onDisable() {
getLogger().warning(" ");
getLogger().warning(" ForestMOTD v1.0.1 | Disabled");
getLogger().warning(" ForestMOTD v1.0 | Disabled");
getLogger().warning(" ");
getLogger().warning(" Author: Fly_Ultra");
getLogger().warning(" Version: 1.0.1");
getLogger().warning(" Version: 1.0");
getLogger().warning(" Bungee");
getLogger().warning(" ");
}
Expand Down Expand Up @@ -187,7 +187,7 @@ public void registerCommands(Command... commands) {


public void bStats() {
int pluginId = 14541;
int pluginId = 0000;
Metrics metrics = new Metrics(this, pluginId);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/me/flyultra/forestMotd/spigot/Spigot.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void configSetup() {
/*-----------------------------------------------------------------------------*/

public void bStats() {
int pluginId = 15803;
int pluginId = 0000;
Metrics metrics = new Metrics(this, pluginId);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/bungee.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ForestMOTD
author: Fly_Ultra
version: 1.0.1
version: 1.0
main: me.flyultra.forestMotd.bungee.Bungee
database: false

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# ForestMOTD v1.0.1
# ForestMOTD v1.0
#
# | If you find bug or you have an idea for an adjustment, please contact us on
# https://discord.com/invite/2PpdrfxhD4
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ForestMOTD
author: Fly_Ultra
version: 1.0.1
version: 1.0
main: me.flyultra.forestMotd.spigot.Spigot
database: false
depend: [ProtocolLib]
Expand Down

0 comments on commit ccb06f2

Please sign in to comment.