bukkit-api 0.0.1.pre.99

Sign up to get free protection for your applications and to get access to all the features.
Files changed (233) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +22 -0
  3. data/.travis.yml +46 -0
  4. data/Gemfile +8 -0
  5. data/LICENSE.txt +674 -0
  6. data/README.md +25 -0
  7. data/Rakefile +8 -0
  8. data/bukkit-api.gemspec +26 -0
  9. data/lib/bukkit.rb +23 -0
  10. data/lib/bukkit/achievement.rb +84 -0
  11. data/lib/bukkit/achievement/acquire_iron.rb +15 -0
  12. data/lib/bukkit/achievement/bake_cake.rb +15 -0
  13. data/lib/bukkit/achievement/bookcase.rb +15 -0
  14. data/lib/bukkit/achievement/breed_cow.rb +15 -0
  15. data/lib/bukkit/achievement/brew_potion.rb +15 -0
  16. data/lib/bukkit/achievement/build_better_pickaxe.rb +15 -0
  17. data/lib/bukkit/achievement/build_furnace.rb +15 -0
  18. data/lib/bukkit/achievement/build_hoe.rb +15 -0
  19. data/lib/bukkit/achievement/build_pickaxe.rb +15 -0
  20. data/lib/bukkit/achievement/build_sword.rb +15 -0
  21. data/lib/bukkit/achievement/build_workbench.rb +15 -0
  22. data/lib/bukkit/achievement/cook_fish.rb +15 -0
  23. data/lib/bukkit/achievement/diamonds_to_you.rb +15 -0
  24. data/lib/bukkit/achievement/enchantments.rb +15 -0
  25. data/lib/bukkit/achievement/end_portal.rb +15 -0
  26. data/lib/bukkit/achievement/explore_all_biomes.rb +15 -0
  27. data/lib/bukkit/achievement/fly_pig.rb +15 -0
  28. data/lib/bukkit/achievement/full_beacon.rb +15 -0
  29. data/lib/bukkit/achievement/get_blaze_rod.rb +15 -0
  30. data/lib/bukkit/achievement/get_diamonds.rb +15 -0
  31. data/lib/bukkit/achievement/ghast_return.rb +15 -0
  32. data/lib/bukkit/achievement/kill_cow.rb +15 -0
  33. data/lib/bukkit/achievement/kill_enemy.rb +15 -0
  34. data/lib/bukkit/achievement/kill_wither.rb +15 -0
  35. data/lib/bukkit/achievement/make_bread.rb +15 -0
  36. data/lib/bukkit/achievement/mine_wood.rb +15 -0
  37. data/lib/bukkit/achievement/nether_portal.rb +15 -0
  38. data/lib/bukkit/achievement/on_a_rail.rb +15 -0
  39. data/lib/bukkit/achievement/open_inventory.rb +12 -0
  40. data/lib/bukkit/achievement/overkill.rb +15 -0
  41. data/lib/bukkit/achievement/snipe_skeleton.rb +15 -0
  42. data/lib/bukkit/achievement/spawn_wither.rb +15 -0
  43. data/lib/bukkit/achievement/the_end.rb +15 -0
  44. data/lib/bukkit/art.rb +88 -0
  45. data/lib/bukkit/art/alban.rb +15 -0
  46. data/lib/bukkit/art/aztec.rb +15 -0
  47. data/lib/bukkit/art/aztec2.rb +15 -0
  48. data/lib/bukkit/art/bomb.rb +15 -0
  49. data/lib/bukkit/art/burningskull.rb +15 -0
  50. data/lib/bukkit/art/bust.rb +15 -0
  51. data/lib/bukkit/art/courbet.rb +15 -0
  52. data/lib/bukkit/art/creebet.rb +15 -0
  53. data/lib/bukkit/art/donkeykong.rb +15 -0
  54. data/lib/bukkit/art/fighters.rb +15 -0
  55. data/lib/bukkit/art/graham.rb +15 -0
  56. data/lib/bukkit/art/kebab.rb +15 -0
  57. data/lib/bukkit/art/match.rb +15 -0
  58. data/lib/bukkit/art/pigscene.rb +15 -0
  59. data/lib/bukkit/art/plant.rb +15 -0
  60. data/lib/bukkit/art/pointer.rb +15 -0
  61. data/lib/bukkit/art/pool.rb +15 -0
  62. data/lib/bukkit/art/sea.rb +15 -0
  63. data/lib/bukkit/art/skeleton.rb +15 -0
  64. data/lib/bukkit/art/skull_and_roses.rb +15 -0
  65. data/lib/bukkit/art/stage.rb +15 -0
  66. data/lib/bukkit/art/sunset.rb +15 -0
  67. data/lib/bukkit/art/void.rb +15 -0
  68. data/lib/bukkit/art/wanderer.rb +15 -0
  69. data/lib/bukkit/art/wasteland.rb +15 -0
  70. data/lib/bukkit/art/wither.rb +15 -0
  71. data/lib/bukkit/ban_entry.rb +33 -0
  72. data/lib/bukkit/ban_list.rb +58 -0
  73. data/lib/bukkit/block.rb +11 -0
  74. data/lib/bukkit/block/beacon.rb +11 -0
  75. data/lib/bukkit/block/biome.rb +11 -0
  76. data/lib/bukkit/block/block_face.rb +11 -0
  77. data/lib/bukkit/block/block_state.rb +11 -0
  78. data/lib/bukkit/block/brewing_stand.rb +11 -0
  79. data/lib/bukkit/block/chest.rb +11 -0
  80. data/lib/bukkit/block/command_block.rb +11 -0
  81. data/lib/bukkit/block/container_block.rb +11 -0
  82. data/lib/bukkit/block/creature_spawner.rb +11 -0
  83. data/lib/bukkit/block/dispenser.rb +11 -0
  84. data/lib/bukkit/block/double_chest.rb +11 -0
  85. data/lib/bukkit/block/dropper.rb +11 -0
  86. data/lib/bukkit/block/furnace.rb +11 -0
  87. data/lib/bukkit/block/hopper.rb +11 -0
  88. data/lib/bukkit/block/jukebox.rb +11 -0
  89. data/lib/bukkit/block/note_block.rb +11 -0
  90. data/lib/bukkit/block/piston_move_retraction.rb +11 -0
  91. data/lib/bukkit/block/sign.rb +11 -0
  92. data/lib/bukkit/block/skull.rb +11 -0
  93. data/lib/bukkit/block_change_delegate.rb +24 -0
  94. data/lib/bukkit/chat_color.rb +7 -0
  95. data/lib/bukkit/chunk.rb +7 -0
  96. data/lib/bukkit/chunk_snapshot.rb +7 -0
  97. data/lib/bukkit/coal_type.rb +7 -0
  98. data/lib/bukkit/color.rb +7 -0
  99. data/lib/bukkit/command.rb +11 -0
  100. data/lib/bukkit/command/block_command_sender.rb +11 -0
  101. data/lib/bukkit/command/command_exception.rb +11 -0
  102. data/lib/bukkit/command/command_map.rb +11 -0
  103. data/lib/bukkit/command/command_sender.rb +11 -0
  104. data/lib/bukkit/command/console_command_sender.rb +11 -0
  105. data/lib/bukkit/command/defaults.rb +15 -0
  106. data/lib/bukkit/command/defaults/achievement_command.rb +15 -0
  107. data/lib/bukkit/command/defaults/ban_command.rb +15 -0
  108. data/lib/bukkit/command/defaults/ban_ip_command.rb +15 -0
  109. data/lib/bukkit/command/defaults/ban_list_command.rb +15 -0
  110. data/lib/bukkit/command/defaults/bukkit_command.rb +15 -0
  111. data/lib/bukkit/command/defaults/clear_command.rb +15 -0
  112. data/lib/bukkit/command/defaults/default_game_mode_command.rb +15 -0
  113. data/lib/bukkit/command/defaults/deop_command.rb +15 -0
  114. data/lib/bukkit/command/defaults/difficulty_command.rb +15 -0
  115. data/lib/bukkit/command/defaults/effect_command.rb +15 -0
  116. data/lib/bukkit/command/defaults/enchant_command.rb +15 -0
  117. data/lib/bukkit/command/defaults/exp_command.rb +15 -0
  118. data/lib/bukkit/command/defaults/game_mode_command.rb +15 -0
  119. data/lib/bukkit/command/defaults/game_rule_command.rb +15 -0
  120. data/lib/bukkit/command/defaults/give_command.rb +15 -0
  121. data/lib/bukkit/command/defaults/help_command.rb +15 -0
  122. data/lib/bukkit/command/defaults/kick_command.rb +15 -0
  123. data/lib/bukkit/command/defaults/kill_command.rb +15 -0
  124. data/lib/bukkit/command/defaults/list_command.rb +15 -0
  125. data/lib/bukkit/command/defaults/me_command.rb +15 -0
  126. data/lib/bukkit/command/defaults/op_command.rb +15 -0
  127. data/lib/bukkit/command/defaults/pardon_command.rb +15 -0
  128. data/lib/bukkit/command/defaults/pardon_ip_command.rb +15 -0
  129. data/lib/bukkit/command/defaults/play_sound_command.rb +15 -0
  130. data/lib/bukkit/command/defaults/plugins_command.rb +15 -0
  131. data/lib/bukkit/command/defaults/reload_command.rb +15 -0
  132. data/lib/bukkit/command/defaults/save_command.rb +15 -0
  133. data/lib/bukkit/command/defaults/save_off_command.rb +15 -0
  134. data/lib/bukkit/command/defaults/say_command.rb +15 -0
  135. data/lib/bukkit/command/defaults/scoreboard_command.rb +15 -0
  136. data/lib/bukkit/command/defaults/seed_command.rb +15 -0
  137. data/lib/bukkit/command/defaults/set_idle_timeout_command.rb +15 -0
  138. data/lib/bukkit/command/defaults/set_world_spawn_command.rb +15 -0
  139. data/lib/bukkit/command/defaults/spawnpoint_command.rb +15 -0
  140. data/lib/bukkit/command/defaults/spread_players_command.rb +15 -0
  141. data/lib/bukkit/command/defaults/stop_command.rb +15 -0
  142. data/lib/bukkit/command/defaults/teleport_command.rb +15 -0
  143. data/lib/bukkit/command/defaults/tell_command.rb +15 -0
  144. data/lib/bukkit/command/defaults/test_for_command.rb +15 -0
  145. data/lib/bukkit/command/defaults/time_command.rb +15 -0
  146. data/lib/bukkit/command/defaults/timings_command.rb +15 -0
  147. data/lib/bukkit/command/defaults/toggle_downfall_command.rb +15 -0
  148. data/lib/bukkit/command/defaults/vanilla_command.rb +15 -0
  149. data/lib/bukkit/command/defaults/version_command.rb +15 -0
  150. data/lib/bukkit/command/defaults/weather_command.rb +15 -0
  151. data/lib/bukkit/command/defaults/whitelist_command.rb +15 -0
  152. data/lib/bukkit/command/formatted_command_alias.rb +11 -0
  153. data/lib/bukkit/command/multiple_command_alias.rb +11 -0
  154. data/lib/bukkit/command/plugin_command.rb +11 -0
  155. data/lib/bukkit/command/plugin_command_yaml_parser.rb +11 -0
  156. data/lib/bukkit/command/plugin_identifiable_command.rb +11 -0
  157. data/lib/bukkit/command/remote_console_command_sender.rb +11 -0
  158. data/lib/bukkit/command/simple_command_map.rb +11 -0
  159. data/lib/bukkit/command/tab_command_executor.rb +11 -0
  160. data/lib/bukkit/command/tab_completer.rb +11 -0
  161. data/lib/bukkit/command/tab_executor.rb +11 -0
  162. data/lib/bukkit/configuration.rb +11 -0
  163. data/lib/bukkit/configuration/configuration_options.rb +11 -0
  164. data/lib/bukkit/configuration/configuration_section.rb +11 -0
  165. data/lib/bukkit/configuration/file.rb +15 -0
  166. data/lib/bukkit/configuration/file/file_configuration.rb +15 -0
  167. data/lib/bukkit/configuration/file/file_configuration_options.rb +15 -0
  168. data/lib/bukkit/configuration/file/yaml_configuration.rb +15 -0
  169. data/lib/bukkit/configuration/file/yaml_configuration_options.rb +15 -0
  170. data/lib/bukkit/configuration/file/yaml_constructor.rb +15 -0
  171. data/lib/bukkit/configuration/file/yaml_representer.rb +15 -0
  172. data/lib/bukkit/configuration/invalid_configuration_exception.rb +11 -0
  173. data/lib/bukkit/configuration/memory_configuration.rb +11 -0
  174. data/lib/bukkit/configuration/memory_section.rb +11 -0
  175. data/lib/bukkit/configuration/serialization.rb +15 -0
  176. data/lib/bukkit/configuration/serialization/configuration_seriablization.rb +15 -0
  177. data/lib/bukkit/configuration/serialization/configuration_serializable.rb +15 -0
  178. data/lib/bukkit/configuration/serialization/delegate_deserialization.rb +15 -0
  179. data/lib/bukkit/configuration/serialization/serializable_as.rb +15 -0
  180. data/lib/bukkit/crop_state.rb +7 -0
  181. data/lib/bukkit/difficulty.rb +7 -0
  182. data/lib/bukkit/dye_color.rb +7 -0
  183. data/lib/bukkit/effect.rb +7 -0
  184. data/lib/bukkit/enchantment.rb +11 -0
  185. data/lib/bukkit/enchantments/enchantment_target.rb +11 -0
  186. data/lib/bukkit/enchantments/enchantment_wrapper.rb +11 -0
  187. data/lib/bukkit/entity_effect.rb +7 -0
  188. data/lib/bukkit/firework_effect.rb +7 -0
  189. data/lib/bukkit/game_mode.rb +7 -0
  190. data/lib/bukkit/game_species.rb +7 -0
  191. data/lib/bukkit/instrument.rb +7 -0
  192. data/lib/bukkit/location.rb +7 -0
  193. data/lib/bukkit/material.rb +7 -0
  194. data/lib/bukkit/nether_warts_state.rb +7 -0
  195. data/lib/bukkit/note.rb +7 -0
  196. data/lib/bukkit/offline_player.rb +7 -0
  197. data/lib/bukkit/plugin/messaging/plugin_message_recipient.rb +11 -0
  198. data/lib/bukkit/portal_type.rb +7 -0
  199. data/lib/bukkit/rotation.rb +7 -0
  200. data/lib/bukkit/sandstone_type.rb +7 -0
  201. data/lib/bukkit/server.rb +41 -0
  202. data/lib/bukkit/server/commands.rb +23 -0
  203. data/lib/bukkit/server/config.rb +20 -0
  204. data/lib/bukkit/server/info.rb +38 -0
  205. data/lib/bukkit/server/network.rb +58 -0
  206. data/lib/bukkit/server/players.rb +44 -0
  207. data/lib/bukkit/server/processing.rb +53 -0
  208. data/lib/bukkit/server/recipes.rb +23 -0
  209. data/lib/bukkit/server/whitelist.rb +23 -0
  210. data/lib/bukkit/server/world.rb +47 -0
  211. data/lib/bukkit/skull_type.rb +7 -0
  212. data/lib/bukkit/sound.rb +7 -0
  213. data/lib/bukkit/statistic.rb +7 -0
  214. data/lib/bukkit/travel_agent.rb +7 -0
  215. data/lib/bukkit/tree_species.rb +7 -0
  216. data/lib/bukkit/tree_type.rb +7 -0
  217. data/lib/bukkit/unsafe_values.rb +7 -0
  218. data/lib/bukkit/utility.rb +7 -0
  219. data/lib/bukkit/version.rb +3 -0
  220. data/lib/bukkit/warning.rb +7 -0
  221. data/lib/bukkit/weather_type.rb +7 -0
  222. data/lib/bukkit/world.rb +7 -0
  223. data/lib/bukkit/world_creator.rb +7 -0
  224. data/lib/bukkit/world_type.rb +50 -0
  225. data/lib/bukkit/world_type/amplified.rb +15 -0
  226. data/lib/bukkit/world_type/flat.rb +15 -0
  227. data/lib/bukkit/world_type/large_biomes.rb +15 -0
  228. data/lib/bukkit/world_type/normal.rb +15 -0
  229. data/lib/bukkit/world_type/version_1_1.rb +15 -0
  230. data/spec/lib/achievement_spec.rb +383 -0
  231. data/spec/lib/art_spec.rb +566 -0
  232. data/spec/spec_helper.rb +17 -0
  233. metadata +336 -0
@@ -0,0 +1,7 @@
1
+ class Bukkit
2
+
3
+ class TreeSpecies
4
+
5
+ end
6
+
7
+ end
@@ -0,0 +1,7 @@
1
+ class Bukkit
2
+
3
+ class TreeType
4
+
5
+ end
6
+
7
+ end
@@ -0,0 +1,7 @@
1
+ class Bukkit
2
+
3
+ class UnsafeValues
4
+
5
+ end
6
+
7
+ end
@@ -0,0 +1,7 @@
1
+ class Bukkit
2
+
3
+ class Utility
4
+
5
+ end
6
+
7
+ end
@@ -0,0 +1,3 @@
1
+ class Bukkit
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,7 @@
1
+ class Bukkit
2
+
3
+ class Warning
4
+
5
+ end
6
+
7
+ end
@@ -0,0 +1,7 @@
1
+ class Bukkit
2
+
3
+ class WeatherType
4
+
5
+ end
6
+
7
+ end
@@ -0,0 +1,7 @@
1
+ class Bukkit
2
+
3
+ class World
4
+
5
+ end
6
+
7
+ end
@@ -0,0 +1,7 @@
1
+ class Bukkit
2
+
3
+ class WorldCreator
4
+
5
+ end
6
+
7
+ end
@@ -0,0 +1,50 @@
1
+ Dir[File.dirname(__FILE__) + '/world_type/**/*.rb'].each do |file|
2
+ load file
3
+ end
4
+
5
+ class Bukkit
6
+
7
+ class WorldType
8
+ attr_reader :name
9
+ alias_method :getName, :name
10
+
11
+ NORMAL = Normal
12
+ FLAT = Flat
13
+ VERSION_1_1 = Version11
14
+ LARGE_BIOMES = LargeBiomes
15
+ AMPLIFIED = Amplified
16
+
17
+ BY_NAME = {}
18
+
19
+ def initialize(name = self.to_s.upcase)
20
+ @name = name
21
+ self
22
+ end
23
+
24
+ class << self
25
+ def values
26
+ [
27
+ NORMAL,
28
+ FLAT,
29
+ VERSION_1_1,
30
+ LARGE_BIOMES,
31
+ AMPLIFIED
32
+ ]
33
+ end
34
+
35
+ def by_name(name)
36
+ BY_NAME[name]
37
+ end
38
+
39
+ alias_method :getByName, :by_name
40
+ end
41
+
42
+ begin
43
+ self.values.each do |type|
44
+ BY_NAME[type.name] = type
45
+ end
46
+ end
47
+
48
+ end
49
+
50
+ end
@@ -0,0 +1,15 @@
1
+ require_relative '../world_type'
2
+
3
+ class Bukkit
4
+
5
+ class WorldType
6
+
7
+ class Amplified < WorldType
8
+ def initialized
9
+ super 'AMPLIFIED'
10
+ end
11
+ end
12
+
13
+ end
14
+
15
+ end
@@ -0,0 +1,15 @@
1
+ require_relative '../world_type'
2
+
3
+ class Bukkit
4
+
5
+ class WorldType
6
+
7
+ class Flat < WorldType
8
+ def initialized
9
+ super 'FLAT'
10
+ end
11
+ end
12
+
13
+ end
14
+
15
+ end
@@ -0,0 +1,15 @@
1
+ require_relative '../world_type'
2
+
3
+ class Bukkit
4
+
5
+ class WorldType
6
+
7
+ class LargeBiomes < WorldType
8
+ def initialized
9
+ super 'LARGEBIOMES'
10
+ end
11
+ end
12
+
13
+ end
14
+
15
+ end
@@ -0,0 +1,15 @@
1
+ require_relative '../world_type'
2
+
3
+ class Bukkit
4
+
5
+ class WorldType
6
+
7
+ class Normal < WorldType
8
+ def initialized
9
+ super 'DEFAULT'
10
+ end
11
+ end
12
+
13
+ end
14
+
15
+ end
@@ -0,0 +1,15 @@
1
+ require_relative '../world_type'
2
+
3
+ class Bukkit
4
+
5
+ class WorldType
6
+
7
+ class Version11 < WorldType
8
+ def initialized
9
+ super 'DEFAULT_1_1'
10
+ end
11
+ end
12
+
13
+ end
14
+
15
+ end
@@ -0,0 +1,383 @@
1
+ require 'spec_helper'
2
+
3
+ describe Bukkit::Achievement do
4
+ before :each do
5
+ @achievement = Bukkit::Achievement
6
+ @initialized = @achievement.new
7
+ end
8
+
9
+ it do
10
+ expect(@achievement).to be
11
+ end
12
+
13
+ it do
14
+ expect(@achievement).to be_truthy
15
+ end
16
+
17
+ it do
18
+ expect(@achievement).to_not be_falsey
19
+ end
20
+
21
+ it do
22
+ expect(@achievement).to_not be_nil
23
+ end
24
+
25
+ it do
26
+ expect(@achievement).to be_a Class
27
+ end
28
+
29
+ context '#new' do
30
+ it do
31
+ expect(@initialized).to be
32
+ end
33
+
34
+ it do
35
+ expect(@initialized).to be_truthy
36
+ end
37
+
38
+ it do
39
+ expect(@initialized).to_not be_falsey
40
+ end
41
+
42
+ it do
43
+ expect(@initialized).to_not be_nil
44
+ end
45
+ end
46
+
47
+ context '#parent' do
48
+ context 'when no parent defined' do
49
+ before :each do
50
+ @parent = @initialized.parent
51
+ end
52
+
53
+ it do
54
+ expect(@parent).to_not be
55
+ end
56
+
57
+ it do
58
+ expect(@parent).to_not be_truthy
59
+ end
60
+
61
+ it do
62
+ expect(@parent).to be_falsey
63
+ end
64
+
65
+ it do
66
+ expect(@parent).to be_nil
67
+ end
68
+ end
69
+ end
70
+
71
+ context '#parent?' do
72
+ context 'when no parent defined' do
73
+ before :each do
74
+ @parent = @initialized.parent?
75
+ end
76
+
77
+ it do
78
+ expect(@parent).to_not be
79
+ end
80
+
81
+ it do
82
+ expect(@parent).to_not be_truthy
83
+ end
84
+
85
+ it do
86
+ expect(@parent).to be_falsey
87
+ end
88
+
89
+ it do
90
+ expect(@parent).to_not be_nil
91
+ end
92
+
93
+ it do
94
+ expect(@parent).to be false
95
+ end
96
+ end
97
+ end
98
+
99
+ context '#hasParent' do
100
+ before :each do
101
+ @java_alias = @initialized.hasParent
102
+ @ruby_origin = @initialized.parent?
103
+ end
104
+
105
+ it do
106
+ expect(@java_alias).to_not be_nil
107
+ end
108
+
109
+ it do
110
+ expect(@java_alias).to be @ruby_origin
111
+ end
112
+ end
113
+
114
+ context '#getParent' do
115
+ before :each do
116
+ @java_alias = @initialized.getParent
117
+ @ruby_origin = @initialized.parent
118
+ end
119
+
120
+ it do
121
+ expect(@java_alias).to be @ruby_origin
122
+ end
123
+ end
124
+ end
125
+
126
+ achievements = {
127
+ Bukkit::Achievement::OpenInventory => nil,
128
+ Bukkit::Achievement::MineWood => Bukkit::Achievement::OpenInventory,
129
+ Bukkit::Achievement::BuildWorkbench => Bukkit::Achievement::MineWood,
130
+ Bukkit::Achievement::BuildPickaxe => Bukkit::Achievement::BuildWorkbench,
131
+ Bukkit::Achievement::BuildFurnace => Bukkit::Achievement::BuildPickaxe,
132
+ Bukkit::Achievement::AcquireIron => Bukkit::Achievement::BuildFurnace,
133
+ Bukkit::Achievement::BuildHoe => Bukkit::Achievement::BuildWorkbench,
134
+ Bukkit::Achievement::MakeBread => Bukkit::Achievement::BuildHoe,
135
+ Bukkit::Achievement::BakeCake => Bukkit::Achievement::BuildHoe,
136
+ Bukkit::Achievement::BuildBetterPickaxe => Bukkit::Achievement::BuildPickaxe,
137
+ Bukkit::Achievement::CookFish => Bukkit::Achievement::BuildFurnace,
138
+ Bukkit::Achievement::OnARail => Bukkit::Achievement::AcquireIron,
139
+ Bukkit::Achievement::BuildSword => Bukkit::Achievement::BuildWorkbench,
140
+ Bukkit::Achievement::KillEnemy => Bukkit::Achievement::BuildSword,
141
+ Bukkit::Achievement::KillCow => Bukkit::Achievement::BuildSword,
142
+ Bukkit::Achievement::FlyPig => Bukkit::Achievement::KillCow,
143
+ Bukkit::Achievement::SnipeSkeleton => Bukkit::Achievement::KillEnemy,
144
+ Bukkit::Achievement::GetDiamonds => Bukkit::Achievement::AcquireIron,
145
+ Bukkit::Achievement::NetherPortal => Bukkit::Achievement::GetDiamonds,
146
+ Bukkit::Achievement::GhastReturn => Bukkit::Achievement::NetherPortal,
147
+ Bukkit::Achievement::GetBlazeRod => Bukkit::Achievement::NetherPortal,
148
+ Bukkit::Achievement::BrewPotion => Bukkit::Achievement::GetBlazeRod,
149
+ Bukkit::Achievement::EndPortal => Bukkit::Achievement::GetBlazeRod,
150
+ Bukkit::Achievement::TheEnd => Bukkit::Achievement::EndPortal,
151
+ Bukkit::Achievement::Enchantments => Bukkit::Achievement::GetDiamonds,
152
+ Bukkit::Achievement::Overkill => Bukkit::Achievement::Enchantments,
153
+ Bukkit::Achievement::Bookcase => Bukkit::Achievement::Enchantments,
154
+ Bukkit::Achievement::ExploreAllBiomes => Bukkit::Achievement::EndPortal,
155
+ Bukkit::Achievement::SpawnWither => Bukkit::Achievement::TheEnd,
156
+ Bukkit::Achievement::KillWither => Bukkit::Achievement::SpawnWither,
157
+ Bukkit::Achievement::FullBeacon => Bukkit::Achievement::KillWither,
158
+ Bukkit::Achievement::BreedCow => Bukkit::Achievement::KillCow,
159
+ Bukkit::Achievement::DiamondsToYou => Bukkit::Achievement::GetDiamonds
160
+ }
161
+
162
+ achievements.each do |achievement, parent|
163
+ describe achievement do
164
+ before :each do
165
+ @achievement = achievement
166
+ @initialized = @achievement.new
167
+ end
168
+
169
+ it do
170
+ expect(@achievement).to be
171
+ end
172
+
173
+ it do
174
+ expect(@achievement).to be_truthy
175
+ end
176
+
177
+ it do
178
+ expect(@achievement).to_not be_falsey
179
+ end
180
+
181
+ it do
182
+ expect(@achievement).to_not be_nil
183
+ end
184
+
185
+ it do
186
+ expect(@achievement.new).to be_a Bukkit::Achievement
187
+ end
188
+
189
+ context '#new' do
190
+ it do
191
+ expect(@initialized).to be
192
+ end
193
+
194
+ it do
195
+ expect(@initialized).to be_truthy
196
+ end
197
+
198
+ it do
199
+ expect(@initialized).to_not be_falsey
200
+ end
201
+
202
+ it do
203
+ expect(@initialized).to_not be_nil
204
+ end
205
+ end
206
+
207
+ context '#parent?' do
208
+ before :each do
209
+ @parent = @initialized.parent?
210
+ end
211
+
212
+ it do
213
+ expect(@parent).to_not be_nil
214
+ end
215
+
216
+ if parent == nil
217
+ it do
218
+ expect(@parent).to_not be
219
+ end
220
+
221
+ it do
222
+ expect(@parent).to_not be_truthy
223
+ end
224
+
225
+ it do
226
+ expect(@parent).to be_falsey
227
+ end
228
+
229
+ it do
230
+ expect(@parent).to be false
231
+ end
232
+ else
233
+ it do
234
+ expect(@parent).to be
235
+ end
236
+
237
+ it do
238
+ expect(@parent).to be_truthy
239
+ end
240
+
241
+ it do
242
+ expect(@parent).to_not be_falsey
243
+ end
244
+
245
+ it do
246
+ expect(@parent).to be true
247
+ end
248
+ end
249
+ end
250
+
251
+ context '#hasParent' do
252
+ before :each do
253
+ @parent = @initialized.hasParent
254
+ end
255
+
256
+ it do
257
+ expect(@parent).to_not be_nil
258
+ end
259
+
260
+ if parent == nil
261
+ it do
262
+ expect(@parent).to_not be
263
+ end
264
+
265
+ it do
266
+ expect(@parent).to_not be_truthy
267
+ end
268
+
269
+ it do
270
+ expect(@parent).to be_falsey
271
+ end
272
+
273
+ it do
274
+ expect(@parent).to be false
275
+ end
276
+ else
277
+ it do
278
+ expect(@parent).to be
279
+ end
280
+
281
+ it do
282
+ expect(@parent).to be_truthy
283
+ end
284
+
285
+ it do
286
+ expect(@parent).to_not be_falsey
287
+ end
288
+
289
+ it do
290
+ expect(@parent).to be true
291
+ end
292
+ end
293
+ end
294
+
295
+ context '#parent' do
296
+ before :each do
297
+ @parent = @initialized.parent
298
+ end
299
+
300
+ if parent == nil
301
+ it do
302
+ expect(@parent).to_not be
303
+ end
304
+
305
+ it do
306
+ expect(@parent).to_not be_truthy
307
+ end
308
+
309
+ it do
310
+ expect(@parent).to be_falsey
311
+ end
312
+
313
+ it do
314
+ expect(@parent).to be_nil
315
+ end
316
+ else
317
+ it do
318
+ expect(@parent).to be
319
+ end
320
+
321
+ it do
322
+ expect(@parent).to be_truthy
323
+ end
324
+
325
+ it do
326
+ expect(@parent).to_not be_falsey
327
+ end
328
+
329
+ it do
330
+ expect(@parent).to_not be_nil
331
+ end
332
+
333
+ it do
334
+ expect(@parent).to be parent
335
+ end
336
+ end
337
+ end
338
+
339
+ context '#getParent' do
340
+ before :each do
341
+ @parent = @initialized.getParent
342
+ end
343
+
344
+ if parent == nil
345
+ it do
346
+ expect(@parent).to_not be
347
+ end
348
+
349
+ it do
350
+ expect(@parent).to_not be_truthy
351
+ end
352
+
353
+ it do
354
+ expect(@parent).to be_falsey
355
+ end
356
+
357
+ it do
358
+ expect(@parent).to be_nil
359
+ end
360
+ else
361
+ it do
362
+ expect(@parent).to be
363
+ end
364
+
365
+ it do
366
+ expect(@parent).to be_truthy
367
+ end
368
+
369
+ it do
370
+ expect(@parent).to_not be_falsey
371
+ end
372
+
373
+ it do
374
+ expect(@parent).to_not be_nil
375
+ end
376
+
377
+ it do
378
+ expect(@parent).to be parent
379
+ end
380
+ end
381
+ end
382
+ end
383
+ end