-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db8f8c6
commit 0d7dd25
Showing
13 changed files
with
347 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
- Makes use of API version 4.0.0, allowing for marginal performance increases as API calls are now Async | ||
- Add client side command /mclogsc |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package gs.mclo.fabric.commands; | ||
|
||
import com.mojang.brigadier.builder.LiteralArgumentBuilder; | ||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource; | ||
import net.minecraft.server.command.ServerCommandSource; | ||
|
||
public interface Command { | ||
LiteralArgumentBuilder<FabricClientCommandSource> buildClient(LiteralArgumentBuilder<FabricClientCommandSource> builder); | ||
LiteralArgumentBuilder<ServerCommandSource> buildServer(LiteralArgumentBuilder<ServerCommandSource> builder); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package gs.mclo.fabric.commands; | ||
|
||
import com.mojang.brigadier.builder.LiteralArgumentBuilder; | ||
import gs.mclo.fabric.MclogsFabric; | ||
import gs.mclo.fabric.commands.source.ClientSource; | ||
import gs.mclo.fabric.commands.source.ServerSource; | ||
import net.fabricmc.fabric.api.client.command.v1.FabricClientCommandSource; | ||
import net.minecraft.server.command.ServerCommandSource; | ||
|
||
|
||
public class MclogsCommand implements Command { | ||
@Override | ||
public LiteralArgumentBuilder<FabricClientCommandSource> buildClient(LiteralArgumentBuilder<FabricClientCommandSource> builder) { | ||
return builder.executes(context -> MclogsFabric.share(new ClientSource(context.getSource()), "latest.log")); | ||
} | ||
|
||
@Override | ||
public LiteralArgumentBuilder<ServerCommandSource> buildServer(LiteralArgumentBuilder<ServerCommandSource> builder) { | ||
return builder | ||
.requires(source -> source.hasPermissionLevel(2)) | ||
.executes(context -> MclogsFabric.share(new ServerSource(context.getSource()), "latest.log")); | ||
} | ||
} |
Oops, something went wrong.