Jump to content

jamiemac262

Members
  • Posts

    87
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

jamiemac262's Achievements

Stone Miner

Stone Miner (3/8)

1

Reputation

  1. ok, that makes this sooo much easier haha Thanks
  2. oh... so actually, just the command name would suffice?
  3. no, the ID is part of the permission in the config file, as a way to identify the different mods... so the system won't be confused if Thermal expansion and IC2 use the same command (for example) surely there's a way to identify the mod that a command belongs to?
  4. Hi, Is it possible to get the modid of a command when a command is sent to the server? I'm building a permission manager and I want users to be able to enter something like <modid>.<command> so... "factionmod.create" where factionmod is the ID I have an event handler that runs a method everytime a command is sent, I need it to get the modid to check groups for that modid it needs to be the modid because you might have multiple mods that use the same commands (galacticraft.create and factionmod.create for example) Anyone know how to do this? Thanks
  5. For anybody who might look for the answer to this in the future, GSON is the solution create a class for the object you want to make JSON Class Groups{ private String name; private boolean initial; private String[] permissions; public Group(String n, boolean init, String[] p) { // TODO Auto-generated constructor stub name = n; initial = init; permissions = p; } } then in the syncConfig() method you do something like this: String[] perms = {"vanilla.help"}; String[] oPerms = {"*"}; Group def = new Group("default", true, perms); Group owner = new Group("Owner", false, oPerms); Gson g = new Gson(); String json1 = g.toJson(def); String json2 = g.toJson(owner); String[] groups = {json1, json2}; config.getStringList("Groups", "groups", groups, "Comment here");
  6. there are still videos out there... although most tutorials are text based now
  7. Thanks now I have something to start on. latest conundrum, if you're interested:
  8. Hi, I'm building a simple permission manager for a friend. I'm pretty much learning everything as I go. What I'm trying to do right now is create a config file that lists the users, each user's group and the groups/permissions I want the permissions to be readable so I was trying to replicate the PermissionsEx Bukkit plugin e.g. default: default: true permissions: vanilla.gamemode so it's basically a key/value format. [groupname: [default: true, permissions: [vanilla.gamemode, vanilla.help]]] I'm not really sure how to do this using the Configuration class. Can someone help me with this? I'm using 1.12 Thanks
  9. A JAR file is an archive (collection) of classes that java can run... It only runs in JAVA An EXE file is a windows executable, It runs in windows without the need of java You screwed up the installation. The minecraft Forge installer needs an existing version of minecraft 1.12 before it can install. If you have deleted the .minecraft folder there won't be any versions of 1.12. try what I suggested, delete .minecraft and uninstall the Minecraft launcher. then start from scratch If you want to use a video get one that's less than 2 years old
  10. you might need to download and play on minecraft 1.12 before you can install forge 1.12
  11. I think you've been watching videos from about 6 or 7 years ago Modding's come a looong way, Delete your .minecraft folder, uninstall minecraft launcher from your program file. then you should be able to start from scratch. Install minecraft then go to files.minecraftforge.net and get the version you want to play on.... download the INSTALLER run the installer and follow the instructions it show's you. it's that simple now
  12. Hi, I'm trying to build a simple permission system for a friend. The best way I can see to do this is to run a method whenever a command is sent to the server, even commands from other mods, then check the sender UUID against a YAML (or maybe JSON) file for the sender's group, and check that group for a permission (similar to the way PEX ran on bukkit). I'm also going to do the same thing for blocks...(Pretty sure I've seen an "onBlockPlaced" event example on the internet in the past) so a user group won't be able to place IC2 nukes without a permission like place.{modid}.{unlocalisedname} I have no knowledge of how to do anything of what I have just said First things first... I've had a look and I can't work out how to call a method whenever a command is sent to the server. Can someone help me out with this?... I think I can work the rest out on my own Thanks
  13. thanks guys, that fixed it.... do either of you know if there's a way to stretch a background texture to a certain size? the image I have is too small, I wanna stretch it to fill more of the screen
  14. Hi I'm trying to display a simple GUI, some buttons and a text box (if I can work out how to display one, lol). At the moment I'm just trying to draw a background.... This isn't working.... I know the function to draw the background it being called (drawScreen()) as when I right click the block that triggers the GUI, the screen goes dark (the default background) Can someone take a look and see where I'm going wrong? According to the logs there are no errors when the GUI is triggered The GUIScreen: package net.tekkcraft.factions.gui; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.util.ResourceLocation; import java.io.IOException; /** * Created by jamie on 07/03/2017. */ public class FactionCoreGuiScreen extends GuiScreen { @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); mc.getTextureManager().bindTexture(new ResourceLocation("factionMod", "/textures/gui/core.png")); super.drawScreen(mouseX, mouseY, partialTicks); } @Override public boolean doesGuiPauseGame() { return false; } @Override public void initGui() { } @Override protected void actionPerformed(GuiButton button) throws IOException { } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.