Skip to content

Commit 23925eb

Browse files
committed
version 1.0.0. added config file.
1 parent 22e0e88 commit 23925eb

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
# hsrails
2-
### high speed rails
2+
### High Speed Rails
33

4-
A spigot plugin to make rails great again.
4+
A spigot/bukkit plugin to make minecarts viable again.
55

66
Place a powered rail on a redstone block to build high speed rail.
7-
Default speed is 4x regular powered rails, ie. 32 m/s, or 115 km/h. This is as fast as rocket powered elytra flight.
7+
High speed rails are by default 4x faster than regular powered rails, ie. 32 m/s, or 115 km/h. This is as fast as rocket powered elytra flight.
88

9-
The high speed rail multiplier can be changed with the `/hsrails` command.
9+
The high speed rail multiplier can be temporarily changed with the `/hsrails` command, or permanently changed in the config.
1010

1111
![scrot](https://github.com/ergor/hsrails/blob/master/scrots/scrot.png)
1212

1313
## Usage
14-
Place a powered rail on a redstone block to make it a high speed rail. Place on any other block to get regular powered rail. When traveling at high speeds, a regular powered rail will quickly slow the cart down towards the stock 8 m/s speed. I recommend building your tracks with regular power rails before corners to prevent derailing, and then accelerate out of the turn with high speed rails.
14+
Place a powered rail on a redstone block to make it a high speed rail. Place on any other block to get regular powered rail. When traveling at high speeds, a regular powered rail will quickly slow the cart down towards the stock 8 m/s speed. I recommend building your tracks with regular powered rails before corners and slopes to prevent derailing, and then accelerate out of the turn with high speed rails.
1515

16-
Use `/hsrails <multiplier>` to tweak how fast high speed rails are. Multiplier must be between 0 and 50.
16+
Use `/hsrails <multiplier>` to tweak how fast high speed rails are.
17+
For permanent change, edit the config file `config.yml`.
18+
Multiplier must be between 0 and 50.
1719

1820
## Compiling
19-
`mvn package`
21+
This is a maven project made in intellij idea.
22+
To compile, simply run `mvn package`

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>st.netb.mc</groupId>
88
<artifactId>hsrails</artifactId>
9-
<version>0.1.1</version>
9+
<version>1.0.0</version>
1010

1111
<repositories>
1212
<repository>

src/main/java/st/netb/mc/hsrails/HsRails.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@
99

1010
public class HsRails extends JavaPlugin {
1111

12-
private static double speed_multiplier = 4.0d;
12+
private static double speed_multiplier;
1313

1414
public static double getMultiplier() {
1515
return speed_multiplier;
1616
}
1717

1818
@Override
1919
public void onEnable() {
20+
saveDefaultConfig(); // copies default file to data folder, will not override existing file
21+
getLogger().info("Reading config");
22+
speed_multiplier = getConfig().getDouble("speedMultiplier");
23+
2024
getLogger().info("Registering event listener");
2125
PluginManager pm = this.getServer().getPluginManager();
2226
pm.registerEvents(new MinecartListener(), this);

src/main/resources/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
speedMultiplier: 4.0

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: HsRails
2-
version: 0.1.1
2+
version: 1.0.0
33
main: st.netb.mc.hsrails.HsRails
44
commands:
55
hsrails:

0 commit comments

Comments
 (0)