Skip to content

Commit

Permalink
Add a method to set the identifier a packet is acting on.
Browse files Browse the repository at this point in the history
  • Loading branch information
iso2013 committed Jul 28, 2018
1 parent 7c3126a commit cbef89a
Show file tree
Hide file tree
Showing 101 changed files with 459 additions and 387 deletions.
2 changes: 1 addition & 1 deletion API/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>PacketEntityAPI</artifactId>
<groupId>net.blitzcube.peapi</groupId>
<version>0.4.3-SNAPSHOT</version>
<version>0.5.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ public interface IEntityPacket {
*/
int getDelay();

/**
* Set the identifier that this packet is acting on. Null values will be ignored, and the underlying packet will
* not change.
*
* @param identifier the identifier of the entity being changed by this packet.
*/
void setIdentifier(IEntityIdentifier identifier);

/**
* Gets the raw ProtocolLib packet container that is used by the engine to send this packet to the client.
*
Expand Down
4 changes: 2 additions & 2 deletions Plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>PacketEntityAPI</artifactId>
<groupId>net.blitzcube.peapi</groupId>
<version>0.4.3-SNAPSHOT</version>
<version>0.5.0-SNAPSHOT</version>
</parent>

<artifactId>Plugin</artifactId>
Expand Down Expand Up @@ -59,7 +59,7 @@
<dependency>
<groupId>net.blitzcube.peapi</groupId>
<artifactId>API</artifactId>
<version>0.4.3-SNAPSHOT</version>
<version>0.5.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ public IEntityIdentifier getIdentifier() {
return identifier;
}

@Override
public void setIdentifier(IEntityIdentifier identifier) {
if (identifier != null)
this.rawPacket.getIntegers().write(0, identifier.getEntityID());
}

@Override
public PacketContainer getRawPacket() {
return rawPacket;
Expand Down
6 changes: 3 additions & 3 deletions docs/javadocs/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:48 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:53 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>All Classes (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>All Classes (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
6 changes: 3 additions & 3 deletions docs/javadocs/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:48 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:53 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>All Classes (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>All Classes (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
Expand Down
8 changes: 4 additions & 4 deletions docs/javadocs/constant-values.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:47 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:52 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Constant Field Values (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>Constant Field Values (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Constant Field Values (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="Constant Field Values (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down
8 changes: 4 additions & 4 deletions docs/javadocs/deprecated-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:48 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:53 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Deprecated List (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>Deprecated List (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Deprecated List (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="Deprecated List (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down
8 changes: 4 additions & 4 deletions docs/javadocs/help-doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:48 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:53 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>API Help (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>API Help (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="API Help (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="API Help (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down
16 changes: 12 additions & 4 deletions docs/javadocs/index-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:48 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:53 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Index (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>Index (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Index (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="Index (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down Expand Up @@ -1433,6 +1433,14 @@ <h2 class="title">S</h2>
<dd>
<div class="block">Sets the hitbox of this entity.</div>
</dd>
<dt><span class="memberNameLink"><a
href="net/blitzcube/peapi/api/packet/IEntityPacket.html#setIdentifier-net.blitzcube.peapi.api.entity.IEntityIdentifier-">setIdentifier(IEntityIdentifier)</a></span>
- Method in interface net.blitzcube.peapi.api.packet.<a
href="net/blitzcube/peapi/api/packet/IEntityPacket.html"
title="interface in net.blitzcube.peapi.api.packet">IEntityPacket</a></dt>
<dd>
<div class="block">Set the identifier that this packet is acting on.</div>
</dd>
<dt><span class="memberNameLink"><a
href="net/blitzcube/peapi/api/packet/IEntityEquipmentPacket.html#setItem-org.bukkit.inventory.ItemStack-">setItem(ItemStack)</a></span>
- Method in interface net.blitzcube.peapi.api.packet.<a
Expand Down
4 changes: 2 additions & 2 deletions docs/javadocs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:48 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:53 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PacketEntityAPI docs v0.4.3-SNAPSHOT</title>
<title>PacketEntityAPI docs v0.5.0-SNAPSHOT</title>
<script type="text/javascript">
tmpTargetPage = "" + window.location.search;
if (tmpTargetPage != "" && tmpTargetPage != "undefined")
Expand Down
8 changes: 4 additions & 4 deletions docs/javadocs/net/blitzcube/peapi/api/IPacketEntityAPI.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:47 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:52 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IPacketEntityAPI (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>IPacketEntityAPI (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IPacketEntityAPI (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="IPacketEntityAPI (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:48 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:52 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface net.blitzcube.peapi.api.IPacketEntityAPI (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>Uses of Interface net.blitzcube.peapi.api.IPacketEntityAPI (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface net.blitzcube.peapi.api.IPacketEntityAPI (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="Uses of Interface net.blitzcube.peapi.api.IPacketEntityAPI (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:47 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:52 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IEntityIdentifier (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>IEntityIdentifier (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IEntityIdentifier (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="IEntityIdentifier (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:47 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:52 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface net.blitzcube.peapi.api.entity.IEntityIdentifier (PacketEntityAPI docs
v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface net.blitzcube.peapi.api.entity.IEntityIdentifier (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="Uses of Interface net.blitzcube.peapi.api.entity.IEntityIdentifier (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down Expand Up @@ -510,6 +510,16 @@ <h3>Uses of <a href="../../../../../../net/blitzcube/peapi/api/entity/IEntityIde
<div class="block">Removes a given entity identifier from the list.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><span class="typeNameLabel">IEntityPacket.</span><code><span
class="memberNameLink"><a
href="../../../../../../net/blitzcube/peapi/api/packet/IEntityPacket.html#setIdentifier-net.blitzcube.peapi.api.entity.IEntityIdentifier-">setIdentifier</a></span>(<a
href="../../../../../../net/blitzcube/peapi/api/entity/IEntityIdentifier.html"
title="interface in net.blitzcube.peapi.api.entity">IEntityIdentifier</a>&nbsp;identifier)</code>
<div class="block">Set the identifier that this packet is acting on.</div>
</td>
</tr>
</tbody>
</table>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:47 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:52 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IFakeEntity (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>IFakeEntity (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IFakeEntity (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="IFakeEntity (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:47 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:52 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IFakeEntityFactory (PacketEntityAPI docs v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
<title>IFakeEntityFactory (PacketEntityAPI docs v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IFakeEntityFactory (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="IFakeEntityFactory (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161) on Thu Jul 26 19:59:47 MDT 2018 -->
<!-- Generated by javadoc (1.8.0_161) on Sat Jul 28 11:21:52 MDT 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface net.blitzcube.peapi.api.entity.fake.IFakeEntity (PacketEntityAPI docs
v0.4.3-SNAPSHOT)</title>
<meta name="date" content="2018-07-26">
v0.5.0-SNAPSHOT)</title>
<meta name="date" content="2018-07-28">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface net.blitzcube.peapi.api.entity.fake.IFakeEntity (PacketEntityAPI docs v0.4.3-SNAPSHOT)";
parent.document.title="Uses of Interface net.blitzcube.peapi.api.entity.fake.IFakeEntity (PacketEntityAPI docs v0.5.0-SNAPSHOT)";
}
}
catch(err) {
Expand Down
Loading

0 comments on commit cbef89a

Please sign in to comment.