mclib 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -6
- data/lib/mclib.rb +4 -4
- data/lib/mclib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0185a19716d4f6096667bcd990c8d2f979781ad
|
4
|
+
data.tar.gz: cee7281ca8d675c28f5b126e57aac71dcac99423
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bb953109c5c3421e94d42434afbfdb400c2a5fade9e4748e09d19594d9813adcae06f7bdb1b4f375050673063cf940e2a199edcdc276f50aa0713f0e605e4d6
|
7
|
+
data.tar.gz: ca431fbf3c21bbeb0ffdb1368622c8652ea9af5911179df2aded8ed319a4c3bc0240ffdf6e09703f04cda1c65c6d29a2e220e991c59e68586a8ccdaf7f0a4905
|
data/README.md
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# MClib
|
2
2
|
|
3
3
|
This library provides a Ruby API to vanilla minecraft by watching the log file and parsing the lines out into native objects and registering callbacks on server events such as login, chat, warnings and more.
|
4
4
|
|
5
|
+
## Supported Versions
|
6
|
+
* 1.7.9
|
7
|
+
|
5
8
|
## Installation
|
6
9
|
|
7
10
|
Add this line to your application's Gemfile:
|
@@ -44,14 +47,14 @@ Or install it yourself as:
|
|
44
47
|
|
45
48
|
You can also fetch the whitelist, ops, banned ips, and players as a hash using the MCLib module
|
46
49
|
|
47
|
-
MCLib::
|
48
|
-
MCLib::
|
49
|
-
MCLib::
|
50
|
-
MCLib::
|
50
|
+
MCLib::ops
|
51
|
+
MCLib::whitelist
|
52
|
+
MCLib::banned_ips
|
53
|
+
MCLib::banned_players
|
51
54
|
|
52
55
|
## Contributing
|
53
56
|
|
54
|
-
1. Fork it ( https://github.com/
|
57
|
+
1. Fork it ( https://github.com/C0deMaver1ck/mclib/fork )
|
55
58
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
56
59
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
57
60
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/mclib.rb
CHANGED
@@ -15,21 +15,21 @@ module MCLib
|
|
15
15
|
@@mc_dir
|
16
16
|
end
|
17
17
|
|
18
|
-
def self.
|
18
|
+
def self.ops
|
19
19
|
json = JSON.parse(File.open(@@mc_dir + 'ops.json').read)
|
20
20
|
json.collect { |user| user['name'] }
|
21
21
|
end
|
22
22
|
|
23
|
-
def self.
|
23
|
+
def self.whitelist
|
24
24
|
json = JSON.parse(File.open(@@mc_dir + 'whitelist.json').read)
|
25
25
|
json.collect { |user| user['name'] }
|
26
26
|
end
|
27
27
|
|
28
|
-
def self.
|
28
|
+
def self.banned_ips
|
29
29
|
JSON.parse(File.open(@@mc_dir + 'banned-ips.json').read)
|
30
30
|
end
|
31
31
|
|
32
|
-
def self.
|
32
|
+
def self.banned_players
|
33
33
|
JSON.parse(File.open(@@mc_dir + 'banned-players.json').read)
|
34
34
|
end
|
35
35
|
end
|
data/lib/mclib/version.rb
CHANGED