Skip to content

Commit 9eb14a8

Browse files
Merge branch 'master' of https://github.com/desht/sensibletoolbox into newroot
2 parents 133f27e + b95fdc7 commit 9eb14a8

File tree

204 files changed

+27905
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+27905
-0
lines changed

.gitignore

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Eclipse stuff
2+
/.classpath
3+
/.project
4+
/.settings
5+
6+
# netbeans
7+
/nbproject
8+
9+
# we use maven!
10+
/build.xml
11+
12+
# maven
13+
/target
14+
15+
# vim
16+
.*.sw[a-p]
17+
18+
# various other potential build files
19+
/build
20+
/bin
21+
/dist
22+
/manifest.mf
23+
24+
# Mac filesystem dust
25+
/.DS_Store
26+
27+
# intellij
28+
*.iml
29+
*.ipr
30+
*.iws
31+
/.idea
32+

LICENSE

+674
Large diffs are not rendered by default.

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Sensible Toolbox
2+
3+
Sensible Toolbox - new blocks, items, machines, energy system and more!
4+
5+
## Installation and Usage
6+
7+
... TODO ...
8+
9+
## Building
10+
11+
If you want to build Sensible Toolbox yourself, you will need Maven.
12+
13+
1) ```git clone https://github.com/desht/sensibletoolbox.git```
14+
15+
2) ```cd sensibletoolbox```
16+
17+
3) ```mvn clean install```
18+
19+
This should give you a copy of SensibleToolbox.jar under the target/ directory.
20+
21+
## License
22+
23+
Sensible Toolbox by Des Herriott is licensed under the [Gnu GPL v3](http://www.gnu.org/licenses/gpl-3.0.html).

lib/plugins/LWC.jar

452 KB
Binary file not shown.

lib/plugins/PreciousStones.jar

985 KB
Binary file not shown.

pom.xml

+231
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>me.desht</groupId>
5+
<artifactId>sensibletoolbox</artifactId>
6+
<packaging>jar</packaging>
7+
<version>0.99.2-SNAPSHOT</version>
8+
<name>SensibleToolbox</name>
9+
<url>http://maven.apache.org</url>
10+
11+
<properties>
12+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13+
</properties>
14+
15+
<scm>
16+
<connection>scm:git:git://github.com/desht/${project.artifactId}.git</connection>
17+
<developerConnection>scm:git:[email protected]:desht/${project.artifactId}.git</developerConnection>
18+
<url>https://github.com/desht/${project.artifactId}</url>
19+
</scm>
20+
21+
<licenses>
22+
<license>
23+
<name>GNU GENERAL PUBLIC LICENSE - Version 3, June 2007</name>
24+
<url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
25+
<distribution>repo</distribution>
26+
</license>
27+
</licenses>
28+
29+
<repositories>
30+
<repository>
31+
<id>bukkit-repo</id>
32+
<url>http://repo.bukkit.org/content/groups/public</url>
33+
</repository>
34+
<repository>
35+
<id>Plugin Metrics</id>
36+
<url>http://repo.mcstats.org/content/repositories/public</url>
37+
</repository>
38+
<repository>
39+
<id>comphenix-rep</id>
40+
<name>Comphenix Repository</name>
41+
<url>http://repo.comphenix.net/content/groups/public</url>
42+
</repository>
43+
<repository>
44+
<id>hawkfalcon-repo</id>
45+
<name>Hawkfalcon Repository</name>
46+
<url>http://ci.hawkfalcon.com/plugin/repository/everything</url>
47+
</repository>
48+
<repository>
49+
<id>sk89q-maven</id>
50+
<url>http://maven.sk89q.com/repo</url>
51+
</repository>
52+
<repository>
53+
<id>OnARandomBox</id>
54+
<url>http://repo.onarandombox.com/content/repositories/multiverse</url>
55+
</repository>
56+
<repository>
57+
<id>njol-maven</id>
58+
<url>http://maven.njol.ch/repo</url>
59+
</repository>
60+
</repositories>
61+
62+
<dependencies>
63+
<dependency>
64+
<groupId>org.bukkit</groupId>
65+
<artifactId>bukkit</artifactId>
66+
<version>RELEASE</version>
67+
<type>jar</type>
68+
<scope>provided</scope>
69+
</dependency>
70+
<dependency>
71+
<groupId>me.desht</groupId>
72+
<artifactId>dhutils-lib</artifactId>
73+
<version>2.17.0-SNAPSHOT</version>
74+
<scope>compile</scope>
75+
</dependency>
76+
<dependency>
77+
<groupId>junit</groupId>
78+
<artifactId>junit</artifactId>
79+
<version>4.11</version>
80+
<scope>test</scope>
81+
</dependency>
82+
<dependency>
83+
<groupId>com.comphenix.protocol</groupId>
84+
<artifactId>ProtocolLib</artifactId>
85+
<version>3.2.0</version>
86+
<scope>provided</scope>
87+
</dependency>
88+
<dependency>
89+
<groupId>me.desht</groupId>
90+
<artifactId>landslide</artifactId>
91+
<version>1.5.0</version>
92+
<scope>provided</scope>
93+
</dependency>
94+
<dependency>
95+
<groupId>com.comphenix.attribute</groupId>
96+
<artifactId>AttributeStorage</artifactId>
97+
<version>0.0.2-SNAPSHOT</version>
98+
<scope>compile</scope>
99+
</dependency>
100+
<dependency>
101+
<groupId>com.dsh105</groupId>
102+
<artifactId>HoloAPI</artifactId>
103+
<version>1.2.4-SNAPSHOT</version>
104+
<scope>provided</scope>
105+
</dependency>
106+
<dependency>
107+
<groupId>org.mcstats.bukkit</groupId>
108+
<artifactId>metrics-lite</artifactId>
109+
<version>R7</version>
110+
</dependency>
111+
<dependency>
112+
<groupId>com.griefcraft.lwc</groupId>
113+
<artifactId>LWC</artifactId>
114+
<version>4.5.0-SNAPSHOT</version>
115+
<scope>system</scope>
116+
<systemPath>${project.basedir}/lib/plugins/LWC.jar</systemPath>
117+
</dependency>
118+
<dependency>
119+
<groupId>net.sacredlabyrinth.phaed</groupId>
120+
<artifactId>preciousstones</artifactId>
121+
<version>9.5.0</version>
122+
<scope>provided</scope>
123+
</dependency>
124+
<dependency>
125+
<groupId>com.sk89q</groupId>
126+
<artifactId>worldguard</artifactId>
127+
<version>6.0.0-SNAPSHOT</version>
128+
<scope>provided</scope>
129+
<exclusions>
130+
<exclusion>
131+
<groupId>org.bukkit</groupId>
132+
<artifactId>bukkit</artifactId>
133+
</exclusion>
134+
</exclusions>
135+
</dependency>
136+
<dependency>
137+
<groupId>com.onarandombox.multiversecore</groupId>
138+
<artifactId>Multiverse-Core</artifactId>
139+
<version>2.5</version>
140+
<scope>provided</scope>
141+
</dependency>
142+
</dependencies>
143+
144+
<build>
145+
<finalName>${project.name}</finalName>
146+
<plugins>
147+
<plugin>
148+
<groupId>org.apache.maven.plugins</groupId>
149+
<artifactId>maven-compiler-plugin</artifactId>
150+
<version>2.3.2</version>
151+
<configuration>
152+
<source>1.6</source>
153+
<target>1.6</target>
154+
</configuration>
155+
</plugin>
156+
<plugin>
157+
<groupId>org.apache.maven.plugins</groupId>
158+
<artifactId>maven-shade-plugin</artifactId>
159+
<version>1.5</version>
160+
<executions>
161+
<execution>
162+
<phase>package</phase>
163+
<goals>
164+
<goal>shade</goal>
165+
</goals>
166+
<configuration>
167+
<minimizeJar>true</minimizeJar>
168+
<relocations>
169+
<relocation>
170+
<pattern>me.desht.dhutils</pattern>
171+
<shadedPattern>me.desht.sensibletoolbox.dhutils</shadedPattern>
172+
</relocation>
173+
<relocation>
174+
<pattern>org.mcstats</pattern>
175+
<shadedPattern>me.desht.sensibletoolbox.mcstats</shadedPattern>
176+
</relocation>
177+
<relocation>
178+
<pattern>com.comphenix.attribute</pattern>
179+
<shadedPattern>me.desht.sensibletoolbox.attribute</shadedPattern>
180+
</relocation>
181+
</relocations>
182+
</configuration>
183+
</execution>
184+
</executions>
185+
</plugin>
186+
<plugin>
187+
<groupId>org.apache.maven.plugins</groupId>
188+
<artifactId>maven-javadoc-plugin</artifactId>
189+
<version>2.9.1</version>
190+
<configuration>
191+
<aggregate>true</aggregate>
192+
<show>protected</show>
193+
<nohelp>true</nohelp>
194+
<header>Sensible Toolbox, ${project.version}</header>
195+
<footer>Sensible Toolbox, ${project.version}</footer>
196+
<doctitle>Sensible Toolbox, ${project.version}</doctitle>
197+
<links>
198+
<link>http://static.springsource.org/spring/docs/3.0.x/javadoc-api/</link>
199+
<link>http://jd.bukkit.org/dev/apidocs/</link>
200+
</links>
201+
<subpackages>
202+
me.desht.sensibletoolbox.api:me.desht.sensibletoolbox.items:me.desht.sensibletoolbox.blocks
203+
</subpackages>
204+
</configuration>
205+
</plugin>
206+
<plugin>
207+
<groupId>org.apache.maven.plugins</groupId>
208+
<artifactId>maven-scm-publish-plugin</artifactId>
209+
<version>1.0-beta-2</version>
210+
<configuration>
211+
<checkoutDirectory>${project.build.directory}/scmpublish</checkoutDirectory>
212+
<checkinComment>Publishing javadoc for ${project.artifactId}:${project.version}</checkinComment>
213+
<content>${project.reporting.outputDirectory}/apidocs</content>
214+
<skipDeletedFiles>true</skipDeletedFiles>
215+
<pubScmUrl>scm:git:[email protected]:desht/sensibletoolbox.git</pubScmUrl>
216+
<scmBranch>gh-pages</scmBranch> <!-- branch with static site -->
217+
</configuration>
218+
</plugin>
219+
</plugins>
220+
<resources>
221+
<resource>
222+
<directory>${basedir}/src/main/resources</directory>
223+
<filtering>true</filtering>
224+
<includes>
225+
<include>plugin.yml</include>
226+
<include>config.yml</include>
227+
</includes>
228+
</resource>
229+
</resources>
230+
</build>
231+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package me.desht.sensibletoolbox;
2+
3+
import me.desht.dhutils.LogUtils;
4+
import me.desht.sensibletoolbox.api.AccessControl;
5+
import me.desht.sensibletoolbox.api.RedstoneBehaviour;
6+
7+
/**
8+
* Cache some frequently-access config values to reduce config lookup overhead
9+
*/
10+
public class ConfigCache {
11+
private final SensibleToolboxPlugin plugin;
12+
private RedstoneBehaviour defaultRedstone;
13+
private AccessControl defaultAccess;
14+
private boolean noisyMachines;
15+
private int particleLevel;
16+
private boolean creativeEnderAccess;
17+
18+
public ConfigCache(SensibleToolboxPlugin plugin) {
19+
this.plugin = plugin;
20+
}
21+
22+
public void processConfig() {
23+
try {
24+
defaultRedstone = RedstoneBehaviour.valueOf(plugin.getConfig().getString("default_redstone").toUpperCase());
25+
} catch (IllegalArgumentException e) {
26+
LogUtils.warning("bad value for default_redstone in config.yml: must be one of ignore,high,low,pulsed (defaulting to ignore)");
27+
defaultRedstone = RedstoneBehaviour.IGNORE;
28+
}
29+
try {
30+
defaultAccess = AccessControl.valueOf(plugin.getConfig().getString("default_access").toUpperCase());
31+
} catch (IllegalArgumentException e) {
32+
LogUtils.warning("bad value for default_access in config.yml: must be one of public,private,restricted (defaulting to public)");
33+
defaultAccess = AccessControl.PUBLIC;
34+
}
35+
noisyMachines = plugin.getConfig().getBoolean("noisy_machines");
36+
particleLevel = plugin.getConfig().getInt("particle_effects");
37+
creativeEnderAccess = plugin.getConfig().getBoolean("creative_ender_access");
38+
}
39+
40+
public RedstoneBehaviour getDefaultRedstone() {
41+
return defaultRedstone;
42+
}
43+
44+
void setDefaultRedstone(RedstoneBehaviour defaultRedstone) {
45+
this.defaultRedstone = defaultRedstone;
46+
}
47+
48+
public AccessControl getDefaultAccess() {
49+
return defaultAccess;
50+
}
51+
52+
void setDefaultAccess(AccessControl defaultAccess) {
53+
this.defaultAccess = defaultAccess;
54+
}
55+
56+
public boolean isNoisyMachines() {
57+
return noisyMachines;
58+
}
59+
60+
void setNoisyMachines(boolean noisyMachines) {
61+
this.noisyMachines = noisyMachines;
62+
}
63+
64+
public int getParticleLevel() {
65+
return particleLevel;
66+
}
67+
68+
void setParticleLevel(int particleLevel) {
69+
this.particleLevel = particleLevel;
70+
}
71+
72+
public boolean isCreativeEnderAccess() {
73+
return creativeEnderAccess;
74+
}
75+
76+
public void setCreativeEnderAccess(boolean creativeEnderAccess) {
77+
this.creativeEnderAccess = creativeEnderAccess;
78+
}
79+
}

0 commit comments

Comments
 (0)