/*
 * This file is part of SpongeAPI, licensed under the MIT License (MIT).
 *
 * Copyright (c) SpongePowered <https://www.spongepowered.org>
 * Copyright (c) contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */
package org.spongepowered.api.event;

/**
 * Order that {@link Listener}d methods may be registered at.
 *
 * <p>Event handlers are called the order given in the following table.</p>
 *
 * <table summary="Order Recommendations">
 *     <tr><td>Order</td>       <td>Read Only</td> <td>Cancellation Allowed</td>
 *         <td>Recommendation</td></tr>
 *     <tr><td>PRE</td>         <td>YES</td>       <td>NO</td>
 *         <td>Initialisation and registration actions</td></tr>
 *     <tr><td>AFTER_PRE</td>   <td>YES</td>       <td>NO</td>
 *         <td>Immediate responses to actions in PRE</td></tr>
 *     <tr><td>FIRST</td>       <td>YES</td>       <td>YES</td>
 *         <td>
 *             Cancellation by protection plugins for informational purposes
 *         </td>
 *     </tr>
 *     <tr><td>EARLY</td>       <td>NO</td>        <td>YES</td>
 *         <td>Standard actions that should happen before other plugins react to
 *         the event</td>
 *     </tr>
 *     <tr><td>DEFAULT</td>     <td>NO</td>        <td>YES</td>
 *         <td>The default action order</td></tr>
 *     <tr><td>LATE</td>        <td>NO</td>        <td>YES</td>
 *         <td>Standard actions that should happen after other plugins react to
 *         the event</td>
 *     </tr>
 *     <tr><td>LAST</td>        <td>YES</td>       <td>YES</td>
 *         <td>Final cancellation by protection plugins</td></tr>
 *     <tr><td>BEFORE_POST</td> <td>YES</td>       <td>NO</td>
 *         <td>Actions that need to respond to cancelled events before POST</td>
 *     </tr>
 *     <tr><td>POST</td>        <td>YES</td>       <td>NO</td>
 *         <td>Actions that need to react to the final and stable effects of
 *         event</td>
 *     </tr>
 * </table>
 */
public enum Order {

    /**
     * The order point of PRE handles setting up things that need to be done
     * before other things are handled PRE is read only and cannot cancel the
     * events.
     */
    PRE,

    /**
     * The order point of AFTER_PRE handles things that need to be done after
     * PRE AFTER_PRE is read only and cannot cancel the events.
     */
    AFTER_PRE,

    /**
     * The order point of FIRST handles cancellation by protection plugins for
     * informational responses FIRST is read only but can cancel events.
     */
    FIRST,

    /**
     * The order point of EARLY handles standard actions that need to be done
     * before other plugins EARLY is not read only and can cancel events.
     */
    EARLY,

    /**
     * The order point of DEFAULT handles just standard event handlings, you
     * should use this unless you know you need otherwise DEFAULT is not read
     * only and can cancel events.
     */
    DEFAULT,

    /**
     * The order point of LATE handles standard actions that need to be done
     * after other plugins LATE is not read only and can cancel the event.
     */
    LATE,

    /**
     * The order point of LAST handles last minute cancellations by protection
     * plugins LAST is read only but can cancel events.
     */
    LAST,

    /**
     * The order point of BEFORE_POST handles preparation for things needing
     * to be done in post BEFORE_POST is read only and cannot cancel events.
     */
    BEFORE_POST,

    /**
     * The order point of POST handles last minute things and monitoring
     * of events for rollback or logging POST is read only and
     * cannot cancel events.
     */
    POST

}

@@ -1502,63 +1502,8 @@
 /td%3E
-       %3Ctd%3ERead Only%3C/td%3E %3Ctd%3ECancellation Allowed%3C/td%3E
 %0A * 
@@ -1566,47 +1566,8 @@
 /td%3E
-         %3Ctd%3EYES%3C/td%3E       %3Ctd%3ENO%3C/td%3E
 %0A * 
@@ -1661,41 +1661,8 @@
 /td%3E
-   %3Ctd%3EYES%3C/td%3E       %3Ctd%3ENO%3C/td%3E
 %0A * 
@@ -1750,46 +1750,8 @@
 /td%3E
-       %3Ctd%3EYES%3C/td%3E       %3Ctd%3EYES%3C/td%3E
 %0A * 
@@ -1899,46 +1899,8 @@
 /td%3E
-       %3Ctd%3ENO%3C/td%3E        %3Ctd%3EYES%3C/td%3E
 %0A * 
@@ -2047,44 +2047,8 @@
 /td%3E
-     %3Ctd%3ENO%3C/td%3E        %3Ctd%3EYES%3C/td%3E
 %0A * 
@@ -2122,47 +2122,8 @@
 /td%3E
-        %3Ctd%3ENO%3C/td%3E        %3Ctd%3EYES%3C/td%3E
 %0A * 
@@ -2266,47 +2266,8 @@
 /td%3E
-        %3Ctd%3EYES%3C/td%3E       %3Ctd%3EYES%3C/td%3E
 %0A * 
@@ -2364,39 +2364,8 @@
 /td%3E
- %3Ctd%3EYES%3C/td%3E       %3Ctd%3ENO%3C/td%3E
 %0A * 
@@ -2483,46 +2483,8 @@
 /td%3E
-        %3Ctd%3EYES%3C/td%3E       %3Ctd%3ENO%3C/td%3E
 %0A * 
@@ -2756,61 +2756,8 @@
 dled
- PRE is read only and cannot cancel the%0A     * events
 .%0A  
@@ -2872,60 +2872,8 @@
  PRE
- AFTER_PRE is read only and cannot cancel the events
 .%0A  
@@ -3015,49 +3015,8 @@
 nses
- FIRST is read only but can cancel events
 .%0A  
@@ -3150,53 +3150,8 @@
 gins
- EARLY is not read only and can cancel events
 .%0A  
@@ -3314,62 +3314,8 @@
 wise
- DEFAULT is not read%0A     * only and can cancel events
 .%0A  
@@ -3449,55 +3449,8 @@
 gins
- LATE is not read only and can cancel the event
 .%0A  
@@ -3571,48 +3571,8 @@
 gins
- LAST is read only but can cancel events
 .%0A  
@@ -3702,58 +3702,8 @@
 post
- BEFORE_POST is read only and cannot cancel events
 .%0A  
@@ -3851,58 +3851,8 @@
 ging
- POST is read only and%0A     * cannot cancel events
 .%0A  

Remove the concept of read-only orders (#2189)