MCPcopy Create free account
hub / github.com/EndstoneMC/endstone / PYBIND11_MODULE

Function PYBIND11_MODULE

src/endstone/python/endstone_python.cpp:60–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58void init_util(py::module_ &, py::class_<Vector> &);
59
60PYBIND11_MODULE(_python, m) // NOLINT(*-use-anonymous-namespace)
61{
62 py::options options;
63 options.disable_enum_members_docstring();
64
65 // Submodules
66 auto m_actor =
67 m.def_submodule("actor", "Classes relating to actors (entities) that can exist in a world, including all "
68 "players, monsters, projectiles, etc.");
69 auto m_attribute = m.def_submodule("attribute", "Classes relevant to attributes.");
70 auto m_ban = m.def_submodule("ban", "Classes relevant to bans.");
71 auto m_block = m.def_submodule("block", "Classes relating to the blocks in a world, including special states.");
72 auto m_boss =
73 m.def_submodule("boss", "Classes relating to the boss bars that appear at the top of the player's screen.");
74 auto m_command = m.def_submodule("command", "Classes relating to handling specialized non-chat player input.");
75 auto m_damage =
76 m.def_submodule("damage", "Classes relating to damage types and sources applicable to mobs (living entities).");
77 auto m_effect = m.def_submodule("effect", "Classes relating to the effects that can be applied to entities.");
78 auto m_enchantments =
79 m.def_submodule("enchantments", "Classes relating to the specialized enhancements to ItemStacks.");
80 auto m_event = m.def_submodule("event", "Classes relating to handling triggered code executions.");
81 auto m_form = m.def_submodule("form");
82 auto m_inventory = m.def_submodule("inventory", "Classes relating to player inventories and item interactions.");
83 auto m_lang = m.def_submodule("lang");
84 auto m_level = m.def_submodule("level");
85 auto m_map = m.def_submodule("map", "Classes relating to plugin handling of map displays.");
86 auto m_nbt = m.def_submodule("nbt", "Classes relating to the NBT data format.");
87 auto m_permissions = m.def_submodule("permissions", "Classes relating to permissions of players.");
88 auto m_plugin = m.def_submodule("plugin", "Classes relating to loading and managing plugins.");
89 auto m_potion = m.def_submodule("potion", "Classes relating to potion effects.");
90 auto m_scheduler =
91 m.def_submodule("scheduler", "Classes relating to letting plugins run code at specific time intervals.");
92 auto m_scoreboard =
93 m.def_submodule("scoreboard", "Classes relating to manage the client side score display system.");
94 auto m_util = m.def_submodule("util", "Multi and single purpose classes.");
95
96 py::native_enum<EventPriority>(
97 m_event, "EventPriority", "enum.IntEnum",
98 "Listeners are called in following order: LOWEST -> LOW -> NORMAL -> HIGH -> HIGHEST -> MONITOR")
99 .value("LOWEST", EventPriority::Lowest,
100 "Event call is of very low importance and should be run first, to allow other plugins to further "
101 "customise the outcome")
102 .value("LOW", EventPriority::Low, "Event call is of low importance")
103 .value("NORMAL", EventPriority::Normal,
104 " Event call is neither important nor unimportant, and may be run normally")
105 .value("HIGH", EventPriority::High, "Event call is of high importance")
106 .value("HIGHEST", EventPriority::Highest,
107 "Event call is critical and must have the final say in what happens to the event")
108 .value("MONITOR", EventPriority::Monitor,
109 "Event is listened to purely for monitoring the outcome of an event. No modifications to the event "
110 "should be made under this priority.")
111 .finalize();
112 py::native_enum<PermissionDefault>(m_permissions, "PermissionDefault", "enum.Enum",
113 "Represents the possible default values for permissions")
114 .value("TRUE", PermissionDefault::True)
115 .value("FALSE", PermissionDefault::False)
116 .value("OP", PermissionDefault::Operator)
117 .value("OPERATOR", PermissionDefault::Operator)

Callers

nothing calls this directly

Calls 15

init_attributeFunction · 0.85
init_color_formatFunction · 0.85
init_damageFunction · 0.85
init_game_modeFunction · 0.85
init_loggerFunction · 0.85
init_langFunction · 0.85
init_formFunction · 0.85
init_enchantmentsFunction · 0.85
init_mapFunction · 0.85
init_nbtFunction · 0.85
init_effectFunction · 0.85
init_potionFunction · 0.85

Tested by

no test coverage detected