-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
142 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
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. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# ForestMOTD | ||
 | ||
 | ||
 | ||
[](https://discord.gg/2PpdrfxhD4) | ||
[](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. |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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