Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,9 @@ to generate our protobuf types, you will need to install [buf](https://buf.build
# Install buf
# Follow instructions at https://buf.build/docs/cli/installation/

# Install protoc-gen-go
# Install protoc-gen-go and protoc-gen-go-grpc
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
```

Then run:
Expand Down
2 changes: 1 addition & 1 deletion plugin/adapters/plugin/actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/df-mc/dragonfly/server/world/sound"
"github.com/go-gl/mathgl/mgl64"
"github.com/google/uuid"
pb "github.com/secmc/plugin/proto/generated"
pb "github.com/secmc/plugin/proto/generated/go"
)

func (m *Manager) applyActions(p *pluginProcess, batch *pb.ActionBatch) {
Expand Down
2 changes: 1 addition & 1 deletion plugin/adapters/plugin/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/df-mc/dragonfly/server/cmd"
"github.com/df-mc/dragonfly/server/player"
"github.com/df-mc/dragonfly/server/world"
pb "github.com/secmc/plugin/proto/generated"
pb "github.com/secmc/plugin/proto/generated/go"
)

func (m *Manager) registerCommands(p *pluginProcess, specs []*pb.CommandSpec) {
Expand Down
2 changes: 1 addition & 1 deletion plugin/adapters/plugin/custom_items.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/df-mc/dragonfly/server/item/category"
"github.com/df-mc/dragonfly/server/world"
pb "github.com/secmc/plugin/proto/generated"
pb "github.com/secmc/plugin/proto/generated/go"
)

// customItem implements world.CustomItem
Expand Down
3 changes: 1 addition & 2 deletions plugin/adapters/plugin/event_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/df-mc/dragonfly/server/session"
"github.com/df-mc/dragonfly/server/world"
"github.com/go-gl/mathgl/mgl64"
pb "github.com/secmc/plugin/proto/generated"
pb "github.com/secmc/plugin/proto/generated/go"
)

type cancelContext interface {
Expand Down Expand Up @@ -272,4 +272,3 @@ func worldFromContext(ctx *world.Context) *world.World {
}
return tx.World()
}

2 changes: 1 addition & 1 deletion plugin/adapters/plugin/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/secmc/plugin/plugin/adapters/grpc"
"github.com/secmc/plugin/plugin/config"
"github.com/secmc/plugin/plugin/ports"
pb "github.com/secmc/plugin/proto/generated"
pb "github.com/secmc/plugin/proto/generated/go"
)

type Manager struct {
Expand Down
2 changes: 1 addition & 1 deletion plugin/adapters/plugin/player_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/df-mc/dragonfly/server/session"
"github.com/df-mc/dragonfly/server/world"
"github.com/go-gl/mathgl/mgl64"
pb "github.com/secmc/plugin/proto/generated"
pb "github.com/secmc/plugin/proto/generated/go"
)

func (m *Manager) EmitPlayerJoin(p *player.Player) {
Expand Down
2 changes: 1 addition & 1 deletion plugin/adapters/plugin/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (

"github.com/secmc/plugin/plugin/adapters/grpc"
"github.com/secmc/plugin/plugin/config"
pb "github.com/secmc/plugin/proto/generated"
pb "github.com/secmc/plugin/proto/generated/go"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion plugin/adapters/plugin/world_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/df-mc/dragonfly/server/block/cube"
"github.com/df-mc/dragonfly/server/world"
"github.com/go-gl/mathgl/mgl64"
pb "github.com/secmc/plugin/proto/generated"
pb "github.com/secmc/plugin/proto/generated/go"
)

func (m *Manager) EmitWorldLiquidFlow(ctx *world.Context, from, into cube.Pos, liquid world.Liquid, replaced world.Block) {
Expand Down
2 changes: 1 addition & 1 deletion plugin/ports/ports.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/df-mc/dragonfly/server/session"
"github.com/df-mc/dragonfly/server/world"
"github.com/go-gl/mathgl/mgl64"
pb "github.com/secmc/plugin/proto/generated"
pb "github.com/secmc/plugin/proto/generated/go"
)

type PluginManager interface {
Expand Down
7 changes: 6 additions & 1 deletion proto/buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ managed:
- file_option: go_package_prefix
value: github.com/secmc/plugin/proto/generated
plugins:
# Go
- local: protoc-gen-go
out: generated
out: generated/go
opt:
- paths=source_relative
- remote: buf.build/grpc/go
out: generated/go
opt:
- paths=source_relative
# C++
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
115 changes: 115 additions & 0 deletions proto/generated/go/plugin_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion scripts/post_generation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cd ts
npm install
npm run build

cd ..
cd ../go
go mod tidy