Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hey, i added a command and in the canCommandSenderUseCommand i just put in return true;

but still on the bukkit server the none ops dont have permission to use it. is there something im missing here?

If you're talking about making a bukket plugin this isn't the forum for it. This is the forge modder support forum.

 

If you are using forge, show your code.

  • Author
5 minutes ago, Awesome_Spider said:

If you're talking about making a bukket plugin this isn't the forum for it. This is the forge modder support forum.

 

If you are using forge, show your code.

of course its forge, its just a kcauldron server so i wanted you guys to know its also partily bukkit. the code is:

package com.drpiggy.eventsystem.commands;

import java.util.ArrayList;
import java.util.List;

import com.drpiggy.eventsystem.data.DataManager;

import net.minecraft.command.ICommand;
import net.minecraft.command.ICommandSender;
import net.minecraft.util.ChatComponentText;

public class CommandJoinTeam implements ICommand {

	private final List<String> aliases;

	public CommandJoinTeam() {
		aliases = new ArrayList<String>();
		aliases.add("jointeam");
		aliases.add("joint");
	}

	@Override
	public int compareTo(Object paramT) {
		return 0;
	}

	@Override
	public String getCommandName() {
		return "jointeam";
	}

	@Override
	public String getCommandUsage(ICommandSender sender) {
		return "jointeam <team name>";
	}

	@Override
	public List<String> getCommandAliases() {
		return this.aliases;
	}

	@Override
	public void processCommand(ICommandSender sender, String[] arguments) {

		if (arguments.length == 0) {

			sender.addChatMessage(new ChatComponentText("[EventSystem] Please enter the name of the team!"));
			return;

		}

		if (!DataManager.AddTeamPlayer(arguments[0],
				sender.getEntityWorld().getPlayerEntityByName(sender.getCommandSenderName()))) {

			sender.addChatMessage(new ChatComponentText("[EventSystem] That team does not exist!"));
			return;

		}

		sender.addChatMessage(new ChatComponentText("[EventSystem] Team changed!"));

		DataManager.get(sender.getEntityWorld()).markDirty();

	}

	@Override
	public boolean canCommandSenderUseCommand(ICommandSender sender) {
		return true;
	}

	@Override
	public List<String> addTabCompletionOptions(ICommandSender sender, String[] arguments) {
		return null;
	}

	@Override
	public boolean isUsernameIndex(String[] p_82358_1_, int p_82358_2_) {
		return false;
	}

}

but non op players cant use it

Oh, ok. Sorry. My bad.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.