Skip to content

Commit

Permalink
- moved papi to external jar
Browse files Browse the repository at this point in the history
- readme update
  • Loading branch information
lmk02 committed Aug 13, 2019
1 parent 8fde918 commit b9f5a27
Show file tree
Hide file tree
Showing 19 changed files with 441 additions and 165 deletions.
183 changes: 182 additions & 1 deletion README.md
Expand Up @@ -112,4 +112,185 @@ Database:
Password: password

# End of configuration
```
```

## Arena setup

* Create an arena
* Use the **/bp create \<arenaName>**
* Replace \<arenaName> with the name of your arena
* Set the lobby spawn
* Place yourself where you want to have your lobby spawn. Use **/bp setspawn \<arenaName> lobby**
* Players get teleported to this position when they enter the lobby
* Set the boundaries of the arena floor
* Use **/bp pos <1|2>** to set the positions to your current positions. OR:
* Use **/bp wand** to get a stick to set the positions via left and right click
* Finally use **/bp setfloor \<arenaName>** to set the floor boundaries for you arena
* Set the game spawn
* Place yourself where you want to have your game spawn. Use **/bp setspawn \<arenaName> game**
* Players get teleported to this position when the game starts
* Enable your arena
* To be able to play in an arena you need to enable it first. Use **/bp enable \<arenaName>**

Thats it for the arena setup. To customize your arena, use ingame commands or head to the **\<arenaName>.yml** located in your `plugins/BlockParty/Arenas/` folder. Here you can find an example arena config:
<details>
<summary>Example arena config</summary>

```yaml
Settings:
DistanceToOutArea: 5
TimeToSearch: 8
LevelAmount: 15
MinPlayers: 2
MaxPlayers: 20
LobbyCountdown: 30
TimeReductionPerLevel: 0.5
TimeModifier: 0.1
Enabled: true
EnableParticles: true
EnableLightnings: true
AutoRestart: false
AutoKick: false
EnableBoosts: true
EnableFallingBlocks: false
UseAutoGeneratedFloors: true
UsePatternFloors: true
EnableActionbarInfo: true
UseNoteBlockSongs: false
UseWebSongs: true
EnableFireworksOnWin: true
TimerResetOnPlayerJoin: false
AllowJoinDuringGame: true
EnableScoreboard: false
Name: example
SongManager:
- examplesong.mp3
Signs: []
LobbySpawn:
World: world1.13
X: 119.96556415260845
Y: 64.0
Z: 26.73431969945681
Yaw: -57.567917
Pitch: 35.83339
GameSpawn:
World: world1.13
X: 126.06898491630506
Y: 63.0
Z: 30.055373974750374
Yaw: -57.567917
Pitch: 35.83339
Floor:
A:
World: world1.13
X: 124.0
Y: 62.0
Z: 28.0
Yaw: 0.0
Pitch: 0.0
B:
World: world1.13
X: 127.0
Y: 62.0
Z: 31.0
Yaw: 0.0
Pitch: 0.0
Patterns:
- exampleFloor
Width: 4.0
Length: 4.0
```

</details>

## Floor setup

In BlockParty we are using our own format to save block data. We are making use of the Run-length encoding to keep the file as small as possible. You can create your own floors, save and use them.

#### Creating your own floor

* Build a two dimensional pattern using terracotta, wool and/or glass (all blocks supported in > 1.13)
* Set the boundaries of pattern
* Use **/bp pos <1|2>** to set the positions to your current positions. OR:
* Use **/bp wand** to get a stick to set the positions via left and right click
* Save your pattern
* Finally use **/bp save \<patternName>** to save your pattern to the `/plugins/BlockParty/Floors/` folder

#### Add a floor to your arena

* Test your pattern
* This is optional but you may want to test your floor
* Use **/bp placepattern \<patternName>** to test it
* Activate UsePatternFloors
* Make sure you set `UsePatternFloors: true` in your arena config
* You can also add patterns in your arena config
* Reload with **/bp reload** if you have just changed a value
* Selecting an initial pattern
* If you name a pattern start it will load first
* Selecting the game over pattern
* If you name a pattern end it will load when the game is over

#### Remove a pattern

* List the active patterns
* Use **/bp listpatterns \<arenaName>** to list all active patterns for this arena
* Remove a paattern
* Use **/bp removepattern \<arenaName> \<patternName>** to list all active patterns for this arena

## Web player setup

This is a basic tutorial on how to set up the build in web player.

* Enable the web player
* Head over to the config.yml located in you `plugins/BlockParty/` folder
* Make sure to enable your enable the MusicServer
* Make sure to use jetty, other librarys are in development, and a non-blocked port
* Your section should look like this now:
```yaml
MusicServer:
# When "True", music playback in browser will be activated. You will need a web server for this
Enabled: True

# Available libraries: "websocket", "jetty", "tcp/ip", "mcjukebox"
WebSocketLibrary: jetty

# Web server port (Not Minecraft server port!)
Port: 8080
```
#### Adding songs

* Add songs to your web player songs folder
* Head over to `plugins/BlockParty/web/songs/`
* Place any songs here (e.g. example.mp3)
* Add songs to your arena
* Add them ingame by typing **/bp addsong \<arenaName> \<songName>**
* **Important:** Make sure to also include the file type. You command should look something like this: /bp addsong exampleArena example.mp3
* Add them to your arena config. The config section should look something like this:
```yaml
SongManager:
- examplesong.mp3
```
* Enable the use of web player songs
* Make sure `UseWebSongs: true` is set to true in your arena config

## Sign setup

You can also use signs to let players join to the arena. Your sign should look something like this:

| Line | Text |
|:----:|:------------:|
| 1 | [BlockParty] |
| 2 | \<arenaName> |
| 3 | |
| 4 | |

#### Customize your sign messages

Head over to your config.yml in the `plugins/BlockParty/` folder. You can edit the used text that is displayed on the sign right there.

## Permissions

* **blockparty.admin**
* This provides access to all BlockParty commands (/bp admin)
* **blockparty.user**
* This provides access to basic BlockParty commands (/bp help)
2 changes: 1 addition & 1 deletion api/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blockparty-parent</artifactId>
<groupId>de.leonkoth</groupId>
<version>2.0.3.1-RELEASE</version>
<version>2.0.3.2-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
15 changes: 2 additions & 13 deletions core/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blockparty-parent</artifactId>
<groupId>de.leonkoth</groupId>
<version>2.0.3.1-RELEASE</version>
<version>2.0.3.2-RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -35,21 +35,10 @@
<id>TimoCloud-API</id>
<url>https://maven.timo.cloud/repository/TimoCloud-API/</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>http://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
</repositories>

<dependencies>

<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.10.3</version>
<scope>provided</scope>
</dependency>


<!--Spigot API-->
<dependency>
<groupId>org.spigotmc</groupId>
Expand Down
7 changes: 0 additions & 7 deletions core/src/main/java/de/leonkoth/blockparty/BlockParty.java
Expand Up @@ -11,7 +11,6 @@
import de.leonkoth.blockparty.listener.*;
import de.leonkoth.blockparty.locale.BlockPartyLocale;
import de.leonkoth.blockparty.player.PlayerInfo;
import de.leonkoth.blockparty.util.BlockPartyExpansion;
import de.leonkoth.blockparty.util.DefaultManager;
import de.leonkoth.blockparty.version.BlockInfo;
import de.leonkoth.blockparty.version.IBlockPlacer;
Expand Down Expand Up @@ -176,12 +175,6 @@ public void start() {

// Init commands
new BlockPartyCommand(this);

if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) {
if(new BlockPartyExpansion(this).register()){
Bukkit.getConsoleSender().sendMessage("[BlockParty] Successfully loaded BlockPartyExpansion for the PlaceholderAPI");
}
}
}

public void stop() {
Expand Down

This file was deleted.

Expand Up @@ -11,12 +11,10 @@
public class DefaultManager {

public static void copyAll() {
copy("Songs/LetItGo.nbs");
copy("Songs/ZeldaTheme.nbs");
copy("Songs/readme.md");
copy("Floors/start.floor");
copy("Floors/example.floor");
copy("web/index.html");
//copy("web/songs/Vincent_Augustus_-_woah.mp3");
copy("web/songs/readme.md");
copy("web/bootstrap/css/bootstrap.css");
copy("web/bootstrap/js/bootstrap.js");
Expand Down
Binary file removed core/src/main/resources/Songs/LetItGo.nbs
Binary file not shown.
Binary file removed core/src/main/resources/Songs/ZeldaTheme.nbs
Binary file not shown.

0 comments on commit b9f5a27

Please sign in to comment.