Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

* Notifications


Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CodeCrafter47

Pages: [1] 2 3 ... 35
1
Plugin Development / Re: How does onPlayerDeath work?
« on: October 04, 2017, 04:53:08 AM »
plrVictim is always the player who died. But I think the onPlayerDeath event is slightly broken, it's not being called when death messages are disabled. I'll fix that when I get around. Should be called on kill command though.

2
News and Info / Re: Rainbow 1.12
« on: September 23, 2017, 06:25:33 PM »
Thanks to Bayside308 a 1.12.2 build of rainbow is now available.

3
News and Info / Re: Rainbow 1.12
« on: September 21, 2017, 05:12:35 AM »
I'm currently on vacation, so rainbow probably won't be updated before October.

4
You can use onAttemptPlaceOrInteract an check whether there's a repeater or comparator at the targeted location.

5
Instead of rounding or casting it might be better to use
Code: [Select]
int x = plr.getLocation().getBlockX();
int y = plr.getLocation().getBlockY();
int z = plr.getLocation().getBlockZ();

plr.getLocation() will give you the location of the player (of his feet, horizontally centered). In the case of a pressure plate the above will give you the coordinates of the pressure plate (as with pressure plates the player literally stands inside them).

Instead of using onAttemptPlayerMove I'd recommend using onTick to check for every player whether he's standing on a pressure plate. Checking the block every player stand on once every tick shouldn't make your server lag.

6
General Discussion / Re: Mojang released 1.12.1
« on: August 03, 2017, 12:56:53 PM »
1.12.1 Rainbow builds can now be downloaded from jenkins.

7
General Discussion / Re: Mojang released 1.12.1
« on: August 03, 2017, 09:25:58 AM »
I will update Rainbow soon.

8
News and Info / Re: Rainbow 1.12
« on: June 07, 2017, 04:39:11 PM »
You need to use Java 8. With the 1.12 update Minecraft requires Java 8 to run, thus Rainbow also needs Java 8.

9
News and Info / Rainbow 1.12
« on: June 07, 2017, 03:50:17 PM »
Hello everyone,

As of now, Rainbow for 1.12 is available for download. You can get it here.

Have fun playing.

Edit:
1.12.1 is available now.

10
Yes it will. I just arrived at home after a day at university, I'll start working on it right now, so you can expect an update for Rainbow to be available in a few hours.

11
General Discussion / Re: Rainbow Documentation
« on: April 03, 2017, 03:40:11 AM »
First of all, you shouldn't be building off Rainbow anyway. The idea is that you build off the PluginReference, which everyone who downloads the Rainbow.jar has a local copy of. You can just add the library as a dependency in Eclipse or whatever IDE you use. I would recommend including a link to the javadoc for Rainbow, as well as DIW's tutorial.
I agree with that. You cannot access the implementation classes anyway, and if you need some of the libraries included in Rainbow it's better to directly add these as dependencies than to add the Rainbow.jar as dependency.

Secondly, no Rainbow plugin will ever require a POM file. The only two times you will ever need a file other than java class files is a plugin.properties file, and the manifest, as you can see about here and here, though most people won't need to worry about bytecode injection (the second one). The first one could be useful though.
I don't agree with that. While using a build system like maven or gradle is not necessary, it is good practice and will speed up the development. I think it's good to have the maven repository and artifacts we use documented somewhere.

12
Offtopic: Do you still talk to DiW?
Not recently. He hasn't visited the forums for almost a year now and I didn't try to contact him on any other way.

14
API Requests / Re: built in SnakeYAML
« on: February 16, 2017, 08:18:07 AM »
Rainbow now includes a YAML based config API. Basically we use the BungeeCord config API (have a look at the documentation: https://www.spigotmc.org/wiki/using-the-bungee-configuration-system/) and there are some convenience methods to access the config file.

Here's a code example:
Code: [Select]
public void onStartup(MC_Server server) {
    Configuration config = getConfig();

    // alternatively use the following line to save the default config from the plugin jar
    // Configuration config = getConfig(true);

    // reading config values
    boolean option1 = config.getBoolean("option1");
    int option2 = config.getInt("option2");

    // writing config values
    config.set("option", 47);
    saveConfig();
}

15
Nope you cannot access the blocks which the Minecraft world generator would generate.

Pages: [1] 2 3 ... 35