bukkit-api 0.0.1.pre.99
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +22 -0
- data/.travis.yml +46 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +674 -0
- data/README.md +25 -0
- data/Rakefile +8 -0
- data/bukkit-api.gemspec +26 -0
- data/lib/bukkit.rb +23 -0
- data/lib/bukkit/achievement.rb +84 -0
- data/lib/bukkit/achievement/acquire_iron.rb +15 -0
- data/lib/bukkit/achievement/bake_cake.rb +15 -0
- data/lib/bukkit/achievement/bookcase.rb +15 -0
- data/lib/bukkit/achievement/breed_cow.rb +15 -0
- data/lib/bukkit/achievement/brew_potion.rb +15 -0
- data/lib/bukkit/achievement/build_better_pickaxe.rb +15 -0
- data/lib/bukkit/achievement/build_furnace.rb +15 -0
- data/lib/bukkit/achievement/build_hoe.rb +15 -0
- data/lib/bukkit/achievement/build_pickaxe.rb +15 -0
- data/lib/bukkit/achievement/build_sword.rb +15 -0
- data/lib/bukkit/achievement/build_workbench.rb +15 -0
- data/lib/bukkit/achievement/cook_fish.rb +15 -0
- data/lib/bukkit/achievement/diamonds_to_you.rb +15 -0
- data/lib/bukkit/achievement/enchantments.rb +15 -0
- data/lib/bukkit/achievement/end_portal.rb +15 -0
- data/lib/bukkit/achievement/explore_all_biomes.rb +15 -0
- data/lib/bukkit/achievement/fly_pig.rb +15 -0
- data/lib/bukkit/achievement/full_beacon.rb +15 -0
- data/lib/bukkit/achievement/get_blaze_rod.rb +15 -0
- data/lib/bukkit/achievement/get_diamonds.rb +15 -0
- data/lib/bukkit/achievement/ghast_return.rb +15 -0
- data/lib/bukkit/achievement/kill_cow.rb +15 -0
- data/lib/bukkit/achievement/kill_enemy.rb +15 -0
- data/lib/bukkit/achievement/kill_wither.rb +15 -0
- data/lib/bukkit/achievement/make_bread.rb +15 -0
- data/lib/bukkit/achievement/mine_wood.rb +15 -0
- data/lib/bukkit/achievement/nether_portal.rb +15 -0
- data/lib/bukkit/achievement/on_a_rail.rb +15 -0
- data/lib/bukkit/achievement/open_inventory.rb +12 -0
- data/lib/bukkit/achievement/overkill.rb +15 -0
- data/lib/bukkit/achievement/snipe_skeleton.rb +15 -0
- data/lib/bukkit/achievement/spawn_wither.rb +15 -0
- data/lib/bukkit/achievement/the_end.rb +15 -0
- data/lib/bukkit/art.rb +88 -0
- data/lib/bukkit/art/alban.rb +15 -0
- data/lib/bukkit/art/aztec.rb +15 -0
- data/lib/bukkit/art/aztec2.rb +15 -0
- data/lib/bukkit/art/bomb.rb +15 -0
- data/lib/bukkit/art/burningskull.rb +15 -0
- data/lib/bukkit/art/bust.rb +15 -0
- data/lib/bukkit/art/courbet.rb +15 -0
- data/lib/bukkit/art/creebet.rb +15 -0
- data/lib/bukkit/art/donkeykong.rb +15 -0
- data/lib/bukkit/art/fighters.rb +15 -0
- data/lib/bukkit/art/graham.rb +15 -0
- data/lib/bukkit/art/kebab.rb +15 -0
- data/lib/bukkit/art/match.rb +15 -0
- data/lib/bukkit/art/pigscene.rb +15 -0
- data/lib/bukkit/art/plant.rb +15 -0
- data/lib/bukkit/art/pointer.rb +15 -0
- data/lib/bukkit/art/pool.rb +15 -0
- data/lib/bukkit/art/sea.rb +15 -0
- data/lib/bukkit/art/skeleton.rb +15 -0
- data/lib/bukkit/art/skull_and_roses.rb +15 -0
- data/lib/bukkit/art/stage.rb +15 -0
- data/lib/bukkit/art/sunset.rb +15 -0
- data/lib/bukkit/art/void.rb +15 -0
- data/lib/bukkit/art/wanderer.rb +15 -0
- data/lib/bukkit/art/wasteland.rb +15 -0
- data/lib/bukkit/art/wither.rb +15 -0
- data/lib/bukkit/ban_entry.rb +33 -0
- data/lib/bukkit/ban_list.rb +58 -0
- data/lib/bukkit/block.rb +11 -0
- data/lib/bukkit/block/beacon.rb +11 -0
- data/lib/bukkit/block/biome.rb +11 -0
- data/lib/bukkit/block/block_face.rb +11 -0
- data/lib/bukkit/block/block_state.rb +11 -0
- data/lib/bukkit/block/brewing_stand.rb +11 -0
- data/lib/bukkit/block/chest.rb +11 -0
- data/lib/bukkit/block/command_block.rb +11 -0
- data/lib/bukkit/block/container_block.rb +11 -0
- data/lib/bukkit/block/creature_spawner.rb +11 -0
- data/lib/bukkit/block/dispenser.rb +11 -0
- data/lib/bukkit/block/double_chest.rb +11 -0
- data/lib/bukkit/block/dropper.rb +11 -0
- data/lib/bukkit/block/furnace.rb +11 -0
- data/lib/bukkit/block/hopper.rb +11 -0
- data/lib/bukkit/block/jukebox.rb +11 -0
- data/lib/bukkit/block/note_block.rb +11 -0
- data/lib/bukkit/block/piston_move_retraction.rb +11 -0
- data/lib/bukkit/block/sign.rb +11 -0
- data/lib/bukkit/block/skull.rb +11 -0
- data/lib/bukkit/block_change_delegate.rb +24 -0
- data/lib/bukkit/chat_color.rb +7 -0
- data/lib/bukkit/chunk.rb +7 -0
- data/lib/bukkit/chunk_snapshot.rb +7 -0
- data/lib/bukkit/coal_type.rb +7 -0
- data/lib/bukkit/color.rb +7 -0
- data/lib/bukkit/command.rb +11 -0
- data/lib/bukkit/command/block_command_sender.rb +11 -0
- data/lib/bukkit/command/command_exception.rb +11 -0
- data/lib/bukkit/command/command_map.rb +11 -0
- data/lib/bukkit/command/command_sender.rb +11 -0
- data/lib/bukkit/command/console_command_sender.rb +11 -0
- data/lib/bukkit/command/defaults.rb +15 -0
- data/lib/bukkit/command/defaults/achievement_command.rb +15 -0
- data/lib/bukkit/command/defaults/ban_command.rb +15 -0
- data/lib/bukkit/command/defaults/ban_ip_command.rb +15 -0
- data/lib/bukkit/command/defaults/ban_list_command.rb +15 -0
- data/lib/bukkit/command/defaults/bukkit_command.rb +15 -0
- data/lib/bukkit/command/defaults/clear_command.rb +15 -0
- data/lib/bukkit/command/defaults/default_game_mode_command.rb +15 -0
- data/lib/bukkit/command/defaults/deop_command.rb +15 -0
- data/lib/bukkit/command/defaults/difficulty_command.rb +15 -0
- data/lib/bukkit/command/defaults/effect_command.rb +15 -0
- data/lib/bukkit/command/defaults/enchant_command.rb +15 -0
- data/lib/bukkit/command/defaults/exp_command.rb +15 -0
- data/lib/bukkit/command/defaults/game_mode_command.rb +15 -0
- data/lib/bukkit/command/defaults/game_rule_command.rb +15 -0
- data/lib/bukkit/command/defaults/give_command.rb +15 -0
- data/lib/bukkit/command/defaults/help_command.rb +15 -0
- data/lib/bukkit/command/defaults/kick_command.rb +15 -0
- data/lib/bukkit/command/defaults/kill_command.rb +15 -0
- data/lib/bukkit/command/defaults/list_command.rb +15 -0
- data/lib/bukkit/command/defaults/me_command.rb +15 -0
- data/lib/bukkit/command/defaults/op_command.rb +15 -0
- data/lib/bukkit/command/defaults/pardon_command.rb +15 -0
- data/lib/bukkit/command/defaults/pardon_ip_command.rb +15 -0
- data/lib/bukkit/command/defaults/play_sound_command.rb +15 -0
- data/lib/bukkit/command/defaults/plugins_command.rb +15 -0
- data/lib/bukkit/command/defaults/reload_command.rb +15 -0
- data/lib/bukkit/command/defaults/save_command.rb +15 -0
- data/lib/bukkit/command/defaults/save_off_command.rb +15 -0
- data/lib/bukkit/command/defaults/say_command.rb +15 -0
- data/lib/bukkit/command/defaults/scoreboard_command.rb +15 -0
- data/lib/bukkit/command/defaults/seed_command.rb +15 -0
- data/lib/bukkit/command/defaults/set_idle_timeout_command.rb +15 -0
- data/lib/bukkit/command/defaults/set_world_spawn_command.rb +15 -0
- data/lib/bukkit/command/defaults/spawnpoint_command.rb +15 -0
- data/lib/bukkit/command/defaults/spread_players_command.rb +15 -0
- data/lib/bukkit/command/defaults/stop_command.rb +15 -0
- data/lib/bukkit/command/defaults/teleport_command.rb +15 -0
- data/lib/bukkit/command/defaults/tell_command.rb +15 -0
- data/lib/bukkit/command/defaults/test_for_command.rb +15 -0
- data/lib/bukkit/command/defaults/time_command.rb +15 -0
- data/lib/bukkit/command/defaults/timings_command.rb +15 -0
- data/lib/bukkit/command/defaults/toggle_downfall_command.rb +15 -0
- data/lib/bukkit/command/defaults/vanilla_command.rb +15 -0
- data/lib/bukkit/command/defaults/version_command.rb +15 -0
- data/lib/bukkit/command/defaults/weather_command.rb +15 -0
- data/lib/bukkit/command/defaults/whitelist_command.rb +15 -0
- data/lib/bukkit/command/formatted_command_alias.rb +11 -0
- data/lib/bukkit/command/multiple_command_alias.rb +11 -0
- data/lib/bukkit/command/plugin_command.rb +11 -0
- data/lib/bukkit/command/plugin_command_yaml_parser.rb +11 -0
- data/lib/bukkit/command/plugin_identifiable_command.rb +11 -0
- data/lib/bukkit/command/remote_console_command_sender.rb +11 -0
- data/lib/bukkit/command/simple_command_map.rb +11 -0
- data/lib/bukkit/command/tab_command_executor.rb +11 -0
- data/lib/bukkit/command/tab_completer.rb +11 -0
- data/lib/bukkit/command/tab_executor.rb +11 -0
- data/lib/bukkit/configuration.rb +11 -0
- data/lib/bukkit/configuration/configuration_options.rb +11 -0
- data/lib/bukkit/configuration/configuration_section.rb +11 -0
- data/lib/bukkit/configuration/file.rb +15 -0
- data/lib/bukkit/configuration/file/file_configuration.rb +15 -0
- data/lib/bukkit/configuration/file/file_configuration_options.rb +15 -0
- data/lib/bukkit/configuration/file/yaml_configuration.rb +15 -0
- data/lib/bukkit/configuration/file/yaml_configuration_options.rb +15 -0
- data/lib/bukkit/configuration/file/yaml_constructor.rb +15 -0
- data/lib/bukkit/configuration/file/yaml_representer.rb +15 -0
- data/lib/bukkit/configuration/invalid_configuration_exception.rb +11 -0
- data/lib/bukkit/configuration/memory_configuration.rb +11 -0
- data/lib/bukkit/configuration/memory_section.rb +11 -0
- data/lib/bukkit/configuration/serialization.rb +15 -0
- data/lib/bukkit/configuration/serialization/configuration_seriablization.rb +15 -0
- data/lib/bukkit/configuration/serialization/configuration_serializable.rb +15 -0
- data/lib/bukkit/configuration/serialization/delegate_deserialization.rb +15 -0
- data/lib/bukkit/configuration/serialization/serializable_as.rb +15 -0
- data/lib/bukkit/crop_state.rb +7 -0
- data/lib/bukkit/difficulty.rb +7 -0
- data/lib/bukkit/dye_color.rb +7 -0
- data/lib/bukkit/effect.rb +7 -0
- data/lib/bukkit/enchantment.rb +11 -0
- data/lib/bukkit/enchantments/enchantment_target.rb +11 -0
- data/lib/bukkit/enchantments/enchantment_wrapper.rb +11 -0
- data/lib/bukkit/entity_effect.rb +7 -0
- data/lib/bukkit/firework_effect.rb +7 -0
- data/lib/bukkit/game_mode.rb +7 -0
- data/lib/bukkit/game_species.rb +7 -0
- data/lib/bukkit/instrument.rb +7 -0
- data/lib/bukkit/location.rb +7 -0
- data/lib/bukkit/material.rb +7 -0
- data/lib/bukkit/nether_warts_state.rb +7 -0
- data/lib/bukkit/note.rb +7 -0
- data/lib/bukkit/offline_player.rb +7 -0
- data/lib/bukkit/plugin/messaging/plugin_message_recipient.rb +11 -0
- data/lib/bukkit/portal_type.rb +7 -0
- data/lib/bukkit/rotation.rb +7 -0
- data/lib/bukkit/sandstone_type.rb +7 -0
- data/lib/bukkit/server.rb +41 -0
- data/lib/bukkit/server/commands.rb +23 -0
- data/lib/bukkit/server/config.rb +20 -0
- data/lib/bukkit/server/info.rb +38 -0
- data/lib/bukkit/server/network.rb +58 -0
- data/lib/bukkit/server/players.rb +44 -0
- data/lib/bukkit/server/processing.rb +53 -0
- data/lib/bukkit/server/recipes.rb +23 -0
- data/lib/bukkit/server/whitelist.rb +23 -0
- data/lib/bukkit/server/world.rb +47 -0
- data/lib/bukkit/skull_type.rb +7 -0
- data/lib/bukkit/sound.rb +7 -0
- data/lib/bukkit/statistic.rb +7 -0
- data/lib/bukkit/travel_agent.rb +7 -0
- data/lib/bukkit/tree_species.rb +7 -0
- data/lib/bukkit/tree_type.rb +7 -0
- data/lib/bukkit/unsafe_values.rb +7 -0
- data/lib/bukkit/utility.rb +7 -0
- data/lib/bukkit/version.rb +3 -0
- data/lib/bukkit/warning.rb +7 -0
- data/lib/bukkit/weather_type.rb +7 -0
- data/lib/bukkit/world.rb +7 -0
- data/lib/bukkit/world_creator.rb +7 -0
- data/lib/bukkit/world_type.rb +50 -0
- data/lib/bukkit/world_type/amplified.rb +15 -0
- data/lib/bukkit/world_type/flat.rb +15 -0
- data/lib/bukkit/world_type/large_biomes.rb +15 -0
- data/lib/bukkit/world_type/normal.rb +15 -0
- data/lib/bukkit/world_type/version_1_1.rb +15 -0
- data/spec/lib/achievement_spec.rb +383 -0
- data/spec/lib/art_spec.rb +566 -0
- data/spec/spec_helper.rb +17 -0
- metadata +336 -0
data/README.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# Bukkit (Deprecated)
|
2
|
+
|
3
|
+
[![Gem Version](http://img.shields.io/gem/v/formatador.svg?style=flat-square)](https://rubygems.org/gems/bukkit-api)
|
4
|
+
[![Latest Stable Gem Downloads](http://img.shields.io/gem/dv/bukkit-api/stable.svg?style=flat-square)](https://rubygems.org/gems/bukkit-api)
|
5
|
+
[![Latest Gem Downloads](http://img.shields.io/gem/dtv/bukkit-api.svg?style=flat-square)](https://rubygems.org/gems/bukkit-api)
|
6
|
+
[![Total Gem Downloads](http://img.shields.io/gem/dt/bukkit-api.svg?style=flat-square)](https://rubygems.org/gems/bukkit-api)
|
7
|
+
|
8
|
+
[![Inline docs](http://inch-ci.org/github/MinecraftRuby/bukkit.svg?branch=master&style=flat-square)](http://inch-ci.org/github/MinecraftRuby/bukkit)
|
9
|
+
[![travis.ci Continuous Integration](http://img.shields.io/travis/MinecraftRuby/bukkit.svg?style=flat-square)](https://travis-ci.org/MinecraftRuby/bukkit)
|
10
|
+
[![Code Climate GPA](http://img.shields.io/codeclimate/github/MinecraftRuby/bukkit.svg?style=flat-square)](https://codeclimate.com/github/MinecraftRuby/bukkit)
|
11
|
+
[![Code Climate Test Coverage](http://img.shields.io/codeclimate/coverage/github/MinecraftRuby/bukkit.svg?style=flat-square)](https://codeclimate.com/github/MinecraftRuby/bukkit)
|
12
|
+
|
13
|
+
A backwards compatible Bukkit API written in Ruby.
|
14
|
+
|
15
|
+
In light of the recent exedus from Bukkit I (@k2b6s9j) will no longer be dedicating a substantial amount of time to this API.
|
16
|
+
|
17
|
+
I may, no guarentees though, return to this project eventually and utilitize much like a BukkitBridge sortof thing.
|
18
|
+
|
19
|
+
## Contributing
|
20
|
+
|
21
|
+
1. Fork it ( https://github.com/MinecraftRuby/bukkit/fork )
|
22
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
23
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
24
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
25
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bukkit-api.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'bukkit/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'bukkit-api'
|
8
|
+
spec.version = Bukkit::VERSION
|
9
|
+
spec.version = "#{spec.version}-#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
|
10
|
+
spec.authors = ['Kepler Sticka-Jones']
|
11
|
+
spec.email = ['kbsj269@gmail.com']
|
12
|
+
spec.summary = 'The API for the formally popular server mod, Bukkit'
|
13
|
+
spec.description = 'A backwards compatible API for the server mod, Bukkit. Not being actively maintained longer due to the legal issues and other drama surrounding the CraftBukkit community currently.'
|
14
|
+
spec.homepage = 'https://github.com/MinecraftRuby/bukkit'
|
15
|
+
spec.license = 'GNU General Public License'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0")
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
23
|
+
spec.add_development_dependency 'rake'
|
24
|
+
spec.add_development_dependency 'rspec'
|
25
|
+
spec.add_development_dependency 'simplecov'
|
26
|
+
end
|
data/lib/bukkit.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Dir[File.dirname(__FILE__) + '/bukkit/**/*.rb'].each do |file|
|
2
|
+
load file
|
3
|
+
end
|
4
|
+
|
5
|
+
class Bukkit
|
6
|
+
|
7
|
+
attr_accessor :server
|
8
|
+
alias_method :getServer, :server
|
9
|
+
|
10
|
+
def server=(server)
|
11
|
+
if @server
|
12
|
+
raise StandardError, 'Cannot redefine singleton Server'
|
13
|
+
elsif !@server.is_a? Bukkit::Server
|
14
|
+
raise StandardError, 'Cannot redefine singleton Server'
|
15
|
+
else
|
16
|
+
@server = server
|
17
|
+
import @server
|
18
|
+
@server.logger.info "This server is running #{name} version #{version} (Implementing API version #{bukkit_version})"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
alias_method :setServer, :server=
|
22
|
+
|
23
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
Dir[File.dirname(__FILE__) + '/achievement/**/*.rb'].each do |file|
|
2
|
+
load file
|
3
|
+
end
|
4
|
+
|
5
|
+
class Bukkit
|
6
|
+
|
7
|
+
# Represents an achievement, which may be given to players.
|
8
|
+
class Achievement
|
9
|
+
|
10
|
+
attr_accessor :parent
|
11
|
+
|
12
|
+
def initialize(parent = nil)
|
13
|
+
if parent
|
14
|
+
@parent = parent
|
15
|
+
self
|
16
|
+
else
|
17
|
+
@parent = nil
|
18
|
+
self
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# Returns whether or not this achievement has a parent achievement.
|
23
|
+
#
|
24
|
+
# @return [boolean] whether the achievement has a parent achievement
|
25
|
+
def parent?
|
26
|
+
if @parent
|
27
|
+
true
|
28
|
+
else
|
29
|
+
false
|
30
|
+
end
|
31
|
+
end
|
32
|
+
alias_method :hasParent, :parent?
|
33
|
+
|
34
|
+
# Returns the parent achievement of this achievement, or nil if none.
|
35
|
+
#
|
36
|
+
# @return the parent {Achievement} or nil
|
37
|
+
def parent
|
38
|
+
@parent
|
39
|
+
end
|
40
|
+
alias_method :getParent, :parent
|
41
|
+
|
42
|
+
class << self
|
43
|
+
def values
|
44
|
+
[
|
45
|
+
Bukkit::Achievement::OpenInventory,
|
46
|
+
Bukkit::Achievement::MineWood,
|
47
|
+
Bukkit::Achievement::BuildWorkbench,
|
48
|
+
Bukkit::Achievement::BuildPickaxe,
|
49
|
+
Bukkit::Achievement::BuildFurnace,
|
50
|
+
Bukkit::Achievement::AcquireIron,
|
51
|
+
Bukkit::Achievement::BuildHoe,
|
52
|
+
Bukkit::Achievement::MakeBread,
|
53
|
+
Bukkit::Achievement::BakeCake,
|
54
|
+
Bukkit::Achievement::BuildBetterPickaxe,
|
55
|
+
Bukkit::Achievement::CookFish,
|
56
|
+
Bukkit::Achievement::OnARail,
|
57
|
+
Bukkit::Achievement::BuildSword,
|
58
|
+
Bukkit::Achievement::KillEnemy,
|
59
|
+
Bukkit::Achievement::KillCow,
|
60
|
+
Bukkit::Achievement::FlyPig,
|
61
|
+
Bukkit::Achievement::SnipeSkeleton,
|
62
|
+
Bukkit::Achievement::GetDiamonds,
|
63
|
+
Bukkit::Achievement::NetherPortal,
|
64
|
+
Bukkit::Achievement::GhastReturn,
|
65
|
+
Bukkit::Achievement::GetBlazeRod,
|
66
|
+
Bukkit::Achievement::BrewPotion,
|
67
|
+
Bukkit::Achievement::EndPortal,
|
68
|
+
Bukkit::Achievement::TheEnd,
|
69
|
+
Bukkit::Achievement::Enchantments,
|
70
|
+
Bukkit::Achievement::Overkill,
|
71
|
+
Bukkit::Achievement::Bookcase,
|
72
|
+
Bukkit::Achievement::ExploreAllBiomes,
|
73
|
+
Bukkit::Achievement::SpawnWither,
|
74
|
+
Bukkit::Achievement::KillWither,
|
75
|
+
Bukkit::Achievement::FullBeacon,
|
76
|
+
Bukkit::Achievement::BreedCow,
|
77
|
+
Bukkit::Achievement::DiamondsToYou
|
78
|
+
]
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
end
|